0
0
Fork 0
mirror of https://git.sr.ht/~rabbits/uxn synced 2024-11-12 17:25:05 +00:00
uxn/projects/tests/loop.usm
2021-03-14 13:30:17 -07:00

46 lines
No EOL
601 B
Text

( Loop )
;a { byte 1 } ;b { byte 1 } ;c { byte 1 }
|0100 @RESET
,type1 JSR2
,type2 JSR2
,type3 JSR2
BRK
@type1 ( type: padded muljmp )
$loop NOP
~a #01 ADD =a
~a #d0 LTH ^$loop MUL JMPS
~a =Console.byte
RTS
@type2 ( type: jmppop )
$loop
~b #01 ADD =b
,$loop ~b #d0 LTH JMP2? POP2
~b =Console.byte
RTS
@type3 ( type: padded jmppop )
$loop NOP
~c #01 ADD =c
~c #d0 LTH ^$loop SWP JMPS? POP
~c =Console.byte
RTS
|c000 @FRAME
|d000 @ERROR
|FF00 ;Console { pad 8 char 1 byte 1 short 2 }
|FFF0 .RESET .FRAME .ERROR ( vectors )
|FFF8 [ 13fd 1ef3 1bf2 ] ( palette )