20 lines
772 B
Plaintext
20 lines
772 B
Plaintext
set 72 0 1 ; fill in the data bytes from 1 to 10
|
|
set 101 0 2
|
|
set 108 0 3
|
|
set 108 0 4
|
|
set 111 0 5
|
|
set 114 0 6
|
|
set 108 0 7
|
|
set 100 0 8
|
|
set 33 0 9
|
|
set 10 0 10 ; end the string with an LF character for newline
|
|
set 1 0 50 ; set the constant 1 to memory loc 50
|
|
set 1 0 10 ; set the first address to 1 at loc 10
|
|
set 10 0 11 ; set the counter variable to 10 at loc 11
|
|
:lp set 12 0 12 ; prepare the loc 12 with its own address
|
|
cpy 2 10 12 ; load the contents of the current address at loc 10 into loc 12
|
|
out 12 12 1 ; output the character at the current address to port 1
|
|
sub 11 50 11 ; decrement the counter at loc 11
|
|
fma 50 50 10 ; increment the current address at loc 10
|
|
jmp 1 11 :lp ; jump to the loop start if the counter is over zero
|