2021-10-07 21:00:54 +00:00
|
|
|
( devices )
|
|
|
|
|
2021-11-05 21:32:45 +00:00
|
|
|
|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 ]
|
2021-10-07 21:00:54 +00:00
|
|
|
|
|
|
|
( 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
|
2023-06-05 18:06:13 +00:00
|
|
|
#80 .System/halt DEO
|
2021-10-07 21:00:54 +00:00
|
|
|
BRK
|
|
|
|
|
2021-11-17 22:06:00 +00:00
|
|
|
~projects/library/asma.tal
|
2021-10-07 21:00:54 +00:00
|
|
|
|
|
|
|
@asma-heap
|
|
|
|
|e000 &end
|
|
|
|
|
|
|
|
@asma-read-buffer
|
|
|
|
|f800 &end
|
|
|
|
|
|
|
|
@asma-write-buffer
|
|
|
|
|ffff &end
|
|
|
|
|