uxn/projects/examples/dev.console.usm

28 lines
334 B
Plaintext

( dev/console )
%RTN { JMP2r }
( devices )
|10 @Console [ &pad $8 &char $1 ]
( init )
|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 ]