diff --git a/examples/add1.asm b/examples/add1.asm new file mode 100644 index 0000000..512dd70 --- /dev/null +++ b/examples/add1.asm @@ -0,0 +1,7 @@ +; This program adds 1 to register A until it equals 64, then halts. +ldb 1 +loop: +add b +cmp 64 +jnz loop +hlt \ No newline at end of file diff --git a/examples/double.asm b/examples/double.asm new file mode 100644 index 0000000..40782cd --- /dev/null +++ b/examples/double.asm @@ -0,0 +1,5 @@ +; Endlessly doubles A by adding itself to itself. +lda 1 +add b +ldb a +jpr loop \ No newline at end of file