From 2fb5bbaa8d97a390b3175026040709c762cb93ec Mon Sep 17 00:00:00 2001 From: krolxon Date: Mon, 5 Jan 2026 00:11:08 +0530 Subject: [PATCH] add examples --- README.md | 4 ++-- examples/addition.asm | 4 ++++ examples/subtraction.asm | 4 ++++ program.asm | 10 ---------- 4 files changed, 10 insertions(+), 12 deletions(-) create mode 100644 examples/addition.asm create mode 100644 examples/subtraction.asm delete mode 100644 program.asm diff --git a/README.md b/README.md index e3ffea8..48f85e9 100644 --- a/README.md +++ b/README.md @@ -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 +cargo run -- --f ``` ## 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