A2osX/SYS/KERNEL.S.SOCK.txt

53 lines
1012 B
Plaintext
Raw Normal View History

2021-05-19 12:44:47 +00:00
NEW
AUTO 3,1
*--------------------------------------
SOCK.OPEN lda IO.hDevNod
clc
rts
*--------------------------------------
SOCK.CLOSE ldy #S.FD.SSOCK.CLOSE
.HS 2C BIT ABS
*--------------------------------------
SOCK.EOF ldy #S.FD.SSOCK.EOF
jsr SOCK.SETUP
SOCK.JMP jmp (pDrv)
*--------------------------------------
SOCK.READ ldy #S.FD.SSOCK.READ
.HS 2C BIT ABS
*--------------------------------------
SOCK.WRITE ldy #S.FD.SSOCK.WRITE
jsr SOCK.SETUP
>PUSHA hFD
phx
ldx #4
ldy #4
.1 lda (pStack),y
>PUSHA
dex
bne .1
plx
jsr SOCK.JMP
>RET 5
*--------------------------------------
SOCK.SETUP lda (pFD),y
tax Function Offset in LIB
ldy #S.FD.SSOCK.IOH
lda (pFD),y
jsr K.GetMemPtr
>STYA pDrv
lda IO.hFD
rts
*--------------------------------------
MAN
SAVE usr/src/sys/kernel.s.sock
LOAD usr/src/sys/kernel.s
ASM