Use System/expansion for msfl

This commit is contained in:
Devine Lu Linvega 2024-03-20 10:20:47 -07:00
parent 10b8ec73d4
commit 6456311a20
1 changed files with 12 additions and 13 deletions

View File

@ -1,6 +1,6 @@
( Left )
|00 @System &vector $2 &wst $1 &rst $1 &pad $4 &r $2 &g $2 &b $2 &debug $1 &halt $1
|00 @System &vector $2 &expansion $2 &wst $1 &rst $1 &metadata $2 &r $2 &g $2 &b $2 &debug $1 &state $1
|10 @Console &vector $2 &read $1 &pad $4 &type $1 &write $1 &error $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
@ -375,7 +375,7 @@
#0001 !mod-length
@<cut-char> ( addr* -- )
get-eof #0001 <msfl>
#0001 <msfl>
#ffff
( >> )
@ -384,7 +384,7 @@
reqdraw-textarea reqdraw-navbar #0a !<draw-state>
@erase-selection ( -- )
get-from get-eof get-length STH2k <msfl>
get-from get-length STH2k <msfl>
update-nav #0000 STH2r SUB2 !mod-length
@join-spaces ( addr* -- addr* )
@ -1198,7 +1198,7 @@
[ LIT2 15 -Screen/auto ] DEO
get-scroll-addr
&>l ( -- )
draw-character LDAk #0a NEQ ?{
scan-state draw-character LDAk #0a NEQ ?{
<draw-lb>
.Screen/y DEI2 .Screen/height DEI2 #0010 SUB2 GTH2 ?&end
.scroll/x LDZ2 ;draw-character/anchor STA2 }
@ -1216,7 +1216,7 @@
JMP2r
@draw-character ( addr* -- addr* )
scan-state get-glyph-addr .Screen/addr DEO2
get-glyph-addr .Screen/addr DEO2
get-color ,&c STR
[ LIT2r &anchor $2 ] LITr -Screen/x DEO2kr
( | draw normal )
@ -1543,14 +1543,13 @@
LDAk LDAkr STHr NEQ ?&>d
INC2 INC2r !&>l
@<msfl> ( b* a* len* -- )
STH2
SWP2 EQU2k ?{
&>l ( -- )
DUP2k STH2kr ADD2 LDA ROT ROT STA
INC2 GTH2k ?&>l
POP2 POP2 }
POP2r JMP2r
@<msfl> ( a* distance* -- )
OVR2 ,&dst STR2
ADD2k ,&src STR2
POP2 get-eof SWP2 SUB2 ,&length STR2
;&mmu .System/expansion DEO2
JMP2r
&mmu 01 &length 0000 0000 &src 0000 0000 &dst 0000
@<msfr> ( b* a* len* -- )
STH2