2017-12-22 21:24:30 +00:00
|
|
|
|
NEW
|
2019-07-25 15:10:59 +00:00
|
|
|
|
AUTO 3,1
|
2017-11-16 16:46:18 +00:00
|
|
|
|
*--------------------------------------
|
2022-12-07 07:02:29 +00:00
|
|
|
|
LBUF.SetBounds1YA
|
2017-11-16 16:46:18 +00:00
|
|
|
|
jsr DIVMOD7YA A=DIV, X=MOD
|
|
|
|
|
sta LBUF.C1
|
2017-11-20 06:59:59 +00:00
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
lda C1.MASK,x
|
2017-11-16 16:46:18 +00:00
|
|
|
|
sta LBUF.C1.MASK
|
|
|
|
|
lda C1.DATA,x
|
|
|
|
|
sta LBUF.C1.DATA
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
LBUF.SetBounds2YA
|
|
|
|
|
jsr DIVMOD7YA A=DIV, X=MOD
|
|
|
|
|
sta LBUF.C2
|
2022-12-07 07:02:29 +00:00
|
|
|
|
cmp LBUF.C1
|
2017-11-16 16:46:18 +00:00
|
|
|
|
beq .1
|
2022-12-07 07:02:29 +00:00
|
|
|
|
|
2020-06-09 13:40:21 +00:00
|
|
|
|
lda C2.MASK,x
|
2017-11-16 16:46:18 +00:00
|
|
|
|
sta LBUF.C2.MASK
|
|
|
|
|
lda C2.DATA,x
|
|
|
|
|
sta LBUF.C2.DATA
|
|
|
|
|
rts
|
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
.1 lda C2.MASK,x C1=C2, go combine in C1
|
|
|
|
|
tsb LBUF.C1.MASK
|
|
|
|
|
lda C2.DATA,x
|
|
|
|
|
tsb LBUF.C1.DATA
|
2017-11-16 16:46:18 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
LBUF.DrawAtY lda BASEL,y setup line Base Ptr
|
|
|
|
|
sta ZPBasePtr
|
|
|
|
|
lda BASEH,y
|
2017-11-17 16:16:05 +00:00
|
|
|
|
sta ZPBasePtr+1
|
2020-06-09 13:40:21 +00:00
|
|
|
|
|
2017-11-17 16:16:05 +00:00
|
|
|
|
lda CB.Cache+S.CB.OP
|
2020-10-12 15:36:10 +00:00
|
|
|
|
and #$F
|
2017-11-17 16:16:05 +00:00
|
|
|
|
tax
|
|
|
|
|
jmp (J.LBUF.DrawAtY,x)
|
2017-11-16 16:46:18 +00:00
|
|
|
|
*--------------------------------------
|
2019-10-03 06:25:27 +00:00
|
|
|
|
LBUF.DrawAtY.SET
|
2020-06-09 13:40:21 +00:00
|
|
|
|
LBUF.DrawAtY.AND.SET
|
2017-11-16 16:46:18 +00:00
|
|
|
|
ldx LBUF.C1 x C1->C2
|
2020-09-01 15:38:55 +00:00
|
|
|
|
|
2021-06-05 15:48:54 +00:00
|
|
|
|
>X2PageY
|
2020-09-01 15:38:55 +00:00
|
|
|
|
|
2017-11-30 07:33:45 +00:00
|
|
|
|
lda (ZPBasePtr),y Clear screen at C1
|
|
|
|
|
and LBUF.C1.MASK with MASK bits
|
2018-05-04 14:55:29 +00:00
|
|
|
|
sta ZPTmpByte
|
2017-11-30 07:33:45 +00:00
|
|
|
|
|
2017-11-16 16:46:18 +00:00
|
|
|
|
lda LBUF.DATA,x get DATA bits
|
|
|
|
|
and LBUF.C1.DATA set ONLY bits starting at X1 mod 7
|
2019-07-25 15:10:59 +00:00
|
|
|
|
ora ZPTmpByte ora with screen bits
|
2017-11-16 16:46:18 +00:00
|
|
|
|
sta (ZPBasePtr),y update screen
|
2020-09-01 15:38:55 +00:00
|
|
|
|
|
2017-11-16 16:46:18 +00:00
|
|
|
|
inx
|
|
|
|
|
cpx LBUF.C2
|
2019-07-25 15:10:59 +00:00
|
|
|
|
beq .2 C1=C2, go setup C2
|
2020-06-09 13:40:21 +00:00
|
|
|
|
|
2019-10-03 06:25:27 +00:00
|
|
|
|
bcs .8 C1+1 > C2, we are done...
|
|
|
|
|
|
2021-06-05 15:48:54 +00:00
|
|
|
|
.1 >X2PageY
|
2020-09-01 15:38:55 +00:00
|
|
|
|
|
2019-07-25 15:10:59 +00:00
|
|
|
|
lda LBUF.DATA,x set all bytes between C1+1 & C2-1
|
2017-11-16 16:46:18 +00:00
|
|
|
|
sta (ZPBasePtr),y
|
2019-07-25 15:10:59 +00:00
|
|
|
|
|
2017-11-16 16:46:18 +00:00
|
|
|
|
inx
|
|
|
|
|
cpx LBUF.C2
|
2017-12-04 16:42:08 +00:00
|
|
|
|
bcc .1
|
2022-12-07 07:02:29 +00:00
|
|
|
|
|
2021-06-05 15:48:54 +00:00
|
|
|
|
.2 >X2PageY
|
2017-12-07 07:42:58 +00:00
|
|
|
|
|
2017-11-16 16:46:18 +00:00
|
|
|
|
lda (ZPBasePtr),y Get C2
|
|
|
|
|
and LBUF.C2.MASK clear ONLY bits ending at X2 mod 7
|
2018-05-04 14:55:29 +00:00
|
|
|
|
sta ZPTmpByte
|
2020-09-01 15:38:55 +00:00
|
|
|
|
|
2017-11-16 16:46:18 +00:00
|
|
|
|
lda LBUF.DATA,x get DATA bits
|
|
|
|
|
and LBUF.C2.DATA set ONLY bits ending at X2 mod 7
|
2018-05-04 14:55:29 +00:00
|
|
|
|
ora ZPTmpByte
|
2017-11-16 16:46:18 +00:00
|
|
|
|
sta (ZPBasePtr),y update screen
|
2020-09-01 15:38:55 +00:00
|
|
|
|
|
2017-11-16 16:46:18 +00:00
|
|
|
|
.8 rts
|
2022-12-07 07:02:29 +00:00
|
|
|
|
*--------------------------------------
|
2019-07-25 15:10:59 +00:00
|
|
|
|
LBUF.DrawAtY.XOR
|
2020-06-09 13:40:21 +00:00
|
|
|
|
LBUF.DrawAtY.AND.XOR
|
2019-07-25 15:10:59 +00:00
|
|
|
|
lda #$51 EOR (Indirect),Y
|
|
|
|
|
bra LBUF.DrawAtY.XXX
|
2017-11-16 16:46:18 +00:00
|
|
|
|
*--------------------------------------
|
2019-07-25 15:10:59 +00:00
|
|
|
|
LBUF.DrawAtY.ORA
|
|
|
|
|
lda #$11 ORA (Indirect),Y
|
|
|
|
|
LBUF.DrawAtY.XXX
|
2022-12-07 07:02:29 +00:00
|
|
|
|
sta .10
|
|
|
|
|
sta .20
|
|
|
|
|
sta .30
|
2020-06-09 13:40:21 +00:00
|
|
|
|
|
2017-11-17 16:16:05 +00:00
|
|
|
|
ldx LBUF.C1 x C1->C2
|
2020-06-09 13:40:21 +00:00
|
|
|
|
|
2021-06-05 15:48:54 +00:00
|
|
|
|
>X2PageY
|
2020-09-01 15:38:55 +00:00
|
|
|
|
|
2017-11-17 16:16:05 +00:00
|
|
|
|
lda LBUF.DATA,x get DATA bits
|
|
|
|
|
and LBUF.C1.DATA set ONLY bits starting at X1 mod 7
|
2022-12-07 07:02:29 +00:00
|
|
|
|
|
|
|
|
|
.10 eor (ZPBasePtr),y
|
2017-11-17 16:16:05 +00:00
|
|
|
|
sta (ZPBasePtr),y update screen
|
|
|
|
|
inx
|
|
|
|
|
cpx LBUF.C2
|
|
|
|
|
beq .2 C1=C2, go setup C2
|
2020-06-09 13:40:21 +00:00
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
bcs .8 C1+1 > C2, we are done...
|
2020-06-09 13:40:21 +00:00
|
|
|
|
|
2021-06-05 15:48:54 +00:00
|
|
|
|
.1 >X2PageY
|
2020-09-01 15:38:55 +00:00
|
|
|
|
|
2017-11-17 16:16:05 +00:00
|
|
|
|
lda LBUF.DATA,x set all bytes between C1+1 & C2-1
|
2022-12-07 07:02:29 +00:00
|
|
|
|
.20 eor (ZPBasePtr),y
|
2017-11-16 16:46:18 +00:00
|
|
|
|
sta (ZPBasePtr),y
|
|
|
|
|
|
2017-11-17 16:16:05 +00:00
|
|
|
|
inx
|
|
|
|
|
cpx LBUF.C2
|
|
|
|
|
bne .1
|
2020-06-09 13:40:21 +00:00
|
|
|
|
|
2021-06-05 15:48:54 +00:00
|
|
|
|
.2 >X2PageY
|
2020-09-01 15:38:55 +00:00
|
|
|
|
|
2017-11-17 16:16:05 +00:00
|
|
|
|
lda LBUF.DATA,x get DATA bits
|
|
|
|
|
and LBUF.C2.DATA set ONLY bits ending at X2 mod 7
|
2022-12-07 07:02:29 +00:00
|
|
|
|
|
|
|
|
|
.30 eor (ZPBasePtr),y
|
|
|
|
|
sta (ZPBasePtr),y update screen
|
2019-07-25 15:10:59 +00:00
|
|
|
|
|
2017-11-17 16:16:05 +00:00
|
|
|
|
.8 rts
|
|
|
|
|
*--------------------------------------
|
2017-11-29 06:59:27 +00:00
|
|
|
|
LBUF.DrawAtY.AND.ORA
|
2017-11-17 16:16:05 +00:00
|
|
|
|
ldx LBUF.C1 x C1->C2
|
2017-12-22 21:24:30 +00:00
|
|
|
|
|
2021-06-05 15:48:54 +00:00
|
|
|
|
>X2PageY
|
2020-09-01 15:38:55 +00:00
|
|
|
|
|
2017-11-27 16:39:09 +00:00
|
|
|
|
lda LBUF.MASK,x get MASK bits
|
|
|
|
|
ora LBUF.C1.MASK clear ONLY bits starting at X1 mod 7
|
2022-12-07 07:02:29 +00:00
|
|
|
|
and (ZPBasePtr),y
|
2020-09-06 12:24:04 +00:00
|
|
|
|
sta ZPTmpByte
|
2022-12-07 07:02:29 +00:00
|
|
|
|
|
|
|
|
|
lda LBUF.DATA,x
|
2020-09-06 12:24:04 +00:00
|
|
|
|
and LBUF.C1.DATA
|
2022-12-07 07:02:29 +00:00
|
|
|
|
ora ZPTmpByte
|
2020-09-06 12:24:04 +00:00
|
|
|
|
sta (ZPBasePtr),y update screen
|
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
inx
|
|
|
|
|
cpx LBUF.C2
|
|
|
|
|
beq .2 C1=C2, go setup C2
|
2017-11-27 16:39:09 +00:00
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
bcs .8 C1+1 > C2, we are done...
|
2020-06-09 13:40:21 +00:00
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
.1 >X2PageY
|
2020-09-01 15:38:55 +00:00
|
|
|
|
|
2017-11-27 16:39:09 +00:00
|
|
|
|
lda (ZPBasePtr),y
|
2020-06-09 13:40:21 +00:00
|
|
|
|
and LBUF.MASK,x
|
2020-09-06 12:24:04 +00:00
|
|
|
|
ora LBUF.DATA,x set all bytes between C1+1 & C2-1
|
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
sta (ZPBasePtr),y update screen
|
2017-11-16 16:46:18 +00:00
|
|
|
|
|
2017-11-17 16:16:05 +00:00
|
|
|
|
inx
|
|
|
|
|
cpx LBUF.C2
|
2022-12-07 07:02:29 +00:00
|
|
|
|
bne .1
|
2020-06-09 13:40:21 +00:00
|
|
|
|
|
2022-12-07 07:02:29 +00:00
|
|
|
|
.2 >X2PageY
|
2020-09-01 15:38:55 +00:00
|
|
|
|
|
2017-11-27 16:39:09 +00:00
|
|
|
|
lda LBUF.MASK,x get MASK bits
|
|
|
|
|
ora LBUF.C2.MASK
|
2022-12-07 07:02:29 +00:00
|
|
|
|
and (ZPBasePtr),y
|
2018-05-04 14:55:29 +00:00
|
|
|
|
sta ZPTmpByte
|
2020-06-09 13:40:21 +00:00
|
|
|
|
|
2017-11-17 16:16:05 +00:00
|
|
|
|
lda LBUF.DATA,x get DATA bits
|
2022-12-07 07:02:29 +00:00
|
|
|
|
and LBUF.C2.DATA set ONLY bits ending at X2 mod 7
|
2020-06-09 13:40:21 +00:00
|
|
|
|
ora ZPTmpByte
|
2017-11-17 16:16:05 +00:00
|
|
|
|
sta (ZPBasePtr),y update screen
|
2020-09-01 15:38:55 +00:00
|
|
|
|
|
2017-11-17 16:16:05 +00:00
|
|
|
|
.8 rts
|
2017-11-16 16:46:18 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
MAN
|
2020-06-09 13:40:21 +00:00
|
|
|
|
SAVE usr/src/drv/dhgr.drv.s.lbuf
|
|
|
|
|
LOAD usr/src/drv/dhgr.drv.s
|
2017-11-16 16:46:18 +00:00
|
|
|
|
ASM
|