mirror of
https://git.sr.ht/~rabbits/uxn
synced 2024-11-08 07:15:04 +00:00
32 lines
407 B
Text
32 lines
407 B
Text
( hello world )
|
|
|
|
;iterator
|
|
:dev1r FFF0
|
|
:dev1w FFF1
|
|
|
|
|0100 @RESET
|
|
|
|
@word1 "hello_word ( len: 0x0b )
|
|
|
|
@loop
|
|
,dev1w STR ( write to stdout )
|
|
,incr JSR ( increment itr )
|
|
,word1 ,strlen JSR ( get strlen )
|
|
NEQ ,loop ROT JSR? ( loop != strlen )
|
|
|
|
BRK
|
|
|
|
@strlen
|
|
,0001 ADD^ LDR
|
|
RTS
|
|
|
|
@incr
|
|
,iterator LDR
|
|
,01 ADD
|
|
,iterator STR
|
|
,iterator LDR
|
|
RTS
|
|
|
|
|c000 @FRAME BRK
|
|
|d000 @ERROR BRK
|
|
|FFFA .RESET .FRAME .ERROR
|