From 467ec78e894c8184144bfac039dc7d780abbd050 Mon Sep 17 00:00:00 2001 From: krolxon Date: Thu, 8 Jan 2026 19:21:43 +0530 Subject: add SYS instruction --- README.md | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 717351e..af5513c 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,7 @@ | MUL | mul r1, r2 | | DIV | div r1, r2 | | CALL | call \ | +| SYS | sys \ | | HLT (Halt) | hlt | @@ -33,6 +34,7 @@ | PC | 16-bit | Program Counter | | SP | 16-bit | Stack pointer | + ## Flags | Flag | Description | | ----- | ------------ | @@ -40,6 +42,14 @@ | C | Carry/Borrow | +## Syscalls +| Imm | Meaning | +| --- | ------- | +| 0 | Exit Program | +| 1 | Print register A as integer | +| 2 | Print register A as ASCII char | + + # Usage ```bash cargo run -- --f @@ -49,11 +59,12 @@ cargo run -- --f - [x] Assembler - [x] Lexer/Tokenizer - [x] Add label support (supporting JMP/JZ/JNZ) -- [ ] Add instructions +- [x] Add instructions - [x] CMP - [x] MUL - [x] DIV - [x] CALL - [x] RET -- [ ] Error handling -- [ ] Build Debugger + - [x] SYS +- [ ] Better Error handling +- [ ] TUI Debugger -- cgit v1.2.3