Examples
This commit is contained in:
parent
a8dea7b3db
commit
861820aa49
7
examples/add1.asm
Normal file
7
examples/add1.asm
Normal file
@ -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
|
5
examples/double.asm
Normal file
5
examples/double.asm
Normal file
@ -0,0 +1,5 @@
|
||||
; Endlessly doubles A by adding itself to itself.
|
||||
lda 1
|
||||
add b
|
||||
ldb a
|
||||
jpr loop
|
Loading…
x
Reference in New Issue
Block a user