Files
damn_simple_architecture/resources/dsa/print.dsa
T
2025-06-17 23:50:16 +01:00

29 lines
471 B
Plaintext

dw stack: 0x10000
dw screen: 0x20000
db string: "Dominos sucks!"
db string2: 0, 1, 2, 3, 4, 5, 6
db length: 14
init:
ldw stack, bpr
mov bpr, spr
start:
ldb length, rg0
lwi rg1, string
lwi rg2, display
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