This commit is contained in:
Timerix 2025-02-27 22:53:27 +05:00
parent c2bd5922ff
commit 0291279f1a
2 changed files with 8 additions and 6 deletions

View File

@ -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.

View File

@ -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=""
;;
*)