2021-03-30 12:28:11 -04:00
|
|
|
( a blank file )
|
|
|
|
|
2021-12-11 17:28:10 -05:00
|
|
|
%+ { ADD } %- { SUB } %* { MUL } %/ { DIV }
|
|
|
|
%< { LTH } %> { GTH } %= { EQU } %! { NEQ }
|
|
|
|
%++ { ADD2 } %-- { SUB2 } %** { MUL2 } %// { DIV2 }
|
|
|
|
%<< { LTH2 } %>> { GTH2 } %== { EQU2 } %!! { NEQ2 }
|
|
|
|
|
|
|
|
%2* { #10 SFT } %2/ { #01 SFT } %2** { #10 SFT2 } %2// { #01 SFT2 }
|
|
|
|
%4* { #20 SFT } %4/ { #02 SFT } %4** { #20 SFT2 } %4// { #02 SFT2 }
|
|
|
|
%8* { #30 SFT } %8/ { #03 SFT } %8** { #30 SFT2 } %8// { #03 SFT2 }
|
|
|
|
%10* { #40 SFT } %10/ { #04 SFT } %10** { #40 SFT2 } %10// { #04 SFT2 }
|
|
|
|
%20* { #50 SFT } %20/ { #05 SFT } %20** { #50 SFT2 } %20// { #05 SFT2 }
|
|
|
|
|
|
|
|
%2MOD { #01 AND } %2MOD2 { #0001 AND2 }
|
|
|
|
%4MOD { #03 AND } %4MOD2 { #0003 AND2 }
|
|
|
|
%8MOD { #07 AND } %8MOD2 { #0007 AND2 }
|
|
|
|
%10MOD { #0f AND } %10MOD2 { #000f AND2 }
|
|
|
|
|
|
|
|
%DEBUG { ;print-hex/byte JSR2 #0a18 DEO }
|
|
|
|
%DEBUG2 { ;print-hex JSR2 #0a18 DEO }
|
|
|
|
%RTN { JMP2r }
|
2021-05-05 23:16:27 -04:00
|
|
|
|
2021-03-30 12:28:11 -04:00
|
|
|
( devices )
|
|
|
|
|
2021-07-29 18:30:21 -04:00
|
|
|
|00 @System [ &vector $2 &wst $1 &rst $1 &pad $4 &r $2 &g $2 &b $2 &debug $1 &halt $1 ]
|
2021-07-11 12:51:11 -04:00
|
|
|
|10 @Console [ &vector $2 &read $1 &pad $5 &write $1 &error $1 ]
|
2021-07-31 16:58:33 -04:00
|
|
|
|20 @Screen [ &vector $2 &width $2 &height $2 &pad $2 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1 ]
|
2021-07-29 18:31:09 -04:00
|
|
|
|30 @Audio0 [ &vector $2 &position $2 &output $1 &pad $3 &adsr $2 &length $2 &addr $2 &volume $1 &pitch $1 ]
|
|
|
|
|40 @Audio1 [ &vector $2 &position $2 &output $1 &pad $3 &adsr $2 &length $2 &addr $2 &volume $1 &pitch $1 ]
|
|
|
|
|50 @Audio2 [ &vector $2 &position $2 &output $1 &pad $3 &adsr $2 &length $2 &addr $2 &volume $1 &pitch $1 ]
|
|
|
|
|60 @Audio3 [ &vector $2 &position $2 &output $1 &pad $3 &adsr $2 &length $2 &addr $2 &volume $1 &pitch $1 ]
|
2021-04-26 13:52:46 -04:00
|
|
|
|80 @Controller [ &vector $2 &button $1 &key $1 ]
|
2021-07-29 18:31:09 -04:00
|
|
|
|90 @Mouse [ &vector $2 &x $2 &y $2 &state $1 &wheel $1 ]
|
2021-11-07 14:10:30 -05:00
|
|
|
|a0 @File [ &vector $2 &success $2 &stat $2 &delete $1 &append $1 &name $2 &length $2 &read $2 &write $2 ]
|
2021-07-29 18:31:09 -04:00
|
|
|
|b0 @DateTime [ &year $2 &month $1 &day $1 &hour $1 &minute $1 &second $1 &dotw $1 &doty $2 &isdst $1 ]
|
2021-04-21 16:13:39 -04:00
|
|
|
|
|
|
|
( variables )
|
|
|
|
|
|
|
|
|0000
|
|
|
|
|
|
|
|
( program )
|
|
|
|
|
|
|
|
|0100 ( -> )
|
2021-03-30 12:28:11 -04:00
|
|
|
|
2021-07-03 23:24:36 -04:00
|
|
|
( theme )
|
|
|
|
#0fe5 .System/r DEO2
|
|
|
|
#0fc5 .System/g DEO2
|
|
|
|
#0f25 .System/b DEO2
|
|
|
|
|
2021-12-11 17:28:10 -05:00
|
|
|
BRK
|
2021-07-03 23:24:36 -04:00
|
|
|
|
2021-12-11 17:28:10 -05:00
|
|
|
@print-hex ( value* -- )
|
|
|
|
|
|
|
|
SWP ,&byte JSR
|
|
|
|
&byte ( byte -- )
|
|
|
|
STHk #04 SFT ,&parse JSR #18 DEO
|
|
|
|
STHr #0f AND ,&parse JSR #18 DEO
|
|
|
|
RTN
|
|
|
|
&parse ( byte -- char ) DUP #09 GTH ,&above JCN #30 + RTN
|
|
|
|
&above #57 + RTN
|
2021-07-03 23:24:36 -04:00
|
|
|
|
2021-12-11 17:28:10 -05:00
|
|
|
RTN
|
2021-07-03 23:24:36 -04:00
|
|
|
|
2021-12-11 17:28:10 -05:00
|
|
|
@print-dec ( value* -- )
|
2021-07-03 23:24:36 -04:00
|
|
|
|
2021-12-11 17:28:10 -05:00
|
|
|
#2710 DIV2k DUP #30 ADD #18 DEO MUL2 SUB2
|
|
|
|
#03e8 DIV2k DUP #30 ADD #18 DEO MUL2 SUB2
|
|
|
|
#0064 DIV2k DUP #30 ADD #18 DEO MUL2 SUB2
|
|
|
|
#000a DIV2k DUP #30 ADD #18 DEO MUL2 SUB2
|
|
|
|
#30 ADD #18 DEO POP
|
2021-07-03 23:24:36 -04:00
|
|
|
|
|
|
|
RTN
|
|
|
|
|
2021-12-11 17:28:10 -05:00
|
|
|
@print-str ( string* -- )
|
|
|
|
|
2021-12-11 17:31:14 -05:00
|
|
|
#0001 --
|
2021-12-11 17:28:10 -05:00
|
|
|
&while
|
|
|
|
INC2 LDAk DUP #18 DEO ,&while JCN
|
|
|
|
POP2
|
2021-04-22 22:57:47 -04:00
|
|
|
|
2021-07-03 23:24:36 -04:00
|
|
|
RTN
|