0
0
Fork 0
mirror of https://git.sr.ht/~rabbits/uxn synced 2024-11-08 23:35:05 +00:00
uxn/examples/hello.usm
2021-02-10 11:59:26 -08:00

30 lines
379 B
Text

( hello world )
;iterator
|0100 @RESET
@word1 "hello_world ( len: 0x0b )
@loop
IOW ( write to device#0 )
,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