0
0
Fork 0
mirror of https://git.sr.ht/~rabbits/uxn synced 2024-11-20 04:45:11 +00:00
uxn/examples/hello.usm
2021-02-13 19:19:13 -08:00

21 lines
564 B
Text

( 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