A2osX/SYS/KERNEL.S.TERM.txt

110 lines
1.9 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)
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-05-04 20:46:21 +00:00
tay
2020-02-06 16:23:59 +00:00
bra TERM.TOAUX
2018-12-17 14:24:39 +00:00
2020-05-04 20:46:21 +00:00
TERM.OPEN sta ZPDevID DEV.ID in A for OPEN
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
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-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
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
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-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
2020-01-11 17:13:27 +00:00
lda Dev.Table-1,x
clc
adc #S.FD.DEV
2020-05-04 20:46:21 +00:00
tay
2020-01-11 17:13:27 +00:00
lda Dev.Table,x
adc /S.FD.DEV
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