0
0
Fork 0
mirror of https://git.sr.ht/~rabbits/uxn synced 2024-11-08 07:15:04 +00:00
uxn/examples/devconsole.usm
2021-02-23 13:49:36 -08:00

28 lines
No EOL
621 B
Text

( hello world )
:dev/w fff9 ( const write port )
|0100 @RESET
#00 =dev/w ( set dev/write to console )
,text1 ,print-label JSR ( print to console )
BRK
@print-label ( text )
@cliloop
DUP2 LDR IOW ( write pointer value to console )
#0001 ADD2 ( increment string pointer )
DUP2 LDR #00 NEQ ,cliloop ROT JMP? POP2 ( while *ptr!=0 goto loop )
POP2
RTS
@text1 [ Hello World ] <1 .00 ( add text to memory, return 1 byte, add null byte )
|c000 @FRAME
|d000 @ERROR
|FFF0 [ f3f0 f30b f30a ] ( palette )
|FFFA .RESET .FRAME .ERROR