From 45fc35c420631d1b3083d3aed669e4b71c31e40b Mon Sep 17 00:00:00 2001 From: d6 Date: Wed, 15 Feb 2023 19:41:37 -0500 Subject: [PATCH] fix a few more bugs, slightly improve autowrap --- term.tal | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/term.tal b/term.tal index 080c946..75e9db7 100644 --- a/term.tal +++ b/term.tal @@ -216,7 +216,7 @@ #0002 .File1/len DEO2 ;&x .File1/r DEO2 .File1/ok DEI2 ORA #01 JCN JMP2r - #00 ,&x LDR INC2 ( HACK ) .cols STZ2 + #00 ,&x LDR .cols STZ2 #00 ,&y LDR .rows STZ2 JMP2r [ &path ".theme $1 &r $2 &g $2 &b $2 &x $1 &y $1 ] @@ -928,15 +928,19 @@ POP 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? ) .cur-y LDZ2 .max-y LDZ2 EQU2 JMP2r @read-nl ( 0a -> BRK ) - POP clear-cursor at-max-y ?&scrolling + POP .cur-wrap LDZ ?&skip + clear-cursor at-max-y ?&scrolling down BRK - &scrolling scroll BRK + &scrolling scroll + &skip BRK @goto ( y* x* -> ) clear-cursor @@ -977,10 +981,11 @@ @maybe-autowrap ( -> ) .cur-wrap LDZ #00 EQU ?&skip #00 .cur-wrap STZ -( #010e DEO ) - clear-cursor #0000 .cur-x STZ2 + clear-cursor + #0000 .cur-x STZ2 at-max-y ?&scrolling .cur-y LDZ2k INC2 ROT STZ2 + screen-to-cursor &skip JMP2r &scrolling !scroll