uxn/examples/hello.usm

22 lines
564 B
Plaintext
Raw Normal View History

( comment )
2021-02-06 18:39:13 +00:00
2021-02-11 03:05:40 +00:00
:dev/w fff9 ( const write port )
2021-02-06 18:39:13 +00:00
|0100 @RESET
2021-02-06 18:39:13 +00:00
2021-02-14 03:19:13 +00:00
#00 ,dev/w STR ( set dev/write to console )
,string ( add string pointer to stack )
2021-02-11 03:05:40 +00:00
@loop
DUP2 LDR IOW ( write pointer value to console )
#0001 ADD2 ( increment string pointer )
DUP2 LDR #00 NEQ ,loop ROT JMP? POP2 ( while *ptr!=0 goto loop )
2021-02-06 18:39:13 +00:00
2021-02-11 03:05:40 +00:00
BRK
2021-02-06 18:39:13 +00:00
2021-02-14 03:19:13 +00:00
@string " Hello World " ( add string to memory )
2021-02-06 18:39:13 +00:00
|c000 @FRAME BRK
2021-02-06 18:39:13 +00:00
|d000 @ERROR BRK
2021-02-06 18:39:13 +00:00
|FFFA .RESET .FRAME .ERROR