optimized hellorld
This commit is contained in:
@@ -8,12 +8,4 @@ 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
|
||||
out 1 10 1 ; output the range as ASCII to port 1
|
||||
|
||||
Reference in New Issue
Block a user