fix a few more bugs, slightly improve autowrap

This commit is contained in:
~d6 2023-02-15 19:41:37 -05:00
parent 7e0041c4ac
commit 45fc35c420
1 changed files with 11 additions and 6 deletions

View File

@ -216,7 +216,7 @@
#0002 .File1/len DEO2 #0002 .File1/len DEO2
;&x .File1/r DEO2 ;&x .File1/r DEO2
.File1/ok DEI2 ORA #01 JCN JMP2r .File1/ok DEI2 ORA #01 JCN JMP2r
#00 ,&x LDR INC2 ( HACK ) .cols STZ2 #00 ,&x LDR .cols STZ2
#00 ,&y LDR .rows STZ2 #00 ,&y LDR .rows STZ2
JMP2r [ &path ".theme $1 &r $2 &g $2 &b $2 &x $1 &y $1 ] JMP2r [ &path ".theme $1 &r $2 &g $2 &b $2 &x $1 &y $1 ]
@ -928,15 +928,19 @@
POP BRK ( ) POP BRK ( )
@read-cr ( 0d -> BRK ) @read-cr ( 0d -> BRK )
POP clear-cursor #0000 .cur-x STZ2 draw-cursor BRK POP .cur-wrap LDZ ?&skip
clear-cursor #0000 .cur-x STZ2 draw-cursor
&skip BRK
@at-max-y ( -> true? ) @at-max-y ( -> true? )
.cur-y LDZ2 .max-y LDZ2 EQU2 JMP2r .cur-y LDZ2 .max-y LDZ2 EQU2 JMP2r
@read-nl ( 0a -> BRK ) @read-nl ( 0a -> BRK )
POP clear-cursor at-max-y ?&scrolling POP .cur-wrap LDZ ?&skip
clear-cursor at-max-y ?&scrolling
down BRK down BRK
&scrolling scroll BRK &scrolling scroll
&skip BRK
@goto ( y* x* -> ) @goto ( y* x* -> )
clear-cursor clear-cursor
@ -977,10 +981,11 @@
@maybe-autowrap ( -> ) @maybe-autowrap ( -> )
.cur-wrap LDZ #00 EQU ?&skip .cur-wrap LDZ #00 EQU ?&skip
#00 .cur-wrap STZ #00 .cur-wrap STZ
( #010e DEO ) clear-cursor
clear-cursor #0000 .cur-x STZ2 #0000 .cur-x STZ2
at-max-y ?&scrolling at-max-y ?&scrolling
.cur-y LDZ2k INC2 ROT STZ2 .cur-y LDZ2k INC2 ROT STZ2
screen-to-cursor
&skip JMP2r &skip JMP2r
&scrolling !scroll &scrolling !scroll