uxn/projects/examples/dev.console.usm

33 lines
585 B
Plaintext
Raw Normal View History

2021-02-20 18:00:34 -05:00
( hello world )
2021-03-01 12:38:54 -05:00
&Console { pad 8 char 1 byte 1 short 2 }
2021-02-20 18:00:34 -05:00
|0100 @RESET
2021-03-10 22:41:46 -05:00
,text1 ,print-label JSR2
,text2 ,print-label JSR2
2021-03-11 15:19:59 -05:00
#ab =CNSL.byte
#cdef =CNSL.short
2021-02-20 18:00:34 -05:00
BRK
@print-label ( text )
2021-03-11 15:19:59 -05:00
@print-label-loop NOP
( send ) DUP2 LDR =CNSL.char
( incr ) #0001 ADD2
DUP2 LDR #00 NEQ ^print-label-loop MUL JMPS
POP2
2021-03-01 11:55:16 -05:00
RTS
2021-02-20 18:00:34 -05:00
2021-03-05 16:58:43 -05:00
@text1 [ Hello 20 World 0a00 ] ( store text with a linebreak and null byte )
@text2 [ Welcome 20 to 20 UxnVM 0a00 ]
2021-02-20 18:00:34 -05:00
|c000 @FRAME
|d000 @ERROR
2021-03-11 15:19:59 -05:00
|FF00 ;CNSL Console
|FFF0 .RESET .FRAME .ERROR ( vectors )
2021-02-28 23:52:41 -05:00
|FFF8 [ 13fd 1ef3 1bf2 ] ( palette )