From 1e30400f297131aa802811e32e1e2c95659833f7 Mon Sep 17 00:00:00 2001 From: d6 Date: Tue, 31 Jan 2023 22:30:13 -0500 Subject: [PATCH] draw to bg not fg --- term.tal | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/term.tal b/term.tal index 5579dfb..3970002 100644 --- a/term.tal +++ b/term.tal @@ -181,7 +181,7 @@ ;cells STH2 ( [addr*] ) #0000 &yloop ( y* [addr*] y* ) #0000 &xloop ( y* x* [addr*] ) - #4220 STH2kr STA2 ( y* x* [addr*] ) + #0220 STH2kr STA2 ( y* x* [addr*] ) INC2r INC2r ( y* x* [addr+2*] ) INC2 DUP2 .cols LDZ2 ( y* x+1* x+1* cols* [addr+2*] ) LTH2 ?&xloop ( y* x+1* [addr+2*] ) @@ -520,7 +520,7 @@ @erase ( start* end* -> ) EQU2k ?&skip ( start* end* ) OVR2 SWP2 ( start* start* end* ) - SUB2 STH2 #4220 SWP2 ( 4220 start* [count*] ) + SUB2 STH2 #0220 SWP2 ( 4220 start* [count*] ) &loop ( 4220 addr* [i*] ) STA2k INC2 INC2 INC2r INC2r ( 4220 addr+2* [i+1*] ) ORAkr STHr ?&loop ( 4220 addr+2* [i+2*] ) @@ -696,7 +696,7 @@ &loop ( bound* pos* [i*] ) LDA2k OVR2 STH2kr ADD2 ( bound* pos* x* pos+i* [i*] ) STA2 ( bound* pos* [i*] ; pos+i<-x ) - #4220 OVR2 STA2 ( bound* pos* [i*] ; pos<-4220 ) + #0220 OVR2 STA2 ( bound* pos* [i*] ; pos<-4220 ) #0002 SUB2 ( bound* pos-2* [i*] ) GTH2k #00 EQU ?&loop ( bound* pos-2* [i*] ) POP2 POP2 POP2r ( ) @@ -716,7 +716,7 @@ POP2 POP2 POP2r ( [n*] ) &replace ( [n*] ) LIT2r 0000 SWP2r SUB2r ( [-n*] ) - #4220 cur-addr ( 4220 cur* [-n*] ) + #0220 cur-addr ( 4220 cur* [-n*] ) &loop2 ( 4220 pos* [-i*] ) STA2k INC2 INC2 INC2r ( 4220 pos+2* [-i+1*] ) ORAkr STHr ?&loop2 ( 4220 pos+2* [-i+1*] ) @@ -730,7 +730,7 @@ cur-addr ( limit* start* [i*] ) &loop ( limit* pos* [n*] ) DUP2 STH2kr ADD2 LDA2k ( limit* pos* pos+i* x* [i*] ) - #4220 ROT2 STA2 ( limit* pos* x* [i*] ; pos+i<-4220 ) + #0220 ROT2 STA2 ( limit* pos* x* [i*] ; pos+i<-4220 ) OVR2 STA2 INC2 INC2 ( limit* pos+2* [i*] ; pos<-x ) GTH2k ?&loop ( limit* pos+2* [i*] ) POP2 POP2 POP2r ( ) @@ -747,7 +747,7 @@ limit-addr STH2 ;cells .col-bytes LDZ2 ADD2 STH2 &loop - STH2kr LDA2 #4220 STH2kr STA2 + STH2kr LDA2 #0220 STH2kr STA2 STH2kr .col-bytes LDZ2 SUB2 STA2 INC2r INC2r GTH2kr STHr ?&loop POP2r POP2r @@ -768,14 +768,13 @@ .attr LDZ DUP #80 LTH ?&ok #80 EOR DUP #02 SFT SWP #20 SFT #0c AND ORA - &ok #40 ORA - .tint STZ JMP2r + &ok .tint STZ JMP2r @reverse-tint ( tint^ -> tint^ ) #0f AND ( x=tint&0f ) DUP #02 SFT SWP ( x>>2 x ) #03 AND #20 SFT ( x>>2 (x&3)<<2 ) - ORA #40 ORA ( res=40|x>>2|(x&3)<<2 ) + ORA ( res=40|x>>2|(x&3)<<2 ) JMP2r ( res^ ) ( cell* = tint^ c^ )