A2osX/SYS/KERNEL.S.TERM.txt

157 lines
2.8 KiB
Plaintext
Raw Normal View History

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)
.1 .DA DRV.TERM.STATUS.LC
.DA A2osX.BADCALL
.DA A2osX.BADCALL
.DA A2osX.BADCALL
.DA DRV.TERM.CONTROL.LC
.DA A2osX.BADCALL
.DA DRV.TERM.OPEN.LC
.DA DRV.TERM.CLOSE.LC
.DA DRV.TERM.READ.LC
.DA DRV.TERM.WRITE.LC
2018-12-12 16:32:33 +00:00
*--------------------------------------
2020-01-10 15:58:47 +00:00
DRV.TERM.STATUS.LC
jsr DRV.TERM.GetIOCTLBufCntDCB
2020-01-11 17:13:27 +00:00
ldy #S.IOCTL.STATCODE
lda (ZPIOCTL),y
2018-12-14 16:19:05 +00:00
sta SETREADAUX
2020-01-10 15:58:47 +00:00
sta SETWRITEAUX
jsr DRV.TERM.STATUS
2018-12-17 07:02:03 +00:00
sta CLRREADAUX
2020-01-10 15:58:47 +00:00
sta CLRWRITEAUX
2018-12-17 07:02:03 +00:00
rts
2018-12-17 14:24:39 +00:00
2020-01-10 15:58:47 +00:00
DRV.TERM.CONTROL.LC
jsr DRV.TERM.GetDCB
2018-12-17 07:02:03 +00:00
sta SETREADAUX
2020-01-10 15:58:47 +00:00
sta SETWRITEAUX
jsr DRV.TERM.CONTROL
2018-12-14 16:19:05 +00:00
sta CLRREADAUX
2020-01-10 15:58:47 +00:00
sta CLRWRITEAUX
rts
DRV.TERM.OPEN.LC
tax DEV.ID in A
2018-12-17 07:02:03 +00:00
2020-01-10 15:58:47 +00:00
jsr DRV.TERM.GetDCB
sta SETREADAUX
2018-12-14 16:19:05 +00:00
sta SETWRITEAUX
2020-01-10 15:58:47 +00:00
jsr DRV.TERM.OPEN
sta CLRREADAUX
2018-12-14 16:19:05 +00:00
sta CLRWRITEAUX
2020-01-10 15:58:47 +00:00
rts
DRV.TERM.CLOSE.LC
jsr DRV.TERM.GetDCB
2018-12-14 16:19:05 +00:00
sta SETREADAUX
2020-01-10 15:58:47 +00:00
sta SETWRITEAUX
jsr DRV.TERM.CLOSE
2018-12-14 16:19:05 +00:00
sta CLRREADAUX
2020-01-10 15:58:47 +00:00
sta CLRWRITEAUX
rts
DRV.TERM.READ.LC
jsr DRV.TERM.GetIOCTLBufCntDCB
sta SETREADAUX
sta SETWRITEAUX
jsr DRV.TERM.READ
sta CLRREADAUX
sta CLRWRITEAUX
rts
DRV.TERM.WRITE.LC
jsr DRV.TERM.GetIOCTLBufCntDCB
2019-06-02 08:58:46 +00:00
2020-01-10 15:58:47 +00:00
sta SETREADAUX
sta SETWRITEAUX
jsr DRV.TERM.WRITE
sta CLRREADAUX
sta CLRWRITEAUX
rts
2019-12-04 13:46:58 +00:00
*--------------------------------------
2020-01-11 17:13:27 +00:00
DRV.TERM.GetIOCTLBufCntDCB
>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
*--------------------------------------
DRV.TERM.GetDCB ldy #S.FD.DEV.DCBPTR
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
cmp DevMgr.ASCREEN
beq .1 CS
clc
.1 ror bActive
rts
*--------------------------------------
DRV.TERM.GetBufByte
sta CLRREADAUX
lda (ZPBufPtr)
sta SETREADAUX
rts
*--------------------------------------
DRV.TERM.GetDevName
sta CLRREADAUX
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