From 0291279f1a8a2d7a649ec9d14a8d5b3756b62755 Mon Sep 17 00:00:00 2001 From: Timerix Date: Thu, 27 Feb 2025 22:53:27 +0500 Subject: [PATCH] sdl3 --- README.md | 11 ++++++----- project.config | 3 ++- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 93f6baa..870a2be 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,8 @@ Machine code interpreter written in pure C. Can execute programs up to 1 MEGABYT ## Building 1. Install [cbuild](https://timerix.ddns.net:3322/Timerix/cbuild.git) -2. ```sh +2. Install [SDL3](https://github.com/libsdl-org/SDL) and [SDL3_image](https://github.com/libsdl-org/SDL_image) from package manager or source. +3. ```sh cbuild build_exec_dbg ``` @@ -25,10 +26,10 @@ Machine code interpreter written in pure C. Can execute programs up to 1 MEGABYT ### Registers | code | name | size (bits) | |------|------|-------------| -| 00 | ax | 32 | -| 01 | bx | 32 | -| 02 | cx | 32 | -| 03 | dx | 32 | +| 01 | ax | 32 | +| 02 | bx | 32 | +| 03 | cx | 32 | +| 04 | dx | 32 | ### System functions To call a system function you need to push values to registers and write `SYS` opcode. The return value of a function will will be avaliable in `ax` after call. diff --git a/project.config b/project.config index 3fd21bd..92324c9 100755 --- a/project.config +++ b/project.config @@ -32,12 +32,13 @@ case "$OS" in WINDOWS) EXEC_FILE="$PROJECT.exe" SHARED_LIB_FILE="$PROJECT.dll" - # example: "-I./" + LINKER_LIBS="-lSDL3_image -lSDL3" INCLUDE="" ;; LINUX) EXEC_FILE="$PROJECT" SHARED_LIB_FILE="$PROJECT.so" + LINKER_LIBS="-lSDL3_image -lSDL3" INCLUDE="" ;; *)