2018-12-11 16:41:25 +00:00
|
|
|
|
NEW
|
2019-05-15 05:46:12 +00:00
|
|
|
|
AUTO 3,1
|
2018-12-11 16:41:25 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
CURSOR.BLINK.SPEED .EQ 2
|
|
|
|
|
*--------------------------------------
|
2020-11-19 15:34:02 +00:00
|
|
|
|
.DUMMY ZPDRV
|
2018-12-14 16:19:05 +00:00
|
|
|
|
.OR ZPDRV
|
|
|
|
|
ZPIOCTL .BS 2
|
|
|
|
|
ZPBufPtr .BS 2
|
2020-05-04 20:46:21 +00:00
|
|
|
|
ZPDCBPtr .BS 2
|
|
|
|
|
|
2021-03-15 20:45:22 +00:00
|
|
|
|
ZPCnt .BS 2
|
2020-01-10 15:58:47 +00:00
|
|
|
|
|
2021-03-15 20:45:22 +00:00
|
|
|
|
ZPBufBL1 .BS 2
|
|
|
|
|
ZPBufBL2 .BS 2
|
|
|
|
|
ZPScrBL1 .BS 2
|
|
|
|
|
ZPScrBL2 .BS 2
|
2020-01-10 15:58:47 +00:00
|
|
|
|
*--------------------------------------
|
2020-05-04 20:46:21 +00:00
|
|
|
|
bActive .BS 1
|
|
|
|
|
ZPDevID .BS 1
|
2020-01-11 17:13:27 +00:00
|
|
|
|
|
2018-12-14 16:19:05 +00:00
|
|
|
|
ZPTmpBool .BS 1
|
2019-05-15 15:30:46 +00:00
|
|
|
|
ZPTmpChar .BS 1
|
2020-01-10 15:58:47 +00:00
|
|
|
|
|
2021-03-15 20:45:22 +00:00
|
|
|
|
CsiH .BS 1
|
|
|
|
|
CsiPCnt .BS 1
|
|
|
|
|
CsiP .BS 4
|
2018-12-14 16:19:05 +00:00
|
|
|
|
.ED
|
2018-12-11 16:41:25 +00:00
|
|
|
|
*--------------------------------------
|
2020-02-06 16:23:59 +00:00
|
|
|
|
TERMX .DA TERMX.STATUS
|
|
|
|
|
.DA A2osX.BADCALL
|
|
|
|
|
.DA A2osX.BADCALL
|
|
|
|
|
.DA A2osX.BADCALL
|
|
|
|
|
.DA TERMX.CONTROL
|
|
|
|
|
.DA A2osX.BADCALL
|
|
|
|
|
.DA TERMX.OPEN
|
|
|
|
|
.DA TERMX.CLOSE
|
|
|
|
|
.DA TERMX.READ
|
|
|
|
|
.DA TERMX.WRITE
|
|
|
|
|
*--------------------------------------
|
2020-05-04 20:46:21 +00:00
|
|
|
|
TERMX.STATUS tya
|
|
|
|
|
beq .1
|
2020-01-10 15:58:47 +00:00
|
|
|
|
|
2018-12-11 16:41:25 +00:00
|
|
|
|
cmp #S.IOCTL.STATCODE.GETDIB
|
2019-02-20 16:07:43 +00:00
|
|
|
|
bne .3
|
2020-01-10 15:58:47 +00:00
|
|
|
|
|
2018-12-12 16:32:33 +00:00
|
|
|
|
ldy #S.DIB-1
|
2018-12-11 16:41:25 +00:00
|
|
|
|
.HS 2C bit abs
|
2018-12-12 16:32:33 +00:00
|
|
|
|
.1 ldy #3
|
2018-12-11 16:41:25 +00:00
|
|
|
|
|
2020-01-10 15:58:47 +00:00
|
|
|
|
sta CLRWRITEAUX
|
|
|
|
|
|
2020-02-06 16:23:59 +00:00
|
|
|
|
.2 lda TERMX.DIB,y
|
2018-12-17 14:24:39 +00:00
|
|
|
|
sta (ZPBufPtr),y
|
2018-12-12 16:32:33 +00:00
|
|
|
|
dey
|
|
|
|
|
bne .2
|
2019-11-14 14:48:12 +00:00
|
|
|
|
|
2018-12-13 16:39:24 +00:00
|
|
|
|
ldy #S.DCB.TTY.STATUS
|
|
|
|
|
lda (ZPDCBPtr),y
|
2018-12-14 07:32:20 +00:00
|
|
|
|
sta (ZPBufPtr)
|
2018-12-11 16:41:25 +00:00
|
|
|
|
clc
|
|
|
|
|
rts
|
2019-11-14 14:48:12 +00:00
|
|
|
|
|
2019-05-16 15:51:19 +00:00
|
|
|
|
.3 cmp #S.IOCTL.STATCODE.EOF
|
2019-02-20 16:07:43 +00:00
|
|
|
|
bne .9
|
|
|
|
|
|
2020-02-06 16:23:59 +00:00
|
|
|
|
jsr TERMX.ISOPENED
|
|
|
|
|
beq TERMX.OPEN.E
|
2019-11-14 14:48:12 +00:00
|
|
|
|
|
2020-02-06 16:23:59 +00:00
|
|
|
|
jsr TERMX.CURBLNK
|
2019-02-20 16:07:43 +00:00
|
|
|
|
ldy #S.DCB.TTY.OUTTAIL
|
|
|
|
|
lda (ZPDCBPtr),y
|
2019-02-21 06:29:41 +00:00
|
|
|
|
iny
|
2019-11-14 14:48:12 +00:00
|
|
|
|
* sec
|
2019-05-16 15:51:19 +00:00
|
|
|
|
eor (ZPDCBPtr),y OUTHEAD
|
|
|
|
|
bne .8
|
2018-12-11 16:41:25 +00:00
|
|
|
|
|
2019-02-20 16:07:43 +00:00
|
|
|
|
bit bActive
|
2019-05-16 15:51:19 +00:00
|
|
|
|
bpl .7
|
2019-11-14 14:48:12 +00:00
|
|
|
|
|
2019-02-20 16:07:43 +00:00
|
|
|
|
bit OPENAPPLE
|
2019-05-16 15:51:19 +00:00
|
|
|
|
bmi .7
|
2019-11-14 14:48:12 +00:00
|
|
|
|
|
2019-02-20 16:07:43 +00:00
|
|
|
|
bit KBD
|
2019-05-16 15:51:19 +00:00
|
|
|
|
bmi .8
|
2019-02-20 16:07:43 +00:00
|
|
|
|
|
2019-05-16 15:51:19 +00:00
|
|
|
|
.7 lda #$ff
|
|
|
|
|
.HS 2C BIT ABS
|
|
|
|
|
.8 lda #0
|
2019-02-20 16:07:43 +00:00
|
|
|
|
clc
|
|
|
|
|
rts
|
2019-11-14 14:48:12 +00:00
|
|
|
|
|
2018-12-11 16:41:25 +00:00
|
|
|
|
.9 lda #MLI.E.BADCTL
|
2019-11-14 14:48:12 +00:00
|
|
|
|
.HS 2C BIT ABS
|
2020-02-06 16:23:59 +00:00
|
|
|
|
TERMX.OPEN.E lda #MLI.E.OPEN
|
2018-12-11 16:41:25 +00:00
|
|
|
|
sec
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2020-05-04 20:46:21 +00:00
|
|
|
|
TERMX.OPEN jsr TERMX.ISOPENED
|
2020-02-06 16:23:59 +00:00
|
|
|
|
bne TERMX.OPEN.E
|
2019-11-14 14:48:12 +00:00
|
|
|
|
|
2019-03-19 16:52:08 +00:00
|
|
|
|
ldx #0
|
2019-11-14 14:48:12 +00:00
|
|
|
|
|
2020-03-12 07:46:43 +00:00
|
|
|
|
.2 jsr SHARED.GetScrnDevX
|
2019-03-19 16:52:08 +00:00
|
|
|
|
beq .3
|
2019-11-14 14:48:12 +00:00
|
|
|
|
|
2018-12-11 16:41:25 +00:00
|
|
|
|
inx
|
2020-01-11 17:13:27 +00:00
|
|
|
|
cpx #K.TTY.MAX+1
|
2019-03-19 16:52:08 +00:00
|
|
|
|
bne .2
|
2019-11-14 14:48:12 +00:00
|
|
|
|
|
2018-12-11 16:41:25 +00:00
|
|
|
|
lda #E.OOH
|
|
|
|
|
sec
|
|
|
|
|
rts
|
2019-11-14 14:48:12 +00:00
|
|
|
|
|
2020-05-04 20:46:21 +00:00
|
|
|
|
.3 lda ZPDevID
|
2020-03-12 07:46:43 +00:00
|
|
|
|
|
|
|
|
|
sta CLRWRITEAUX
|
|
|
|
|
sta A2osX.SCRNDEVS,x
|
|
|
|
|
sta SETWRITEAUX
|
2018-12-14 16:19:05 +00:00
|
|
|
|
|
2020-01-11 17:13:27 +00:00
|
|
|
|
sta (ZPDCBPtr) #S.DCB.TTY.DEVID
|
|
|
|
|
|
2018-12-13 16:39:24 +00:00
|
|
|
|
ldy #S.DCB.TTY.STATUS
|
|
|
|
|
lda (ZPDCBPtr),y
|
2018-12-11 16:41:25 +00:00
|
|
|
|
ora #S.DIB.S.OPENED
|
2020-02-06 16:23:59 +00:00
|
|
|
|
ora TERMX.DIB+S.DIB.S
|
2018-12-13 16:39:24 +00:00
|
|
|
|
sta (ZPDCBPtr),y
|
2018-12-11 16:41:25 +00:00
|
|
|
|
jsr RESET
|
|
|
|
|
*--------------------------------------
|
2020-02-06 16:23:59 +00:00
|
|
|
|
TERMX.CONTROL lda (ZPDCBPtr) #S.DCB.TTY.DEVID
|
2020-03-12 07:46:43 +00:00
|
|
|
|
|
|
|
|
|
sta CLRWRITEAUX
|
|
|
|
|
sta A2osX.ASCREEN
|
|
|
|
|
sta SETWRITEAUX
|
|
|
|
|
|
2018-12-17 14:24:39 +00:00
|
|
|
|
sta SETTEXT
|
|
|
|
|
|
2020-02-06 16:23:59 +00:00
|
|
|
|
jsr TERMX.SCRCPY
|
2018-12-17 07:02:03 +00:00
|
|
|
|
lda #0
|
|
|
|
|
|
|
|
|
|
ldy #S.DCB.TTY.bCURON
|
|
|
|
|
sta (ZPDCBPtr),y
|
|
|
|
|
|
2020-01-10 15:58:47 +00:00
|
|
|
|
iny #S.DCB.TTY.bTITLE
|
2018-12-17 07:02:03 +00:00
|
|
|
|
sta (ZPDCBPtr),y
|
2018-12-11 16:41:25 +00:00
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2020-02-06 16:23:59 +00:00
|
|
|
|
TERMX.CLOSE jsr TERMX.ISOPENED
|
2018-12-11 16:41:25 +00:00
|
|
|
|
beq .9
|
2019-11-14 14:48:12 +00:00
|
|
|
|
|
2020-02-06 16:23:59 +00:00
|
|
|
|
lda TERMX.DIB+S.DIB.S
|
2018-12-13 16:39:24 +00:00
|
|
|
|
sta (ZPDCBPtr),y
|
2018-12-11 16:41:25 +00:00
|
|
|
|
ldx #0
|
2020-01-10 15:58:47 +00:00
|
|
|
|
|
2020-03-12 07:46:43 +00:00
|
|
|
|
.1 jsr SHARED.GetScrnDevX
|
2020-01-11 17:13:27 +00:00
|
|
|
|
cmp (ZPDCBPtr) #S.DCB.TTY.DEVID
|
2018-12-11 16:41:25 +00:00
|
|
|
|
bne .2
|
|
|
|
|
|
2020-03-12 07:46:43 +00:00
|
|
|
|
sta CLRWRITEAUX
|
|
|
|
|
stz A2osX.SCRNDEVS,x
|
|
|
|
|
sta SETWRITEAUX
|
2018-12-11 16:41:25 +00:00
|
|
|
|
clc
|
|
|
|
|
rts
|
2020-01-10 15:58:47 +00:00
|
|
|
|
|
|
|
|
|
.2 inx
|
2020-01-11 17:13:27 +00:00
|
|
|
|
cpx #K.TTY.MAX+1
|
2020-01-10 15:58:47 +00:00
|
|
|
|
bne .1
|
|
|
|
|
|
2018-12-14 16:19:05 +00:00
|
|
|
|
.9 lda #MLI.E.IO
|
2018-12-11 16:41:25 +00:00
|
|
|
|
sec
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2020-02-06 16:23:59 +00:00
|
|
|
|
TERMX.ISOPENED ldy #S.DCB.TTY.STATUS
|
2019-11-14 14:48:12 +00:00
|
|
|
|
lda (ZPDCBPtr),y
|
|
|
|
|
bit #S.DIB.S.OPENED
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2020-02-06 16:23:59 +00:00
|
|
|
|
TERMX.READ bit bActive is screen active?
|
2018-12-14 16:19:05 +00:00
|
|
|
|
bpl .6 no....go check flush...
|
2020-02-06 16:23:59 +00:00
|
|
|
|
jsr TERMX.CURBLNK
|
2018-12-11 16:41:25 +00:00
|
|
|
|
|
2020-03-11 16:41:45 +00:00
|
|
|
|
bit OPENAPPLE
|
2019-02-23 22:01:58 +00:00
|
|
|
|
bpl .1
|
2018-12-11 16:41:25 +00:00
|
|
|
|
|
2020-02-06 16:23:59 +00:00
|
|
|
|
jsr TERMX.Title.ON
|
2019-12-07 17:53:45 +00:00
|
|
|
|
|
|
|
|
|
bra .6 Open apple key, not for us...
|
|
|
|
|
|
2020-02-06 16:23:59 +00:00
|
|
|
|
.1 jsr TERMX.Title.OFF
|
2018-12-17 07:02:03 +00:00
|
|
|
|
|
2018-12-11 16:41:25 +00:00
|
|
|
|
lda KBD
|
2020-03-12 07:46:43 +00:00
|
|
|
|
|
2018-12-11 16:41:25 +00:00
|
|
|
|
bpl .6
|
|
|
|
|
sta KBDSTROBE
|
|
|
|
|
|
|
|
|
|
and #$7F
|
2020-02-10 16:24:49 +00:00
|
|
|
|
cmp #C.ESC
|
|
|
|
|
bne .10
|
|
|
|
|
|
|
|
|
|
lda #3
|
2020-02-14 07:21:56 +00:00
|
|
|
|
|
2020-02-10 16:24:49 +00:00
|
|
|
|
.10 ldx #KeyRemapped.cnt-1
|
2019-12-04 13:46:58 +00:00
|
|
|
|
|
2018-12-11 16:41:25 +00:00
|
|
|
|
.2 cmp KeyRemapped,x
|
|
|
|
|
beq .3
|
2019-12-04 13:46:58 +00:00
|
|
|
|
|
2018-12-11 16:41:25 +00:00
|
|
|
|
dex
|
2019-05-25 19:24:07 +00:00
|
|
|
|
bpl .2
|
2019-12-04 13:46:58 +00:00
|
|
|
|
|
2019-05-25 19:24:07 +00:00
|
|
|
|
cmp #C.CR
|
|
|
|
|
bne .21
|
|
|
|
|
|
|
|
|
|
jsr Char.Out.Put
|
|
|
|
|
ldy #S.DCB.TTY.bCRLF
|
|
|
|
|
lda (ZPDCBPtr),y
|
|
|
|
|
bpl .7
|
2019-12-04 13:46:58 +00:00
|
|
|
|
|
2019-05-25 19:24:07 +00:00
|
|
|
|
lda #C.LF
|
|
|
|
|
.21 jsr Char.Out.Put no remap....send char....
|
2018-12-11 16:41:25 +00:00
|
|
|
|
bra .7 and flush
|
2019-12-04 13:46:58 +00:00
|
|
|
|
|
2019-05-25 19:24:07 +00:00
|
|
|
|
.3 lda KeyRemapped.Tbl,x
|
|
|
|
|
pha
|
|
|
|
|
lda #C.ESC
|
2018-12-11 16:41:25 +00:00
|
|
|
|
jsr Char.Out.Put
|
2019-05-25 19:24:07 +00:00
|
|
|
|
lda #'['
|
|
|
|
|
jsr Char.Out.Put
|
|
|
|
|
pla
|
|
|
|
|
jsr Char.Out.Put
|
|
|
|
|
bra .7
|
2018-12-11 16:41:25 +00:00
|
|
|
|
|
2018-12-15 20:34:55 +00:00
|
|
|
|
.6 ldy #S.DCB.TTY.OUTTAIL
|
2018-12-13 16:39:24 +00:00
|
|
|
|
lda (ZPDCBPtr),y
|
2019-10-11 20:05:54 +00:00
|
|
|
|
iny
|
|
|
|
|
cmp (ZPDCBPtr),y OUTHEAD
|
2018-12-11 16:41:25 +00:00
|
|
|
|
beq .9 no char in output buffer...
|
2019-12-04 13:46:58 +00:00
|
|
|
|
|
2018-12-11 16:41:25 +00:00
|
|
|
|
.7 stz .8+1
|
2020-01-10 15:58:47 +00:00
|
|
|
|
|
2021-03-15 20:45:22 +00:00
|
|
|
|
.70 inc ZPCnt
|
2018-12-11 16:41:25 +00:00
|
|
|
|
bne .71
|
2019-12-04 13:46:58 +00:00
|
|
|
|
|
2021-03-15 20:45:22 +00:00
|
|
|
|
inc ZPCnt+1
|
2018-12-11 16:41:25 +00:00
|
|
|
|
beq .8
|
2019-12-04 13:46:58 +00:00
|
|
|
|
|
2018-12-11 16:41:25 +00:00
|
|
|
|
.71 jsr Char.Out.Get
|
|
|
|
|
bcs .8
|
2019-12-04 13:46:58 +00:00
|
|
|
|
|
2018-12-11 16:41:25 +00:00
|
|
|
|
ldy .8+1
|
2020-01-11 17:13:27 +00:00
|
|
|
|
sta CLRWRITEAUX
|
2018-12-11 16:41:25 +00:00
|
|
|
|
sta (ZPBufPtr),y
|
2020-01-11 17:13:27 +00:00
|
|
|
|
sta SETWRITEAUX
|
2018-12-11 16:41:25 +00:00
|
|
|
|
iny
|
|
|
|
|
sty .8+1
|
|
|
|
|
bra .70
|
2019-12-04 13:46:58 +00:00
|
|
|
|
|
2018-12-11 16:41:25 +00:00
|
|
|
|
.8 lda #$ff SELF MODIFIED
|
2020-01-11 17:13:27 +00:00
|
|
|
|
|
|
|
|
|
sta CLRWRITEAUX
|
|
|
|
|
|
2018-12-11 16:41:25 +00:00
|
|
|
|
ldy #S.IOCTL.BYTECNT
|
|
|
|
|
sta (ZPIOCTL),y
|
|
|
|
|
iny
|
|
|
|
|
lda #0
|
|
|
|
|
sta (ZPIOCTL),y
|
|
|
|
|
clc
|
|
|
|
|
rts
|
2019-12-04 13:46:58 +00:00
|
|
|
|
|
2019-05-12 20:45:11 +00:00
|
|
|
|
.9 lda #E.NODATA
|
|
|
|
|
* sec
|
2018-12-11 16:41:25 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2020-02-06 16:23:59 +00:00
|
|
|
|
TERMX.WRITE jsr TERMX.CUROFF
|
2019-11-14 14:48:12 +00:00
|
|
|
|
|
2021-03-15 20:45:22 +00:00
|
|
|
|
.1 inc ZPCnt
|
2018-12-12 16:32:33 +00:00
|
|
|
|
bne .2
|
2019-11-14 14:48:12 +00:00
|
|
|
|
|
2021-03-15 20:45:22 +00:00
|
|
|
|
inc ZPCnt+1
|
2019-05-25 19:24:07 +00:00
|
|
|
|
beq .8
|
2019-11-14 14:48:12 +00:00
|
|
|
|
|
2018-12-17 14:24:39 +00:00
|
|
|
|
.2 ldy #S.DCB.TTY.MODE
|
2018-12-13 16:39:24 +00:00
|
|
|
|
lda (ZPDCBPtr),y
|
2018-12-12 16:32:33 +00:00
|
|
|
|
tax
|
|
|
|
|
jsr .3
|
2018-12-11 16:41:25 +00:00
|
|
|
|
|
2018-12-12 16:32:33 +00:00
|
|
|
|
inc ZPBufPtr
|
|
|
|
|
bne .1
|
|
|
|
|
inc ZPBufPtr+1
|
|
|
|
|
bra .1
|
2018-12-11 16:41:25 +00:00
|
|
|
|
|
2018-12-12 16:32:33 +00:00
|
|
|
|
.3 jmp (.4,x)
|
2018-12-17 07:02:03 +00:00
|
|
|
|
|
2021-03-15 20:45:22 +00:00
|
|
|
|
.4 .DA TERMX.OUT
|
2020-02-06 16:23:59 +00:00
|
|
|
|
.DA TERMX.ESC
|
|
|
|
|
.DA TERMX.CSI
|
|
|
|
|
.DA TERMX.IAC
|
|
|
|
|
.DA TERMX.G0
|
|
|
|
|
.DA TERMX.G1
|
2019-11-14 14:48:12 +00:00
|
|
|
|
|
2019-05-25 19:24:07 +00:00
|
|
|
|
.8 clc
|
|
|
|
|
rts
|
2018-12-11 16:41:25 +00:00
|
|
|
|
*--------------------------------------
|
2021-03-15 20:45:22 +00:00
|
|
|
|
TERMX.OUT jsr TERM.GetBufByte
|
2018-12-12 16:32:33 +00:00
|
|
|
|
|
|
|
|
|
cmp #IAC
|
2018-12-11 16:41:25 +00:00
|
|
|
|
bne .1
|
2019-11-14 14:48:12 +00:00
|
|
|
|
|
2018-12-13 16:39:24 +00:00
|
|
|
|
lda #S.DCB.TTY.MODE.IAC
|
2021-03-15 20:45:22 +00:00
|
|
|
|
jmp TERMX.SETM
|
2019-11-14 14:48:12 +00:00
|
|
|
|
|
2018-12-17 07:02:03 +00:00
|
|
|
|
.1 cmp #C.DEL
|
2021-03-15 20:45:22 +00:00
|
|
|
|
beq TERMX.OUT.DEL
|
2019-11-14 14:48:12 +00:00
|
|
|
|
|
2018-12-11 16:41:25 +00:00
|
|
|
|
cmp #C.SPACE
|
2018-12-17 14:24:39 +00:00
|
|
|
|
bcs .8
|
2019-11-14 14:48:12 +00:00
|
|
|
|
|
2018-12-17 14:24:39 +00:00
|
|
|
|
ldx #CtrlChars.Cnt-1
|
2018-12-11 16:41:25 +00:00
|
|
|
|
|
2018-12-17 14:24:39 +00:00
|
|
|
|
.2 cmp CtrlChars,x
|
|
|
|
|
beq .3
|
2019-11-14 14:48:12 +00:00
|
|
|
|
|
2018-12-17 14:24:39 +00:00
|
|
|
|
dex
|
|
|
|
|
bpl .2
|
2019-11-14 14:48:12 +00:00
|
|
|
|
|
2018-12-17 14:24:39 +00:00
|
|
|
|
clc
|
|
|
|
|
rts
|
2019-11-14 14:48:12 +00:00
|
|
|
|
|
2018-12-17 14:24:39 +00:00
|
|
|
|
.3 txa
|
|
|
|
|
asl
|
|
|
|
|
tax
|
|
|
|
|
jmp (.4,x)
|
|
|
|
|
|
2019-05-15 15:30:46 +00:00
|
|
|
|
.4 .DA ENQ
|
2021-03-15 20:45:22 +00:00
|
|
|
|
.DA TERMX.OUT.BS
|
|
|
|
|
.DA TERMX.OUT.LF
|
|
|
|
|
.DA TERMX.OUT.FF
|
|
|
|
|
.DA TERMX.OUT.CR
|
|
|
|
|
.DA TERMX.OUT.SO
|
|
|
|
|
.DA TERMX.OUT.SI
|
|
|
|
|
.DA TERMX.OUT.FS
|
|
|
|
|
.DA TERMX.OUT.ESC
|
2020-02-06 16:23:59 +00:00
|
|
|
|
*--------------------------------------
|
2019-05-12 20:45:11 +00:00
|
|
|
|
.8 jsr SetCharAtCurPos
|
2018-12-11 16:41:25 +00:00
|
|
|
|
*--------------------------------------
|
2021-03-15 20:45:22 +00:00
|
|
|
|
TERMX.OUT.FS ldy #S.DCB.TTY.CH
|
2018-12-13 16:39:24 +00:00
|
|
|
|
lda (ZPDCBPtr),y
|
2019-05-29 15:21:14 +00:00
|
|
|
|
inc
|
|
|
|
|
sta (ZPDCBPtr),y
|
|
|
|
|
cmp #80
|
2021-03-15 20:45:22 +00:00
|
|
|
|
bcc TERMX.OUT.BS.8
|
2018-12-11 16:41:25 +00:00
|
|
|
|
|
2018-12-13 16:39:24 +00:00
|
|
|
|
ldy #S.DCB.TTY.bLINEWRAP
|
|
|
|
|
lda (ZPDCBPtr),y
|
2021-03-15 20:45:22 +00:00
|
|
|
|
bpl TERMX.OUT.BS.8
|
2019-11-14 14:48:12 +00:00
|
|
|
|
|
2021-03-15 20:45:22 +00:00
|
|
|
|
jsr TERMX.OUT.CR
|
2019-11-14 14:48:12 +00:00
|
|
|
|
|
2021-03-15 20:45:22 +00:00
|
|
|
|
jmp TERMX.OUT.LF.1
|
2019-05-25 19:24:07 +00:00
|
|
|
|
*--------------------------------------
|
2021-03-15 20:45:22 +00:00
|
|
|
|
TERMX.OUT.BS ldy #S.DCB.TTY.CH
|
2019-05-25 19:24:07 +00:00
|
|
|
|
lda (ZPDCBPtr),y
|
2021-03-15 20:45:22 +00:00
|
|
|
|
beq TERMX.OUT.BS.1
|
2019-05-25 19:24:07 +00:00
|
|
|
|
|
|
|
|
|
dec
|
|
|
|
|
sta (ZPDCBPtr),y
|
2020-02-06 16:23:59 +00:00
|
|
|
|
|
2021-03-15 20:45:22 +00:00
|
|
|
|
TERMX.OUT.BS.8 clc
|
2019-05-25 19:24:07 +00:00
|
|
|
|
rts
|
|
|
|
|
|
2021-03-15 20:45:22 +00:00
|
|
|
|
TERMX.OUT.BS.1 ldy #S.DCB.TTY.CV
|
2019-05-25 19:24:07 +00:00
|
|
|
|
lda (ZPDCBPtr),y
|
|
|
|
|
beq .2
|
|
|
|
|
|
|
|
|
|
dec
|
|
|
|
|
sta (ZPDCBPtr),y
|
|
|
|
|
|
|
|
|
|
lda #79
|
2020-07-04 19:00:47 +00:00
|
|
|
|
ldy #S.DCB.TTY.CH
|
2019-05-25 19:24:07 +00:00
|
|
|
|
sta (ZPDCBPtr),y
|
|
|
|
|
|
|
|
|
|
.2 clc
|
2018-12-11 16:41:25 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2021-03-15 20:45:22 +00:00
|
|
|
|
TERMX.OUT.DEL ldy #S.DCB.TTY.CH
|
2018-12-13 16:39:24 +00:00
|
|
|
|
lda (ZPDCBPtr),y
|
2018-12-11 16:41:25 +00:00
|
|
|
|
beq .1
|
2019-11-14 14:48:12 +00:00
|
|
|
|
|
2018-12-12 16:32:33 +00:00
|
|
|
|
dec
|
2018-12-13 16:39:24 +00:00
|
|
|
|
sta (ZPDCBPtr),y
|
2018-12-11 16:41:25 +00:00
|
|
|
|
bra .3
|
|
|
|
|
|
2019-12-04 13:46:58 +00:00
|
|
|
|
.1 ldy #S.DCB.TTY.CV
|
2018-12-13 16:39:24 +00:00
|
|
|
|
lda (ZPDCBPtr),y
|
2021-03-15 20:45:22 +00:00
|
|
|
|
beq TERMX.OUT.BS.8
|
2018-12-12 16:32:33 +00:00
|
|
|
|
dec
|
2018-12-13 16:39:24 +00:00
|
|
|
|
sta (ZPDCBPtr),y
|
2018-12-12 16:32:33 +00:00
|
|
|
|
|
2019-12-04 13:46:58 +00:00
|
|
|
|
ldy #S.DCB.TTY.CH
|
2018-12-11 16:41:25 +00:00
|
|
|
|
lda #79
|
2018-12-13 16:39:24 +00:00
|
|
|
|
sta (ZPDCBPtr),y S.DCB.TTY.CH
|
2019-11-14 14:48:12 +00:00
|
|
|
|
.3 lda #C.SPACE
|
2018-12-11 16:41:25 +00:00
|
|
|
|
jmp SetCharAtCurPos
|
|
|
|
|
*--------------------------------------
|
2021-03-15 20:45:22 +00:00
|
|
|
|
TERMX.OUT.FF jsr HOME
|
2020-02-06 16:23:59 +00:00
|
|
|
|
jmp TERMX.CLRSCR
|
2018-12-17 14:24:39 +00:00
|
|
|
|
*--------------------------------------
|
2021-03-15 20:45:22 +00:00
|
|
|
|
TERMX.OUT.CR lda #0
|
2018-12-17 14:24:39 +00:00
|
|
|
|
ldy #S.DCB.TTY.CH
|
|
|
|
|
sta (ZPDCBPtr),y
|
2018-12-11 16:41:25 +00:00
|
|
|
|
clc
|
|
|
|
|
rts
|
2018-12-17 07:02:03 +00:00
|
|
|
|
*--------------------------------------
|
2021-03-15 20:45:22 +00:00
|
|
|
|
TERMX.OUT.SO sec
|
2019-05-15 15:30:46 +00:00
|
|
|
|
.HS 90 BCC
|
|
|
|
|
*--------------------------------------
|
2021-03-15 20:45:22 +00:00
|
|
|
|
TERMX.OUT.SI clc
|
2019-05-15 15:30:46 +00:00
|
|
|
|
ldy #S.DCB.TTY.bG0G1
|
|
|
|
|
ror
|
|
|
|
|
sta (ZPDCBPtr),y
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2021-03-15 20:45:22 +00:00
|
|
|
|
TERMX.OUT.ESC lda #S.DCB.TTY.MODE.ESC
|
|
|
|
|
bra TERMX.SETM
|
2018-12-11 16:41:25 +00:00
|
|
|
|
*--------------------------------------
|
2020-02-06 16:23:59 +00:00
|
|
|
|
TERMX.ESC jsr TERM.GetBufByte y = #S.DCB.TTY.MODE
|
2018-12-12 16:32:33 +00:00
|
|
|
|
|
2018-12-11 16:41:25 +00:00
|
|
|
|
ldx #EscCodes.Cnt-1
|
|
|
|
|
.2 cmp EscCodes,x
|
|
|
|
|
beq .3
|
|
|
|
|
dex
|
|
|
|
|
bpl .2
|
2019-12-04 13:46:58 +00:00
|
|
|
|
|
2021-03-15 20:45:22 +00:00
|
|
|
|
bra TERMX.SETM0
|
2018-12-11 16:41:25 +00:00
|
|
|
|
|
2019-05-15 15:30:46 +00:00
|
|
|
|
.3 phx
|
|
|
|
|
jsr .4
|
|
|
|
|
plx
|
|
|
|
|
lda EscModes,x
|
2021-03-15 20:45:22 +00:00
|
|
|
|
bra TERMX.SETM
|
2019-12-04 13:46:58 +00:00
|
|
|
|
|
2019-05-15 15:30:46 +00:00
|
|
|
|
.4 txa
|
2018-12-11 16:41:25 +00:00
|
|
|
|
asl
|
|
|
|
|
tax
|
2019-05-15 15:30:46 +00:00
|
|
|
|
jmp (.5,x)
|
2019-12-04 13:46:58 +00:00
|
|
|
|
|
|
|
|
|
.5 .DA SaveCurPos 7
|
|
|
|
|
.DA RestoreCurPos 8
|
|
|
|
|
.DA Scroll.Dn M
|
2018-12-11 16:41:25 +00:00
|
|
|
|
.DA Scroll.Up D
|
|
|
|
|
.DA RESET c
|
2021-03-15 20:45:22 +00:00
|
|
|
|
.DA TERMX.SETM.RTS [
|
|
|
|
|
.DA TERMX.SETM.RTS (
|
|
|
|
|
.DA TERMX.SETM.RTS )
|
2019-05-15 15:30:46 +00:00
|
|
|
|
*--------------------------------------
|
2021-03-15 20:45:22 +00:00
|
|
|
|
TERMX.SETM0 lda #0
|
|
|
|
|
TERMX.SETM ldy #S.DCB.TTY.MODE
|
2019-05-15 15:30:46 +00:00
|
|
|
|
sta (ZPDCBPtr),y
|
|
|
|
|
ldy #S.DCB.TTY.INBUFFER
|
|
|
|
|
lda #S.DCB.TTY.INBUFFER
|
|
|
|
|
sta (ZPDCBPtr),y
|
|
|
|
|
clc
|
2021-03-15 20:45:22 +00:00
|
|
|
|
|
|
|
|
|
TERMX.SETM.RTS rts
|
2018-12-11 16:41:25 +00:00
|
|
|
|
*--------------------------------------
|
2020-02-06 16:23:59 +00:00
|
|
|
|
TERMX.CSI ldy #S.DCB.TTY.INBUFFER
|
2018-12-13 16:39:24 +00:00
|
|
|
|
lda (ZPDCBPtr),y
|
|
|
|
|
inc
|
|
|
|
|
sta (ZPDCBPtr),y
|
|
|
|
|
tay
|
2020-01-11 17:13:27 +00:00
|
|
|
|
|
2020-02-06 16:23:59 +00:00
|
|
|
|
jsr TERM.GetBufByte
|
2020-01-11 17:13:27 +00:00
|
|
|
|
|
2018-12-13 16:39:24 +00:00
|
|
|
|
sta (ZPDCBPtr),y
|
2018-12-11 16:41:25 +00:00
|
|
|
|
cmp #64 End of Seq ?
|
2020-02-06 16:23:59 +00:00
|
|
|
|
bcs TERMX.CSI.Exec
|
2018-12-13 16:39:24 +00:00
|
|
|
|
cpy #S.DCB.TTY.INBUFFER.MAX-1 buffer full?
|
2018-12-12 16:32:33 +00:00
|
|
|
|
bne .8
|
2019-10-16 20:42:21 +00:00
|
|
|
|
|
2019-07-12 14:51:57 +00:00
|
|
|
|
jsr RESET.MODE
|
2019-10-16 20:42:21 +00:00
|
|
|
|
|
2018-12-12 16:32:33 +00:00
|
|
|
|
.8 clc
|
2018-12-11 16:41:25 +00:00
|
|
|
|
rts
|
|
|
|
|
|
2021-03-15 20:45:22 +00:00
|
|
|
|
TERMX.CSI.Exec stz CsiH
|
|
|
|
|
stz CsiPCnt
|
2019-10-11 20:05:54 +00:00
|
|
|
|
|
2019-07-12 14:51:57 +00:00
|
|
|
|
lda #S.DCB.TTY.INBUFFER+1 EscSeq Ptr
|
|
|
|
|
clc
|
|
|
|
|
adc ZPDCBPtr
|
|
|
|
|
sta ZPPtr2
|
2019-10-11 20:05:54 +00:00
|
|
|
|
|
2019-07-12 14:51:57 +00:00
|
|
|
|
lda /S.DCB.TTY.INBUFFER+1
|
|
|
|
|
adc ZPDCBPtr+1
|
|
|
|
|
sta ZPPtr2+1
|
2019-10-11 20:05:54 +00:00
|
|
|
|
|
2019-07-12 14:51:57 +00:00
|
|
|
|
lda (ZPPtr2)
|
2019-05-25 19:24:07 +00:00
|
|
|
|
cmp #'?'
|
2019-07-12 14:51:57 +00:00
|
|
|
|
bne .2
|
2019-05-25 19:24:07 +00:00
|
|
|
|
|
2021-03-15 20:45:22 +00:00
|
|
|
|
sta CsiH
|
2019-10-11 20:05:54 +00:00
|
|
|
|
|
2019-07-28 20:39:30 +00:00
|
|
|
|
.1 jsr SHARED.NextCharPtr2
|
|
|
|
|
|
2020-03-16 06:50:15 +00:00
|
|
|
|
.2 jsr MATH32.Dec2ACC32
|
2019-07-12 14:51:57 +00:00
|
|
|
|
bcs .5
|
2018-12-11 16:41:25 +00:00
|
|
|
|
|
2019-07-28 20:39:30 +00:00
|
|
|
|
jsr SHARED.AddYToPtr2
|
2018-12-11 16:41:25 +00:00
|
|
|
|
lda #255
|
2019-07-12 14:51:57 +00:00
|
|
|
|
ldx ACC32+1
|
|
|
|
|
bne .3
|
2018-12-11 16:41:25 +00:00
|
|
|
|
|
2019-07-12 14:51:57 +00:00
|
|
|
|
lda ACC32
|
|
|
|
|
|
2021-03-15 20:45:22 +00:00
|
|
|
|
.3 ldx CsiPCnt
|
|
|
|
|
sta CsiP,x
|
|
|
|
|
inc CsiPCnt
|
2018-12-11 16:41:25 +00:00
|
|
|
|
|
2019-07-12 14:51:57 +00:00
|
|
|
|
lda (ZPPtr2)
|
2018-12-11 16:41:25 +00:00
|
|
|
|
cmp #';'
|
2019-07-12 14:51:57 +00:00
|
|
|
|
beq .1
|
2018-12-11 16:41:25 +00:00
|
|
|
|
|
2019-07-12 14:51:57 +00:00
|
|
|
|
.5 jsr RESET.MODE
|
2019-10-11 20:05:54 +00:00
|
|
|
|
|
2019-07-12 14:51:57 +00:00
|
|
|
|
lda (ZPPtr2)
|
2018-12-15 20:34:55 +00:00
|
|
|
|
ldx #CsiCodes.Cnt-1
|
2018-12-11 16:41:25 +00:00
|
|
|
|
|
2019-07-12 14:51:57 +00:00
|
|
|
|
.6 cmp CsiCodes,x
|
|
|
|
|
beq .7
|
2019-10-16 20:42:21 +00:00
|
|
|
|
|
2018-12-11 16:41:25 +00:00
|
|
|
|
dex
|
2019-10-16 20:42:21 +00:00
|
|
|
|
bpl .6
|
|
|
|
|
|
2018-12-11 16:41:25 +00:00
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
|
2019-07-12 14:51:57 +00:00
|
|
|
|
.7 txa
|
2018-12-11 16:41:25 +00:00
|
|
|
|
asl
|
|
|
|
|
tax
|
2018-12-15 20:34:55 +00:00
|
|
|
|
jmp (.8,x)
|
|
|
|
|
|
2021-03-15 20:45:22 +00:00
|
|
|
|
.8 .DA Csi.SetM h
|
|
|
|
|
.DA Csi.ResetM l
|
2018-12-15 20:34:55 +00:00
|
|
|
|
.DA Csi.DispAttr m
|
|
|
|
|
.DA Csi.Query n
|
|
|
|
|
.DA Csi.Scroll r
|
2021-03-15 20:45:22 +00:00
|
|
|
|
.DA Csi.CUU A
|
|
|
|
|
.DA Csi.CUD B
|
|
|
|
|
.DA Csi.CUF C
|
|
|
|
|
.DA Csi.CUB D
|
|
|
|
|
.DA Csi.CLRSCR J
|
|
|
|
|
.DA Csi.CLRL K
|
2018-12-15 20:34:55 +00:00
|
|
|
|
.DA Csi.Home H
|
|
|
|
|
*--------------------------------------
|
2021-03-15 20:45:22 +00:00
|
|
|
|
Csi.SetM sec
|
2018-12-15 20:34:55 +00:00
|
|
|
|
.HS 90 BCC
|
|
|
|
|
*--------------------------------------
|
2021-03-15 20:45:22 +00:00
|
|
|
|
Csi.ResetM clc
|
2019-05-25 19:24:07 +00:00
|
|
|
|
|
2021-03-15 20:45:22 +00:00
|
|
|
|
ldx CsiPCnt
|
2019-05-25 19:24:07 +00:00
|
|
|
|
beq .99
|
2019-10-11 20:05:54 +00:00
|
|
|
|
|
2018-12-15 20:34:55 +00:00
|
|
|
|
dex
|
2019-05-25 19:24:07 +00:00
|
|
|
|
bne .99
|
2019-10-11 20:05:54 +00:00
|
|
|
|
|
2021-03-15 20:45:22 +00:00
|
|
|
|
ldx CsiH
|
2019-10-11 20:05:54 +00:00
|
|
|
|
|
2021-03-15 20:45:22 +00:00
|
|
|
|
lda CsiP
|
2019-05-25 19:24:07 +00:00
|
|
|
|
php
|
2018-12-15 20:34:55 +00:00
|
|
|
|
|
2019-05-25 19:24:07 +00:00
|
|
|
|
cmp #20 bCRLF
|
|
|
|
|
bne .1
|
2019-10-11 20:05:54 +00:00
|
|
|
|
|
2019-05-25 19:24:07 +00:00
|
|
|
|
txa
|
|
|
|
|
bne .98
|
|
|
|
|
|
|
|
|
|
ldy #S.DCB.TTY.bCRLF
|
|
|
|
|
bra .8
|
2019-10-11 20:05:54 +00:00
|
|
|
|
|
2019-05-25 19:24:07 +00:00
|
|
|
|
.1 cmp #7
|
|
|
|
|
bne .98
|
|
|
|
|
|
|
|
|
|
cpx #'?'
|
|
|
|
|
bne .98
|
2019-10-11 20:05:54 +00:00
|
|
|
|
|
2018-12-15 20:34:55 +00:00
|
|
|
|
ldy #S.DCB.TTY.bLINEWRAP
|
2019-10-11 20:05:54 +00:00
|
|
|
|
|
2019-05-25 19:24:07 +00:00
|
|
|
|
.8 plp
|
|
|
|
|
ror
|
|
|
|
|
sta (ZPDCBPtr),y
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
|
2019-10-03 06:25:27 +00:00
|
|
|
|
.98 plp
|
2019-05-25 19:24:07 +00:00
|
|
|
|
.99 clc
|
2018-12-15 20:34:55 +00:00
|
|
|
|
rts
|
2018-12-11 16:41:25 +00:00
|
|
|
|
*--------------------------------------
|
2021-03-15 20:45:22 +00:00
|
|
|
|
Csi.DispAttr ldx CsiPCnt
|
2021-03-15 15:00:27 +00:00
|
|
|
|
bne .10
|
|
|
|
|
|
2019-05-12 20:45:11 +00:00
|
|
|
|
jmp RESETATTR
|
2018-12-15 20:34:55 +00:00
|
|
|
|
|
2021-03-15 15:00:27 +00:00
|
|
|
|
.10 ldx #0
|
|
|
|
|
|
2021-03-15 20:45:22 +00:00
|
|
|
|
.1 lda CsiP,x
|
2018-12-15 20:34:55 +00:00
|
|
|
|
bne .2
|
2021-03-15 15:00:27 +00:00
|
|
|
|
|
2018-12-15 20:34:55 +00:00
|
|
|
|
jsr RESETATTR
|
|
|
|
|
bra .7
|
|
|
|
|
|
|
|
|
|
.2 eor #7
|
2019-05-12 20:45:11 +00:00
|
|
|
|
bne .7
|
2018-12-15 20:34:55 +00:00
|
|
|
|
|
2019-05-15 15:30:46 +00:00
|
|
|
|
.3 ldy #S.DCB.TTY.bNORMAL
|
2018-12-15 20:34:55 +00:00
|
|
|
|
sta (ZPDCBPtr),y
|
2021-03-15 15:00:27 +00:00
|
|
|
|
|
|
|
|
|
.7 inx
|
2021-03-15 20:45:22 +00:00
|
|
|
|
dec CsiPCnt
|
2018-12-15 20:34:55 +00:00
|
|
|
|
bne .1
|
|
|
|
|
|
|
|
|
|
.8 clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2021-03-15 20:45:22 +00:00
|
|
|
|
Csi.Query ldx CsiPCnt
|
2018-12-15 20:34:55 +00:00
|
|
|
|
beq .8
|
|
|
|
|
dex
|
|
|
|
|
bne .8
|
|
|
|
|
|
2021-03-15 20:45:22 +00:00
|
|
|
|
lda CsiP
|
2018-12-15 20:34:55 +00:00
|
|
|
|
cmp #6
|
|
|
|
|
bne .8
|
|
|
|
|
lda #C.ESC
|
|
|
|
|
jsr Char.Out.Put
|
|
|
|
|
lda #'['
|
|
|
|
|
jsr Char.Out.Put
|
|
|
|
|
ldy #S.DCB.TTY.CV
|
|
|
|
|
lda (ZPDCBPtr),y
|
|
|
|
|
inc
|
2021-03-15 20:45:22 +00:00
|
|
|
|
jsr DecOut
|
2018-12-15 20:34:55 +00:00
|
|
|
|
lda #';'
|
|
|
|
|
jsr Char.Out.Put
|
|
|
|
|
|
|
|
|
|
ldy #S.DCB.TTY.CH
|
|
|
|
|
lda (ZPDCBPtr),y
|
|
|
|
|
inc
|
2021-03-15 20:45:22 +00:00
|
|
|
|
jsr DecOut
|
2018-12-15 20:34:55 +00:00
|
|
|
|
lda #'R'
|
|
|
|
|
jsr Char.Out.Put
|
|
|
|
|
.8 clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2021-03-15 20:45:22 +00:00
|
|
|
|
Csi.Scroll ldy CsiPCnt
|
2018-12-15 20:34:55 +00:00
|
|
|
|
bne .1
|
|
|
|
|
lda #0
|
|
|
|
|
ldx #23
|
|
|
|
|
bra .8
|
|
|
|
|
.1 cpy #2
|
|
|
|
|
bne .9
|
2021-03-15 20:45:22 +00:00
|
|
|
|
lda CsiP
|
2018-12-15 20:34:55 +00:00
|
|
|
|
dec
|
2021-03-15 20:45:22 +00:00
|
|
|
|
ldx CsiP+1
|
2018-12-15 20:34:55 +00:00
|
|
|
|
dex
|
|
|
|
|
.8 ldy #S.DCB.TTY.SCROLLTOP
|
|
|
|
|
sta (ZPDCBPtr),y
|
|
|
|
|
iny S.DCB.TTY.SCROLLBOT
|
|
|
|
|
txa
|
|
|
|
|
sta (ZPDCBPtr),y
|
|
|
|
|
.9 clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2021-03-15 20:45:22 +00:00
|
|
|
|
Csi.CUU sec
|
|
|
|
|
.HS 90 BCC
|
|
|
|
|
Csi.CUD clc
|
|
|
|
|
ldy #S.DCB.TTY.CV
|
|
|
|
|
bra Csi.CU
|
|
|
|
|
|
|
|
|
|
Csi.CUF clc
|
|
|
|
|
.HS B0 BCS
|
|
|
|
|
Csi.CUB sec
|
|
|
|
|
ldy #S.DCB.TTY.CH
|
|
|
|
|
|
|
|
|
|
Csi.CU lda CsiPCnt
|
|
|
|
|
beq .8
|
|
|
|
|
|
|
|
|
|
dec
|
|
|
|
|
bne .8
|
|
|
|
|
|
|
|
|
|
lda (ZPDCBPtr),y
|
|
|
|
|
bcs .1
|
|
|
|
|
|
|
|
|
|
adc CsiP
|
|
|
|
|
sta (ZPDCBPtr),y
|
|
|
|
|
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
.1 sbc CsiP
|
|
|
|
|
sta (ZPDCBPtr),y
|
|
|
|
|
|
|
|
|
|
.8 clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
Csi.CLRSCR ldx CsiPCnt
|
2021-03-15 15:00:27 +00:00
|
|
|
|
beq .8
|
2019-05-14 16:04:16 +00:00
|
|
|
|
|
2021-03-15 20:45:22 +00:00
|
|
|
|
.1 lda CsiP
|
2021-03-15 15:00:27 +00:00
|
|
|
|
beq .8
|
|
|
|
|
|
2019-05-14 16:04:16 +00:00
|
|
|
|
cmp #1
|
|
|
|
|
bne .2
|
2021-03-15 15:00:27 +00:00
|
|
|
|
|
|
|
|
|
jmp TERMX.CLRSCR.DN
|
2019-05-14 16:04:16 +00:00
|
|
|
|
|
|
|
|
|
.2 cmp #2
|
|
|
|
|
bne .9
|
2021-03-15 15:00:27 +00:00
|
|
|
|
|
|
|
|
|
jmp TERMX.CLRSCR.UP
|
|
|
|
|
|
|
|
|
|
.8 jmp TERMX.CLRSCR
|
2019-05-14 16:04:16 +00:00
|
|
|
|
|
|
|
|
|
.9 clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2021-03-15 20:45:22 +00:00
|
|
|
|
Csi.CLRL ldx CsiPCnt
|
2018-12-15 20:34:55 +00:00
|
|
|
|
|
|
|
|
|
bne .1
|
|
|
|
|
jmp CLREOL
|
2021-03-15 20:45:22 +00:00
|
|
|
|
.1 lda CsiP
|
2018-12-15 20:34:55 +00:00
|
|
|
|
cmp #1
|
|
|
|
|
bne .2
|
|
|
|
|
jmp CLRSOL
|
|
|
|
|
|
|
|
|
|
.2 cmp #2
|
2019-12-04 13:46:58 +00:00
|
|
|
|
bne Csi.Home.8
|
2018-12-15 20:34:55 +00:00
|
|
|
|
jmp CLRLINE
|
|
|
|
|
*--------------------------------------
|
2021-03-15 20:45:22 +00:00
|
|
|
|
Csi.Home lda CsiPCnt
|
2019-12-04 13:46:58 +00:00
|
|
|
|
beq HOME
|
2019-11-14 14:48:12 +00:00
|
|
|
|
|
2019-12-04 13:46:58 +00:00
|
|
|
|
ldx #1
|
2021-03-15 20:45:22 +00:00
|
|
|
|
lda CsiP
|
2018-12-15 20:34:55 +00:00
|
|
|
|
beq .2
|
2019-11-14 14:48:12 +00:00
|
|
|
|
|
2018-12-15 20:34:55 +00:00
|
|
|
|
ldx #24
|
|
|
|
|
cmp #24
|
|
|
|
|
bcs .2
|
2019-11-14 14:48:12 +00:00
|
|
|
|
|
2018-12-15 20:34:55 +00:00
|
|
|
|
tax
|
2019-11-14 14:48:12 +00:00
|
|
|
|
|
2018-12-15 20:34:55 +00:00
|
|
|
|
.2 dex
|
|
|
|
|
txa
|
|
|
|
|
ldy #S.DCB.TTY.CV
|
|
|
|
|
sta (ZPDCBPtr),y
|
2021-03-15 20:45:22 +00:00
|
|
|
|
dec CsiPCnt
|
2018-12-17 10:40:00 +00:00
|
|
|
|
beq Csi.Home.8
|
2019-11-14 14:48:12 +00:00
|
|
|
|
|
2018-12-15 20:34:55 +00:00
|
|
|
|
ldx #1
|
2021-03-15 20:45:22 +00:00
|
|
|
|
lda CsiP+1
|
2018-12-15 20:34:55 +00:00
|
|
|
|
beq .3
|
2019-11-14 14:48:12 +00:00
|
|
|
|
|
2018-12-15 20:34:55 +00:00
|
|
|
|
ldx #80
|
|
|
|
|
cmp #80
|
|
|
|
|
bcs .3
|
2019-11-14 14:48:12 +00:00
|
|
|
|
|
2018-12-15 20:34:55 +00:00
|
|
|
|
tax
|
2019-11-14 14:48:12 +00:00
|
|
|
|
|
2018-12-15 20:34:55 +00:00
|
|
|
|
.3 dex
|
|
|
|
|
txa
|
|
|
|
|
ldy #S.DCB.TTY.CH
|
|
|
|
|
sta (ZPDCBPtr),y
|
2019-11-14 14:48:12 +00:00
|
|
|
|
|
2018-12-17 10:40:00 +00:00
|
|
|
|
Csi.Home.8 clc
|
2018-12-15 20:34:55 +00:00
|
|
|
|
rts
|
2018-12-11 16:41:25 +00:00
|
|
|
|
*--------------------------------------
|
2019-12-04 13:46:58 +00:00
|
|
|
|
HOME lda #0
|
|
|
|
|
ldy #S.DCB.TTY.CV
|
|
|
|
|
sta (ZPDCBPtr),y
|
|
|
|
|
|
|
|
|
|
ldy #S.DCB.TTY.CH
|
|
|
|
|
sta (ZPDCBPtr),y
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2020-02-06 16:23:59 +00:00
|
|
|
|
TERMX.G0 ldx #$80
|
2019-05-14 16:04:16 +00:00
|
|
|
|
.HS 2C BIT ABS
|
2020-02-06 16:23:59 +00:00
|
|
|
|
TERMX.G1 ldx #$40
|
2019-12-04 13:46:58 +00:00
|
|
|
|
|
|
|
|
|
ldy #S.DCB.TTY.bG0G1ALT
|
2019-05-12 20:45:11 +00:00
|
|
|
|
|
2020-02-06 16:23:59 +00:00
|
|
|
|
jsr TERM.GetBufByte
|
2019-05-14 16:04:16 +00:00
|
|
|
|
cmp #'0'
|
|
|
|
|
beq .1
|
2019-12-04 13:46:58 +00:00
|
|
|
|
|
|
|
|
|
txa
|
|
|
|
|
eor #$ff
|
|
|
|
|
and (ZPDCBPtr),y
|
|
|
|
|
bra .8
|
|
|
|
|
|
|
|
|
|
.1 txa
|
|
|
|
|
ora (ZPDCBPtr),y
|
|
|
|
|
.8 sta (ZPDCBPtr),y
|
|
|
|
|
|
2021-03-15 20:45:22 +00:00
|
|
|
|
jmp TERMX.SETM0
|
2019-05-12 20:45:11 +00:00
|
|
|
|
*--------------------------------------
|
2020-02-06 16:23:59 +00:00
|
|
|
|
TERMX.IAC ldy #S.DCB.TTY.INBUFFER
|
2018-12-13 16:39:24 +00:00
|
|
|
|
lda (ZPDCBPtr),y
|
|
|
|
|
inc
|
|
|
|
|
sta (ZPDCBPtr),y
|
|
|
|
|
tay
|
2020-01-11 17:13:27 +00:00
|
|
|
|
|
2020-02-06 16:23:59 +00:00
|
|
|
|
jsr TERM.GetBufByte
|
2020-01-11 17:13:27 +00:00
|
|
|
|
|
2018-12-13 16:39:24 +00:00
|
|
|
|
sta (ZPDCBPtr),y
|
|
|
|
|
cpy #S.DCB.TTY.INBUFFER+1 CMD ?
|
2018-12-17 10:40:00 +00:00
|
|
|
|
beq Csi.Home.8 yes, wait for additional bytes
|
2018-12-11 16:41:25 +00:00
|
|
|
|
|
2018-12-13 16:39:24 +00:00
|
|
|
|
ldy #S.DCB.TTY.INBUFFER+1
|
|
|
|
|
lda (ZPDCBPtr),y get back CMD
|
|
|
|
|
cmp #SB
|
2018-12-11 16:41:25 +00:00
|
|
|
|
bne .1 not a SB/SE....stop with CMD/SUBCMD
|
|
|
|
|
|
2020-02-06 16:23:59 +00:00
|
|
|
|
jsr TERM.GetBufByte
|
2020-01-11 17:13:27 +00:00
|
|
|
|
|
2018-12-11 16:41:25 +00:00
|
|
|
|
cmp #SE
|
2018-12-17 10:40:00 +00:00
|
|
|
|
bne Csi.Home.8 wait for ending SE....keep bIACMode
|
2019-01-07 15:48:25 +00:00
|
|
|
|
bra COUT.IAC.SB
|
|
|
|
|
ldy #S.DCB.TTY.INBUFFER+1
|
|
|
|
|
lda (ZPDCBPtr),y get back CMD
|
2018-12-13 16:39:24 +00:00
|
|
|
|
.1 cmp #IAC
|
2018-12-18 14:37:07 +00:00
|
|
|
|
beq COUT.IAC.SB.9
|
2018-12-11 16:41:25 +00:00
|
|
|
|
sec
|
2019-01-07 15:48:25 +00:00
|
|
|
|
sbc #WILL
|
2018-12-18 14:37:07 +00:00
|
|
|
|
bcc COUT.IAC.SB.9
|
2018-12-11 16:41:25 +00:00
|
|
|
|
asl
|
|
|
|
|
tax
|
2019-01-07 15:48:25 +00:00
|
|
|
|
|
2018-12-13 16:39:24 +00:00
|
|
|
|
ldy #S.DCB.TTY.INBUFFER+2
|
|
|
|
|
lda (ZPDCBPtr),y Get SUBCMD in A
|
2018-12-11 16:41:25 +00:00
|
|
|
|
|
2018-12-18 14:37:07 +00:00
|
|
|
|
jmp (.8,x)
|
2018-12-17 10:40:00 +00:00
|
|
|
|
|
2019-01-07 15:48:25 +00:00
|
|
|
|
.8 .DA COUT.IAC.WILL
|
2018-12-11 16:41:25 +00:00
|
|
|
|
.DA COUT.IAC.WONT
|
|
|
|
|
.DA COUT.IAC.DO
|
|
|
|
|
.DA COUT.IAC.DONT
|
|
|
|
|
*--------------------------------------
|
2019-01-07 15:48:25 +00:00
|
|
|
|
COUT.IAC.SB ldy #S.DCB.TTY.INBUFFER+2
|
|
|
|
|
lda (ZPDCBPtr),y Get SUBCMD in A
|
|
|
|
|
|
2020-08-18 19:56:50 +00:00
|
|
|
|
cmp #TN.O.TTYPE
|
2018-12-18 14:37:07 +00:00
|
|
|
|
bne COUT.IAC.SB.9
|
2019-01-07 15:48:25 +00:00
|
|
|
|
iny
|
2018-12-13 16:39:24 +00:00
|
|
|
|
lda (ZPDCBPtr),y
|
2018-12-11 16:41:25 +00:00
|
|
|
|
cmp #SB.SEND
|
2018-12-18 14:37:07 +00:00
|
|
|
|
bne COUT.IAC.SB.9
|
2018-12-15 20:34:55 +00:00
|
|
|
|
ldx #0
|
|
|
|
|
.1 lda SB.IS.TTYPE,x
|
2018-12-11 16:41:25 +00:00
|
|
|
|
jsr Char.Out.Put
|
2018-12-15 20:34:55 +00:00
|
|
|
|
inx
|
|
|
|
|
cpx #SB.IS.TTYPE.LEN
|
2018-12-11 16:41:25 +00:00
|
|
|
|
bne .1
|
|
|
|
|
|
2018-12-18 14:37:07 +00:00
|
|
|
|
COUT.IAC.SB.9 bra COUT.IAC.EXIT
|
2018-12-11 16:41:25 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
COUT.IAC.WILL ldx #WILLDO.CNT-1
|
|
|
|
|
|
|
|
|
|
.1 cmp WILLDO,x
|
|
|
|
|
beq .7
|
|
|
|
|
dex
|
|
|
|
|
bpl .1
|
|
|
|
|
ldx #WILLDONT.CNT-1
|
|
|
|
|
|
|
|
|
|
.2 cmp WILLDONT,x
|
|
|
|
|
beq .8
|
|
|
|
|
dex
|
|
|
|
|
bpl .2
|
2020-05-06 15:28:09 +00:00
|
|
|
|
|
2018-12-18 14:37:07 +00:00
|
|
|
|
bra COUT.IAC.EXIT
|
2020-05-06 15:28:09 +00:00
|
|
|
|
|
2018-12-11 16:41:25 +00:00
|
|
|
|
.7 ldx #DO
|
|
|
|
|
.HS 2C BIT ABS
|
|
|
|
|
.8 ldx #DONT
|
|
|
|
|
|
|
|
|
|
bra COUT.IAC.SendAX
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
COUT.IAC.DO ldx #DOWILL.CNT-1
|
|
|
|
|
|
|
|
|
|
.1 cmp DOWILL,x
|
|
|
|
|
beq .7
|
|
|
|
|
dex
|
|
|
|
|
bpl .1
|
2019-12-04 13:46:58 +00:00
|
|
|
|
|
2018-12-11 16:41:25 +00:00
|
|
|
|
ldx #DOWONT.CNT-1
|
|
|
|
|
|
|
|
|
|
.2 cmp DOWONT,x
|
|
|
|
|
beq .8
|
|
|
|
|
dex
|
|
|
|
|
bpl .2
|
2019-12-04 13:46:58 +00:00
|
|
|
|
|
2018-12-18 14:37:07 +00:00
|
|
|
|
bra COUT.IAC.EXIT
|
2020-05-06 15:28:09 +00:00
|
|
|
|
|
2018-12-11 16:41:25 +00:00
|
|
|
|
.7 ldx #WILL
|
|
|
|
|
.HS 2C BIT ABS
|
|
|
|
|
.8 ldx #WONT
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
COUT.IAC.SendAX
|
|
|
|
|
pha push CMD
|
|
|
|
|
phx
|
|
|
|
|
lda #IAC
|
|
|
|
|
jsr Char.Out.Put
|
|
|
|
|
pla
|
|
|
|
|
jsr Char.Out.Put
|
|
|
|
|
pla
|
|
|
|
|
jsr Char.Out.Put
|
2020-05-06 15:28:09 +00:00
|
|
|
|
*--------------------------------------
|
2018-12-18 14:37:07 +00:00
|
|
|
|
COUT.IAC.WONT
|
2020-05-06 15:28:09 +00:00
|
|
|
|
*--------------------------------------
|
2018-12-11 16:41:25 +00:00
|
|
|
|
COUT.IAC.DONT
|
2020-05-06 15:28:09 +00:00
|
|
|
|
*--------------------------------------
|
2018-12-18 14:37:07 +00:00
|
|
|
|
COUT.IAC.EXIT
|
2018-12-12 16:32:33 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
RESET.MODE lda #0
|
2019-05-14 16:04:16 +00:00
|
|
|
|
ldy #S.DCB.TTY.MODE
|
2018-12-13 16:39:24 +00:00
|
|
|
|
sta (ZPDCBPtr),y
|
2018-12-11 16:41:25 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2019-07-12 14:51:57 +00:00
|
|
|
|
RESET ldy #S.DCB.TTY.MODE
|
2019-12-14 18:44:01 +00:00
|
|
|
|
.1 lda RESET.VALUES-S.DCB.TTY.MODE,y
|
2018-12-15 20:34:55 +00:00
|
|
|
|
sta (ZPDCBPtr),y
|
2019-07-12 14:51:57 +00:00
|
|
|
|
iny
|
|
|
|
|
cpy #S.DCB.TTY.INBUFFER+1
|
2018-12-17 07:02:03 +00:00
|
|
|
|
bne .1
|
2020-02-06 16:23:59 +00:00
|
|
|
|
jmp TERMX.CLRSCR
|
2018-12-11 16:41:25 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
RESETATTR lda #$80
|
2019-05-15 15:30:46 +00:00
|
|
|
|
ldy #S.DCB.TTY.bNORMAL
|
2019-05-14 16:04:16 +00:00
|
|
|
|
sta (ZPDCBPtr),y
|
|
|
|
|
clc
|
|
|
|
|
rts
|
2019-05-12 20:45:11 +00:00
|
|
|
|
*--------------------------------------
|
2018-12-15 20:34:55 +00:00
|
|
|
|
ENQ ldx #0
|
2018-12-11 16:41:25 +00:00
|
|
|
|
|
2018-12-15 20:34:55 +00:00
|
|
|
|
.1 lda ENQ.String,x
|
2019-05-15 15:30:46 +00:00
|
|
|
|
|
2018-12-11 16:41:25 +00:00
|
|
|
|
jsr Char.Out.Put
|
2018-12-15 20:34:55 +00:00
|
|
|
|
inx
|
2019-05-25 21:23:24 +00:00
|
|
|
|
cpx #ENQ.String.Len
|
2018-12-11 16:41:25 +00:00
|
|
|
|
bne .1
|
|
|
|
|
.8 clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2021-03-15 20:45:22 +00:00
|
|
|
|
TERMX.OUT.LF ldy #S.DCB.TTY.bCRLF
|
2018-12-13 16:39:24 +00:00
|
|
|
|
lda (ZPDCBPtr),y
|
2021-03-15 20:45:22 +00:00
|
|
|
|
bpl TERMX.OUT.LF.1
|
|
|
|
|
|
|
|
|
|
jsr TERMX.OUT.CR
|
2020-02-06 16:23:59 +00:00
|
|
|
|
|
2021-03-15 20:45:22 +00:00
|
|
|
|
TERMX.OUT.LF.1 ldy #S.DCB.TTY.CV
|
2018-12-13 16:39:24 +00:00
|
|
|
|
lda (ZPDCBPtr),y
|
|
|
|
|
ldy #S.DCB.TTY.SCROLLBOT
|
|
|
|
|
cmp (ZPDCBPtr),y
|
2018-12-11 16:41:25 +00:00
|
|
|
|
beq SCROLL.UP
|
2021-03-15 20:45:22 +00:00
|
|
|
|
|
2018-12-12 16:32:33 +00:00
|
|
|
|
inc
|
2018-12-13 16:39:24 +00:00
|
|
|
|
ldy #S.DCB.TTY.CV
|
|
|
|
|
sta (ZPDCBPtr),y
|
2018-12-12 16:32:33 +00:00
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2019-11-14 14:48:12 +00:00
|
|
|
|
CLRSOL ldy #S.DCB.TTY.CH End
|
2018-12-13 16:39:24 +00:00
|
|
|
|
lda (ZPDCBPtr),y
|
2019-11-14 14:48:12 +00:00
|
|
|
|
cmp #80
|
|
|
|
|
bcc CLRLINE.1
|
2018-12-12 16:32:33 +00:00
|
|
|
|
|
2019-11-14 14:48:12 +00:00
|
|
|
|
CLRLINE lda #80 End
|
2018-12-11 16:41:25 +00:00
|
|
|
|
|
2019-11-14 14:48:12 +00:00
|
|
|
|
CLRLINE.1 ldy #0 Start
|
2019-01-16 14:37:21 +00:00
|
|
|
|
bra CLR
|
|
|
|
|
|
|
|
|
|
CLREOL ldy #S.DCB.TTY.CH
|
|
|
|
|
lda (ZPDCBPtr),y
|
|
|
|
|
tay Start
|
2019-11-14 14:48:12 +00:00
|
|
|
|
cpy #80
|
|
|
|
|
bcs CLR.8
|
|
|
|
|
|
|
|
|
|
lda #80 End
|
|
|
|
|
|
|
|
|
|
CLR sty .1+1 Save Start
|
|
|
|
|
sta .2+1 Save End
|
2018-12-11 16:41:25 +00:00
|
|
|
|
|
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
|
2019-05-29 15:21:14 +00:00
|
|
|
|
|
2019-11-14 14:48:12 +00:00
|
|
|
|
.1 ldy #$ff SELF MODIFIED
|
|
|
|
|
.2 cpy #$ff SELF MODIFIED
|
|
|
|
|
bcs CLR.8
|
|
|
|
|
|
2018-12-12 16:32:33 +00:00
|
|
|
|
lda #" "
|
2018-12-11 16:41:25 +00:00
|
|
|
|
jsr SetCharAtYX X unmodified
|
2019-11-14 14:48:12 +00:00
|
|
|
|
|
|
|
|
|
inc .1+1
|
2019-05-29 15:21:14 +00:00
|
|
|
|
bra .1
|
2019-11-14 14:48:12 +00:00
|
|
|
|
|
|
|
|
|
CLR.8 clc
|
2018-12-11 16:41:25 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2019-12-04 13:46:58 +00:00
|
|
|
|
SaveCurPos ldy #S.DCB.TTY.CH
|
2019-12-14 18:44:01 +00:00
|
|
|
|
|
|
|
|
|
jsr .1
|
|
|
|
|
|
2019-12-04 13:46:58 +00:00
|
|
|
|
iny
|
2019-12-14 18:44:01 +00:00
|
|
|
|
|
|
|
|
|
.1 lda (ZPDCBPtr),y
|
2019-12-04 13:46:58 +00:00
|
|
|
|
iny
|
|
|
|
|
sta (ZPDCBPtr),y
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2020-02-06 16:23:59 +00:00
|
|
|
|
RestoreCurPos jsr TERMX.CUROFF
|
2019-12-04 13:46:58 +00:00
|
|
|
|
|
|
|
|
|
ldy #S.DCB.TTY.CV.SAVE
|
2019-12-14 18:44:01 +00:00
|
|
|
|
|
|
|
|
|
jsr .1
|
|
|
|
|
|
2019-12-04 13:46:58 +00:00
|
|
|
|
dey
|
2019-12-14 18:44:01 +00:00
|
|
|
|
|
|
|
|
|
.1 lda (ZPDCBPtr),y
|
2019-12-04 13:46:58 +00:00
|
|
|
|
dey
|
|
|
|
|
sta (ZPDCBPtr),y
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2019-11-14 14:48:12 +00:00
|
|
|
|
SCROLL.UP ldy #S.DCB.TTY.SCROLLTOP
|
|
|
|
|
lda (ZPDCBPtr),y
|
|
|
|
|
|
|
|
|
|
tax
|
|
|
|
|
|
2020-02-06 16:23:59 +00:00
|
|
|
|
.1 jsr TERMX.SETUP.L1X
|
2019-11-14 14:48:12 +00:00
|
|
|
|
|
|
|
|
|
inx
|
2020-02-06 16:23:59 +00:00
|
|
|
|
jsr TERMX.COPY.XtoL1
|
2019-11-14 14:48:12 +00:00
|
|
|
|
|
|
|
|
|
txa
|
|
|
|
|
ldy #S.DCB.TTY.SCROLLBOT
|
|
|
|
|
cmp (ZPDCBPtr),y
|
|
|
|
|
bne .1
|
|
|
|
|
bra CLRLINE
|
|
|
|
|
*--------------------------------------
|
2018-12-13 16:39:24 +00:00
|
|
|
|
SCROLL.DN ldy #S.DCB.TTY.SCROLLBOT
|
|
|
|
|
lda (ZPDCBPtr),y
|
2018-12-11 16:41:25 +00:00
|
|
|
|
|
2018-12-12 16:32:33 +00:00
|
|
|
|
tax
|
2019-11-14 14:48:12 +00:00
|
|
|
|
|
2020-02-06 16:23:59 +00:00
|
|
|
|
.1 jsr TERMX.SETUP.L1X
|
2018-12-11 16:41:25 +00:00
|
|
|
|
|
|
|
|
|
dex
|
2020-02-06 16:23:59 +00:00
|
|
|
|
jsr TERMX.COPY.XtoL1
|
2018-12-11 16:41:25 +00:00
|
|
|
|
|
2018-12-12 16:32:33 +00:00
|
|
|
|
txa
|
2018-12-13 16:39:24 +00:00
|
|
|
|
ldy #S.DCB.TTY.SCROLLTOP
|
|
|
|
|
cmp (ZPDCBPtr),y
|
2018-12-11 16:41:25 +00:00
|
|
|
|
bne .1
|
|
|
|
|
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2020-02-06 16:23:59 +00:00
|
|
|
|
TERMX.CURBLNK bit bActive
|
2019-02-23 22:01:58 +00:00
|
|
|
|
bpl .9
|
2019-11-14 14:48:12 +00:00
|
|
|
|
|
2020-01-11 17:13:27 +00:00
|
|
|
|
lda DevMgr.Timer
|
2019-02-23 22:01:58 +00:00
|
|
|
|
and #CURSOR.BLINK.SPEED
|
|
|
|
|
ldy #S.DCB.TTY.bCURON
|
|
|
|
|
eor (ZPDCBPtr),y
|
2020-02-06 16:23:59 +00:00
|
|
|
|
bne TERMX.CURBLNK.1
|
2019-02-23 22:01:58 +00:00
|
|
|
|
|
|
|
|
|
.9 rts
|
|
|
|
|
|
2020-02-06 16:23:59 +00:00
|
|
|
|
TERMX.CUROFF bit bActive
|
|
|
|
|
bpl TERMX.CURBLNK.RTS
|
2018-12-13 16:39:24 +00:00
|
|
|
|
ldy #S.DCB.TTY.bCURON
|
2019-02-23 22:01:58 +00:00
|
|
|
|
lda (ZPDCBPtr),y
|
2020-02-06 16:23:59 +00:00
|
|
|
|
beq TERMX.CURBLNK.RTS
|
2019-11-14 14:48:12 +00:00
|
|
|
|
|
2020-02-06 16:23:59 +00:00
|
|
|
|
TERMX.CURBLNK.1 lda (ZPDCBPtr),y
|
|
|
|
|
bne TERMX.CURBLNK.OFF
|
2018-12-11 16:41:25 +00:00
|
|
|
|
|
|
|
|
|
jsr GetCharAtCurPos
|
2020-02-06 16:23:59 +00:00
|
|
|
|
bcs TERMX.CURBLNK.RTS Out of screen
|
2019-06-02 08:58:46 +00:00
|
|
|
|
|
2018-12-11 16:41:25 +00:00
|
|
|
|
and #$80
|
|
|
|
|
eor #" "
|
2019-11-14 14:48:12 +00:00
|
|
|
|
|
2020-02-06 16:23:59 +00:00
|
|
|
|
TERMX.CURBLNK.SET
|
2019-05-15 15:30:46 +00:00
|
|
|
|
jsr SetCharAtY.SCR
|
2018-12-13 16:39:24 +00:00
|
|
|
|
ldy #S.DCB.TTY.bCURON
|
|
|
|
|
lda (ZPDCBPtr),y
|
2018-12-11 16:41:25 +00:00
|
|
|
|
eor #CURSOR.BLINK.SPEED
|
2018-12-13 16:39:24 +00:00
|
|
|
|
sta (ZPDCBPtr),y
|
2019-11-14 14:48:12 +00:00
|
|
|
|
rts
|
|
|
|
|
|
2020-02-06 16:23:59 +00:00
|
|
|
|
TERMX.CURBLNK.OFF
|
2019-11-14 14:48:12 +00:00
|
|
|
|
jsr GetCharAtCurPos
|
2020-02-06 16:23:59 +00:00
|
|
|
|
bcc TERMX.CURBLNK.SET if not Out of screen
|
|
|
|
|
TERMX.CURBLNK.RTS
|
2018-12-17 07:02:03 +00:00
|
|
|
|
rts
|
2018-12-11 16:41:25 +00:00
|
|
|
|
*--------------------------------------
|
2021-03-15 20:45:22 +00:00
|
|
|
|
DecOut jsr MATH32.A2STR10NP
|
2018-12-11 16:41:25 +00:00
|
|
|
|
|
2019-06-24 15:32:22 +00:00
|
|
|
|
ldx #0
|
2019-07-03 15:25:07 +00:00
|
|
|
|
.1 lda A2osX.NumStrBuf,x
|
2020-02-06 16:23:59 +00:00
|
|
|
|
beq TERMX.CURBLNK.RTS
|
2019-06-24 15:32:22 +00:00
|
|
|
|
inx
|
|
|
|
|
jsr Char.Out.Put
|
|
|
|
|
bra .1
|
2018-12-11 16:41:25 +00:00
|
|
|
|
*--------------------------------------
|
2018-12-15 20:34:55 +00:00
|
|
|
|
Char.Out.Put pha save char
|
2018-12-13 16:39:24 +00:00
|
|
|
|
|
|
|
|
|
ldy #S.DCB.TTY.OUTHEAD
|
|
|
|
|
lda (ZPDCBPtr),y
|
2018-12-15 20:34:55 +00:00
|
|
|
|
pha save actual HEAD
|
2018-12-13 16:39:24 +00:00
|
|
|
|
inc
|
|
|
|
|
cmp #S.DCB.TTY.OUTBUFFER.MAX
|
|
|
|
|
bne .1
|
|
|
|
|
lda #S.DCB.TTY.OUTBUFFER
|
|
|
|
|
|
2018-12-15 20:34:55 +00:00
|
|
|
|
.1 dey OUTTAIL
|
|
|
|
|
cmp (ZPDCBPtr),y HEAD+1 = TAIL ?
|
2018-12-13 16:39:24 +00:00
|
|
|
|
beq .9 CS, full!
|
|
|
|
|
iny
|
|
|
|
|
sta (ZPDCBPtr),y new head
|
|
|
|
|
ply old head
|
|
|
|
|
pla
|
|
|
|
|
sta (ZPDCBPtr),y
|
2018-12-11 16:41:25 +00:00
|
|
|
|
clc
|
2018-12-13 16:39:24 +00:00
|
|
|
|
rts
|
|
|
|
|
.9 pla
|
2018-12-11 16:41:25 +00:00
|
|
|
|
pla
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2018-12-15 20:34:55 +00:00
|
|
|
|
Char.Out.Get ldy #S.DCB.TTY.OUTTAIL
|
2018-12-13 16:39:24 +00:00
|
|
|
|
lda (ZPDCBPtr),y
|
2018-12-15 20:34:55 +00:00
|
|
|
|
iny OUTHEAD
|
2018-12-13 16:39:24 +00:00
|
|
|
|
cmp (ZPDCBPtr),y
|
|
|
|
|
beq .9 CS
|
|
|
|
|
tay
|
|
|
|
|
lda (ZPDCBPtr),y
|
2018-12-11 16:41:25 +00:00
|
|
|
|
pha
|
2018-12-13 16:39:24 +00:00
|
|
|
|
tya
|
2018-12-11 16:41:25 +00:00
|
|
|
|
inc
|
2018-12-13 16:39:24 +00:00
|
|
|
|
cmp #S.DCB.TTY.OUTBUFFER.MAX
|
|
|
|
|
bne .1
|
|
|
|
|
lda #S.DCB.TTY.OUTBUFFER
|
|
|
|
|
|
|
|
|
|
.1 ldy #S.DCB.TTY.OUTTAIL
|
|
|
|
|
sta (ZPDCBPtr),y
|
2018-12-11 16:41:25 +00:00
|
|
|
|
pla
|
|
|
|
|
clc
|
2019-10-03 06:25:27 +00:00
|
|
|
|
.9 rts
|
2018-12-11 16:41:25 +00:00
|
|
|
|
*--------------------------------------
|
2020-05-04 20:46:21 +00:00
|
|
|
|
TERMX.SETUP.L1X lda ZPDCBPtr
|
2019-07-12 14:51:57 +00:00
|
|
|
|
clc
|
|
|
|
|
adc BUF.BASEL,x
|
2021-03-15 20:45:22 +00:00
|
|
|
|
sta ZPBufBL1
|
2020-01-11 17:13:27 +00:00
|
|
|
|
|
2020-05-04 20:46:21 +00:00
|
|
|
|
lda ZPDCBPtr+1
|
2019-07-12 14:51:57 +00:00
|
|
|
|
adc BUF.BASEH,x
|
2021-03-15 20:45:22 +00:00
|
|
|
|
sta ZPBufBL1+1
|
2019-11-14 14:48:12 +00:00
|
|
|
|
|
2019-07-12 14:51:57 +00:00
|
|
|
|
bit bActive
|
2020-02-06 16:23:59 +00:00
|
|
|
|
bpl TERMX.SETUP.L1X.8
|
2019-07-12 14:51:57 +00:00
|
|
|
|
|
2020-02-06 16:23:59 +00:00
|
|
|
|
TERMX.SETUP.L1X.SCR
|
2019-07-12 14:51:57 +00:00
|
|
|
|
lda SCR.BASEL,x
|
2021-03-15 20:45:22 +00:00
|
|
|
|
sta ZPScrBL1
|
2020-06-10 20:04:13 +00:00
|
|
|
|
lda SCR.BASEH,x
|
2021-03-15 20:45:22 +00:00
|
|
|
|
sta ZPScrBL1+1
|
2020-02-06 16:23:59 +00:00
|
|
|
|
TERMX.SETUP.L1X.8
|
2019-07-12 14:51:57 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2020-02-06 16:23:59 +00:00
|
|
|
|
TERMX.CLRSCR.DN ldy #S.DCB.TTY.CV
|
2020-01-10 15:58:47 +00:00
|
|
|
|
sta (ZPDCBPtr),y
|
|
|
|
|
tax
|
2020-02-06 16:23:59 +00:00
|
|
|
|
bra TERMX.CLRSCR.1
|
|
|
|
|
|
|
|
|
|
TERMX.CLRSCR.UP ldx #0
|
2020-01-10 15:58:47 +00:00
|
|
|
|
ldy #S.DCB.TTY.CV
|
|
|
|
|
sta (ZPDCBPtr),y
|
|
|
|
|
tay
|
2020-02-06 16:23:59 +00:00
|
|
|
|
bra TERMX.CLRSCR.2
|
|
|
|
|
|
|
|
|
|
TERMX.CLRSCR ldx #0
|
2020-01-10 15:58:47 +00:00
|
|
|
|
|
2020-02-06 16:23:59 +00:00
|
|
|
|
TERMX.CLRSCR.1 ldy #24
|
2020-01-10 15:58:47 +00:00
|
|
|
|
|
2020-02-06 16:23:59 +00:00
|
|
|
|
TERMX.CLRSCR.2 sty .1+1
|
2020-01-10 15:58:47 +00:00
|
|
|
|
|
|
|
|
|
.1 cpx #$ff SELF MODIFIED
|
|
|
|
|
beq .9
|
2020-02-06 16:23:59 +00:00
|
|
|
|
jsr TERMX.SETUP.L1X
|
2020-01-10 15:58:47 +00:00
|
|
|
|
lda #" "
|
|
|
|
|
|
|
|
|
|
bit bActive
|
|
|
|
|
bpl .4
|
2020-07-05 08:58:35 +00:00
|
|
|
|
|
2020-01-10 15:58:47 +00:00
|
|
|
|
sta SETPAGE2
|
|
|
|
|
jsr .7
|
|
|
|
|
|
|
|
|
|
sta CLRPAGE2
|
|
|
|
|
jsr .7
|
|
|
|
|
|
|
|
|
|
.4 ldy #79
|
|
|
|
|
|
2021-03-15 20:45:22 +00:00
|
|
|
|
.5 sta (ZPBufBL1),y
|
2020-01-10 15:58:47 +00:00
|
|
|
|
dey
|
|
|
|
|
bpl .5
|
|
|
|
|
|
|
|
|
|
inx
|
|
|
|
|
bra .1
|
2020-07-05 08:58:35 +00:00
|
|
|
|
|
2020-01-10 15:58:47 +00:00
|
|
|
|
.7 ldy #39
|
2021-03-15 20:45:22 +00:00
|
|
|
|
.8 sta (ZPScrBL1),y
|
2020-01-10 15:58:47 +00:00
|
|
|
|
dey
|
|
|
|
|
bpl .8
|
|
|
|
|
.9 rts
|
|
|
|
|
*--------------------------------------
|
2020-02-06 16:23:59 +00:00
|
|
|
|
TERMX.Title.ON ldy #S.DCB.TTY.bTITLE
|
2020-01-11 17:13:27 +00:00
|
|
|
|
lda (ZPDCBPtr),y
|
2020-02-06 16:23:59 +00:00
|
|
|
|
bmi TERMX.Title.RTS
|
2020-01-11 17:13:27 +00:00
|
|
|
|
|
|
|
|
|
lda #$ff
|
|
|
|
|
sta (ZPDCBPtr),y
|
|
|
|
|
|
2020-05-04 20:46:21 +00:00
|
|
|
|
lda (ZPDCBPtr) #S.DCB.TTY.DEVID
|
|
|
|
|
tax
|
2020-02-06 16:23:59 +00:00
|
|
|
|
jsr TERM.GetDevName
|
2020-05-04 20:46:21 +00:00
|
|
|
|
>STYA TXTPTR
|
2020-01-11 17:13:27 +00:00
|
|
|
|
|
|
|
|
|
ldx #0
|
2020-02-06 16:23:59 +00:00
|
|
|
|
jsr TERMX.SETUP.L1X.SCR
|
2020-01-11 17:13:27 +00:00
|
|
|
|
|
|
|
|
|
ldy #0
|
|
|
|
|
|
|
|
|
|
.1 jsr SHARED.TXTPTR.GetNext
|
|
|
|
|
beq .3
|
|
|
|
|
|
|
|
|
|
cmp #$40
|
|
|
|
|
bcc .2
|
|
|
|
|
cmp #$60
|
|
|
|
|
bcs .2
|
|
|
|
|
and #$1F remap UPPERCASE
|
|
|
|
|
|
|
|
|
|
.2 phy
|
|
|
|
|
jsr SetCharAtY.SCR
|
|
|
|
|
ply
|
|
|
|
|
iny
|
|
|
|
|
bne .1
|
|
|
|
|
|
|
|
|
|
.3 lda #C.SPACE
|
|
|
|
|
|
|
|
|
|
.4 phy
|
|
|
|
|
jsr SetCharAtY.SCR
|
|
|
|
|
ply
|
|
|
|
|
iny
|
|
|
|
|
cpy #80
|
|
|
|
|
bne .4
|
2020-02-06 16:23:59 +00:00
|
|
|
|
|
|
|
|
|
TERMX.Title.RTS rts
|
2020-01-11 17:13:27 +00:00
|
|
|
|
|
2020-02-06 16:23:59 +00:00
|
|
|
|
TERMX.Title.OFF ldy #S.DCB.TTY.bTITLE
|
2020-01-11 17:13:27 +00:00
|
|
|
|
lda (ZPDCBPtr),y
|
2020-02-06 16:23:59 +00:00
|
|
|
|
bpl TERMX.Title.RTS
|
2020-01-11 17:13:27 +00:00
|
|
|
|
lda #$0
|
|
|
|
|
sta (ZPDCBPtr),y
|
|
|
|
|
*--------------------------------------
|
2020-02-06 16:23:59 +00:00
|
|
|
|
TERMX.LINE0CPY ldx #0
|
2020-01-10 15:58:47 +00:00
|
|
|
|
.HS 2C BIT ABS
|
2020-02-06 16:23:59 +00:00
|
|
|
|
TERMX.SCRCPY ldx #23
|
2020-01-10 15:58:47 +00:00
|
|
|
|
|
2020-05-04 20:46:21 +00:00
|
|
|
|
.1 lda ZPDCBPtr
|
2020-01-10 15:58:47 +00:00
|
|
|
|
clc
|
|
|
|
|
adc BUF.BASEL,x
|
|
|
|
|
sta .80+1
|
2020-01-11 17:13:27 +00:00
|
|
|
|
|
2020-05-04 20:46:21 +00:00
|
|
|
|
lda ZPDCBPtr+1
|
2020-01-10 15:58:47 +00:00
|
|
|
|
adc BUF.BASEH,x
|
|
|
|
|
sta .80+2
|
2020-02-06 16:23:59 +00:00
|
|
|
|
jsr TERMX.SETUP.L1X.SCR
|
2020-01-10 15:58:47 +00:00
|
|
|
|
|
|
|
|
|
phx
|
|
|
|
|
|
|
|
|
|
ldx #78
|
|
|
|
|
|
|
|
|
|
sta SETPAGE2
|
|
|
|
|
|
|
|
|
|
ldy #39
|
|
|
|
|
|
|
|
|
|
jsr .8
|
|
|
|
|
|
|
|
|
|
ldx #79
|
|
|
|
|
sta CLRPAGE2
|
|
|
|
|
|
|
|
|
|
ldy #39
|
|
|
|
|
|
|
|
|
|
jsr .8
|
|
|
|
|
|
|
|
|
|
plx
|
|
|
|
|
dex
|
|
|
|
|
bpl .1
|
|
|
|
|
rts
|
2020-01-11 17:13:27 +00:00
|
|
|
|
|
2020-01-10 15:58:47 +00:00
|
|
|
|
.8 ldy #39
|
2020-01-11 17:13:27 +00:00
|
|
|
|
|
2020-01-10 15:58:47 +00:00
|
|
|
|
.80 lda $ffff,x SELF MODIFIED
|
2020-01-11 17:13:27 +00:00
|
|
|
|
|
2021-03-15 20:45:22 +00:00
|
|
|
|
sta (ZPScrBL1),y
|
2020-01-10 15:58:47 +00:00
|
|
|
|
dex
|
|
|
|
|
dex
|
|
|
|
|
dey
|
|
|
|
|
bpl .80
|
2020-01-11 17:13:27 +00:00
|
|
|
|
|
2020-01-10 15:58:47 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2020-02-06 16:23:59 +00:00
|
|
|
|
TERMX.COPY.XtoL1
|
2020-05-04 20:46:21 +00:00
|
|
|
|
lda ZPDCBPtr
|
2020-01-10 15:58:47 +00:00
|
|
|
|
clc
|
|
|
|
|
adc BUF.BASEL,x
|
2021-03-15 20:45:22 +00:00
|
|
|
|
sta ZPBufBL2
|
2020-01-11 17:13:27 +00:00
|
|
|
|
|
2020-05-04 20:46:21 +00:00
|
|
|
|
lda ZPDCBPtr+1
|
2020-01-10 15:58:47 +00:00
|
|
|
|
adc BUF.BASEH,x
|
2021-03-15 20:45:22 +00:00
|
|
|
|
sta ZPBufBL2+1
|
2020-01-10 15:58:47 +00:00
|
|
|
|
|
|
|
|
|
ldy #79
|
|
|
|
|
|
2021-03-15 20:45:22 +00:00
|
|
|
|
.1 lda (ZPBufBL2),y
|
|
|
|
|
sta (ZPBufBL1),y
|
2020-01-10 15:58:47 +00:00
|
|
|
|
dey
|
|
|
|
|
bpl .1
|
|
|
|
|
|
|
|
|
|
bit bActive
|
|
|
|
|
bpl .8
|
|
|
|
|
|
|
|
|
|
lda SCR.BASEL,x
|
2021-03-15 20:45:22 +00:00
|
|
|
|
sta ZPScrBL2
|
2020-06-10 20:04:13 +00:00
|
|
|
|
lda SCR.BASEH,x
|
2021-03-15 20:45:22 +00:00
|
|
|
|
sta ZPScrBL2+1
|
2020-07-05 08:58:35 +00:00
|
|
|
|
|
2020-01-10 15:58:47 +00:00
|
|
|
|
sta SETPAGE2
|
|
|
|
|
jsr .6
|
|
|
|
|
sta CLRPAGE2
|
|
|
|
|
|
|
|
|
|
.6 ldy #39
|
2021-03-15 20:45:22 +00:00
|
|
|
|
.7 lda (ZPScrBL2),y
|
|
|
|
|
sta (ZPScrBL1),y
|
2020-01-10 15:58:47 +00:00
|
|
|
|
dey
|
|
|
|
|
bpl .7
|
|
|
|
|
|
|
|
|
|
.8 rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
SetCharAtCurPos pha
|
|
|
|
|
ldy #S.DCB.TTY.CV
|
|
|
|
|
lda (ZPDCBPtr),y
|
|
|
|
|
tax
|
|
|
|
|
ldy #S.DCB.TTY.CH
|
|
|
|
|
lda (ZPDCBPtr),y
|
|
|
|
|
tay
|
|
|
|
|
pla
|
|
|
|
|
cpy #80
|
|
|
|
|
bcs SetCharAtYX.8
|
|
|
|
|
*--------------------------------------
|
2020-03-12 07:46:43 +00:00
|
|
|
|
SetCharAtYX cmp #$40
|
2020-01-10 15:58:47 +00:00
|
|
|
|
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
|
|
|
|
|
clc
|
|
|
|
|
bpl .2
|
|
|
|
|
sec
|
|
|
|
|
|
|
|
|
|
.2 lda #$80
|
|
|
|
|
bcc .21
|
|
|
|
|
lsr
|
|
|
|
|
|
|
|
|
|
.21 iny #S.DCB.TTY.bG0G1ALT
|
|
|
|
|
and (ZPDCBPtr),y
|
|
|
|
|
beq .3 not Graphic mode
|
|
|
|
|
|
|
|
|
|
lda ZPTmpChar
|
|
|
|
|
cmp #$E0 Normal lowercase ?
|
|
|
|
|
bcc .3
|
|
|
|
|
|
|
|
|
|
tay
|
|
|
|
|
lda REMAP.E0.FF-$E0,y
|
|
|
|
|
sta ZPTmpChar
|
|
|
|
|
|
2020-02-06 16:23:59 +00:00
|
|
|
|
.3 jsr TERMX.SETUP.L1X
|
2020-01-10 15:58:47 +00:00
|
|
|
|
ply
|
|
|
|
|
lda ZPTmpChar
|
2021-03-15 20:45:22 +00:00
|
|
|
|
sta (ZPBufBL1),y
|
2020-01-10 15:58:47 +00:00
|
|
|
|
|
|
|
|
|
bit bActive
|
|
|
|
|
bpl SetCharAtYX.8
|
|
|
|
|
|
|
|
|
|
SetCharAtY.SCR pha
|
|
|
|
|
tya
|
|
|
|
|
lsr
|
|
|
|
|
tay
|
|
|
|
|
pla
|
2020-07-04 19:00:47 +00:00
|
|
|
|
|
2020-01-10 15:58:47 +00:00
|
|
|
|
bcs .2
|
|
|
|
|
sta SETPAGE2
|
2021-03-15 20:45:22 +00:00
|
|
|
|
sta (ZPScrBL1),y
|
2020-07-06 12:03:05 +00:00
|
|
|
|
rts
|
2020-07-04 19:00:47 +00:00
|
|
|
|
|
2020-07-06 12:03:05 +00:00
|
|
|
|
.2 sta CLRPAGE2
|
2021-03-15 20:45:22 +00:00
|
|
|
|
sta (ZPScrBL1),y
|
2020-01-10 15:58:47 +00:00
|
|
|
|
|
|
|
|
|
SetCharAtYX.8 rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
GetCharAtCurPos ldy #S.DCB.TTY.CV
|
|
|
|
|
lda (ZPDCBPtr),y
|
|
|
|
|
cmp #24
|
|
|
|
|
bcs .9 Out of screen
|
|
|
|
|
|
|
|
|
|
tax
|
2020-02-06 16:23:59 +00:00
|
|
|
|
jsr TERMX.SETUP.L1X
|
2020-01-10 15:58:47 +00:00
|
|
|
|
|
|
|
|
|
ldy #S.DCB.TTY.CH
|
|
|
|
|
lda (ZPDCBPtr),y
|
|
|
|
|
cmp #80
|
|
|
|
|
bcs .9 Out of screen
|
|
|
|
|
|
|
|
|
|
tay
|
2021-03-15 20:45:22 +00:00
|
|
|
|
lda (ZPBufBL1),y
|
2020-01-10 15:58:47 +00:00
|
|
|
|
cmp #$20
|
|
|
|
|
bcs .8
|
|
|
|
|
|
|
|
|
|
* clc
|
|
|
|
|
adc #40 remap $00-$1F uppercase
|
|
|
|
|
.8 clc
|
|
|
|
|
|
|
|
|
|
.9 rts
|
|
|
|
|
*--------------------------------------
|
2019-07-12 14:51:57 +00:00
|
|
|
|
CtrlChars .DA #C.ENQ,#C.BS,#C.LF,#C.FF,#C.CR,#C.SO,#C.SI,#C.FS,#C.ESC
|
|
|
|
|
CtrlChars.Cnt .EQ *-CtrlChars
|
|
|
|
|
*--------------------------------------
|
2019-12-04 13:46:58 +00:00
|
|
|
|
EscCodes .AZ "78MDc[()"
|
2019-07-12 14:51:57 +00:00
|
|
|
|
EscCodes.Cnt .EQ *-EscCodes
|
2019-12-04 13:46:58 +00:00
|
|
|
|
EscModes .DA #0,#0,#0,#0,#0,#S.DCB.TTY.MODE.CSI,#S.DCB.TTY.MODE.G0,#S.DCB.TTY.MODE.G1
|
2021-03-15 20:45:22 +00:00
|
|
|
|
CsiCodes .AS "hlmnrABCDJKH"
|
2019-07-12 14:51:57 +00:00
|
|
|
|
CsiCodes.Cnt .EQ *-CsiCodes
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
KeyRemapped .HS 080A0B15 Left,Down,Up,Right
|
|
|
|
|
KeyRemapped.Cnt .EQ *-KeyRemapped
|
|
|
|
|
KeyRemapped.Tbl .HS 44424143 esc[D,esc[B,esc[A,esc[C
|
|
|
|
|
*--------------------------------------
|
2020-08-18 19:56:50 +00:00
|
|
|
|
WILLDO .DA #TN.O.BINARY,#TN.O.SGA,#TN.O.ECHO
|
2019-07-12 14:51:57 +00:00
|
|
|
|
WILLDO.CNT .EQ *-WILLDO
|
2020-08-18 19:56:50 +00:00
|
|
|
|
WILLDONT .DA #TN.O.TSPEED,#TN.O.LINEMODE,#TN.O.STATUS
|
2019-07-12 14:51:57 +00:00
|
|
|
|
WILLDONT.CNT .EQ *-WILLDONT
|
2020-08-18 19:56:50 +00:00
|
|
|
|
DOWILL .DA #TN.O.BINARY,#TN.O.SGA,#TN.O.TTYPE,#TN.O.NAWS
|
2019-07-12 14:51:57 +00:00
|
|
|
|
DOWILL.CNT .EQ *-DOWILL
|
2020-08-18 19:56:50 +00:00
|
|
|
|
DOWONT .DA #TN.O.ECHO,#TN.O.NEWENV,#TN.O.XDISPLOC
|
|
|
|
|
.DA #TN.O.TSPEED,#TN.O.LFLOW,#TN.O.AUTH
|
2019-07-12 14:51:57 +00:00
|
|
|
|
DOWONT.CNT .EQ *-DOWONT
|
2020-05-06 15:28:09 +00:00
|
|
|
|
*--------------------------------------
|
2020-08-18 19:56:50 +00:00
|
|
|
|
SB.IS.TTYPE .DA #IAC,#SB,#TN.O.TTYPE,#SB.IS
|
2019-11-17 14:39:55 +00:00
|
|
|
|
ENQ.String .AS "vt100"
|
2019-07-12 14:51:57 +00:00
|
|
|
|
ENQ.String.Len .EQ *-ENQ.String
|
|
|
|
|
.DA #IAC,#SE
|
|
|
|
|
SB.IS.TTYPE.LEN .EQ *-SB.IS.TTYPE
|
2020-08-18 19:56:50 +00:00
|
|
|
|
SB.IS.NAWS .DA #IAC,#SB,#TN.O.NAWS,#SB.IS
|
2019-07-12 14:51:57 +00:00
|
|
|
|
.DA 80
|
|
|
|
|
.DA 24
|
|
|
|
|
.DA #IAC,#SE
|
|
|
|
|
SB.IS.NAWS.LEN .EQ *-SB.IS.NAWS
|
|
|
|
|
*--------------------------------------
|
2020-01-10 15:58:47 +00:00
|
|
|
|
RESET.VALUES .DA #0 MODE
|
|
|
|
|
.DA #0 CH
|
|
|
|
|
.DA #0 CH.SAVE
|
|
|
|
|
.DA #0 CV
|
|
|
|
|
.DA #0 CV.SAVE
|
|
|
|
|
.DA #0 SCROLLTOP
|
|
|
|
|
.DA #23 SCROLLBOT
|
|
|
|
|
.DA #0 bCURON
|
|
|
|
|
.DA #0 bTITLE
|
|
|
|
|
|
|
|
|
|
.DA #$80 bNORMAL
|
|
|
|
|
.DA #$80 bLINEWRAP
|
|
|
|
|
.DA #$80 bCRLF
|
|
|
|
|
|
|
|
|
|
.DA #0 bG0G1
|
|
|
|
|
.DA #0 bG0G1ALT
|
|
|
|
|
|
|
|
|
|
.DA #S.DCB.TTY.OUTBUFFER OUTTAIL
|
|
|
|
|
.DA #S.DCB.TTY.OUTBUFFER OUTHEAD
|
|
|
|
|
.DA #S.DCB.TTY.INBUFFER INBUFFER
|
2019-07-24 15:17:08 +00:00
|
|
|
|
*--------------------------------------
|
2020-02-06 16:23:59 +00:00
|
|
|
|
TERMX.DIB .DA #S.DIB.S.WRITE+S.DIB.S.READ
|
2019-07-24 15:17:08 +00:00
|
|
|
|
.DA #0,#0,#0
|
2020-01-10 15:58:47 +00:00
|
|
|
|
>PSTR "A2osX VT100 term"
|
2019-07-24 15:17:08 +00:00
|
|
|
|
.DA #S.DIB.T.CHAR
|
|
|
|
|
.DA #0
|
|
|
|
|
.DA K.VER
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
* ` 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
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
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
|
2020-06-10 20:04:13 +00:00
|
|
|
|
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
|
2019-07-24 15:17:08 +00:00
|
|
|
|
*--------------------------------------
|
2020-05-04 20:46:21 +00:00
|
|
|
|
BUF.BASEL .DA #S.DCB.TTY+0
|
|
|
|
|
.DA #S.DCB.TTY+80
|
|
|
|
|
.DA #S.DCB.TTY+160
|
|
|
|
|
.DA #S.DCB.TTY+240
|
|
|
|
|
.DA #S.DCB.TTY+320
|
|
|
|
|
.DA #S.DCB.TTY+400
|
|
|
|
|
.DA #S.DCB.TTY+480
|
|
|
|
|
.DA #S.DCB.TTY+560
|
|
|
|
|
.DA #S.DCB.TTY+640
|
|
|
|
|
.DA #S.DCB.TTY+720
|
|
|
|
|
.DA #S.DCB.TTY+800
|
|
|
|
|
.DA #S.DCB.TTY+880
|
|
|
|
|
.DA #S.DCB.TTY+960
|
|
|
|
|
.DA #S.DCB.TTY+1040
|
|
|
|
|
.DA #S.DCB.TTY+1120
|
|
|
|
|
.DA #S.DCB.TTY+1200
|
|
|
|
|
.DA #S.DCB.TTY+1280
|
|
|
|
|
.DA #S.DCB.TTY+1360
|
|
|
|
|
.DA #S.DCB.TTY+1440
|
|
|
|
|
.DA #S.DCB.TTY+1520
|
|
|
|
|
.DA #S.DCB.TTY+1600
|
|
|
|
|
.DA #S.DCB.TTY+1680
|
|
|
|
|
.DA #S.DCB.TTY+1760
|
|
|
|
|
.DA #S.DCB.TTY+1840
|
|
|
|
|
BUF.BASEH .DA /S.DCB.TTY+0
|
|
|
|
|
.DA /S.DCB.TTY+80
|
|
|
|
|
.DA /S.DCB.TTY+160
|
|
|
|
|
.DA /S.DCB.TTY+240
|
|
|
|
|
.DA /S.DCB.TTY+320
|
|
|
|
|
.DA /S.DCB.TTY+400
|
|
|
|
|
.DA /S.DCB.TTY+480
|
|
|
|
|
.DA /S.DCB.TTY+560
|
|
|
|
|
.DA /S.DCB.TTY+640
|
|
|
|
|
.DA /S.DCB.TTY+720
|
|
|
|
|
.DA /S.DCB.TTY+800
|
|
|
|
|
.DA /S.DCB.TTY+880
|
|
|
|
|
.DA /S.DCB.TTY+960
|
|
|
|
|
.DA /S.DCB.TTY+1040
|
|
|
|
|
.DA /S.DCB.TTY+1120
|
|
|
|
|
.DA /S.DCB.TTY+1200
|
|
|
|
|
.DA /S.DCB.TTY+1280
|
|
|
|
|
.DA /S.DCB.TTY+1360
|
|
|
|
|
.DA /S.DCB.TTY+1440
|
|
|
|
|
.DA /S.DCB.TTY+1520
|
|
|
|
|
.DA /S.DCB.TTY+1600
|
|
|
|
|
.DA /S.DCB.TTY+1680
|
|
|
|
|
.DA /S.DCB.TTY+1760
|
|
|
|
|
.DA /S.DCB.TTY+1840
|
2020-01-10 15:58:47 +00:00
|
|
|
|
*--------------------------------------
|
2018-12-11 16:41:25 +00:00
|
|
|
|
MAN
|
2020-12-15 13:23:22 +00:00
|
|
|
|
SAVE usr/src/sys/kernel.s.termx
|
|
|
|
|
LOAD usr/src/sys/kernel.s
|
2018-12-11 16:41:25 +00:00
|
|
|
|
ASM
|