Faster file loading
This commit is contained in:
parent
7924b340c2
commit
73cf6df2dd
|
@ -2,7 +2,7 @@
|
||||||
|20 @Screen &vector $2 &width $2 &height $2 &auto $1 &pad $1 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1
|
|20 @Screen &vector $2 &width $2 &height $2 &auto $1 &pad $1 &x $2 &y $2 &addr $2 &pixel $1 &sprite $1
|
||||||
|80 @Controller &vector $2 &button $1 &key $1
|
|80 @Controller &vector $2 &button $1 &key $1
|
||||||
|90 @Mouse &vector $2 &x $2 &y $2 &state $1 &chord $1
|
|90 @Mouse &vector $2 &x $2 &y $2 &state $1 &chord $1
|
||||||
|a0 @File &vector $2 &success $2 &stat $2 &delete $1 &append $1 &name $2 &length $2 &read $2 &write $2
|
|a0 @File &vector $2 &success $1 &success-lb $1 &stat $2 &delete $1 &append $1 &name $2 &length $2 &read $2 &write $2
|
||||||
|
|
||||||
|000
|
|000
|
||||||
|
|
||||||
|
@ -154,9 +154,7 @@ BRK
|
||||||
|
|
||||||
[ LIT2 &last $1 &f $1 ] INCk ,&f STR
|
[ LIT2 &last $1 &f $1 ] INCk ,&f STR
|
||||||
#05 SFT DUP ,&last STR
|
#05 SFT DUP ,&last STR
|
||||||
EQU ?&unchanged
|
EQU ?{ draw-note }
|
||||||
draw-note
|
|
||||||
&unchanged
|
|
||||||
|
|
||||||
BRK
|
BRK
|
||||||
|
|
||||||
|
@ -165,7 +163,7 @@ BRK
|
||||||
|
|
||||||
@insert ( char -- )
|
@insert ( char -- )
|
||||||
|
|
||||||
get-from scap get-page #1000 ADD2 LTH2 ?&has-space
|
get-from scap/ get-page #1000 ADD2 LTH2 ?&has-space
|
||||||
POP JMP2r
|
POP JMP2r
|
||||||
&has-space
|
&has-space
|
||||||
|
|
||||||
|
@ -221,7 +219,7 @@ BRK
|
||||||
|
|
||||||
get-page
|
get-page
|
||||||
|
|
||||||
!scap
|
!scap/
|
||||||
|
|
||||||
@cut-char ( addr* -- )
|
@cut-char ( addr* -- )
|
||||||
|
|
||||||
|
@ -271,7 +269,7 @@ BRK
|
||||||
|
|
||||||
get-page
|
get-page
|
||||||
DUP2 .selection/a STZ2
|
DUP2 .selection/a STZ2
|
||||||
scap #0001 SUB2 .selection/b STZ2
|
scap/ #0001 SUB2 .selection/b STZ2
|
||||||
|
|
||||||
( >> )
|
( >> )
|
||||||
|
|
||||||
|
@ -373,7 +371,7 @@ JMP2r
|
||||||
[ LIT2r 0000 ]
|
[ LIT2r 0000 ]
|
||||||
&s
|
&s
|
||||||
;&b .File/read DEO2
|
;&b .File/read DEO2
|
||||||
.File/success DEI2 #0000 EQU2 ?&eof
|
[ LIT2 00 -File/success-lb ] DEI EQU ?&eof
|
||||||
INC2r !&s &eof
|
INC2r !&s &eof
|
||||||
STH2r
|
STH2r
|
||||||
|
|
||||||
|
@ -447,7 +445,7 @@ JMP2r
|
||||||
@change-page ( id -- )
|
@change-page ( id -- )
|
||||||
|
|
||||||
.page STZ
|
.page STZ
|
||||||
get-page scap #0001 SUB2
|
get-page scap/ #0001 SUB2
|
||||||
|
|
||||||
!select-from
|
!select-from
|
||||||
|
|
||||||
|
@ -530,6 +528,7 @@ JMP2r
|
||||||
|
|
||||||
DUP #7e GTH ?&missing
|
DUP #7e GTH ?&missing
|
||||||
DUP #20 LTH ?&blank
|
DUP #20 LTH ?&blank
|
||||||
|
DUP2 #0a3e EQU2 ?&marker
|
||||||
DUP2 #093e EQU2 ?&marker
|
DUP2 #093e EQU2 ?&marker
|
||||||
DUP2 #092d EQU2 ?&bullet
|
DUP2 #092d EQU2 ?&bullet
|
||||||
NIP #20 SUB
|
NIP #20 SUB
|
||||||
|
@ -739,6 +738,11 @@ JMP2r
|
||||||
(
|
(
|
||||||
@|stdlib )
|
@|stdlib )
|
||||||
|
|
||||||
|
@scap ( str* -- end* )
|
||||||
|
&>w ( -- )
|
||||||
|
INC2 & LDAk ?&>w
|
||||||
|
JMP2r
|
||||||
|
|
||||||
@<phex> ( short* -: )
|
@<phex> ( short* -: )
|
||||||
SWP /b
|
SWP /b
|
||||||
&b ( byte -: )
|
&b ( byte -: )
|
||||||
|
@ -754,17 +758,18 @@ JMP2r
|
||||||
;&r .File/read DEO2
|
;&r .File/read DEO2
|
||||||
;&g .File/read DEO2
|
;&g .File/read DEO2
|
||||||
;&b .File/read DEO2
|
;&b .File/read DEO2
|
||||||
.File/success DEI2 ORA [ #01 JCN JMP2r ]
|
[ LIT2 00 -File/success-lb ] DEI EQU ?{
|
||||||
LIT2 &r $2 .System/r DEO2
|
[ LIT2 &r $2 ] .System/r DEO2
|
||||||
LIT2 &g $2 .System/g DEO2
|
[ LIT2 &g $2 ] .System/g DEO2
|
||||||
LIT2 &b $2 .System/b DEO2
|
[ LIT2 &b $2 ] .System/b DEO2
|
||||||
|
}
|
||||||
|
|
||||||
JMP2r
|
JMP2r
|
||||||
&path ".theme $1
|
&path ".theme $1
|
||||||
|
|
||||||
@msfl ( b* a* len* -- ) STH2 SWP2 EQU2k ?&e &l DUP2k STH2kr ADD2 LDA ROT ROT STA INC2 GTH2k ?&l POP2 POP2 &e POP2r JMP2r
|
@msfl ( b* a* len* -- ) STH2 SWP2 EQU2k ?&e &l DUP2k STH2kr ADD2 LDA ROT ROT STA INC2 GTH2k ?&l POP2 POP2 &e POP2r JMP2r
|
||||||
@msfr ( b* a* len* -- ) STH2 EQU2k ?&e &l DUP2 LDAk ROT ROT STH2kr ADD2 STA #0001 SUB2 LTH2k ?&l POP2 POP2 &e POP2r JMP2r
|
@msfr ( b* a* len* -- ) STH2 EQU2k ?&e &l DUP2 LDAk ROT ROT STH2kr ADD2 STA #0001 SUB2 LTH2k ?&l POP2 POP2 &e POP2r JMP2r
|
||||||
@scap ( str* -- end* ) LDAk #00 NEQ [ JMP JMP2r ] &w INC2 LDAk ?&w JMP2r
|
|
||||||
|
|
||||||
~src/assets.tal
|
~src/assets.tal
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue