uxn/projects/examples/dev.console.usm

28 lines
332 B
Plaintext

( Dev/Console )
%RTN { JMP2r }
( devices )
|0110 @Console [ &pad $8 &char $1 ]
( program )
|0200
;hello-word ;print JSR2
BRK
@print ( addr -- )
&loop
( send ) DUP2 PEK2 .Console/char IOW
( incr ) #0001 ADD2
( loop ) DUP2 PEK2 #00 NEQ ,&loop JNZ
POP2
RTN
@hello-word [ 48 65 6c 6c 6f 20 57 6f 72 6c 64 21 ]