diff options
| -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 |
