2018-12-12 16:32:33 +00:00
|
|
|
|
NEW
|
2019-05-15 05:46:12 +00:00
|
|
|
|
AUTO 3,1
|
2018-12-12 16:32:33 +00:00
|
|
|
|
*--------------------------------------
|
2020-01-10 15:58:47 +00:00
|
|
|
|
DRV.TERM cld
|
2020-01-11 17:13:27 +00:00
|
|
|
|
|
2020-01-10 15:58:47 +00:00
|
|
|
|
jmp (.1,x)
|
|
|
|
|
|
2020-02-06 16:23:59 +00:00
|
|
|
|
.1 .DA TERM.STATUS
|
2020-01-10 15:58:47 +00:00
|
|
|
|
.DA A2osX.BADCALL
|
|
|
|
|
.DA A2osX.BADCALL
|
|
|
|
|
.DA A2osX.BADCALL
|
2020-02-06 16:23:59 +00:00
|
|
|
|
.DA TERM.CONTROL
|
2020-01-10 15:58:47 +00:00
|
|
|
|
.DA A2osX.BADCALL
|
2020-02-06 16:23:59 +00:00
|
|
|
|
.DA TERM.OPEN
|
|
|
|
|
.DA TERM.CLOSE
|
|
|
|
|
.DA TERM.READ
|
|
|
|
|
.DA TERM.WRITE
|
2018-12-12 16:32:33 +00:00
|
|
|
|
*--------------------------------------
|
2020-02-06 16:23:59 +00:00
|
|
|
|
TERM.STATUS jsr TERM.GetIOCTLBufCntDCB
|
2020-01-10 15:58:47 +00:00
|
|
|
|
|
2020-01-11 17:13:27 +00:00
|
|
|
|
ldy #S.IOCTL.STATCODE
|
|
|
|
|
lda (ZPIOCTL),y
|
2020-02-06 16:23:59 +00:00
|
|
|
|
bra TERM.TOAUX
|
2018-12-17 14:24:39 +00:00
|
|
|
|
|
2020-02-06 16:23:59 +00:00
|
|
|
|
TERM.CONTROL
|
|
|
|
|
TERM.OPEN
|
|
|
|
|
TERM.CLOSE pha DEV.ID in A for OPEN
|
|
|
|
|
jsr TERM.GetDCB
|
2020-02-04 20:04:33 +00:00
|
|
|
|
pla
|
2020-02-06 16:23:59 +00:00
|
|
|
|
bra TERM.TOAUX
|
2020-01-10 15:58:47 +00:00
|
|
|
|
|
2020-02-06 16:23:59 +00:00
|
|
|
|
TERM.READ
|
|
|
|
|
TERM.WRITE jsr TERM.GetIOCTLBufCntDCB
|
2020-02-04 20:04:33 +00:00
|
|
|
|
*--------------------------------------
|
2020-02-06 16:23:59 +00:00
|
|
|
|
TERM.TOAUX sta SETREADAUX
|
2020-01-10 15:58:47 +00:00
|
|
|
|
sta SETWRITEAUX
|
2020-02-04 20:04:33 +00:00
|
|
|
|
jsr .1
|
2020-01-10 15:58:47 +00:00
|
|
|
|
sta CLRREADAUX
|
|
|
|
|
sta CLRWRITEAUX
|
|
|
|
|
rts
|
|
|
|
|
|
2020-02-06 16:23:59 +00:00
|
|
|
|
.1 jmp (TERMX,x)
|
2019-12-04 13:46:58 +00:00
|
|
|
|
*--------------------------------------
|
2020-02-06 16:23:59 +00:00
|
|
|
|
TERM.GetIOCTLBufCntDCB
|
2020-01-11 17:13:27 +00:00
|
|
|
|
>STYA ZPIOCTL
|
|
|
|
|
|
|
|
|
|
ldy #S.IOCTL.BUFPTR
|
|
|
|
|
lda (ZPIOCTL),y
|
|
|
|
|
sta ZPBufPtr
|
|
|
|
|
iny
|
|
|
|
|
lda (ZPIOCTL),y
|
|
|
|
|
sta ZPBufPtr+1
|
|
|
|
|
|
|
|
|
|
iny #S.IOCTL.BYTECNT
|
|
|
|
|
lda (ZPIOCTL),y
|
|
|
|
|
eor #$ff
|
|
|
|
|
sta ZPCount
|
|
|
|
|
iny
|
|
|
|
|
lda (ZPIOCTL),y
|
|
|
|
|
eor #$ff
|
|
|
|
|
sta ZPCount+1
|
|
|
|
|
*--------------------------------------
|
2020-02-06 16:23:59 +00:00
|
|
|
|
TERM.GetDCB ldy #S.FD.DEV.DCBPTR
|
2020-01-11 17:13:27 +00:00
|
|
|
|
lda (pFD),y
|
|
|
|
|
sta ZPDCBPtr
|
|
|
|
|
|
|
|
|
|
iny
|
|
|
|
|
lda (pFD),y
|
|
|
|
|
sta ZPDCBPtr+1
|
|
|
|
|
|
|
|
|
|
iny S.FD.DEV.BUFPTR
|
|
|
|
|
lda (pFD),y
|
|
|
|
|
sta ZPBufBase
|
|
|
|
|
|
|
|
|
|
iny
|
|
|
|
|
lda (pFD),y
|
|
|
|
|
sta ZPBufBase+1
|
|
|
|
|
|
|
|
|
|
lda (ZPDCBPtr) #S.DCB.TTY.DEVID
|
2020-03-12 07:46:43 +00:00
|
|
|
|
cmp A2osX.ASCREEN
|
2020-01-11 17:13:27 +00:00
|
|
|
|
beq .1 CS
|
|
|
|
|
|
|
|
|
|
clc
|
|
|
|
|
|
|
|
|
|
.1 ror bActive
|
|
|
|
|
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2020-02-06 16:23:59 +00:00
|
|
|
|
TERM.GetBufByte sta CLRREADAUX
|
2020-01-11 17:13:27 +00:00
|
|
|
|
lda (ZPBufPtr)
|
|
|
|
|
sta SETREADAUX
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2020-02-06 16:23:59 +00:00
|
|
|
|
TERM.GetDevName sta CLRREADAUX
|
2020-01-11 17:13:27 +00:00
|
|
|
|
|
|
|
|
|
lda (ZPDCBPtr) #S.DCB.TTY.DEVID
|
|
|
|
|
tax
|
|
|
|
|
lda Dev.Table-1,x
|
|
|
|
|
clc
|
|
|
|
|
adc #S.FD.DEV
|
|
|
|
|
sta TXTPTR
|
|
|
|
|
|
|
|
|
|
lda Dev.Table,x
|
|
|
|
|
adc /S.FD.DEV
|
|
|
|
|
|
|
|
|
|
sta TXTPTR+1
|
|
|
|
|
sta SETREADAUX
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2018-12-12 16:32:33 +00:00
|
|
|
|
MAN
|
2020-01-21 11:06:59 +00:00
|
|
|
|
SAVE USR/SRC/SYS/KERNEL.S.TERM
|
2018-12-12 16:32:33 +00:00
|
|
|
|
LOAD USR/SRC/SYS/KERNEL.S
|
|
|
|
|
ASM
|