uxn/examples/hello.usm

33 lines
407 B
Plaintext
Raw Normal View History

2021-02-06 13:39:13 -05:00
( hello world )
;iterator
:dev1r FFF0
:dev1w FFF1
|0100 @RESET
@word1 "hello_word ( len: 0x0b )
@loop
,dev1w STR ( write to stdout )
2021-02-07 23:49:00 -05:00
,incr JSR ( increment itr )
,word1 ,strlen JSR ( get strlen )
NEQ ,loop ROT JSR? ( loop != strlen )
2021-02-06 13:39:13 -05:00
BRK
@strlen
2021-02-07 15:13:38 -05:00
,0001 ADD^ LDR
2021-02-07 23:49:00 -05:00
RTS
2021-02-06 13:39:13 -05:00
@incr
,iterator LDR
,01 ADD
,iterator STR
,iterator LDR
2021-02-07 23:49:00 -05:00
RTS
2021-02-06 13:39:13 -05:00
|c000 @FRAME BRK
|d000 @ERROR BRK
|FFFA .RESET .FRAME .ERROR