mirror of https://git.sr.ht/~rabbits/uxn
4 changed files with 55 additions and 21 deletions
@ -0,0 +1,48 @@
|
||||
( devices ) |
||||
|
||||
|00 @System [ &vector $2 &wst $1 &rst $1 &pad $4 &r $2 &g $2 &b $2 &debug $1 &halt $1 ] |
||||
|10 @Console [ &vector $2 &read $1 &pad $5 &write $1 &error $1 ] |
||||
|a0 @File [ &vector $2 &success $2 &offset-hs $2 &offset-ls $2 &name $2 &length $2 &load $2 &save $2 ] |
||||
|
||||
( vectors ) |
||||
|
||||
|0100 @reset |
||||
( |
||||
Set the log level for helping to debug stuff. |
||||
Its value is the bitwise OR of all the following output types: |
||||
#01 prints the number of lines in the source code, |
||||
#04 dumps all defined labels at end, and |
||||
#08 prints the heap usage. |
||||
) |
||||
#09 ;asma/log-level STA |
||||
|
||||
;asma-heap ;heap STA2 |
||||
|
||||
;on-input .Console/vector DEO2 |
||||
BRK |
||||
|
||||
@on-input ( -> ) |
||||
.Console/read DEI |
||||
DUP #0a EQU ,&newline JCN |
||||
;append-heap-byte JSR2 |
||||
BRK |
||||
|
||||
&newline ( 0a ) |
||||
DUP EOR ( 00 ) |
||||
;append-heap-byte JSR2 ( ) |
||||
|
||||
;asma-heap #0000 ;asma-assemble-file JSR2 |
||||
#01 .System/halt DEO |
||||
BRK |
||||
|
||||
include projects/library/asma.tal |
||||
|
||||
@asma-heap |
||||
|e000 &end |
||||
|
||||
@asma-read-buffer |
||||
|f800 &end |
||||
|
||||
@asma-write-buffer |
||||
|ffff &end |
||||
|
||||
Loading…
Reference in new issue