A2osX/SYS/KERNEL.S.TERMLC.txt

201 lines
2.8 KiB
Plaintext
Raw Normal View History

2018-12-12 16:32:33 +00:00
NEW
PREFIX
AUTO 4,1
*--------------------------------------
2018-12-14 16:19:05 +00:00
DRV.TERM.CLRSCR ldx #23
2018-12-12 16:32:33 +00:00
.1 jsr SETUP.L1X
lda #" "
bit bActive
bpl .4
2018-12-14 07:32:20 +00:00
sta SETPAGE2
2018-12-12 16:32:33 +00:00
ldy #39
.2 sta (ZPScrBaseL1),y
dey
bpl .2
2018-12-14 07:32:20 +00:00
sta CLRPAGE2
2018-12-12 16:32:33 +00:00
ldy #39
.3 sta (ZPScrBaseL1),y
dey
bpl .3
.4 sta SETWRITEAUX
ldy #79
.5 sta (ZPBufBaseL1),y
dey
bpl .5
2018-12-14 16:19:05 +00:00
sta CLRWRITEAUX
2018-12-12 16:32:33 +00:00
dex
bpl .1
lda #0
2018-12-13 16:39:24 +00:00
ldy #S.DCB.TTY.CV
sta (ZPDCBPtr),y
2018-12-12 16:32:33 +00:00
dey
2018-12-13 16:39:24 +00:00
sta (ZPDCBPtr),y
2018-12-12 16:32:33 +00:00
rts
*--------------------------------------
2018-12-14 16:19:05 +00:00
DRV.TERM.SCRCPY ldx #0
.1 ldy #S.FD.DEV.BUFPTR
lda (pFD),y
clc
adc BUF.BASEL,x
sta .2+1
sta .3+1
iny
lda (pFD),y
adc BUF.BASEH,x
sta .2+2
sta .3+2
lda SCR.BASEL,x
sta ZPScrBaseL1
lda SCR.BASEH,x
sta ZPScrBaseL1+1
phx
sta SETREADAUX
ldx #79
ldy #39
sta SETPAGE2
.2 lda $ffff,x SELF MODIFIED
sta (ZPScrBaseL1),y
dex
dex
dey
bpl .2
ldx #78
ldy #39
sta CLRPAGE2
.3 lda $ffff,x SELF MODIFIED
sta (ZPScrBaseL1),y
dex
dex
dey
bpl .3
sta CLRREADAUX
plx
inx
cpx #24
bne .1
rts
*--------------------------------------
2018-12-12 16:32:33 +00:00
SetCharAtCurPos pha
2018-12-13 16:39:24 +00:00
ldy #S.DCB.TTY.CV
lda (ZPDCBPtr),y
2018-12-12 16:32:33 +00:00
tax
dey
2018-12-13 16:39:24 +00:00
lda (ZPDCBPtr),y
2018-12-12 16:32:33 +00:00
tay
pla
*--------------------------------------
SetCharAtYX cmp #$40
2018-12-14 16:19:05 +00:00
bcc .1
2018-12-12 16:32:33 +00:00
cmp #$5F
2018-12-14 16:19:05 +00:00
bcs .1
2018-12-12 16:32:33 +00:00
and #$3F
2018-12-14 16:19:05 +00:00
.1 pha
2018-12-14 07:32:20 +00:00
phy
2018-12-12 16:32:33 +00:00
jsr SETUP.L1X
2018-12-14 16:19:05 +00:00
ply
2018-12-12 16:32:33 +00:00
2018-12-14 07:32:20 +00:00
pla
2018-12-14 16:19:05 +00:00
sta SETWRITEAUX
sta (ZPBufBaseL1),y
sta CLRWRITEAUX
bit bActive
bpl .8
pha
tya
2018-12-12 16:32:33 +00:00
lsr
tay
pla
2018-12-14 16:19:05 +00:00
bcs .2
2018-12-12 16:32:33 +00:00
2018-12-14 07:32:20 +00:00
sta SETPAGE2
2018-12-14 16:19:05 +00:00
.2 sta (ZPScrBaseL1),y
2018-12-14 07:32:20 +00:00
sta CLRPAGE2
2018-12-14 16:19:05 +00:00
.8 rts
2018-12-12 16:32:33 +00:00
*--------------------------------------
2018-12-13 16:39:24 +00:00
GetCharAtCurPos ldy #S.DCB.TTY.CV
lda (ZPDCBPtr),y
2018-12-12 16:32:33 +00:00
tax
jsr SETUP.L1X
2018-12-14 07:32:20 +00:00
ldy #S.DCB.TTY.CH
lda (ZPDCBPtr),y
2018-12-12 16:32:33 +00:00
tay
2018-12-14 16:19:05 +00:00
sta SETREADAUX
lda (ZPBufBaseL1),y
sta CLRREADAUX
2018-12-12 16:32:33 +00:00
rts
*--------------------------------------
COPY.XtoL1 ldy #79
sta SETWRITEAUX
sta SETREADAUX
.1 lda (ZPBufBaseL2),y
sta (ZPBufBaseL1),y
dey
bpl .1
sta CLRWRITEAUX
sta CLRREADAUX
bit bActive
bpl .8
lda SCR.BASEL,x
sta ZPScrBaseL2
lda SCR.BASEH,x
sta ZPScrBaseL2+1
2018-12-14 07:32:20 +00:00
sta SETPAGE2
2018-12-12 16:32:33 +00:00
jsr .6
2018-12-14 07:32:20 +00:00
sta CLRPAGE2
2018-12-12 16:32:33 +00:00
.6 ldy #39
.7 lda (ZPScrBaseL2),y
sta (ZPScrBaseL1),y
dey
bpl .7
.8 rts
*--------------------------------------
MAN
SAVE USR/SRC/SYS/KERNEL.S.TERMLC
LOAD USR/SRC/SYS/KERNEL.S
ASM