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
|
|
|
|
|
2021-05-04 17:31:21 +00:00
|
|
|
|
ldy #S.IOCTL.S
|
2020-01-11 17:13:27 +00:00
|
|
|
|
lda (ZPIOCTL),y
|
2020-05-04 20:46:21 +00:00
|
|
|
|
tay
|
2020-02-06 16:23:59 +00:00
|
|
|
|
bra TERM.TOAUX
|
2021-07-24 20:42:23 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
TERM.OPEN sta ZPhFD hFD in A for OPEN
|
2018-12-17 14:24:39 +00:00
|
|
|
|
|
2020-02-06 16:23:59 +00:00
|
|
|
|
TERM.CONTROL
|
2020-05-04 20:46:21 +00:00
|
|
|
|
TERM.CLOSE jsr TERM.GetDCB
|
|
|
|
|
|
2020-02-06 16:23:59 +00:00
|
|
|
|
bra TERM.TOAUX
|
2021-07-24 20:42:23 +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-05-04 20:46:21 +00:00
|
|
|
|
TERM.TOAUX lda A2osX.ASCREEN
|
|
|
|
|
|
|
|
|
|
sta SETREADAUX
|
2020-01-10 15:58:47 +00:00
|
|
|
|
sta SETWRITEAUX
|
2020-05-04 20:46:21 +00:00
|
|
|
|
|
|
|
|
|
cmp (ZPDCBPtr) #S.DCB.TTY.DEVID
|
|
|
|
|
|
|
|
|
|
beq .1 CS
|
|
|
|
|
|
|
|
|
|
clc
|
|
|
|
|
|
|
|
|
|
.1 ror bActive
|
2021-07-27 16:21:58 +00:00
|
|
|
|
|
2020-05-04 20:46:21 +00:00
|
|
|
|
jsr .8
|
|
|
|
|
|
2020-01-10 15:58:47 +00:00
|
|
|
|
sta CLRREADAUX
|
|
|
|
|
sta CLRWRITEAUX
|
|
|
|
|
rts
|
|
|
|
|
|
2020-05-04 20:46:21 +00:00
|
|
|
|
.8 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
|
2020-05-04 20:46:21 +00:00
|
|
|
|
|
2020-01-11 17:13:27 +00:00
|
|
|
|
lda (ZPIOCTL),y
|
|
|
|
|
eor #$ff
|
2021-03-15 20:45:22 +00:00
|
|
|
|
sta ZPCnt
|
2020-01-11 17:13:27 +00:00
|
|
|
|
iny
|
|
|
|
|
lda (ZPIOCTL),y
|
|
|
|
|
eor #$ff
|
2021-03-15 20:45:22 +00:00
|
|
|
|
sta ZPCnt+1
|
2020-01-11 17:13:27 +00:00
|
|
|
|
*--------------------------------------
|
2020-02-06 16:23:59 +00:00
|
|
|
|
TERM.GetDCB ldy #S.FD.DEV.DCBPTR
|
2020-05-04 20:46:21 +00:00
|
|
|
|
|
2020-01-11 17:13:27 +00:00
|
|
|
|
lda (pFD),y
|
|
|
|
|
sta ZPDCBPtr
|
|
|
|
|
|
|
|
|
|
iny
|
|
|
|
|
lda (pFD),y
|
|
|
|
|
sta ZPDCBPtr+1
|
|
|
|
|
|
|
|
|
|
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
|
2021-07-24 20:42:23 +00:00
|
|
|
|
|
|
|
|
|
lda pFD
|
2020-01-11 17:13:27 +00:00
|
|
|
|
clc
|
|
|
|
|
adc #S.FD.DEV
|
2021-07-24 20:42:23 +00:00
|
|
|
|
sta TXTPTR
|
2020-01-11 17:13:27 +00:00
|
|
|
|
|
2021-07-24 20:42:23 +00:00
|
|
|
|
lda pFD+1
|
2020-01-11 17:13:27 +00:00
|
|
|
|
adc /S.FD.DEV
|
2021-07-24 20:42:23 +00:00
|
|
|
|
sta TXTPTR+1
|
2020-01-11 17:13:27 +00:00
|
|
|
|
|
|
|
|
|
sta SETREADAUX
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2018-12-12 16:32:33 +00:00
|
|
|
|
MAN
|
2020-12-15 13:23:22 +00:00
|
|
|
|
SAVE usr/src/sys/kernel.s.term
|
|
|
|
|
LOAD usr/src/sys/kernel.s
|
2018-12-12 16:32:33 +00:00
|
|
|
|
ASM
|