uxn/projects/examples/devices/console.usm

27 lines
301 B
Plaintext

( dev/console )
%RTN { JMP2r }
( devices )
|10 @Console [ &pad $8 &char $1 ]
( init )
|0100 ( -> )
;hello-word ,print JSR
BRK
@print ( addr* -- )
&loop
( send ) LDAk .Console/char DEO
( incr ) #0001 ADD2
( loop ) LDAk #00 NEQ ,&loop JCN
POP2
RTN
@hello-word "hello 20 "World!