aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorkrolxon <krolyxon@tutanota.com>2026-01-05 12:12:57 +0530
committerkrolxon <krolyxon@tutanota.com>2026-01-05 12:12:57 +0530
commit8d479202b0c9dbe13bb95ad572a060b69642ec26 (patch)
tree5a8f8c015c47bef497e4a54808da667db857fbfd /README.md
parent2fb5bbaa8d97a390b3175026040709c762cb93ec (diff)
add labels, improve documentation, add step debug
Diffstat (limited to 'README.md')
-rw-r--r--README.md41
1 files changed, 34 insertions, 7 deletions
diff --git a/README.md b/README.md
index 48f85e9..6e6835d 100644
--- a/README.md
+++ b/README.md
@@ -1,13 +1,40 @@
# 8-Bit CPU Emulator
+## CPU Architecture
+- Word Size
+ - **Data Width:** 8 bits
+ - **Address width:** 16 bits
+ - **Address space:** 64 KB (0x0000- 0xFFFF)
+
## Supported Instructions
-1. MOV
-2. ADD
-3. SUB
-4. JMP (Jump)
-5. JZ (Jump if zero)
-5. JZ (Jump if not zero)
-6. HLT (Halt)
+
+| Instruction | Syntax |
+| ----------- | ------------ |
+| MOV | mov reg, imm |
+| ADD | add r1, r2 |
+| SUB | sub r1, r2 |
+| JMP | jmp addr |
+| JZ | jz addr |
+| JNZ | jnz addr |
+| HLT (Halt) | hlt |
+
+
+## Registers
+| Register | Size | Description |
+| -------- | ------ | ------------------------------ |
+| A | 8-bit | General |
+| B | 8-bit | General |
+| C | 8-bit | General |
+| D | 8-bit | General |
+| PC | 16-bit | Program Counter |
+| SP | 16-bit | Stack pointer (unused for now) |
+
+## Flags
+| Flag | Description |
+| ----- | ------------ |
+| Z | Zero Flag |
+| C | Carry/Borrow |
+
# Usage
```bash