A2osX/SYS/KERNEL.S.TERMLC.txt
2020-01-11 18:13:27 +01:00

157 lines
2.8 KiB
Plaintext
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

NEW
AUTO 3,1
*--------------------------------------
DRV.TERM cld
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
*--------------------------------------
DRV.TERM.STATUS.LC
jsr DRV.TERM.GetIOCTLBufCntDCB
ldy #S.IOCTL.STATCODE
lda (ZPIOCTL),y
sta SETREADAUX
sta SETWRITEAUX
jsr DRV.TERM.STATUS
sta CLRREADAUX
sta CLRWRITEAUX
rts
DRV.TERM.CONTROL.LC
jsr DRV.TERM.GetDCB
sta SETREADAUX
sta SETWRITEAUX
jsr DRV.TERM.CONTROL
sta CLRREADAUX
sta CLRWRITEAUX
rts
DRV.TERM.OPEN.LC
tax DEV.ID in A
jsr DRV.TERM.GetDCB
sta SETREADAUX
sta SETWRITEAUX
jsr DRV.TERM.OPEN
sta CLRREADAUX
sta CLRWRITEAUX
rts
DRV.TERM.CLOSE.LC
jsr DRV.TERM.GetDCB
sta SETREADAUX
sta SETWRITEAUX
jsr DRV.TERM.CLOSE
sta CLRREADAUX
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
sta SETREADAUX
sta SETWRITEAUX
jsr DRV.TERM.WRITE
sta CLRREADAUX
sta CLRWRITEAUX
rts
*--------------------------------------
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
*--------------------------------------
MAN
SAVE USR/SRC/SYS/KERNEL.S.TERMLC
LOAD USR/SRC/SYS/KERNEL.S
ASM