0
0
Fork 0
mirror of https://git.sr.ht/~rabbits/uxn synced 2024-11-08 07:15:04 +00:00
uxn/examples/hello.usm

33 lines
406 B
Text
Raw Normal View History

2021-02-06 18:39:13 +00:00
( hello world )
;iterator
:dev1r FFF0
:dev1w FFF1
|0100 @RESET
@word1 "hello_word ( len: 0x0b )
@loop
,dev1w STR ( write to stdout )
,incr JSU ( increment itr )
,word1 ,strlen JSU ( get strlen )
NEQ ,loop ROT JSC ( loop != strlen )
BRK
@strlen
,0001 ADD^ PEK
2021-02-07 18:21:41 +00:00
RTU
2021-02-06 18:39:13 +00:00
@incr
,iterator LDR
,01 ADD
,iterator STR
,iterator LDR
2021-02-07 18:21:41 +00:00
RTU
2021-02-06 18:39:13 +00:00
|c000 @FRAME BRK
|d000 @ERROR BRK
|FFFA .RESET .FRAME .ERROR