uxn/examples/devconsole.usm

29 lines
595 B
Plaintext
Raw Normal View History

2021-02-20 18:00:34 -05:00
( hello world )
&Console { stdio 1 }
2021-02-20 18:00:34 -05:00
|0100 @RESET
,text1 ,print-label JSR ( print to console )
2021-02-20 18:00:34 -05:00
BRK
@print-label ( text )
2021-02-21 19:52:51 -05:00
2021-02-20 18:00:34 -05:00
@cliloop
DUP2 LDR =dev/console.stdio ( write pointer value to console )
2021-02-20 18:00:34 -05:00
#0001 ADD2 ( increment string pointer )
DUP2 LDR #00 NEQ ,cliloop ROT JMP? POP2 ( while *ptr!=0 goto loop )
POP2
2021-02-21 19:52:51 -05:00
RTS
2021-02-20 18:00:34 -05:00
@text1 [ Hello World ] <1 .00 ( add text to memory, return 1 byte, add null byte )
2021-02-20 18:00:34 -05:00
|c000 @FRAME
|d000 @ERROR
|FF00 ;dev/console Console
2021-02-20 18:00:34 -05:00
|FFF0 [ f3f0 f30b f30a ] ( palette )
|FFFA .RESET .FRAME .ERROR