update README.md

This commit is contained in:
krolxon 2026-01-08 19:06:11 +05:30
parent 133f6f748d
commit 4667df1425
1 changed files with 17 additions and 13 deletions

View File

@ -8,16 +8,20 @@
## Supported Instructions ## Supported Instructions
| Instruction | Syntax (Reg-Reg) | Syntax (Reg-Imm) | | Instruction | Syntax |
| ----------- | ---------------- | ---------------- | | ----------- | ---------------- |
| MOV | mov dest, src | mov reg, imm | | MOV | mov dest, src OR mov reg, imm |
| ADD | add r1, r2 | add reg, imm | | ADD | add r1, r2 OR add reg, imm |
| SUB | sub r1, r2 | sub reg, imm | | SUB | sub r1, r2 OR sub reg, imm |
| JMP | jmp addr | jmp addr | | JMP | jmp addr OR jmp addr |
| JZ | jz addr | jz addr | | JZ | jz addr OR jz addr |
| JNZ | jnz addr | jnz addr | | JNZ | jnz addr OR jnz addr |
| CMP | cmp reg, reg | cmp reg, imp | | CMP | cmp r1, r2 OR cmp reg, imp |
| HLT (Halt) | hlt | hlt | | MUL | mul r1, r2 |
| DIV | div r1, r2 |
| CALL | call \<label\> |
| HLT (Halt) | hlt |
## Registers ## Registers
| Register | Size | Description | | Register | Size | Description |
@ -27,7 +31,7 @@
| C | 8-bit | General | | C | 8-bit | General |
| D | 8-bit | General | | D | 8-bit | General |
| PC | 16-bit | Program Counter | | PC | 16-bit | Program Counter |
| SP | 16-bit | Stack pointer (unused for now) | | SP | 16-bit | Stack pointer |
## Flags ## Flags
| Flag | Description | | Flag | Description |
@ -49,7 +53,7 @@ cargo run -- --f <examples/filename.asc>
- [x] CMP - [x] CMP
- [x] MUL - [x] MUL
- [x] DIV - [x] DIV
- [ ] CALL - [x] CALL
- [ ] RET - [x] RET
- [ ] Error handling - [ ] Error handling
- [ ] Build Debugger - [ ] Build Debugger