diff options
| author | krolxon <krolyxon@tutanota.com> | 2026-01-05 00:11:08 +0530 |
|---|---|---|
| committer | krolxon <krolyxon@tutanota.com> | 2026-01-05 00:11:08 +0530 |
| commit | 2fb5bbaa8d97a390b3175026040709c762cb93ec (patch) | |
| tree | c26823da26358d0b67ccd78905b0c43a43ce9da1 | |
| parent | 49e6897d7938169d5d16cc6a40e555c8a5ba0242 (diff) | |
add examples
| -rw-r--r-- | README.md | 4 | ||||
| -rw-r--r-- | examples/addition.asm | 4 | ||||
| -rw-r--r-- | examples/subtraction.asm | 4 | ||||
| -rw-r--r-- | program.asm | 10 |
4 files changed, 10 insertions, 12 deletions
@@ -1,6 +1,6 @@ # 8-Bit CPU Emulator -## Added instructions +## Supported Instructions 1. MOV 2. ADD 3. SUB @@ -11,7 +11,7 @@ # Usage ```bash -cargo run -- --f <filename.asc> +cargo run -- --f <examples/filename.asc> ``` ## Todo diff --git a/examples/addition.asm b/examples/addition.asm new file mode 100644 index 0000000..09ecba8 --- /dev/null +++ b/examples/addition.asm @@ -0,0 +1,4 @@ +mov a, 10 +mov b, 5 +add a, b +hlt diff --git a/examples/subtraction.asm b/examples/subtraction.asm new file mode 100644 index 0000000..cfc9db5 --- /dev/null +++ b/examples/subtraction.asm @@ -0,0 +1,4 @@ +mov a, 15 +mov b, 15 +sub a, b +hlt diff --git a/program.asm b/program.asm deleted file mode 100644 index 74bebdd..0000000 --- a/program.asm +++ /dev/null @@ -1,10 +0,0 @@ -; add -mov a, 10 -mov b, 5 -add a, b - -; sub -mov a, 15 -mov b, 15 -sub a, b -hlt |
