A2osX/SYS/KERNEL.S.TERMLC.txt
2018-12-14 08:32:20 +01:00

136 lines
1.9 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
*--------------------------------------
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
dex
bpl .1
lda #0
ldy #S.DCB.TTY.CV
sta (ZPDCBPtr),y
dey
sta (ZPDCBPtr),y
rts
*--------------------------------------
SetCharAtCurPos pha
ldy #S.DCB.TTY.CV
lda (ZPDCBPtr),y
tax
dey
lda (ZPDCBPtr),y
tay
pla
*--------------------------------------
SetCharAtYX cmp #$40
bcc .10
cmp #$5F
bcs .10
and #$3F
.10 pha
phy
jsr SETUP.L1X
pla
lsr
tay
pla
bcs .1
sta SETPAGE2
.1 sta (ZPScrBaseL1),y
sta CLRPAGE2
rts
*--------------------------------------
GetCharAtCurPos ldy #S.DCB.TTY.CV
lda (ZPDCBPtr),y
tax
jsr SETUP.L1X
ldy #S.DCB.TTY.CH
lda (ZPDCBPtr),y
lsr
tay
bcs .1
sta SETPAGE2
.1 lda (ZPScrBaseL1),y
sta CLRPAGE2
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