mirror of
https://github.com/A2osX/A2osX.git
synced 2024-11-03 12:06:05 +00:00
280 lines
4.0 KiB
Plaintext
280 lines
4.0 KiB
Plaintext
NEW
|
||
AUTO 3,1
|
||
*--------------------------------------
|
||
DRV.TERM.CLRSCR.DN
|
||
ldy #S.DCB.TTY.CV
|
||
sta (ZPDCBPtr),y
|
||
tax
|
||
bra DRV.TERM.CLRSCR.1
|
||
|
||
DRV.TERM.CLRSCR.UP
|
||
ldx #0
|
||
ldy #S.DCB.TTY.CV
|
||
sta (ZPDCBPtr),y
|
||
tay
|
||
bra DRV.TERM.CLRSCR.2
|
||
|
||
DRV.TERM.CLRSCR ldx #0
|
||
|
||
DRV.TERM.CLRSCR.1
|
||
ldy #24
|
||
|
||
DRV.TERM.CLRSCR.2
|
||
sty .1+1
|
||
|
||
sta SET80STORE
|
||
|
||
.1 cpx #$ff SELF MODIFIED
|
||
beq .9
|
||
|
||
jsr DRV.TERM.SETUP.L1X
|
||
|
||
lda #" "
|
||
|
||
bit bActive
|
||
bpl .4
|
||
|
||
sta SETPAGE2
|
||
jsr .7
|
||
|
||
sta CLRPAGE2
|
||
jsr .7
|
||
|
||
.4 sta SETWRITEAUX
|
||
|
||
ldy #79
|
||
|
||
.5 sta (ZPBufBaseL1),y
|
||
dey
|
||
bpl .5
|
||
|
||
sta CLRWRITEAUX
|
||
|
||
inx
|
||
bra .1
|
||
|
||
.7 ldy #39
|
||
|
||
.8 sta (ZPScrBaseL1),y
|
||
dey
|
||
bpl .8
|
||
.9 rts
|
||
*--------------------------------------
|
||
DRV.TERM.LINE0CPY
|
||
ldx #0
|
||
.HS 2C BIT ABS
|
||
DRV.TERM.SCRCPY ldx #23
|
||
|
||
sta SET80STORE
|
||
|
||
.1 ldy #S.FD.DEV.BUFPTR
|
||
lda (pFD),y
|
||
clc
|
||
adc BUF.BASEL,x
|
||
sta .80+1
|
||
|
||
iny
|
||
lda (pFD),y
|
||
adc BUF.BASEH,x
|
||
sta .80+2
|
||
|
||
jsr DRV.TERM.SETUP.L1X.SCR
|
||
|
||
phx
|
||
|
||
sta SETREADAUX
|
||
|
||
ldx #78
|
||
sta SETPAGE2
|
||
|
||
ldy #39
|
||
|
||
jsr .8
|
||
|
||
ldx #79
|
||
sta CLRPAGE2
|
||
|
||
ldy #39
|
||
|
||
jsr .8
|
||
|
||
sta CLRREADAUX
|
||
|
||
plx
|
||
dex
|
||
|
||
bpl .1
|
||
rts
|
||
|
||
.8 ldy #39
|
||
|
||
.80 lda $ffff,x SELF MODIFIED
|
||
|
||
.81 sta (ZPScrBaseL1),y
|
||
dex
|
||
dex
|
||
dey
|
||
bpl .80
|
||
rts
|
||
*--------------------------------------
|
||
DRV.TERM.COPY.XtoL1
|
||
ldy #S.FD.DEV.BUFPTR
|
||
lda (pFD),y
|
||
clc
|
||
adc BUF.BASEL,x
|
||
sta ZPBufBaseL2
|
||
|
||
iny
|
||
lda (pFD),y
|
||
adc BUF.BASEH,x
|
||
sta ZPBufBaseL2+1
|
||
|
||
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
|
||
txa
|
||
lsr
|
||
and #$3
|
||
ora #4
|
||
sta ZPScrBaseL2+1
|
||
|
||
sta SET80STORE
|
||
sta SETPAGE2
|
||
|
||
jsr .6
|
||
|
||
sta CLRPAGE2
|
||
|
||
.6 ldy #39
|
||
|
||
.7 lda (ZPScrBaseL2),y
|
||
sta (ZPScrBaseL1),y
|
||
dey
|
||
bpl .7
|
||
|
||
.8 rts
|
||
*--------------------------------------
|
||
SetCharAtCurPos pha
|
||
ldy #S.DCB.TTY.CV
|
||
lda (ZPDCBPtr),y
|
||
tax
|
||
dey
|
||
lda (ZPDCBPtr),y
|
||
tay
|
||
pla
|
||
cpy #80
|
||
bcs SetCharAtYX.8
|
||
*--------------------------------------
|
||
SetCharAtYX cmp #$40
|
||
bcc .1
|
||
|
||
cmp #$60
|
||
bcs .1
|
||
|
||
and #$1F remap UPPERCASE
|
||
|
||
.1 phy
|
||
|
||
ldy #S.DCB.TTY.bNORMAL
|
||
ora (ZPDCBPtr),y
|
||
sta ZPTmpChar
|
||
|
||
ldy #S.DCB.TTY.bG0G1 Select Active Font
|
||
lda (ZPDCBPtr),y
|
||
bpl .2
|
||
iny
|
||
|
||
.2 iny
|
||
|
||
lda (ZPDCBPtr),y
|
||
bpl .3 not Graphic mode
|
||
|
||
lda ZPTmpChar
|
||
cmp #$E0 Normal lowercase ?
|
||
bcc .3
|
||
|
||
tay
|
||
|
||
lda REMAP.E0.FF-$E0,y
|
||
sta ZPTmpChar
|
||
|
||
|
||
.3 jsr DRV.TERM.SETUP.L1X
|
||
ply
|
||
|
||
lda ZPTmpChar
|
||
sta SETWRITEAUX
|
||
sta (ZPBufBaseL1),y
|
||
sta CLRWRITEAUX
|
||
|
||
bit bActive
|
||
bpl SetCharAtYX.8
|
||
|
||
SetCharAtY.SCR pha
|
||
|
||
tya
|
||
lsr
|
||
tay
|
||
|
||
pla
|
||
sta SET80STORE
|
||
bcs .2
|
||
sta SETPAGE2
|
||
.2 sta (ZPScrBaseL1),y
|
||
sta CLRPAGE2
|
||
|
||
SetCharAtYX.8 rts
|
||
*--------------------------------------
|
||
GetCharAtCurPos ldy #S.DCB.TTY.CV
|
||
lda (ZPDCBPtr),y
|
||
cmp #24
|
||
bcs .9 Out of screen
|
||
|
||
tax
|
||
|
||
jsr DRV.TERM.SETUP.L1X
|
||
|
||
ldy #S.DCB.TTY.CH
|
||
lda (ZPDCBPtr),y
|
||
cmp #80
|
||
bcs .9 Out of screen
|
||
|
||
tay
|
||
|
||
sta SETREADAUX
|
||
lda (ZPBufBaseL1),y
|
||
sta CLRREADAUX
|
||
|
||
cmp #$20
|
||
bcs .8
|
||
|
||
* clc
|
||
adc #40 remap $00-$1F uppercase
|
||
|
||
.8 clc
|
||
|
||
.9 rts
|
||
*--------------------------------------
|
||
* TEMP
|
||
*--------------------------------------
|
||
MAN
|
||
SAVE USR/SRC/SYS/KERNEL.S.TERMLC
|
||
LOAD USR/SRC/SYS/KERNEL.S
|
||
ASM
|