uxn/projects/examples/dev.console.usm

28 lines
332 B
Plaintext

( Dev/Console )
%RTN { JMP2r }
( program )
|0100
;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 ]
( devices )
|ff10 @Console [ &pad $8 &char $1 ]