A2osX/SYS/KERNEL.S.TERMLC.txt
2018-12-14 17:19:05 +01:00

201 lines
2.8 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

NEW
PREFIX
AUTO 4,1
*--------------------------------------
DRV.TERM.CLRSCR ldx #23
.1 jsr SETUP.L1X
lda #" "
bit bActive
bpl .4
sta SETPAGE2
ldy #39
.2 sta (ZPScrBaseL1),y
dey
bpl .2
sta CLRPAGE2
ldy #39
.3 sta (ZPScrBaseL1),y
dey
bpl .3
.4 sta SETWRITEAUX
ldy #79
.5 sta (ZPBufBaseL1),y
dey
bpl .5
sta CLRWRITEAUX
dex
bpl .1
lda #0
ldy #S.DCB.TTY.CV
sta (ZPDCBPtr),y
dey
sta (ZPDCBPtr),y
rts
*--------------------------------------
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
*--------------------------------------
SetCharAtCurPos pha
ldy #S.DCB.TTY.CV
lda (ZPDCBPtr),y
tax
dey
lda (ZPDCBPtr),y
tay
pla
*--------------------------------------
SetCharAtYX cmp #$40
bcc .1
cmp #$5F
bcs .1
and #$3F
.1 pha
phy
jsr SETUP.L1X
ply
pla
sta SETWRITEAUX
sta (ZPBufBaseL1),y
sta CLRWRITEAUX
bit bActive
bpl .8
pha
tya
lsr
tay
pla
bcs .2
sta SETPAGE2
.2 sta (ZPScrBaseL1),y
sta CLRPAGE2
.8 rts
*--------------------------------------
GetCharAtCurPos ldy #S.DCB.TTY.CV
lda (ZPDCBPtr),y
tax
jsr SETUP.L1X
ldy #S.DCB.TTY.CH
lda (ZPDCBPtr),y
tay
sta SETREADAUX
lda (ZPBufBaseL1),y
sta CLRREADAUX
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
sta SETPAGE2
jsr .6
sta CLRPAGE2
.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