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
|
|
|
|
|
*--------------------------------------
|
2018-12-14 16:19:05 +00:00
|
|
|
|
.DUMMY
|
|
|
|
|
.OR ZPDRV
|
|
|
|
|
ZPIOCTL .BS 2
|
|
|
|
|
ZPDCBPtr .BS 2
|
|
|
|
|
ZPBufPtr .BS 2
|
|
|
|
|
ZPCount .BS 2
|
|
|
|
|
ZPBufBaseL1 .BS 2
|
|
|
|
|
ZPBufBaseL2 .BS 2
|
|
|
|
|
ZPScrBaseL1 .BS 2
|
|
|
|
|
ZPScrBaseL2 .BS 2
|
2019-05-14 16:04:16 +00:00
|
|
|
|
|
2018-12-14 16:19:05 +00:00
|
|
|
|
ZPTmpWord .BS 2
|
|
|
|
|
ZPTmpBool .BS 1
|
2019-05-15 15:30:46 +00:00
|
|
|
|
ZPTmpChar .BS 1
|
2018-12-15 20:34:55 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
bActive .BS 1
|
2019-05-25 19:24:07 +00:00
|
|
|
|
CsiHeader .BS 1
|
2018-12-15 20:34:55 +00:00
|
|
|
|
CsiParamCnt .BS 1
|
|
|
|
|
CsiParams .BS 4
|
2018-12-14 16:19:05 +00:00
|
|
|
|
.ED
|
2018-12-11 16:41:25 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
DRV.TERM cld
|
2018-12-14 16:19:05 +00:00
|
|
|
|
jmp (.1,x)
|
|
|
|
|
.1 .DA DRV.TERM.STATUS
|
2018-12-11 16:41:25 +00:00
|
|
|
|
.DA A2osX.BADCALL
|
|
|
|
|
.DA A2osX.BADCALL
|
|
|
|
|
.DA A2osX.BADCALL
|
|
|
|
|
.DA DRV.TERM.CONTROL
|
|
|
|
|
.DA A2osX.BADCALL
|
|
|
|
|
.DA DRV.TERM.OPEN
|
|
|
|
|
.DA DRV.TERM.CLOSE
|
|
|
|
|
.DA DRV.TERM.READ
|
|
|
|
|
.DA DRV.TERM.WRITE
|
|
|
|
|
*--------------------------------------
|
2018-12-17 14:24:39 +00:00
|
|
|
|
DRV.TERM.STATUS jsr DRV.TERM.GetIOCTLBufCntDCB
|
|
|
|
|
|
2018-12-12 16:32:33 +00:00
|
|
|
|
ldy #S.IOCTL.STATCODE
|
2018-12-11 16:41:25 +00:00
|
|
|
|
lda (ZPIOCTL),y
|
|
|
|
|
beq .1
|
|
|
|
|
|
|
|
|
|
cmp #S.IOCTL.STATCODE.GETDIB
|
2019-02-20 16:07:43 +00:00
|
|
|
|
bne .3
|
2018-12-11 16:41:25 +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
|
|
|
|
|
2018-12-12 16:32:33 +00:00
|
|
|
|
.2 lda DRV.TERM.DIB,y
|
2018-12-17 14:24:39 +00:00
|
|
|
|
sta (ZPBufPtr),y
|
2018-12-12 16:32:33 +00:00
|
|
|
|
dey
|
|
|
|
|
bne .2
|
2018-12-11 16:41:25 +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-02-20 16:07:43 +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
|
|
|
|
|
|
2019-02-23 22:01:58 +00:00
|
|
|
|
ldy #S.DCB.TTY.STATUS
|
|
|
|
|
lda (ZPDCBPtr),y
|
|
|
|
|
and #S.DIB.S.OPENED
|
2019-05-16 15:51:19 +00:00
|
|
|
|
beq DRV.TERM.OPEN.E
|
2019-02-23 22:01:58 +00:00
|
|
|
|
|
|
|
|
|
jsr DRV.TERM.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
|
|
|
|
|
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-02-20 16:07:43 +00:00
|
|
|
|
bit OPENAPPLE
|
2019-05-16 15:51:19 +00:00
|
|
|
|
bmi .7
|
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
|
|
|
|
|
|
2018-12-11 16:41:25 +00:00
|
|
|
|
.9 lda #MLI.E.BADCTL
|
|
|
|
|
sec
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2019-03-19 16:52:08 +00:00
|
|
|
|
DRV.TERM.OPEN tax DEV.ID in A
|
2018-12-11 16:41:25 +00:00
|
|
|
|
|
2019-03-19 16:52:08 +00:00
|
|
|
|
jsr DRV.TERM.GetDCB
|
|
|
|
|
|
|
|
|
|
ldy #S.DCB.TTY.STATUS
|
|
|
|
|
lda (ZPDCBPtr),y
|
|
|
|
|
bit #S.DIB.S.OPENED
|
2019-05-16 15:51:19 +00:00
|
|
|
|
beq DRV.TERM.OPEN.1
|
2019-03-19 16:52:08 +00:00
|
|
|
|
|
2019-05-16 15:51:19 +00:00
|
|
|
|
DRV.TERM.OPEN.E lda #MLI.E.OPEN
|
2019-03-19 16:52:08 +00:00
|
|
|
|
sec
|
|
|
|
|
rts
|
|
|
|
|
|
2019-05-16 15:51:19 +00:00
|
|
|
|
DRV.TERM.OPEN.1 txa
|
2019-03-19 16:52:08 +00:00
|
|
|
|
|
|
|
|
|
ldx #0
|
|
|
|
|
.2 ldy A2osX.SCRNDEVS,x
|
|
|
|
|
beq .3
|
2018-12-11 16:41:25 +00:00
|
|
|
|
|
|
|
|
|
inx
|
|
|
|
|
cpx #K.SCR.MAX
|
2019-03-19 16:52:08 +00:00
|
|
|
|
bne .2
|
2018-12-11 16:41:25 +00:00
|
|
|
|
|
|
|
|
|
lda #E.OOH
|
|
|
|
|
sec
|
|
|
|
|
rts
|
|
|
|
|
|
2019-03-19 16:52:08 +00:00
|
|
|
|
.3 sta A2osX.SCRNDEVS,x
|
2018-12-14 16:19:05 +00:00
|
|
|
|
|
2018-12-13 16:39:24 +00:00
|
|
|
|
ldy #S.DCB.TTY.DEVID
|
|
|
|
|
sta (ZPDCBPtr),y
|
2018-12-11 16:41:25 +00:00
|
|
|
|
|
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
|
|
|
|
|
ora DRV.TERM.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
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
DRV.TERM.CONTROL
|
2018-12-14 16:19:05 +00:00
|
|
|
|
jsr DRV.TERM.GetDCB
|
|
|
|
|
|
2018-12-13 16:39:24 +00:00
|
|
|
|
ldy #S.DCB.TTY.DEVID
|
|
|
|
|
lda (ZPDCBPtr),y
|
2018-12-11 16:41:25 +00:00
|
|
|
|
sta A2osX.ASCREEN
|
|
|
|
|
|
2018-12-17 14:24:39 +00:00
|
|
|
|
sta SETTEXT
|
|
|
|
|
|
2018-12-14 16:19:05 +00:00
|
|
|
|
jsr DRV.TERM.SCRCPY
|
|
|
|
|
|
2018-12-17 07:02:03 +00:00
|
|
|
|
lda #0
|
|
|
|
|
|
|
|
|
|
ldy #S.DCB.TTY.bCURON
|
|
|
|
|
sta (ZPDCBPtr),y
|
|
|
|
|
|
|
|
|
|
ldy #S.DCB.TTY.bTITLE
|
|
|
|
|
sta (ZPDCBPtr),y
|
|
|
|
|
|
2018-12-11 16:41:25 +00:00
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2018-12-14 16:19:05 +00:00
|
|
|
|
DRV.TERM.CLOSE jsr DRV.TERM.GetDCB
|
|
|
|
|
|
|
|
|
|
ldy #S.DCB.TTY.STATUS
|
2018-12-13 16:39:24 +00:00
|
|
|
|
lda (ZPDCBPtr),y
|
2018-12-11 16:41:25 +00:00
|
|
|
|
bit #S.DIB.S.OPENED
|
|
|
|
|
beq .9
|
|
|
|
|
|
|
|
|
|
lda DRV.TERM.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
|
2018-12-13 16:39:24 +00:00
|
|
|
|
ldy #S.DCB.TTY.DEVID
|
2018-12-12 16:32:33 +00:00
|
|
|
|
|
2018-12-11 16:41:25 +00:00
|
|
|
|
.1 lda A2osX.SCRNDEVS,x
|
2018-12-13 16:39:24 +00:00
|
|
|
|
cmp (ZPDCBPtr),y
|
2018-12-11 16:41:25 +00:00
|
|
|
|
bne .2
|
|
|
|
|
|
|
|
|
|
stz A2osX.SCRNDEVS,x
|
|
|
|
|
|
|
|
|
|
.2 inx
|
|
|
|
|
cpx #K.SCR.MAX
|
|
|
|
|
bne .1
|
|
|
|
|
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
|
2018-12-14 16:19:05 +00:00
|
|
|
|
.9 lda #MLI.E.IO
|
2018-12-11 16:41:25 +00:00
|
|
|
|
sec
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2018-12-17 14:24:39 +00:00
|
|
|
|
DRV.TERM.READ jsr DRV.TERM.GetIOCTLBufCntDCB
|
2018-12-14 16:19:05 +00:00
|
|
|
|
|
|
|
|
|
bit bActive is screen active?
|
|
|
|
|
bpl .6 no....go check flush...
|
2019-02-23 22:01:58 +00:00
|
|
|
|
|
2018-12-17 07:02:03 +00:00
|
|
|
|
jsr DRV.TERM.CURBLNK
|
2018-12-11 16:41:25 +00:00
|
|
|
|
|
2019-02-23 22:01:58 +00:00
|
|
|
|
lda OPENAPPLE
|
|
|
|
|
bpl .1
|
2018-12-17 07:02:03 +00:00
|
|
|
|
|
|
|
|
|
lda KBD
|
2018-12-11 16:41:25 +00:00
|
|
|
|
bmi .6 Open apple key, not for us...
|
|
|
|
|
|
2018-12-17 07:02:03 +00:00
|
|
|
|
jsr DRV.TERM.Title.ON
|
|
|
|
|
bra .6
|
|
|
|
|
|
2019-02-23 22:01:58 +00:00
|
|
|
|
.1 jsr DRV.TERM.Title.OFF
|
2018-12-17 07:02:03 +00:00
|
|
|
|
|
2018-12-11 16:41:25 +00:00
|
|
|
|
lda KBD
|
|
|
|
|
bpl .6
|
|
|
|
|
sta KBDSTROBE
|
|
|
|
|
|
|
|
|
|
and #$7F
|
2018-12-15 20:34:55 +00:00
|
|
|
|
|
2019-05-25 19:24:07 +00:00
|
|
|
|
ldx #KeyRemapped.cnt-1
|
|
|
|
|
|
2018-12-11 16:41:25 +00:00
|
|
|
|
.2 cmp KeyRemapped,x
|
|
|
|
|
beq .3
|
|
|
|
|
dex
|
2019-05-25 19:24:07 +00:00
|
|
|
|
bpl .2
|
|
|
|
|
|
|
|
|
|
cmp #C.CR
|
|
|
|
|
bne .21
|
|
|
|
|
|
|
|
|
|
jsr Char.Out.Put
|
|
|
|
|
ldy #S.DCB.TTY.bCRLF
|
|
|
|
|
lda (ZPDCBPtr),y
|
|
|
|
|
bpl .7
|
|
|
|
|
|
|
|
|
|
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-05-25 19:24:07 +00:00
|
|
|
|
.3 lda KeyRemapped.Tbl,x
|
|
|
|
|
pha
|
2018-12-11 16:41:25 +00:00
|
|
|
|
|
2019-05-25 19:24:07 +00:00
|
|
|
|
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
|
2018-12-15 20:34:55 +00:00
|
|
|
|
iny
|
|
|
|
|
cmp (ZPDCBPtr),y OUTHEAD
|
2018-12-13 16:39:24 +00:00
|
|
|
|
|
2018-12-11 16:41:25 +00:00
|
|
|
|
beq .9 no char in output buffer...
|
|
|
|
|
|
|
|
|
|
.7 stz .8+1
|
|
|
|
|
|
|
|
|
|
.70 inc ZPCount
|
|
|
|
|
bne .71
|
|
|
|
|
inc ZPCount+1
|
|
|
|
|
beq .8
|
|
|
|
|
|
|
|
|
|
.71 jsr Char.Out.Get
|
|
|
|
|
bcs .8
|
|
|
|
|
|
|
|
|
|
ldy .8+1
|
|
|
|
|
sta (ZPBufPtr),y
|
|
|
|
|
iny
|
|
|
|
|
sty .8+1
|
|
|
|
|
bra .70
|
|
|
|
|
|
|
|
|
|
.8 lda #$ff SELF MODIFIED
|
|
|
|
|
ldy #S.IOCTL.BYTECNT
|
|
|
|
|
sta (ZPIOCTL),y
|
|
|
|
|
iny
|
|
|
|
|
lda #0
|
|
|
|
|
sta (ZPIOCTL),y
|
|
|
|
|
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
|
2019-05-12 20:45:11 +00:00
|
|
|
|
.9 lda #E.NODATA
|
|
|
|
|
* sec
|
2018-12-11 16:41:25 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2018-12-17 14:24:39 +00:00
|
|
|
|
DRV.TERM.WRITE jsr DRV.TERM.GetIOCTLBufCntDCB
|
|
|
|
|
|
|
|
|
|
jsr DRV.TERM.CUROFF
|
2018-12-11 16:41:25 +00:00
|
|
|
|
|
2018-12-12 16:32:33 +00:00
|
|
|
|
.1 inc ZPCount
|
|
|
|
|
bne .2
|
2018-12-11 16:41:25 +00:00
|
|
|
|
inc ZPCount+1
|
2019-05-25 19:24:07 +00:00
|
|
|
|
beq .8
|
2018-12-17 07:02:03 +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
|
2018-12-11 16:41:25 +00:00
|
|
|
|
|
2018-12-12 16:32:33 +00:00
|
|
|
|
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
|
|
|
|
|
2018-12-12 16:32:33 +00:00
|
|
|
|
.4 .DA DRV.TERM.COUT
|
|
|
|
|
.DA DRV.TERM.ESC
|
|
|
|
|
.DA DRV.TERM.CSI
|
|
|
|
|
.DA DRV.TERM.IAC
|
2019-05-12 20:45:11 +00:00
|
|
|
|
.DA DRV.TERM.G0
|
|
|
|
|
.DA DRV.TERM.G1
|
2019-05-25 19:24:07 +00:00
|
|
|
|
|
|
|
|
|
.8 clc
|
|
|
|
|
rts
|
2018-12-11 16:41:25 +00:00
|
|
|
|
*--------------------------------------
|
2018-12-12 16:32:33 +00:00
|
|
|
|
DRV.TERM.COUT lda (ZPBufPtr)
|
|
|
|
|
|
|
|
|
|
cmp #IAC
|
2018-12-11 16:41:25 +00:00
|
|
|
|
bne .1
|
2018-12-12 16:32:33 +00:00
|
|
|
|
|
2018-12-13 16:39:24 +00:00
|
|
|
|
lda #S.DCB.TTY.MODE.IAC
|
2018-12-17 14:24:39 +00:00
|
|
|
|
jmp DRV.TERM.SETMODE
|
2018-12-13 16:39:24 +00:00
|
|
|
|
|
2018-12-17 07:02:03 +00:00
|
|
|
|
.1 cmp #C.DEL
|
|
|
|
|
beq DRV.TERM.COUT.DEL
|
2018-12-11 16:41:25 +00:00
|
|
|
|
cmp #C.SPACE
|
2018-12-17 14:24:39 +00:00
|
|
|
|
bcs .8
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
dex
|
|
|
|
|
bpl .2
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
.3 txa
|
|
|
|
|
asl
|
|
|
|
|
tax
|
|
|
|
|
jmp (.4,x)
|
|
|
|
|
|
2019-05-15 15:30:46 +00:00
|
|
|
|
.4 .DA ENQ
|
2019-05-25 19:24:07 +00:00
|
|
|
|
.DA DRV.TERM.COUT.BS
|
|
|
|
|
.DA DRV.TERM.COUT.LF
|
2018-12-17 14:24:39 +00:00
|
|
|
|
.DA DRV.TERM.COUT.FF
|
|
|
|
|
.DA DRV.TERM.COUT.CR
|
2019-05-15 15:30:46 +00:00
|
|
|
|
.DA DRV.TERM.COUT.SO
|
|
|
|
|
.DA DRV.TERM.COUT.SI
|
2018-12-17 14:24:39 +00:00
|
|
|
|
.DA DRV.TERM.COUT.FS
|
|
|
|
|
.DA DRV.TERM.COUT.ESC
|
|
|
|
|
|
2019-05-12 20:45:11 +00:00
|
|
|
|
.8 jsr SetCharAtCurPos
|
2018-12-11 16:41:25 +00:00
|
|
|
|
*--------------------------------------
|
2018-12-17 14:24:39 +00:00
|
|
|
|
DRV.TERM.COUT.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
|
2019-07-17 15:49:23 +00:00
|
|
|
|
bcc DRV.TERM.COUT.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
|
2019-07-17 15:49:23 +00:00
|
|
|
|
bpl DRV.TERM.COUT.BS.8
|
2018-12-11 16:41:25 +00:00
|
|
|
|
|
2018-12-13 16:39:24 +00:00
|
|
|
|
ldy #S.DCB.TTY.CH
|
2018-12-12 16:32:33 +00:00
|
|
|
|
lda #0
|
2018-12-13 16:39:24 +00:00
|
|
|
|
sta (ZPDCBPtr),y
|
2018-12-12 16:32:33 +00:00
|
|
|
|
|
2019-05-25 19:24:07 +00:00
|
|
|
|
jmp DRV.TERM.COUT.LF.1
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
DRV.TERM.COUT.BS
|
|
|
|
|
ldy #S.DCB.TTY.CH
|
|
|
|
|
lda (ZPDCBPtr),y
|
2019-07-17 15:49:23 +00:00
|
|
|
|
beq DRV.TERM.COUT.BS.1
|
2019-05-25 19:24:07 +00:00
|
|
|
|
|
|
|
|
|
dec
|
|
|
|
|
sta (ZPDCBPtr),y
|
2019-07-17 15:49:23 +00:00
|
|
|
|
DRV.TERM.COUT.BS.8
|
2019-05-25 19:24:07 +00:00
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
|
2019-07-17 15:49:23 +00:00
|
|
|
|
DRV.TERM.COUT.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
|
|
|
|
|
dey
|
|
|
|
|
sta (ZPDCBPtr),y
|
|
|
|
|
|
|
|
|
|
.2 clc
|
2018-12-11 16:41:25 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2018-12-17 07:02:03 +00:00
|
|
|
|
DRV.TERM.COUT.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
|
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
|
|
|
|
|
|
2018-12-13 16:39:24 +00:00
|
|
|
|
.1 iny S.DCB.TTY.CV
|
|
|
|
|
lda (ZPDCBPtr),y
|
2019-07-17 15:49:23 +00:00
|
|
|
|
beq DRV.TERM.COUT.BS.8
|
2018-12-11 16:41:25 +00:00
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
dey
|
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
|
2018-12-11 16:41:25 +00:00
|
|
|
|
|
|
|
|
|
.3 lda #$20
|
|
|
|
|
jmp SetCharAtCurPos
|
|
|
|
|
*--------------------------------------
|
2018-12-17 14:24:39 +00:00
|
|
|
|
DRV.TERM.COUT.FF
|
|
|
|
|
lda #0
|
|
|
|
|
ldy #S.DCB.TTY.CV
|
|
|
|
|
sta (ZPDCBPtr),y
|
|
|
|
|
dey
|
|
|
|
|
sta (ZPDCBPtr),y
|
|
|
|
|
jmp DRV.TERM.CLRSCR
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
DRV.TERM.COUT.CR
|
|
|
|
|
lda #0
|
|
|
|
|
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
|
|
|
|
*--------------------------------------
|
2019-05-15 15:30:46 +00:00
|
|
|
|
DRV.TERM.COUT.SO
|
|
|
|
|
sec
|
|
|
|
|
.HS 90 BCC
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
DRV.TERM.COUT.SI
|
|
|
|
|
clc
|
|
|
|
|
ldy #S.DCB.TTY.bG0G1
|
|
|
|
|
ror
|
|
|
|
|
sta (ZPDCBPtr),y
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2018-12-17 14:24:39 +00:00
|
|
|
|
DRV.TERM.COUT.ESC
|
|
|
|
|
lda #S.DCB.TTY.MODE.ESC
|
2018-12-17 07:02:03 +00:00
|
|
|
|
bra DRV.TERM.SETMODE
|
2018-12-11 16:41:25 +00:00
|
|
|
|
*--------------------------------------
|
2019-05-15 15:30:46 +00:00
|
|
|
|
DRV.TERM.ESC lda (ZPBufPtr) 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
|
2018-12-15 20:34:55 +00:00
|
|
|
|
|
2018-12-11 16:41:25 +00:00
|
|
|
|
.2 cmp EscCodes,x
|
|
|
|
|
beq .3
|
|
|
|
|
dex
|
|
|
|
|
bpl .2
|
|
|
|
|
|
2019-05-15 15:30:46 +00:00
|
|
|
|
lda #0
|
|
|
|
|
bra DRV.TERM.SETMODE
|
2018-12-11 16:41:25 +00:00
|
|
|
|
|
2019-05-15 15:30:46 +00:00
|
|
|
|
.3 phx
|
|
|
|
|
jsr .4
|
|
|
|
|
plx
|
|
|
|
|
lda EscModes,x
|
|
|
|
|
bra DRV.TERM.SETMODE
|
|
|
|
|
|
|
|
|
|
.4 txa
|
2018-12-11 16:41:25 +00:00
|
|
|
|
asl
|
|
|
|
|
tax
|
2019-05-15 15:30:46 +00:00
|
|
|
|
jmp (.5,x)
|
2018-12-15 20:34:55 +00:00
|
|
|
|
|
2019-05-15 15:30:46 +00:00
|
|
|
|
.5 .DA Scroll.Dn M
|
2018-12-11 16:41:25 +00:00
|
|
|
|
.DA Scroll.Up D
|
|
|
|
|
.DA RESET c
|
2019-05-15 15:30:46 +00:00
|
|
|
|
.DA DRV.TERM.SETMODE.RTS [
|
|
|
|
|
.DA DRV.TERM.SETMODE.RTS (
|
|
|
|
|
.DA DRV.TERM.SETMODE.RTS )
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
DRV.TERM.SETMODE
|
|
|
|
|
ldy #S.DCB.TTY.MODE
|
|
|
|
|
sta (ZPDCBPtr),y
|
|
|
|
|
ldy #S.DCB.TTY.INBUFFER
|
|
|
|
|
lda #S.DCB.TTY.INBUFFER
|
|
|
|
|
sta (ZPDCBPtr),y
|
|
|
|
|
clc
|
|
|
|
|
DRV.TERM.SETMODE.RTS
|
|
|
|
|
rts
|
2018-12-11 16:41:25 +00:00
|
|
|
|
*--------------------------------------
|
2018-12-13 16:39:24 +00:00
|
|
|
|
DRV.TERM.CSI ldy #S.DCB.TTY.INBUFFER
|
|
|
|
|
lda (ZPDCBPtr),y
|
|
|
|
|
inc
|
|
|
|
|
sta (ZPDCBPtr),y
|
|
|
|
|
tay
|
2018-12-12 16:32:33 +00:00
|
|
|
|
|
|
|
|
|
lda (ZPBufPtr)
|
2018-12-13 16:39:24 +00:00
|
|
|
|
sta (ZPDCBPtr),y
|
2018-12-11 16:41:25 +00:00
|
|
|
|
cmp #64 End of Seq ?
|
2018-12-15 20:34:55 +00:00
|
|
|
|
bcs DRV.TERM.CSI.Exec
|
2018-12-12 16:32:33 +00:00
|
|
|
|
|
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-07-12 14:51:57 +00:00
|
|
|
|
jsr RESET.MODE
|
2018-12-12 16:32:33 +00:00
|
|
|
|
|
|
|
|
|
.8 clc
|
2018-12-11 16:41:25 +00:00
|
|
|
|
rts
|
|
|
|
|
|
2018-12-15 20:34:55 +00:00
|
|
|
|
DRV.TERM.CSI.Exec
|
2019-05-25 19:24:07 +00:00
|
|
|
|
stz CsiHeader
|
2018-12-15 20:34:55 +00:00
|
|
|
|
stz CsiParamCnt
|
2018-12-11 16:41:25 +00:00
|
|
|
|
|
2019-07-12 14:51:57 +00:00
|
|
|
|
lda #S.DCB.TTY.INBUFFER+1 EscSeq Ptr
|
|
|
|
|
clc
|
|
|
|
|
adc ZPDCBPtr
|
|
|
|
|
sta ZPPtr2
|
|
|
|
|
lda /S.DCB.TTY.INBUFFER+1
|
|
|
|
|
adc ZPDCBPtr+1
|
|
|
|
|
sta ZPPtr2+1
|
2018-12-13 16:39:24 +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
|
|
|
|
|
|
|
|
|
sta CsiHeader
|
2018-12-11 16:41:25 +00:00
|
|
|
|
|
2019-07-28 20:39:30 +00:00
|
|
|
|
.1 jsr SHARED.NextCharPtr2
|
|
|
|
|
|
2019-07-12 14:51:57 +00:00
|
|
|
|
.2 jsr MATH.Dec2ACC32
|
|
|
|
|
bcs .5
|
2018-12-11 16:41:25 +00:00
|
|
|
|
|
2019-07-28 20:39:30 +00:00
|
|
|
|
jsr SHARED.AddYToPtr2
|
2018-12-15 20:34:55 +00:00
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
.3 ldx CsiParamCnt
|
2018-12-15 20:34:55 +00:00
|
|
|
|
sta CsiParams,x
|
|
|
|
|
inc CsiParamCnt
|
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
|
2018-12-15 20:34:55 +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
|
|
|
|
|
|
2018-12-11 16:41:25 +00:00
|
|
|
|
dex
|
2019-07-12 14:51:57 +00:00
|
|
|
|
bne .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)
|
|
|
|
|
|
2019-05-25 19:24:07 +00:00
|
|
|
|
.8 .DA Csi.SetMode h
|
|
|
|
|
.DA Csi.ResetMode l
|
2018-12-15 20:34:55 +00:00
|
|
|
|
.DA Csi.DispAttr m
|
|
|
|
|
.DA Csi.Query n
|
|
|
|
|
.DA Csi.Scroll r
|
2019-05-14 16:04:16 +00:00
|
|
|
|
.DA Csi.EraseScreen J
|
|
|
|
|
.DA Csi.EraseLine K
|
2018-12-15 20:34:55 +00:00
|
|
|
|
.DA Csi.Home H
|
|
|
|
|
*--------------------------------------
|
2019-05-25 19:24:07 +00:00
|
|
|
|
Csi.SetMode sec
|
2018-12-15 20:34:55 +00:00
|
|
|
|
.HS 90 BCC
|
|
|
|
|
*--------------------------------------
|
2019-05-25 19:24:07 +00:00
|
|
|
|
Csi.ResetMode clc
|
|
|
|
|
|
2018-12-15 20:34:55 +00:00
|
|
|
|
ldx CsiParamCnt
|
2019-05-25 19:24:07 +00:00
|
|
|
|
beq .99
|
|
|
|
|
|
2018-12-15 20:34:55 +00:00
|
|
|
|
dex
|
2019-05-25 19:24:07 +00:00
|
|
|
|
bne .99
|
2018-12-15 20:34:55 +00:00
|
|
|
|
|
2019-05-25 19:24:07 +00:00
|
|
|
|
ldx CsiHeader
|
2018-12-15 20:34:55 +00:00
|
|
|
|
lda CsiParams
|
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
|
|
|
|
|
txa
|
|
|
|
|
bne .98
|
|
|
|
|
|
|
|
|
|
ldy #S.DCB.TTY.bCRLF
|
|
|
|
|
bra .8
|
|
|
|
|
|
|
|
|
|
.1 cmp #7
|
|
|
|
|
bne .98
|
|
|
|
|
|
|
|
|
|
cpx #'?'
|
|
|
|
|
bne .98
|
|
|
|
|
|
2018-12-15 20:34:55 +00:00
|
|
|
|
ldy #S.DCB.TTY.bLINEWRAP
|
|
|
|
|
|
2019-05-25 19:24:07 +00:00
|
|
|
|
.8 plp
|
|
|
|
|
ror
|
|
|
|
|
sta (ZPDCBPtr),y
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
.98 plp
|
|
|
|
|
.99 clc
|
2018-12-15 20:34:55 +00:00
|
|
|
|
rts
|
2018-12-11 16:41:25 +00:00
|
|
|
|
*--------------------------------------
|
2018-12-15 20:34:55 +00:00
|
|
|
|
Csi.DispAttr ldx CsiParamCnt
|
2019-05-12 20:45:11 +00:00
|
|
|
|
bne .1
|
|
|
|
|
|
|
|
|
|
jmp RESETATTR
|
2018-12-15 20:34:55 +00:00
|
|
|
|
|
|
|
|
|
.1 lda CsiParams-1,x
|
|
|
|
|
bne .2
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
.7 dex
|
|
|
|
|
bne .1
|
|
|
|
|
|
|
|
|
|
.8 clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
Csi.Query ldx CsiParamCnt
|
|
|
|
|
beq .8
|
|
|
|
|
dex
|
|
|
|
|
bne .8
|
|
|
|
|
|
|
|
|
|
lda CsiParams
|
|
|
|
|
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
|
|
|
|
|
jsr Decimal.Out
|
|
|
|
|
|
|
|
|
|
lda #';'
|
|
|
|
|
jsr Char.Out.Put
|
|
|
|
|
|
|
|
|
|
ldy #S.DCB.TTY.CH
|
|
|
|
|
lda (ZPDCBPtr),y
|
|
|
|
|
inc
|
|
|
|
|
jsr Decimal.Out
|
|
|
|
|
|
|
|
|
|
lda #'R'
|
|
|
|
|
jsr Char.Out.Put
|
|
|
|
|
|
|
|
|
|
.8 clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
Csi.Scroll ldy CsiParamCnt
|
|
|
|
|
bne .1
|
|
|
|
|
|
|
|
|
|
lda #0
|
|
|
|
|
ldx #23
|
|
|
|
|
bra .8
|
|
|
|
|
|
|
|
|
|
.1 cpy #2
|
|
|
|
|
bne .9
|
|
|
|
|
|
|
|
|
|
lda CsiParams
|
|
|
|
|
dec
|
|
|
|
|
ldx CsiParams+1
|
|
|
|
|
dex
|
|
|
|
|
|
|
|
|
|
.8 ldy #S.DCB.TTY.SCROLLTOP
|
|
|
|
|
sta (ZPDCBPtr),y
|
|
|
|
|
iny S.DCB.TTY.SCROLLBOT
|
|
|
|
|
txa
|
|
|
|
|
sta (ZPDCBPtr),y
|
|
|
|
|
|
|
|
|
|
.9 clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2019-05-14 16:04:16 +00:00
|
|
|
|
Csi.EraseScreen ldx CsiParamCnt
|
|
|
|
|
|
|
|
|
|
bne .1
|
|
|
|
|
jmp DRV.TERM.CLRSCR.DN
|
|
|
|
|
|
|
|
|
|
.1 lda CsiParams
|
|
|
|
|
cmp #1
|
|
|
|
|
bne .2
|
|
|
|
|
jmp DRV.TERM.CLRSCR.UP
|
|
|
|
|
|
|
|
|
|
.2 cmp #2
|
|
|
|
|
bne .9
|
|
|
|
|
jmp DRV.TERM.CLRSCR
|
|
|
|
|
|
|
|
|
|
.9 clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
Csi.EraseLine ldx CsiParamCnt
|
2018-12-15 20:34:55 +00:00
|
|
|
|
|
|
|
|
|
bne .1
|
|
|
|
|
jmp CLREOL
|
|
|
|
|
|
|
|
|
|
.1 lda CsiParams
|
|
|
|
|
cmp #1
|
|
|
|
|
bne .2
|
|
|
|
|
jmp CLRSOL
|
|
|
|
|
|
|
|
|
|
.2 cmp #2
|
|
|
|
|
bne .9
|
|
|
|
|
jmp CLRLINE
|
|
|
|
|
|
|
|
|
|
.9 clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
Csi.Home lda CsiParamCnt
|
|
|
|
|
bne .1
|
|
|
|
|
|
|
|
|
|
ldy #S.DCB.TTY.CH
|
|
|
|
|
sta (ZPDCBPtr),y
|
2019-05-12 20:45:11 +00:00
|
|
|
|
iny S.DCB.TTY.CV
|
2018-12-15 20:34:55 +00:00
|
|
|
|
sta (ZPDCBPtr),y
|
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
.1 ldx #1
|
|
|
|
|
lda CsiParams
|
|
|
|
|
beq .2
|
|
|
|
|
|
|
|
|
|
ldx #24
|
|
|
|
|
cmp #24
|
|
|
|
|
bcs .2
|
|
|
|
|
|
|
|
|
|
tax
|
|
|
|
|
|
|
|
|
|
.2 dex
|
|
|
|
|
txa
|
|
|
|
|
ldy #S.DCB.TTY.CV
|
|
|
|
|
sta (ZPDCBPtr),y
|
|
|
|
|
|
|
|
|
|
dec CsiParamCnt
|
2018-12-17 10:40:00 +00:00
|
|
|
|
beq Csi.Home.8
|
2018-12-15 20:34:55 +00:00
|
|
|
|
|
|
|
|
|
ldx #1
|
|
|
|
|
lda CsiParams+1
|
|
|
|
|
beq .3
|
|
|
|
|
|
|
|
|
|
ldx #80
|
|
|
|
|
cmp #80
|
|
|
|
|
|
|
|
|
|
bcs .3
|
|
|
|
|
|
|
|
|
|
tax
|
|
|
|
|
|
|
|
|
|
.3 dex
|
|
|
|
|
txa
|
|
|
|
|
ldy #S.DCB.TTY.CH
|
|
|
|
|
sta (ZPDCBPtr),y
|
|
|
|
|
|
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-05-14 16:04:16 +00:00
|
|
|
|
DRV.TERM.G0 ldy #S.DCB.TTY.bG0ALT
|
|
|
|
|
.HS 2C BIT ABS
|
|
|
|
|
DRV.TERM.G1 ldy #S.DCB.TTY.bG1ALT
|
2019-05-12 20:45:11 +00:00
|
|
|
|
|
2019-05-14 16:04:16 +00:00
|
|
|
|
lda (ZPBufPtr)
|
|
|
|
|
cmp #'0'
|
|
|
|
|
beq .1
|
|
|
|
|
clc
|
|
|
|
|
|
|
|
|
|
.1 ror
|
|
|
|
|
sta (ZPDCBPtr),y
|
2019-05-16 15:51:19 +00:00
|
|
|
|
lda #0
|
|
|
|
|
jmp DRV.TERM.SETMODE
|
2019-05-12 20:45:11 +00:00
|
|
|
|
*--------------------------------------
|
2018-12-13 16:39:24 +00:00
|
|
|
|
DRV.TERM.IAC ldy #S.DCB.TTY.INBUFFER
|
|
|
|
|
lda (ZPDCBPtr),y
|
|
|
|
|
inc
|
|
|
|
|
sta (ZPDCBPtr),y
|
|
|
|
|
tay
|
2018-12-12 16:32:33 +00:00
|
|
|
|
|
|
|
|
|
lda (ZPBufPtr)
|
2018-12-13 16:39:24 +00:00
|
|
|
|
sta (ZPDCBPtr),y
|
2018-12-11 16:41:25 +00:00
|
|
|
|
|
2018-12-13 16:39:24 +00:00
|
|
|
|
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
|
|
|
|
|
|
2018-12-13 16:39:24 +00:00
|
|
|
|
lda (ZPBufPtr)
|
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-11 16:41:25 +00:00
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
cmp #TELOPT.TTYPE
|
2018-12-18 14:37:07 +00:00
|
|
|
|
bne COUT.IAC.SB.9
|
2018-12-11 16:41:25 +00:00
|
|
|
|
|
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-11 16:41:25 +00:00
|
|
|
|
|
2018-12-15 20:34:55 +00:00
|
|
|
|
ldx #0
|
2018-12-11 16:41:25 +00:00
|
|
|
|
|
2018-12-15 20:34:55 +00:00
|
|
|
|
.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
|
|
|
|
|
|
2018-12-18 14:37:07 +00:00
|
|
|
|
bra COUT.IAC.EXIT
|
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
|
|
|
|
|
|
|
|
|
|
ldx #DOWONT.CNT-1
|
|
|
|
|
|
|
|
|
|
.2 cmp DOWONT,x
|
|
|
|
|
beq .8
|
|
|
|
|
dex
|
|
|
|
|
bpl .2
|
|
|
|
|
|
2018-12-18 14:37:07 +00:00
|
|
|
|
bra COUT.IAC.EXIT
|
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
|
|
|
|
|
|
2018-12-18 14:37:07 +00:00
|
|
|
|
COUT.IAC.WONT
|
2018-12-11 16:41:25 +00:00
|
|
|
|
COUT.IAC.DONT
|
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
|
2018-12-15 20:34:55 +00:00
|
|
|
|
|
2019-07-12 14:51:57 +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
|
2018-12-15 20:34:55 +00:00
|
|
|
|
|
2018-12-17 07:02:03 +00:00
|
|
|
|
jmp DRV.TERM.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
|
|
|
|
|
*--------------------------------------
|
2019-05-25 19:24:07 +00:00
|
|
|
|
DRV.TERM.COUT.LF
|
|
|
|
|
ldy #S.DCB.TTY.bCRLF
|
2018-12-13 16:39:24 +00:00
|
|
|
|
lda (ZPDCBPtr),y
|
2019-05-25 19:24:07 +00:00
|
|
|
|
bpl DRV.TERM.COUT.LF.1
|
|
|
|
|
|
|
|
|
|
jsr DRV.TERM.COUT.CR
|
|
|
|
|
|
|
|
|
|
DRV.TERM.COUT.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
|
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
|
|
|
|
|
*--------------------------------------
|
2018-12-13 16:39:24 +00:00
|
|
|
|
SCROLL.UP ldy #S.DCB.TTY.SCROLLTOP
|
|
|
|
|
lda (ZPDCBPtr),y
|
2018-12-12 16:32:33 +00:00
|
|
|
|
|
|
|
|
|
tax
|
2018-12-11 16:41:25 +00:00
|
|
|
|
|
2018-12-15 20:34:55 +00:00
|
|
|
|
.1 jsr DRV.TERM.SETUP.L1X
|
2018-12-11 16:41:25 +00:00
|
|
|
|
|
|
|
|
|
inx
|
|
|
|
|
|
2018-12-17 07:02:03 +00:00
|
|
|
|
jsr DRV.TERM.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.SCROLLBOT
|
|
|
|
|
cmp (ZPDCBPtr),y
|
2018-12-11 16:41:25 +00:00
|
|
|
|
bne .1
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CLRLINE ldy #0 Start
|
|
|
|
|
ldx #80 End
|
|
|
|
|
bra CLR
|
|
|
|
|
|
2019-03-11 15:43:33 +00:00
|
|
|
|
CLRSOL ldy #S.DCB.TTY.CH
|
|
|
|
|
lda (ZPDCBPtr),y
|
2018-12-12 16:32:33 +00:00
|
|
|
|
tax End
|
2019-03-11 15:43:33 +00:00
|
|
|
|
ldy #0 Start
|
|
|
|
|
|
2019-01-16 14:37:21 +00:00
|
|
|
|
bra CLR
|
|
|
|
|
|
|
|
|
|
CLREOL ldy #S.DCB.TTY.CH
|
|
|
|
|
lda (ZPDCBPtr),y
|
|
|
|
|
tay Start
|
|
|
|
|
ldx #80 End
|
2018-12-11 16:41:25 +00:00
|
|
|
|
|
2019-05-29 15:21:14 +00:00
|
|
|
|
CLR stx .1+1 Save End
|
2018-12-11 16:41:25 +00:00
|
|
|
|
phy
|
2018-12-12 16:32:33 +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
|
|
|
|
|
|
|
|
|
|
ply
|
|
|
|
|
|
2019-05-29 15:21:14 +00:00
|
|
|
|
.1 cpy #$ff Self Modified
|
|
|
|
|
|
|
|
|
|
beq .8
|
|
|
|
|
|
|
|
|
|
phy
|
2018-12-12 16:32:33 +00:00
|
|
|
|
|
|
|
|
|
lda #" "
|
2018-12-11 16:41:25 +00:00
|
|
|
|
jsr SetCharAtYX X unmodified
|
|
|
|
|
ply
|
|
|
|
|
iny
|
2019-05-29 15:21:14 +00:00
|
|
|
|
bra .1
|
2018-12-11 16:41:25 +00:00
|
|
|
|
|
2019-05-29 15:21:14 +00:00
|
|
|
|
.8 clc
|
2018-12-11 16:41:25 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
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
|
|
|
|
|
|
2018-12-15 20:34:55 +00:00
|
|
|
|
.1 jsr DRV.TERM.SETUP.L1X
|
2018-12-11 16:41:25 +00:00
|
|
|
|
|
|
|
|
|
dex
|
|
|
|
|
|
2018-12-17 07:02:03 +00:00
|
|
|
|
jsr DRV.TERM.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
|
|
|
|
|
*--------------------------------------
|
2018-12-17 07:02:03 +00:00
|
|
|
|
DRV.TERM.CURBLNK
|
|
|
|
|
bit bActive
|
2019-02-23 22:01:58 +00:00
|
|
|
|
bpl .9
|
|
|
|
|
|
|
|
|
|
lda A2osX.TIMER16
|
|
|
|
|
and #CURSOR.BLINK.SPEED
|
|
|
|
|
ldy #S.DCB.TTY.bCURON
|
|
|
|
|
eor (ZPDCBPtr),y
|
|
|
|
|
bne DRV.TERM.CURBLNK.1
|
|
|
|
|
|
|
|
|
|
.9 rts
|
|
|
|
|
|
|
|
|
|
DRV.TERM.CUROFF bit bActive
|
|
|
|
|
bpl DRV.TERM.CURBLNK.RTS
|
2018-12-11 16:41:25 +00:00
|
|
|
|
|
2018-12-13 16:39:24 +00:00
|
|
|
|
ldy #S.DCB.TTY.bCURON
|
2019-02-23 22:01:58 +00:00
|
|
|
|
lda (ZPDCBPtr),y
|
|
|
|
|
beq DRV.TERM.CURBLNK.RTS
|
|
|
|
|
|
|
|
|
|
DRV.TERM.CURBLNK.1
|
2018-12-13 16:39:24 +00:00
|
|
|
|
lda (ZPDCBPtr),y
|
2018-12-17 07:02:03 +00:00
|
|
|
|
bne DRV.TERM.CURBLNK.OFF
|
2018-12-11 16:41:25 +00:00
|
|
|
|
|
|
|
|
|
jsr GetCharAtCurPos
|
2019-06-02 08:58:46 +00:00
|
|
|
|
bcs DRV.TERM.CURBLNK.RTS Out of screen
|
|
|
|
|
|
2018-12-11 16:41:25 +00:00
|
|
|
|
and #$80
|
|
|
|
|
eor #" "
|
2018-12-17 07:02:03 +00:00
|
|
|
|
bra DRV.TERM.CURBLNK.SET
|
2018-12-11 16:41:25 +00:00
|
|
|
|
|
2018-12-17 07:02:03 +00:00
|
|
|
|
DRV.TERM.CURBLNK.OFF
|
2018-12-17 10:40:00 +00:00
|
|
|
|
jsr GetCharAtCurPos
|
2019-06-02 08:58:46 +00:00
|
|
|
|
bcs DRV.TERM.CURBLNK.RTS Out of screen
|
2018-12-11 16:41:25 +00:00
|
|
|
|
|
2018-12-17 07:02:03 +00:00
|
|
|
|
DRV.TERM.CURBLNK.SET
|
2019-05-15 15:30:46 +00:00
|
|
|
|
jsr SetCharAtY.SCR
|
2018-12-11 16:41:25 +00:00
|
|
|
|
|
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
|
2018-12-17 07:02:03 +00:00
|
|
|
|
DRV.TERM.CURBLNK.RTS
|
|
|
|
|
rts
|
2018-12-11 16:41:25 +00:00
|
|
|
|
*--------------------------------------
|
2019-07-10 15:39:02 +00:00
|
|
|
|
Decimal.Out jsr MATH.A2STR10NP
|
2018-12-11 16:41:25 +00:00
|
|
|
|
|
2019-06-24 15:32:22 +00:00
|
|
|
|
ldx #0
|
2018-12-11 16:41:25 +00:00
|
|
|
|
|
2019-07-03 15:25:07 +00:00
|
|
|
|
.1 lda A2osX.NumStrBuf,x
|
2018-12-11 16:41:25 +00:00
|
|
|
|
|
2019-06-24 15:32:22 +00:00
|
|
|
|
beq DRV.TERM.CURBLNK.RTS
|
2018-12-11 16:41:25 +00:00
|
|
|
|
|
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
|
2018-12-13 16:39:24 +00:00
|
|
|
|
|
2018-12-15 20:34:55 +00:00
|
|
|
|
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
|
2018-12-13 16:39:24 +00:00
|
|
|
|
|
2018-12-11 16:41:25 +00:00
|
|
|
|
.9 rts
|
|
|
|
|
*--------------------------------------
|
2018-12-17 14:24:39 +00:00
|
|
|
|
DRV.TERM.GetIOCTLBufCntDCB
|
2018-12-17 07:02:03 +00:00
|
|
|
|
>STYA ZPIOCTL
|
|
|
|
|
|
|
|
|
|
ldy #S.IOCTL.BUFPTR
|
|
|
|
|
lda (ZPIOCTL),y
|
|
|
|
|
sta ZPBufPtr
|
|
|
|
|
iny
|
|
|
|
|
lda (ZPIOCTL),y
|
|
|
|
|
sta ZPBufPtr+1
|
|
|
|
|
|
|
|
|
|
iny #S.IOCTL.BYTECNT
|
2018-12-11 16:41:25 +00:00
|
|
|
|
|
|
|
|
|
lda (ZPIOCTL),y
|
|
|
|
|
eor #$ff
|
|
|
|
|
sta ZPCount
|
|
|
|
|
iny
|
|
|
|
|
lda (ZPIOCTL),y
|
|
|
|
|
eor #$ff
|
|
|
|
|
sta ZPCount+1
|
2018-12-17 14:24:39 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
DRV.TERM.GetDCB ldy #S.FD.DEV.DCBPTR
|
|
|
|
|
lda (pFD),y
|
|
|
|
|
sta ZPDCBPtr
|
|
|
|
|
iny
|
|
|
|
|
lda (pFD),y
|
|
|
|
|
sta ZPDCBPtr+1
|
|
|
|
|
|
|
|
|
|
ldy #S.DCB.TTY.DEVID
|
|
|
|
|
lda (ZPDCBPtr),y
|
|
|
|
|
cmp A2osX.ASCREEN
|
|
|
|
|
beq .1 CS
|
2018-12-14 16:19:05 +00:00
|
|
|
|
|
2018-12-17 14:24:39 +00:00
|
|
|
|
clc
|
|
|
|
|
.1 ror bActive
|
2018-12-11 16:41:25 +00:00
|
|
|
|
rts
|
2018-12-17 07:02:03 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
DRV.TERM.Title.ON
|
|
|
|
|
ldy #S.DCB.TTY.bTITLE
|
|
|
|
|
lda (ZPDCBPtr),y
|
|
|
|
|
bmi DRV.TERM.Title.RTS
|
|
|
|
|
|
|
|
|
|
lda #$ff
|
|
|
|
|
sta (ZPDCBPtr),y
|
|
|
|
|
|
|
|
|
|
ldy #S.DCB.TTY.DEVID
|
|
|
|
|
lda (ZPDCBPtr),y
|
|
|
|
|
tax
|
2019-02-27 15:00:56 +00:00
|
|
|
|
lda Dev.Table-1,x
|
2019-01-13 13:10:14 +00:00
|
|
|
|
clc
|
|
|
|
|
adc #S.FD.DEV
|
|
|
|
|
tay
|
2019-02-27 15:00:56 +00:00
|
|
|
|
lda Dev.Table,x
|
2019-01-13 13:10:14 +00:00
|
|
|
|
adc /S.FD.DEV
|
|
|
|
|
|
2018-12-17 07:02:03 +00:00
|
|
|
|
>STYA ZPTmpWord
|
|
|
|
|
|
|
|
|
|
ldx #0
|
|
|
|
|
jsr DRV.TERM.SETUP.L1X.SCR
|
2018-12-14 07:32:20 +00:00
|
|
|
|
|
2018-12-17 07:02:03 +00:00
|
|
|
|
ldy #0
|
|
|
|
|
|
|
|
|
|
.1 lda (ZPTmpWord),y
|
2019-05-18 15:38:31 +00:00
|
|
|
|
beq .3
|
|
|
|
|
cmp #$40
|
|
|
|
|
bcc .2
|
2018-12-17 07:02:03 +00:00
|
|
|
|
|
2019-05-18 15:38:31 +00:00
|
|
|
|
cmp #$60
|
|
|
|
|
bcs .2
|
|
|
|
|
|
|
|
|
|
and #$1F remap UPPERCASE
|
|
|
|
|
|
|
|
|
|
.2 phy
|
2018-12-17 07:02:03 +00:00
|
|
|
|
jsr SetCharAtY.SCR
|
|
|
|
|
ply
|
2018-12-14 07:32:20 +00:00
|
|
|
|
iny
|
2018-12-17 07:02:03 +00:00
|
|
|
|
bne .1
|
2018-12-14 07:32:20 +00:00
|
|
|
|
|
2019-05-18 15:38:31 +00:00
|
|
|
|
.3 lda #C.SPACE
|
2018-12-14 07:32:20 +00:00
|
|
|
|
|
2019-05-18 15:38:31 +00:00
|
|
|
|
.4 phy
|
2018-12-17 07:02:03 +00:00
|
|
|
|
jsr SetCharAtY.SCR
|
|
|
|
|
ply
|
|
|
|
|
iny
|
|
|
|
|
cpy #80
|
2019-05-18 15:38:31 +00:00
|
|
|
|
bne .4
|
2018-12-17 07:02:03 +00:00
|
|
|
|
DRV.TERM.Title.RTS
|
|
|
|
|
rts
|
|
|
|
|
|
|
|
|
|
DRV.TERM.Title.OFF
|
|
|
|
|
ldy #S.DCB.TTY.bTITLE
|
|
|
|
|
lda (ZPDCBPtr),y
|
|
|
|
|
bpl DRV.TERM.Title.RTS
|
|
|
|
|
|
|
|
|
|
lda #$0
|
|
|
|
|
sta (ZPDCBPtr),y
|
|
|
|
|
jmp DRV.TERM.LINE0CPY
|
2018-12-11 16:41:25 +00:00
|
|
|
|
*--------------------------------------
|
2019-07-12 14:51:57 +00:00
|
|
|
|
DRV.TERM.SETUP.L1X
|
|
|
|
|
ldy #S.FD.DEV.BUFPTR
|
|
|
|
|
lda (pFD),y
|
|
|
|
|
clc
|
|
|
|
|
adc BUF.BASEL,x
|
|
|
|
|
sta ZPBufBaseL1
|
|
|
|
|
|
|
|
|
|
iny
|
|
|
|
|
lda (pFD),y
|
|
|
|
|
adc BUF.BASEH,x
|
|
|
|
|
sta ZPBufBaseL1+1
|
|
|
|
|
|
|
|
|
|
bit bActive
|
|
|
|
|
bpl DRV.TERM.SETUP.L1X.8
|
|
|
|
|
|
|
|
|
|
DRV.TERM.SETUP.L1X.SCR
|
|
|
|
|
lda SCR.BASEL,x
|
|
|
|
|
sta ZPScrBaseL1
|
2019-07-24 15:17:08 +00:00
|
|
|
|
txa
|
|
|
|
|
lsr
|
|
|
|
|
and #$3
|
|
|
|
|
ora #4
|
|
|
|
|
* lda SCR.BASEH,x
|
2019-07-12 14:51:57 +00:00
|
|
|
|
sta ZPScrBaseL1+1
|
|
|
|
|
DRV.TERM.SETUP.L1X.8
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CtrlChars .DA #C.ENQ,#C.BS,#C.LF,#C.FF,#C.CR,#C.SO,#C.SI,#C.FS,#C.ESC
|
|
|
|
|
CtrlChars.Cnt .EQ *-CtrlChars
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
EscCodes .AZ "MDc[()"
|
|
|
|
|
EscCodes.Cnt .EQ *-EscCodes
|
|
|
|
|
EscModes .DA #0,#0,#0,#S.DCB.TTY.MODE.CSI,#S.DCB.TTY.MODE.G0,#S.DCB.TTY.MODE.G1
|
|
|
|
|
CsiCodes .AS "hlmnrJKH"
|
|
|
|
|
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
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
WILLDO .DA #TELOPT.BINARY,#TELOPT.SGA
|
|
|
|
|
WILLDO.CNT .EQ *-WILLDO
|
|
|
|
|
WILLDONT .DA #TELOPT.TSPEED,#TELOPT.LINEMODE,#TELOPT.STATUS
|
|
|
|
|
WILLDONT.CNT .EQ *-WILLDONT
|
|
|
|
|
DOWILL .DA #TELOPT.BINARY,#TELOPT.SGA,#TELOPT.TTYPE,#TELOPT.NAWS
|
|
|
|
|
DOWILL.CNT .EQ *-DOWILL
|
|
|
|
|
DOWONT .DA #TELOPT.ECHO,#TELOPT.NEWENVIRON,#TELOPT.XDISPLOC,#TELOPT.TSPEED,#TELOPT.LFLOW
|
|
|
|
|
DOWONT.CNT .EQ *-DOWONT
|
|
|
|
|
SB.IS.TTYPE .DA #IAC,#SB,#TELOPT.TTYPE,#SB.IS
|
|
|
|
|
ENQ.String .AS "xterm"
|
|
|
|
|
ENQ.String.Len .EQ *-ENQ.String
|
|
|
|
|
.DA #IAC,#SE
|
|
|
|
|
SB.IS.TTYPE.LEN .EQ *-SB.IS.TTYPE
|
|
|
|
|
SB.IS.NAWS .DA #IAC,#SB,#TELOPT.NAWS,#SB.IS
|
|
|
|
|
.DA 80
|
|
|
|
|
.DA 24
|
|
|
|
|
.DA #IAC,#SE
|
|
|
|
|
SB.IS.NAWS.LEN .EQ *-SB.IS.NAWS
|
|
|
|
|
*--------------------------------------
|
2019-07-24 15:17:08 +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
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
* ` 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
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
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
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
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-11 16:41:25 +00:00
|
|
|
|
MAN
|
|
|
|
|
SAVE USR/SRC/SYS/KERNEL.S.TERM
|
|
|
|
|
LOAD USR/SRC/SYS/KERNEL.S
|
|
|
|
|
ASM
|