2018-12-12 16:32:33 +00:00
|
|
|
|
NEW
|
2019-05-15 05:46:12 +00:00
|
|
|
|
AUTO 3,1
|
2018-12-12 16:32:33 +00:00
|
|
|
|
*--------------------------------------
|
2019-05-14 16:04:16 +00:00
|
|
|
|
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
|
2018-12-15 20:34:55 +00:00
|
|
|
|
|
2019-05-14 16:04:16 +00:00
|
|
|
|
DRV.TERM.CLRSCR ldx #0
|
|
|
|
|
|
|
|
|
|
DRV.TERM.CLRSCR.1
|
|
|
|
|
ldy #24
|
2018-12-12 16:32:33 +00:00
|
|
|
|
|
2019-05-14 16:04:16 +00:00
|
|
|
|
DRV.TERM.CLRSCR.2
|
|
|
|
|
sty .1+1
|
|
|
|
|
|
|
|
|
|
sta SET80STORE
|
|
|
|
|
|
|
|
|
|
.1 cpx #$ff SELF MODIFIED
|
|
|
|
|
beq .9
|
|
|
|
|
|
|
|
|
|
jsr DRV.TERM.SETUP.L1X
|
|
|
|
|
|
2018-12-12 16:32:33 +00:00
|
|
|
|
lda #" "
|
|
|
|
|
|
|
|
|
|
bit bActive
|
|
|
|
|
bpl .4
|
|
|
|
|
|
2018-12-14 07:32:20 +00:00
|
|
|
|
sta SETPAGE2
|
2018-12-17 14:24:39 +00:00
|
|
|
|
jsr .7
|
2018-12-12 16:32:33 +00:00
|
|
|
|
|
2018-12-14 07:32:20 +00:00
|
|
|
|
sta CLRPAGE2
|
2018-12-17 14:24:39 +00:00
|
|
|
|
jsr .7
|
|
|
|
|
|
2018-12-12 16:32:33 +00:00
|
|
|
|
.4 sta SETWRITEAUX
|
|
|
|
|
|
|
|
|
|
ldy #79
|
|
|
|
|
|
2018-12-17 07:02:03 +00:00
|
|
|
|
.5 sta (ZPBufBaseL1),y
|
2018-12-12 16:32:33 +00:00
|
|
|
|
dey
|
|
|
|
|
bpl .5
|
|
|
|
|
|
2018-12-14 16:19:05 +00:00
|
|
|
|
sta CLRWRITEAUX
|
|
|
|
|
|
2019-05-14 16:04:16 +00:00
|
|
|
|
inx
|
|
|
|
|
bra .1
|
2018-12-12 16:32:33 +00:00
|
|
|
|
|
2018-12-17 14:24:39 +00:00
|
|
|
|
.7 ldy #39
|
|
|
|
|
|
|
|
|
|
.8 sta (ZPScrBaseL1),y
|
2018-12-12 16:32:33 +00:00
|
|
|
|
dey
|
2018-12-17 14:24:39 +00:00
|
|
|
|
bpl .8
|
2019-05-14 16:04:16 +00:00
|
|
|
|
.9 rts
|
2018-12-12 16:32:33 +00:00
|
|
|
|
*--------------------------------------
|
2018-12-17 07:02:03 +00:00
|
|
|
|
DRV.TERM.LINE0CPY
|
|
|
|
|
ldx #0
|
|
|
|
|
.HS 2C BIT ABS
|
|
|
|
|
DRV.TERM.SCRCPY ldx #23
|
|
|
|
|
|
2018-12-15 20:34:55 +00:00
|
|
|
|
sta SET80STORE
|
2018-12-17 07:02:03 +00:00
|
|
|
|
|
2018-12-14 16:19:05 +00:00
|
|
|
|
.1 ldy #S.FD.DEV.BUFPTR
|
|
|
|
|
lda (pFD),y
|
|
|
|
|
clc
|
|
|
|
|
adc BUF.BASEL,x
|
2018-12-17 07:02:03 +00:00
|
|
|
|
sta .80+1
|
2018-12-14 16:19:05 +00:00
|
|
|
|
|
|
|
|
|
iny
|
|
|
|
|
lda (pFD),y
|
|
|
|
|
adc BUF.BASEH,x
|
2018-12-17 07:02:03 +00:00
|
|
|
|
sta .80+2
|
2018-12-14 16:19:05 +00:00
|
|
|
|
|
2018-12-17 10:40:00 +00:00
|
|
|
|
jsr DRV.TERM.SETUP.L1X.SCR
|
2018-12-14 16:19:05 +00:00
|
|
|
|
|
|
|
|
|
phx
|
|
|
|
|
|
|
|
|
|
sta SETREADAUX
|
|
|
|
|
|
2018-12-15 20:34:55 +00:00
|
|
|
|
ldx #78
|
2018-12-14 16:19:05 +00:00
|
|
|
|
sta SETPAGE2
|
|
|
|
|
|
2018-12-17 07:02:03 +00:00
|
|
|
|
ldy #39
|
|
|
|
|
|
|
|
|
|
jsr .8
|
2018-12-14 16:19:05 +00:00
|
|
|
|
|
2018-12-15 20:34:55 +00:00
|
|
|
|
ldx #79
|
2018-12-14 16:19:05 +00:00
|
|
|
|
sta CLRPAGE2
|
2018-12-17 07:02:03 +00:00
|
|
|
|
|
|
|
|
|
ldy #39
|
|
|
|
|
|
|
|
|
|
jsr .8
|
|
|
|
|
|
|
|
|
|
sta CLRREADAUX
|
|
|
|
|
|
|
|
|
|
plx
|
|
|
|
|
dex
|
2018-12-14 16:19:05 +00:00
|
|
|
|
|
2018-12-17 07:02:03 +00:00
|
|
|
|
bpl .1
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
.8 ldy #39
|
|
|
|
|
|
|
|
|
|
.80 lda $ffff,x SELF MODIFIED
|
2018-12-17 14:24:39 +00:00
|
|
|
|
|
|
|
|
|
.81 sta (ZPScrBaseL1),y
|
2018-12-14 16:19:05 +00:00
|
|
|
|
dex
|
|
|
|
|
dex
|
|
|
|
|
dey
|
2018-12-17 07:02:03 +00:00
|
|
|
|
bpl .80
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
DRV.TERM.COPY.XtoL1
|
2018-12-17 14:24:39 +00:00
|
|
|
|
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
|
|
|
|
|
|
2018-12-17 07:02:03 +00:00
|
|
|
|
ldy #79
|
|
|
|
|
|
|
|
|
|
sta SETWRITEAUX
|
|
|
|
|
sta SETREADAUX
|
2018-12-14 16:19:05 +00:00
|
|
|
|
|
2018-12-17 07:02:03 +00:00
|
|
|
|
.1 lda (ZPBufBaseL2),y
|
|
|
|
|
sta (ZPBufBaseL1),y
|
|
|
|
|
dey
|
|
|
|
|
bpl .1
|
|
|
|
|
|
|
|
|
|
sta CLRWRITEAUX
|
2018-12-14 16:19:05 +00:00
|
|
|
|
sta CLRREADAUX
|
2018-12-17 07:02:03 +00:00
|
|
|
|
|
|
|
|
|
bit bActive
|
|
|
|
|
bpl .8
|
|
|
|
|
|
|
|
|
|
lda SCR.BASEL,x
|
|
|
|
|
sta ZPScrBaseL2
|
|
|
|
|
lda SCR.BASEH,x
|
|
|
|
|
sta ZPScrBaseL2+1
|
2018-12-17 10:40:00 +00:00
|
|
|
|
|
2018-12-17 07:02:03 +00:00
|
|
|
|
sta SET80STORE
|
|
|
|
|
sta SETPAGE2
|
2018-12-14 16:19:05 +00:00
|
|
|
|
|
2018-12-17 07:02:03 +00:00
|
|
|
|
jsr .6
|
|
|
|
|
|
|
|
|
|
sta CLRPAGE2
|
|
|
|
|
|
|
|
|
|
.6 ldy #39
|
|
|
|
|
|
|
|
|
|
.7 lda (ZPScrBaseL2),y
|
|
|
|
|
sta (ZPScrBaseL1),y
|
|
|
|
|
dey
|
|
|
|
|
bpl .7
|
2018-12-17 14:24:39 +00:00
|
|
|
|
|
2018-12-17 07:02:03 +00:00
|
|
|
|
.8 rts
|
2018-12-14 16:19:05 +00:00
|
|
|
|
*--------------------------------------
|
2019-05-15 15:30:46 +00:00
|
|
|
|
SetCharAtCurPos pha
|
2018-12-17 10:40:00 +00:00
|
|
|
|
ldy #S.DCB.TTY.CV
|
|
|
|
|
lda (ZPDCBPtr),y
|
|
|
|
|
tax
|
|
|
|
|
dey
|
|
|
|
|
lda (ZPDCBPtr),y
|
2019-05-15 15:30:46 +00:00
|
|
|
|
tay
|
|
|
|
|
pla
|
2019-05-29 15:21:14 +00:00
|
|
|
|
cpy #80
|
|
|
|
|
bcs SetCharAtYX.8
|
2019-05-15 15:30:46 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
SetCharAtYX cmp #$40
|
|
|
|
|
bcc .1
|
2018-12-17 10:40:00 +00:00
|
|
|
|
|
2019-05-15 15:30:46 +00:00
|
|
|
|
cmp #$60
|
|
|
|
|
bcs .1
|
2018-12-17 10:40:00 +00:00
|
|
|
|
|
2019-05-15 15:30:46 +00:00
|
|
|
|
and #$1F remap UPPERCASE
|
2018-12-17 10:40:00 +00:00
|
|
|
|
|
2019-05-15 15:30:46 +00:00
|
|
|
|
.1 phy
|
|
|
|
|
|
|
|
|
|
ldy #S.DCB.TTY.bNORMAL
|
|
|
|
|
ora (ZPDCBPtr),y
|
|
|
|
|
sta ZPTmpChar
|
|
|
|
|
|
|
|
|
|
ldy #S.DCB.TTY.bG0G1 Select Active Font
|
2019-05-15 05:46:12 +00:00
|
|
|
|
lda (ZPDCBPtr),y
|
2019-05-15 15:30:46 +00:00
|
|
|
|
bpl .2
|
2019-05-15 05:46:12 +00:00
|
|
|
|
iny
|
2019-05-15 15:30:46 +00:00
|
|
|
|
|
|
|
|
|
.2 iny
|
2019-05-14 16:04:16 +00:00
|
|
|
|
|
2019-05-15 15:30:46 +00:00
|
|
|
|
lda (ZPDCBPtr),y
|
|
|
|
|
bpl .3 not Graphic mode
|
2019-05-14 16:04:16 +00:00
|
|
|
|
|
2019-05-15 15:30:46 +00:00
|
|
|
|
lda ZPTmpChar
|
|
|
|
|
cmp #$E0 Normal lowercase ?
|
|
|
|
|
bcc .3
|
|
|
|
|
|
|
|
|
|
tay
|
2019-05-14 16:04:16 +00:00
|
|
|
|
|
2019-05-15 15:30:46 +00:00
|
|
|
|
lda REMAP.E0.FF-$E0,y
|
|
|
|
|
sta ZPTmpChar
|
2019-05-14 16:04:16 +00:00
|
|
|
|
|
|
|
|
|
|
2019-05-15 15:30:46 +00:00
|
|
|
|
.3 jsr DRV.TERM.SETUP.L1X
|
2018-12-14 16:19:05 +00:00
|
|
|
|
ply
|
2018-12-12 16:32:33 +00:00
|
|
|
|
|
2019-05-15 15:30:46 +00:00
|
|
|
|
lda ZPTmpChar
|
2018-12-14 16:19:05 +00:00
|
|
|
|
sta SETWRITEAUX
|
|
|
|
|
sta (ZPBufBaseL1),y
|
|
|
|
|
sta CLRWRITEAUX
|
|
|
|
|
|
|
|
|
|
bit bActive
|
2018-12-17 07:02:03 +00:00
|
|
|
|
bpl SetCharAtYX.8
|
2018-12-17 14:24:39 +00:00
|
|
|
|
|
2019-05-15 15:30:46 +00:00
|
|
|
|
SetCharAtY.SCR pha
|
2018-12-14 16:19:05 +00:00
|
|
|
|
|
|
|
|
|
tya
|
2018-12-12 16:32:33 +00:00
|
|
|
|
lsr
|
|
|
|
|
tay
|
|
|
|
|
|
|
|
|
|
pla
|
2018-12-15 20:34:55 +00:00
|
|
|
|
sta SET80STORE
|
2018-12-17 07:02:03 +00:00
|
|
|
|
bcs .2
|
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-17 07:02:03 +00:00
|
|
|
|
|
|
|
|
|
SetCharAtYX.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
|
2019-06-02 08:58:46 +00:00
|
|
|
|
cmp #24
|
|
|
|
|
bcs .9 Out of screen
|
|
|
|
|
|
2018-12-12 16:32:33 +00:00
|
|
|
|
tax
|
|
|
|
|
|
2018-12-15 20:34:55 +00:00
|
|
|
|
jsr DRV.TERM.SETUP.L1X
|
2018-12-12 16:32:33 +00:00
|
|
|
|
|
2018-12-14 07:32:20 +00:00
|
|
|
|
ldy #S.DCB.TTY.CH
|
|
|
|
|
lda (ZPDCBPtr),y
|
2019-06-02 08:58:46 +00:00
|
|
|
|
cmp #80
|
|
|
|
|
bcs .9 Out of screen
|
|
|
|
|
|
2018-12-12 16:32:33 +00:00
|
|
|
|
tay
|
|
|
|
|
|
2018-12-14 16:19:05 +00:00
|
|
|
|
sta SETREADAUX
|
|
|
|
|
lda (ZPBufBaseL1),y
|
|
|
|
|
sta CLRREADAUX
|
|
|
|
|
|
2019-05-15 15:30:46 +00:00
|
|
|
|
cmp #$20
|
|
|
|
|
bcs .8
|
|
|
|
|
|
|
|
|
|
* clc
|
|
|
|
|
adc #40 remap $00-$1F uppercase
|
|
|
|
|
|
2019-06-02 08:58:46 +00:00
|
|
|
|
.8 clc
|
|
|
|
|
|
|
|
|
|
.9 rts
|
2019-05-15 15:30:46 +00:00
|
|
|
|
*--------------------------------------
|
2019-07-12 14:51:57 +00:00
|
|
|
|
* TEMP
|
2019-05-12 20:45:11 +00:00
|
|
|
|
*--------------------------------------
|
2019-05-25 19:24:07 +00:00
|
|
|
|
RESET.VALUES .DA #0 S.DCB.TTY.MODE
|
|
|
|
|
.DA #0 S.DCB.TTY.CH
|
|
|
|
|
.DA #0 S.DCB.TTY.CV
|
|
|
|
|
.DA #0 S.DCB.TTY.SCROLLTOP
|
|
|
|
|
.DA #23 S.DCB.TTY.SCROLLBOT
|
|
|
|
|
.DA #0 S.DCB.TTY.bCURON
|
|
|
|
|
.DA #0 S.DCB.TTY.bTITLE
|
|
|
|
|
|
|
|
|
|
.DA #$80 S.DCB.TTY.bNORMAL
|
|
|
|
|
.DA #$80 S.DCB.TTY.bLINEWRAP
|
|
|
|
|
.DA #$80 S.DCB.TTY.bCRLF
|
|
|
|
|
|
|
|
|
|
.DA #0
|
|
|
|
|
|
|
|
|
|
.DA #0 S.DCB.TTY.bG0G1
|
|
|
|
|
.DA #0 S.DCB.TTY.bG0ALT
|
|
|
|
|
.DA #$80 S.DCB.TTY.bG1ALT
|
|
|
|
|
|
|
|
|
|
.DA #S.DCB.TTY.OUTBUFFER S.DCB.TTY.OUTTAIL
|
|
|
|
|
.DA #S.DCB.TTY.OUTBUFFER S.DCB.TTY.OUTHEAD
|
|
|
|
|
.DA #S.DCB.TTY.INBUFFER S.DCB.TTY.INBUFFER
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
DRV.TERM.DIB .DA #S.DIB.S.WRITE+S.DIB.S.READ
|
|
|
|
|
.DA #0,#0,#0
|
|
|
|
|
>PSTR "A2osX VT100 TERM"
|
|
|
|
|
.DA #S.DIB.T.CHAR
|
|
|
|
|
.DA #0
|
|
|
|
|
.DA K.VER
|
|
|
|
|
*--------------------------------------
|
2019-07-12 14:51:57 +00:00
|
|
|
|
* ` a b c d e f g h i j k l m n o
|
|
|
|
|
REMAP.E0.FF .HS 5B4142434445464748495FA0DF544e4f
|
|
|
|
|
* p q r s t u v w x y z { | } ~ DEL
|
|
|
|
|
.HS 50DF5253545556575F595a5b5c5d5e5f
|
|
|
|
|
*--------------------------------------
|
2019-02-20 16:07:43 +00:00
|
|
|
|
BUF.BASEL .DA #0
|
|
|
|
|
.DA #80
|
|
|
|
|
.DA #160
|
|
|
|
|
.DA #240
|
|
|
|
|
.DA #320
|
|
|
|
|
.DA #400
|
|
|
|
|
.DA #480
|
|
|
|
|
.DA #560
|
|
|
|
|
.DA #640
|
|
|
|
|
.DA #720
|
|
|
|
|
.DA #800
|
|
|
|
|
.DA #880
|
|
|
|
|
.DA #960
|
|
|
|
|
.DA #1040
|
|
|
|
|
.DA #1120
|
|
|
|
|
.DA #1200
|
|
|
|
|
.DA #1280
|
|
|
|
|
.DA #1360
|
|
|
|
|
.DA #1440
|
|
|
|
|
.DA #1520
|
|
|
|
|
.DA #1600
|
|
|
|
|
.DA #1680
|
|
|
|
|
.DA #1760
|
|
|
|
|
.DA #1840
|
|
|
|
|
BUF.BASEH .DA /0
|
|
|
|
|
.DA /80
|
|
|
|
|
.DA /160
|
|
|
|
|
.DA /240
|
|
|
|
|
.DA /320
|
|
|
|
|
.DA /400
|
|
|
|
|
.DA /480
|
|
|
|
|
.DA /560
|
|
|
|
|
.DA /640
|
|
|
|
|
.DA /720
|
|
|
|
|
.DA /800
|
|
|
|
|
.DA /880
|
|
|
|
|
.DA /960
|
|
|
|
|
.DA /1040
|
|
|
|
|
.DA /1120
|
|
|
|
|
.DA /1200
|
|
|
|
|
.DA /1280
|
|
|
|
|
.DA /1360
|
|
|
|
|
.DA /1440
|
|
|
|
|
.DA /1520
|
|
|
|
|
.DA /1600
|
|
|
|
|
.DA /1680
|
|
|
|
|
.DA /1760
|
|
|
|
|
.DA /1840
|
|
|
|
|
*--------------------------------------
|
2019-02-23 22:01:58 +00:00
|
|
|
|
SCR.BASEL .HS 00.80.00.80.00.80.00.80.28.A8.28.A8.28.A8.28.A8.50.D0.50.D0.50.D0.50.D0
|
|
|
|
|
SCR.BASEH .HS 04.04.05.05.06.06.07.07.04.04.05.05.06.06.07.07.04.04.05.05.06.06.07.07
|
|
|
|
|
*--------------------------------------
|
2018-12-12 16:32:33 +00:00
|
|
|
|
MAN
|
|
|
|
|
SAVE USR/SRC/SYS/KERNEL.S.TERMLC
|
|
|
|
|
LOAD USR/SRC/SYS/KERNEL.S
|
|
|
|
|
ASM
|