uxn/projects/tests/loop.usm

46 lines
601 B
Plaintext

( 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 )