mirror of https://git.sr.ht/~rabbits/drifblim
The bicycle now includes a few device prefabs
This commit is contained in:
parent
ae26ed3861
commit
f76f639f76
|
@ -1,8 +1,8 @@
|
|||
@program
|
||||
|0100 @program
|
||||
|
||||
;hello-word
|
||||
&while
|
||||
( send ) LDAk #18 DEO
|
||||
( send ) LDAk .Console/write DEO
|
||||
( loop ) INC2 LDAk ,&while JCN
|
||||
POP2
|
||||
|
||||
|
|
|
@ -1,12 +1,22 @@
|
|||
|20 @Screen &vector $2 &width $2 &height $2 &auto $1 &pad $1 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1
|
||||
|90 @Mouse &vector $2 &x $2 &y $2 &state $1 &chord $1
|
||||
|0100 ;on-mouse .Mouse/vector DEO2 BRK
|
||||
#4f5f .System/r DEO2
|
||||
#6fcc .System/g DEO2
|
||||
#6fad .System/b DEO2
|
||||
|
||||
;sprite .Screen/addr DEO2
|
||||
#0182 #0105
|
||||
&ver
|
||||
DUP2 .Screen/y DEO2
|
||||
#0227 #0184
|
||||
&hor
|
||||
DUP2 .Screen/x DEO2
|
||||
#41 .Screen/sprite DEO
|
||||
#0008 ADD2 GTH2k ,&hor JCN
|
||||
POP2 POP2
|
||||
#0008 ADD2 GTH2k ,&ver JCN
|
||||
POP2 POP2
|
||||
|
||||
,end JMP
|
||||
|
||||
@on-mouse ( -> )
|
||||
#00 .Screen/auto DEO
|
||||
.Mouse/x DEI2 .Screen/x DEO2
|
||||
.Mouse/y DEI2 .Screen/y DEO2
|
||||
;sprite .Screen/addr DEO2
|
||||
#0a4f .Mouse/state DEI #00 NEQ JMP SWP POP .Screen/sprite DEO
|
||||
BRK
|
||||
@sprite 0000 183c 3c18 0000
|
||||
|
||||
@end
|
||||
|
|
|
@ -20,9 +20,9 @@
|
|||
|0100 ( -> )
|
||||
|
||||
( theme )
|
||||
#0f5f .System/r DEO2
|
||||
#0fcd .System/g DEO2
|
||||
#0fa3 .System/b DEO2
|
||||
#4f5f .System/r DEO2
|
||||
#6fcc .System/g DEO2
|
||||
#6fad .System/b DEO2
|
||||
( resize )
|
||||
#0300 .Screen/width DEO2
|
||||
#0200 .Screen/height DEO2
|
||||
|
@ -37,7 +37,7 @@
|
|||
;redraw JSR2
|
||||
|
||||
BRK
|
||||
&hello-txt "etc/hello.tal $1
|
||||
&hello-txt "etc/paint.tal $1
|
||||
|
||||
@on-button ( -> )
|
||||
|
||||
|
@ -67,7 +67,7 @@ BRK
|
|||
&tab ( char -> ) POP #09 ,&append JMP
|
||||
&linebreak ( char -> ) POP #0a
|
||||
&append ( char -> ) ;insert JSR2 BRK
|
||||
&erase ( char -> ) ;erase JSR2 BRK
|
||||
&erase ( char -> ) POP ;erase JSR2 BRK
|
||||
|
||||
( controls )
|
||||
|
||||
|
@ -132,6 +132,7 @@ JMP2r
|
|||
@do-eval ( -- )
|
||||
|
||||
#010e DEO
|
||||
#00 .Screen/auto DEO
|
||||
|
||||
( time to evaluate program )
|
||||
;on-complete .Screen/vector DEO2
|
||||
|
@ -323,6 +324,8 @@ JMP2r
|
|||
;syms .sym/ptr LDZ2 ;mclr JSR2
|
||||
;refs .ref/ptr LDZ2 ;mclr JSR2
|
||||
;dst .p/len LDZ2 #0100 SUB2 ;mclr JSR2
|
||||
( load prefabs )
|
||||
;syms/prefabs ;syms SUB2 .sym/ptr STZ2
|
||||
( begin )
|
||||
#0100 .p/ptr STZ2
|
||||
;src
|
||||
|
@ -803,7 +806,21 @@ JMP2r
|
|||
|
||||
( buffers )
|
||||
|
||||
@syms $4000 ( addr* name* )
|
||||
@syms
|
||||
|
||||
0008 "System/r $1
|
||||
000a "System/g $1
|
||||
000c "System/b $1
|
||||
0018 "Console/write $1
|
||||
0026 "Screen/auto $1
|
||||
0028 "Screen/x $1
|
||||
002a "Screen/y $1
|
||||
002c "Screen/addr $1
|
||||
002e "Screen/pixel $1
|
||||
002f "Screen/sprite $1
|
||||
&prefabs
|
||||
|
||||
$4000 ( addr* name* )
|
||||
@refs $4000 ( addr* name* )
|
||||
|
||||
@src $1000
|
||||
|
|
Loading…
Reference in New Issue