uxn/examples/hello.usm

22 lines
564 B
Plaintext

( comment )
:dev/w fff9 ( const write port )
|0100 @RESET
#00 ,dev/w STR ( set dev/write to console )
,string ( add string pointer to stack )
@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 )
BRK
@string " Hello World " ( add string to memory )
|c000 @FRAME BRK
|d000 @ERROR BRK
|FFFA .RESET .FRAME .ERROR