uxn/projects/examples/dev.console.usm

37 lines
508 B
Plaintext
Raw Normal View History

2021-02-20 18:00:34 -05:00
( hello world )
2021-03-16 00:29:44 -04:00
%RTN { JMP2r }
2021-03-21 17:16:19 -04:00
( devices )
|0100 ;Console { pad 8 char 1 byte 1 short 2 }
2021-03-28 14:20:36 -04:00
|0200 ,RESET JMP2
|0204 ,ERROR JMP2
|0208 ,FRAME JMP2
2021-03-21 17:16:19 -04:00
( program )
2021-03-28 14:20:36 -04:00
@RESET
2021-02-20 18:00:34 -05:00
2021-03-11 18:47:28 -05:00
,text1 ,print-label JSR2
,text2 ,print-label JSR2
2021-03-13 20:34:08 -05:00
#ab =Console.byte
#cdef =Console.short
2021-02-20 18:00:34 -05:00
BRK
@print-label ( text )
2021-03-11 15:19:59 -05:00
$loop
2021-03-24 12:39:19 -04:00
( send ) DUP2 PEK2 =Console.char
2021-03-11 15:19:59 -05:00
( incr ) #0001 ADD2
( loop ) DUP2 PEK2 #00 NEQ ^$loop JNZ
POP2
2021-03-01 11:55:16 -05:00
2021-03-14 17:26:17 -04:00
RTN
2021-02-20 18:00:34 -05:00
2021-03-11 17:00:32 -05:00
@text1 [ Welcome 20 to 20 UxnVM 0a00 ]
@text2 [ Hello 20 World 0a00 ]
2021-02-20 18:00:34 -05:00
2021-03-22 15:33:15 -04:00
@FRAME BRK
@ERROR BRK