Files
damn_simple_architecture/resources/dsa/print.dsa
T
2025-06-15 03:05:41 +01:00

34 lines
479 B
Plaintext

db stack: 0x10000
db screen: 0x20000
db string: "Dominos sucks!"
db length: 14
cll init
cll start
hlt
init:
ldw stack, bpr
mov bpr, spr
ret
start:
ldb length, rg0
lwi string, rg1
lwi display, rg2
loop:
// read from string and write to display
ldb rg1, rg3, rg4
stb rg3, rg1, rg4
// increment the offset & decrement the loop counter
inc rg4
dec rg0
// if loop counter <= 0 return.
cmp rg0, zero,
jgt loop
ret