0
0
Fork 0
mirror of https://git.sr.ht/~rabbits/uxn synced 2024-11-30 09:43:02 +00:00
uxn/projects/software/asma.tal

54 lines
1.1 KiB
Tal
Raw Normal View History

( 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 ]
2021-11-07 19:10:30 +00:00
|a0 @File [ &vector $2 &success $2 &stat $2 &delete $1 &append $1 &name $2 &length $2 &read $2 &write $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 ( )
2021-11-19 00:20:36 +00:00
,&output-file LDR2 ORA ,&run JCN
2021-10-13 21:58:17 +00:00
;heap LDA2 ,&output-file STR2
BRK
&run
;asma-heap LIT2 &output-file $2 ;asma-assemble-file JSR2
#80 .System/halt DEO
BRK
~projects/library/asma.tal
@asma-heap
|e000 &end
@asma-read-buffer
|f800 &end
@asma-write-buffer
|ffff &end