diff --git a/term.tal b/term.tal index 75e9db7..eabc70a 100644 --- a/term.tal +++ b/term.tal @@ -255,6 +255,15 @@ LTH2 ?&yloop ( y+1* [addr*] ) POP2 POP2r JMP2r ( ) +( uses the existing .Screen/x and .Screen/y ) +( returns them to their starting values when finished ) +@erase-fg-cell ( -> ) + #40 .Screen/sprite DEO ( ; s/s<-40 ) + .Screen/y DEI2k STH2k ( zp^ y* [y*] ) + #0004 ADD2 ROT DEO2 ( [y*] ; s/y<-y+4 ) + #40 .Screen/sprite DEO STH2r ( y* ; s/s<-40 ) + .Screen/y DEO2 JMP2r ( ; s/y<-y ) + @redraw ( -> BRK ) .pointer-ttl LDZ #00 EQU ?&pointer-ok ( ) .pointer-ttl LDZk INC DUP ROT STZ ?&pointer-ok @@ -266,20 +275,12 @@ &yloop .cols LDZ2 #0000 DUP2 #0008 ( border ) ADD2 .Screen/x DEO2 &xloop - STH2kr LDA2 ( DUP2 erase-cell ) draw-cell - #40 .Screen/sprite DEO - ( FIXME start ) - .Screen/y DEI2k #0004 ADD2 ROT DEO2 - #40 .Screen/sprite DEO - .Screen/y DEI2k #0004 SUB2 ROT DEO2 - ( FIXME end ) - .Screen/x DEI2k #0008 ( width/2 ) ADD2 ROT DEO2 - INC2 INC2r INC2r - GTH2k ?&xloop + STH2kr LDA2 draw-cell erase-fg-cell + .Screen/x DEI2k #0008 ( width ) ADD2 ROT DEO2 + INC2 INC2r INC2r GTH2k ?&xloop POP2 POP2 .Screen/y DEI2k #000c ( height ) ADD2 ROT DEO2 - INC2 - GTH2k ?&yloop + INC2 GTH2k ?&yloop POP2 POP2 POP2r .is-lit LDZ #00 EQU ?&flashing redraw-selection !&finally &flashing .flash LDZ #00 EQU ?&pointer flash-bell draw-cursor BRK @@ -1223,5 +1224,4 @@ @paste-pos $2 ( store tint+char for each screen position ) -@cells - +@cells ( width x height x 2 bytes )