A2osX/SYS/KERNEL.S.SOCK.txt
2021-07-24 22:42:23 +02:00

53 lines
1008 B
Plaintext
Raw Permalink 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
*--------------------------------------
SOCK.OPEN lda IO.hFD
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