A2osX/SYS/KERNEL.S.TERM.txt

110 lines
2.0 KiB
Plaintext
Raw Normal View History

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