Kernel 0.9.2

This commit is contained in:
Rémy GIBERT 2018-10-08 17:41:00 +02:00
parent 505259be4a
commit 231e530537
15 changed files with 207 additions and 309 deletions

Binary file not shown.

Binary file not shown.

View File

@ -16,7 +16,7 @@ INSDRV UTHERNET.DRV 00:0E:3A:12:34:56
#INSDRV LANCEGS.DRV #INSDRV LANCEGS.DRV
#INSDRV UTHER2.AI.DRV 00:08:DC:12:34:56 #INSDRV UTHER2.AI.DRV 00:08:DC:12:34:56
#INSDRV UTHERNET2.DRV 00:08:DC:12:34:56 #INSDRV UTHERNET2.DRV 00:08:DC:12:34:56
#STARTPROC TCPIP #STARTPROC TCPIPD
#STARTPROC DHCPCLNT #STARTPROC DHCPCLNT
#STARTPROC TELNETD #STARTPROC TELNETD
#STARTPROC HTTPD #STARTPROC HTTPD

View File

@ -430,14 +430,23 @@ S.FD.DEV .EQ 16
*-------------------------------------- *--------------------------------------
* S.FD.LNK * S.FD.LNK
*-------------------------------------- *--------------------------------------
S.FD.SOCK.HSKT .EQ 2 S.FD.DSOCK.HSKT .EQ 2
S.FD.SOCK.OPEN .EQ 3 S.FD.DSOCK.OPEN .EQ 3
S.FD.SOCK.CLOSE .EQ 4 S.FD.DSOCK.CLOSE .EQ 4
S.FD.SOCK.READ .EQ 5 S.FD.DSOCK.READ .EQ 5
S.FD.SOCK.WRITE .EQ 6 S.FD.DSOCK.WRITE .EQ 6
S.FD.SOCK.STATUS .EQ 7 S.FD.DSOCK.STATUS .EQ 7
* *
S.FD.SOCK .EQ 8 S.FD.DSOCK .EQ 8
*--------------------------------------
S.FD.SSOCK.HSKT .EQ 2
S.FD.SSOCK.OPEN .EQ 3
S.FD.SSOCK.CLOSE .EQ 4
S.FD.SSOCK.READ .EQ 5
S.FD.SSOCK.WRITE .EQ 6
S.FD.SSOCK.STATUS .EQ 7
*
S.FD.SSOCK .EQ 8
*-------------------------------------- *--------------------------------------
S.FD.PIPE.S .EQ 2 S.FD.PIPE.S .EQ 2
S.FD.PIPE.S.ROpened .EQ %00000001 S.FD.PIPE.S.ROpened .EQ %00000001

View File

@ -183,7 +183,7 @@ S.SOCKET.TCP.OUTFREE .EQ S.SOCKET+16
S.SOCKET.TCP.OUTTOSEND .EQ S.SOCKET+18 S.SOCKET.TCP.OUTTOSEND .EQ S.SOCKET+18
S.SOCKET.TCP.OUTUSED .EQ S.SOCKET+20 S.SOCKET.TCP.OUTUSED .EQ S.SOCKET+20
* *
S.SOCKET.TCP.INLASTSEQNUM .EQ S.SOCKET+22 Rcvd:Last SEQ received from remote S.SOCKET.TCP.INLASTSEQNUM .EQ S.SOCKET+22 Recv:Last SEQ received from remote
S.SOCKET.TCP.OUTSEQNUM .EQ S.SOCKET+26 Send:SEQ sent not yet ACKed (retransmit) S.SOCKET.TCP.OUTSEQNUM .EQ S.SOCKET+26 Send:SEQ sent not yet ACKed (retransmit)
S.SOCKET.TCP.OUTNEXTSEQ .EQ S.SOCKET+30 Send:Next SEQ to send S.SOCKET.TCP.OUTNEXTSEQ .EQ S.SOCKET+30 Send:Next SEQ to send

View File

@ -490,18 +490,13 @@ SET.IPCFG.I >LDYA L.DCB.NIC
>SYSCALL IOCTL >SYSCALL IOCTL
bcs .9 bcs .9
.2 lda hDNSSocket1 .2 lda hDNSSocket
beq .3 beq .3
jsr SKT.Close jsr SKT.Close
stz hDNSSocket1 stz hDNSSocket
.3 lda hDNSSocket2 .3 lda IPCFG+S.IPCFG.DNS1
beq .4 beq .8
jsr SKT.Close
stz hDNSSocket2
.4 lda IPCFG+S.IPCFG.DNS1
beq .6
ldx #3 ldx #3
@ -512,31 +507,13 @@ SET.IPCFG.I >LDYA L.DCB.NIC
stz DNS.SOCKET.SP stz DNS.SOCKET.SP
stz DNS.SOCKET.SP+1 stz DNS.SOCKET.SP+1
>DEBUG
>PUSHW L.DNS.SOCKET >PUSHW L.DNS.SOCKET
jsr SKT.New lda #S.SOCKET.T.DGRAM
jsr SKT.Socket
bcs .9 bcs .9
sta hDNSSocket1 sta hDNSSocket
.6 lda IPCFG+S.IPCFG.DNS2
beq .8
ldx #3
.7 lda IPCFG+S.IPCFG.DNS2,x
sta DNS.SOCKET.DA,x
dex
bpl .7
stz DNS.SOCKET.SP
stz DNS.SOCKET.SP+1
>PUSHW L.DNS.SOCKET
jsr SKT.New
bcs .9
sta hDNSSocket2
.8 clc .8 clc
.9 rts .9 rts

View File

@ -53,7 +53,7 @@ DNS.Query.I jsr DNS.FIND.BY.NAME
sec sec
rts rts
*-------------------------------------- *--------------------------------------
DNS.REQUEST lda hDNSSocket1 DNS.REQUEST lda hDNSSocket
beq .99 beq .99
jsr DNS.CSTR2DNS Y=DNS string len+0 jsr DNS.CSTR2DNS Y=DNS string len+0
@ -94,30 +94,25 @@ DNS.REQUEST lda hDNSSocket1
jsr DNS.ADD.I jsr DNS.ADD.I
bcs .9 bcs .9
lda hDNSSocket1
jsr DNS.REQUEST.SEND jsr DNS.REQUEST.SEND
bcs .99 bcs .99
lda hDNSSocket2 lda #ERR.DNS.PENDING
beq .8 sec
rts
jsr DNS.REQUEST.SEND
bcc .8
.99 lda #ERR.DNS.ERROR .99 lda #ERR.DNS.ERROR
.9 sec .9 sec
rts rts
.8 lda #ERR.DNS.PENDING
sec
rts
*-------------------------------------- *--------------------------------------
DNS.REQUEST.SEND DNS.REQUEST.SEND
pha
* TODO : >PUSHW L.SOCKADDR.DNS1....DNS2
>PUSHW DNS.MSG.LEN >PUSHW DNS.MSG.LEN
>PUSHW L.DNS.MSG >PUSHW L.DNS.MSG
pla lda hDNSSocket
jmp SKT.Send jmp SKT.SendTo
*-------------------------------------- *--------------------------------------
DNS.CSTR2DNS lda (ZPPtrDNS) DNS.CSTR2DNS lda (ZPPtrDNS)
beq .9 beq .9
@ -406,20 +401,13 @@ DNS.FREE ldy #S.DNSCACHE.hNAME
sta (ZPCachePtr) sta (ZPCachePtr)
rts rts
*-------------------------------------- *--------------------------------------
DNS.POLL lda hDNSSocket1 DNS.POLL lda hDNSSocket
beq .8 beq .8
jsr SKT.Rcvd jsr SKT.Recv
bcs .1
jsr DNS.DecodeMsg
.1 lda hDNSSocket2
beq .8
jsr SKT.Rcvd
bcs .8 bcs .8
jsr DNS.DecodeMsg jsr DNS.DecodeMsg
.8 clc .8 clc
rts rts
*-------------------------------------- *--------------------------------------

View File

@ -3,7 +3,7 @@ PREFIX /A2OSX.BUILD
AUTO 4,1 AUTO 4,1
.LIST OFF .LIST OFF
*-------------------------------------- *--------------------------------------
FRM.GetTargetSKT FRM.GetTargetSKT.TCPUDP
ldy #S.TCPUDP.SRCPORT ldy #S.TCPUDP.SRCPORT
lda (ZPFrameInPtr),y lda (ZPFrameInPtr),y
sta SKT.REM.ADDR+S.SOCKADDR.PORT+1 sta SKT.REM.ADDR+S.SOCKADDR.PORT+1
@ -18,8 +18,10 @@ FRM.GetTargetSKT
lda (ZPFrameInPtr),y lda (ZPFrameInPtr),y
sta SKT.LOC.ADDR+S.SOCKADDR.PORT sta SKT.LOC.ADDR+S.SOCKADDR.PORT
FRM.GetTargetSKT.RAW
ldy #S.IP.SRC+3 ldy #S.IP.SRC+3
ldx #3 ldx #3
.1 lda (ZPFrameInPtr),y .1 lda (ZPFrameInPtr),y
sta SKT.REM.ADDR+S.SOCKADDR.ADDR,x sta SKT.REM.ADDR+S.SOCKADDR.ADDR,x
dey dey
@ -28,11 +30,13 @@ FRM.GetTargetSKT
ldy #S.IP.DST+3 ldy #S.IP.DST+3
ldx #3 ldx #3
.2 lda (ZPFrameInPtr),y .2 lda (ZPFrameInPtr),y
sta SKT.LOC.ADDR+S.SOCKADDR.ADDR,x sta SKT.LOC.ADDR+S.SOCKADDR.ADDR,x
dey dey
dex dex
bpl .2 bpl .2
rts rts
*-------------------------------------- *--------------------------------------
* FRM.NewIP * FRM.NewIP

View File

@ -51,62 +51,34 @@ ICMP.IN.EXIT lda hFrameIn
stz hFrameIn stz hFrameIn
.8 rts .8 rts
*-------------------------------------- *--------------------------------------
ICMP.IN.ECHOREP jsr IP.FillSKT.TemplateSrcDstIP ICMP.IN.ECHOREP jsr FRM.GetTargetSKT.RAW
lda #S.IP.PROTOCOL.ICMP
sta SKT.Template+S.SOCKET.RAW.PROTO
ldy #S.ICMP.IDENTIFIER ldy #S.ICMP.IDENTIFIER
lda (ZPFrameInPtr),y lda (ZPFrameInPtr),y
sta SKT.Template+S.SOCKET.REM.PORT+1 sta SKT.LOC.ADDR+S.SOCKADDR.PORT+1
iny iny
lda (ZPFrameInPtr),y lda (ZPFrameInPtr),y
sta SKT.Template+S.SOCKET.REM.PORT sta SKT.LOC.ADDR+S.SOCKADDR.PORT
lda hSocketTable jsr SKT.FindMatchingLocRem
>SYSCALL GetMemPtr bcs .9
>STYA ZPPtrSKT >STYA ZPPtrSKT
ldx #0 ldy #S.SOCKET.PROTO
lda (ZPPtrSKT),y
.3 lda (ZPPtrSKT) ldy #S.SOCKET.PROTO
beq .7 lda (ZPPtrSKT),y
cmp #S.SOCKET.T.RAW cmp #S.IP.PROTOCOL.ICMP
bne .7 bne .9
ldy #S.SOCKET.LOC.ADDR
.4 lda (ZPPtrSKT),y
cmp SKT.Template,y
bne .7
iny
cpy #S.SOCKET.LOC.PORT
bne .5
iny
iny
.5 cpy #S.SOCKET.REM.PORT Compare SRC.ADDR,DST.ADDR,DST.PORT
bne .4
lda hFrameIn lda hFrameIn
jsr SKT.AddToQueueA jsr SKT.AddToQueueA
bcs ICMP.IN.EXIT Q full, discard...
rts DO NOT Discard this queued frame
.7 lda ZPPtrSKT
clc
adc #S.SOCKET
sta ZPPtrSKT
bcc .8 bcc .8
inc ZPPtrSKT+1
.8 inx .9 lda hFrameIn Q full, discard...
cpx #K.SKTTABLE.SIZE >SYSCALL FreeMem
bne .3 .8 rts
bra ICMP.IN.EXIT
*-------------------------------------- *--------------------------------------
MAN MAN
SAVE /A2OSX.SRC/LIB/LIBTCPIP.S.ICMP SAVE /A2OSX.SRC/LIB/LIBTCPIP.S.ICMP

View File

@ -186,39 +186,6 @@ IP.AddSrcDstIPToChecksum
rts rts
*-------------------------------------- *--------------------------------------
IP.FillSKT.TemplateSrcDstIPP
ldy #S.TCPUDP.SRCPORT
lda (ZPFrameInPtr),y
sta SKT.Template+S.SOCKET.REM.PORT+1
iny
lda (ZPFrameInPtr),y
sta SKT.Template+S.SOCKET.REM.PORT
iny #S.TCPUDP.DSTPORT
lda (ZPFrameInPtr),y
sta SKT.Template+S.SOCKET.LOC.PORT+1
iny
lda (ZPFrameInPtr),y
sta SKT.Template+S.SOCKET.LOC.PORT
*--------------------------------------
IP.FillSKT.TemplateSrcDstIP
ldy #S.IP.SRC+3
ldx #3
.1 lda (ZPFrameInPtr),y
sta SKT.Template+S.SOCKET.REM.ADDR,x
dey
dex
bpl .1
ldy #S.IP.DST+3
ldx #3
.2 lda (ZPFrameInPtr),y
sta SKT.Template+S.SOCKET.LOC.ADDR,x
dey
dex
bpl .2
rts
*--------------------------------------
IP.SetDestMAC ldy #S.IP.DST IP.SetDestMAC ldy #S.IP.DST
lda (ZPFrameOutPtr),y lda (ZPFrameOutPtr),y
iny iny

View File

@ -37,7 +37,7 @@ SKT.Socket.DSOCK
sta FD.DSOCK+S.SOCKET.PROTO ICMP,UDP,TCP sta FD.DSOCK+S.SOCKET.PROTO ICMP,UDP,TCP
lda #0 Y = socket.size lda #0 Y = socket.size
>SYSCALL GetMem0 >SYSCALL GetMem0
bcs .99 bcs .9
>STYA ZPTmpPtr1 >STYA ZPTmpPtr1
stx FD.DSOCK+S.FD.DSOCK.HSKT stx FD.DSOCK+S.FD.DSOCK.HSKT
@ -63,7 +63,7 @@ SKT.Socket.STREAM
sta FD.SSOCK+S.SOCKET.PROTO ICMP,UDP,TCP sta FD.SSOCK+S.SOCKET.PROTO ICMP,UDP,TCP
lda #0 Y = socket.size lda #0 Y = socket.size
>SYSCALL GetMem0 >SYSCALL GetMem0
bcs .99 bcs .9
>STYA ZPTmpPtr1 >STYA ZPTmpPtr1
stx FD.SSOCK+S.FD.SSOCK.HSKT stx FD.SSOCK+S.FD.SSOCK.HSKT
@ -498,8 +498,9 @@ SKT.Write >SYSCALL GetMemPtr
*/-------------------------------------- */--------------------------------------
* # SKT.Recv (RAW,DGRAM,SEQPACKET) * # SKT.Recv (RAW,DGRAM,SEQPACKET)
* # SKT.RecvFrom (RAW,DGRAM,SEQPACKET) * # SKT.RecvFrom (RAW,DGRAM,SEQPACKET)
* hMem recv(hFD fd); * ## C
* hMem recvfrom(hFD fd, struct sockaddr *addr); * `hMem recv(hFD fd);`
* `hMem recvfrom(hFD fd, struct sockaddr *addr);`
* ## ASM * ## ASM
* **In:** * **In:**
* `>PUSHW addr` (RecvFrom) * `>PUSHW addr` (RecvFrom)
@ -602,7 +603,7 @@ SKT.Send clc
tax tax
jmp (J.SKT.send,x) jmp (J.SKT.send,x)
*-------------------------------------- *--------------------------------------
SKT.Send.RAW ldy #S.SOCKET.RAW.PROTO SKT.Send.RAW ldy #S.SOCKET.PROTO
lda (ZPPtrSKT),y lda (ZPPtrSKT),y
tax tax
@ -629,7 +630,7 @@ SKT.Send.DGRAM.8
*-------------------------------------- *--------------------------------------
SKT.Send.STREAM lda #ERR.SKT.BAD SKT.Send.STREAM lda #ERR.SKT.BAD
sec sec
rts SKT.Send.9 rts
*-------------------------------------- *--------------------------------------
SKT.Send.SEQPACKET SKT.Send.SEQPACKET
bra * bra *
@ -816,9 +817,9 @@ SKT.AddToQueueA sta .2+1
* Dst : hInMem/INHEAD * Dst : hInMem/INHEAD
*-------------------------------------- *--------------------------------------
SKT.AddDataToSktIn SKT.AddDataToSktIn
ldx SKT.TCBCache+S.SOCKET.TCP.INFREE ldx SKT.TmpCache+S.SOCKET.TCP.INFREE
cpx ZPDataInLen cpx ZPDataInLen
lda SKT.TCBCache+S.SOCKET.TCP.INFREE+1 lda SKT.TmpCache+S.SOCKET.TCP.INFREE+1
sbc ZPDataInLen+1 sbc ZPDataInLen+1
bcc .9 Not enough room in Q bcc .9 Not enough room in Q
@ -826,7 +827,7 @@ SKT.AddDataToSktIn
ldx #3 ldx #3
.10 lda (ZPFrameInPtr),y .10 lda (ZPFrameInPtr),y
eor SKT.TCBCache+S.SOCKET.TCP.INLASTSEQNUM,x eor SKT.TmpCache+S.SOCKET.TCP.INLASTSEQNUM,x
bne .9 bne .9
dey dey
dex dex
@ -839,11 +840,11 @@ SKT.AddDataToSktIn
lda ZPTmpPtr1 lda ZPTmpPtr1
clc clc
adc SKT.TCBCache+S.SOCKET.TCP.INHEAD adc SKT.TmpCache+S.SOCKET.TCP.INHEAD
sta ZPTmpPtr2 sta ZPTmpPtr2
lda ZPTmpPtr1+1 lda ZPTmpPtr1+1
adc SKT.TCBCache+S.SOCKET.TCP.INHEAD+1 adc SKT.TmpCache+S.SOCKET.TCP.INHEAD+1
sta ZPTmpPtr2+1 Make ZPTmpPtr2=base+Tail sta ZPTmpPtr2+1 Make ZPTmpPtr2=base+Tail
lda ZPDataInLen lda ZPDataInLen
@ -874,13 +875,13 @@ SKT.AddDataToSktIn
bne .4 bne .4
inc ZPTmpPtr2+1 inc ZPTmpPtr2+1
.4 inc SKT.TCBCache+S.SOCKET.TCP.INHEAD .4 inc SKT.TmpCache+S.SOCKET.TCP.INHEAD
bne .1 bne .1
inc SKT.TCBCache+S.SOCKET.TCP.INHEAD+1 inc SKT.TmpCache+S.SOCKET.TCP.INHEAD+1
lda SKT.TCBCache+S.SOCKET.TCP.INHEAD+1 lda SKT.TmpCache+S.SOCKET.TCP.INHEAD+1
cmp /K.TCP.WSIZE cmp /K.TCP.WSIZE
bne .1 bne .1
stz SKT.TCBCache+S.SOCKET.TCP.INHEAD+1 stz SKT.TmpCache+S.SOCKET.TCP.INHEAD+1
lda ZPTmpPtr1 Dst Ptr=Buffer Base lda ZPTmpPtr1 Dst Ptr=Buffer Base
sta ZPTmpPtr2 sta ZPTmpPtr2
@ -891,37 +892,37 @@ SKT.AddDataToSktIn
.9 sec .9 sec
rts rts
.8 lda SKT.TCBCache+S.SOCKET.TCP.INFREE .8 lda SKT.TmpCache+S.SOCKET.TCP.INFREE
sec sec
sbc ZPDataInLen sbc ZPDataInLen
sta SKT.TCBCache+S.SOCKET.TCP.INFREE sta SKT.TmpCache+S.SOCKET.TCP.INFREE
lda SKT.TCBCache+S.SOCKET.TCP.INFREE+1 lda SKT.TmpCache+S.SOCKET.TCP.INFREE+1
sbc ZPDataInLen+1 sbc ZPDataInLen+1
sta SKT.TCBCache+S.SOCKET.TCP.INFREE+1 sta SKT.TmpCache+S.SOCKET.TCP.INFREE+1
lda SKT.TCBCache+S.SOCKET.TCP.INUSED lda SKT.TmpCache+S.SOCKET.TCP.INUSED
clc clc
adc ZPDataInLen adc ZPDataInLen
sta SKT.TCBCache+S.SOCKET.TCP.INUSED sta SKT.TmpCache+S.SOCKET.TCP.INUSED
lda SKT.TCBCache+S.SOCKET.TCP.INUSED+1 lda SKT.TmpCache+S.SOCKET.TCP.INUSED+1
adc ZPDataInLen+1 adc ZPDataInLen+1
sta SKT.TCBCache+S.SOCKET.TCP.INUSED+1 sta SKT.TmpCache+S.SOCKET.TCP.INUSED+1
clc clc
lda SKT.TCBCache+S.SOCKET.TCP.INLASTSEQNUM+3 lda SKT.TmpCache+S.SOCKET.TCP.INLASTSEQNUM+3
adc ZPDataInLen adc ZPDataInLen
sta SKT.TCBCache+S.SOCKET.TCP.INLASTSEQNUM+3 sta SKT.TmpCache+S.SOCKET.TCP.INLASTSEQNUM+3
lda SKT.TCBCache+S.SOCKET.TCP.INLASTSEQNUM+2 lda SKT.TmpCache+S.SOCKET.TCP.INLASTSEQNUM+2
adc ZPDataInLen+1 adc ZPDataInLen+1
sta SKT.TCBCache+S.SOCKET.TCP.INLASTSEQNUM+2 sta SKT.TmpCache+S.SOCKET.TCP.INLASTSEQNUM+2
bcc .80 bcc .80
inc SKT.TCBCache+S.SOCKET.TCP.INLASTSEQNUM+1 inc SKT.TmpCache+S.SOCKET.TCP.INLASTSEQNUM+1
bne .80 bne .80
inc SKT.TCBCache+S.SOCKET.TCP.INLASTSEQNUM inc SKT.TmpCache+S.SOCKET.TCP.INLASTSEQNUM
.80 clc .80 clc
rts rts
@ -935,8 +936,8 @@ SKT.AddDataToSktIn
*-------------------------------------- *--------------------------------------
SKT.GetDataFromSktIn SKT.GetDataFromSktIn
jsr SKT.GetTCB jsr SKT.GetTCB
lda SKT.TCBCache+S.SOCKET.TCP.INUSED lda SKT.TmpCache+S.SOCKET.TCP.INUSED
ora SKT.TCBCache+S.SOCKET.TCP.INUSED+1 ora SKT.TmpCache+S.SOCKET.TCP.INUSED+1
bne .10 bne .10
sec sec
rts A=0,NO DATA rts A=0,NO DATA
@ -948,11 +949,11 @@ SKT.GetDataFromSktIn
lda ZPTmpPtr1 lda ZPTmpPtr1
clc clc
adc SKT.TCBCache+S.SOCKET.TCP.INTAIL adc SKT.TmpCache+S.SOCKET.TCP.INTAIL
sta ZPTmpPtr2 sta ZPTmpPtr2
lda ZPTmpPtr1+1 lda ZPTmpPtr1+1
adc SKT.TCBCache+S.SOCKET.TCP.INTAIL+1 adc SKT.TmpCache+S.SOCKET.TCP.INTAIL+1
sta ZPTmpPtr2+1 sta ZPTmpPtr2+1
lda ZPDataInLen lda ZPDataInLen
@ -976,25 +977,25 @@ SKT.GetDataFromSktIn
pha pha
.2 lda SKT.TCBCache+S.SOCKET.TCP.INTAIL .2 lda SKT.TmpCache+S.SOCKET.TCP.INTAIL
eor SKT.TCBCache+S.SOCKET.TCP.INHEAD eor SKT.TmpCache+S.SOCKET.TCP.INHEAD
bne .3 bne .3
lda SKT.TCBCache+S.SOCKET.TCP.INTAIL+1 lda SKT.TmpCache+S.SOCKET.TCP.INTAIL+1
eor SKT.TCBCache+S.SOCKET.TCP.INHEAD+1 eor SKT.TmpCache+S.SOCKET.TCP.INHEAD+1
beq .7 no more data.... beq .7 no more data....
.3 lda (ZPTmpPtr2) .3 lda (ZPTmpPtr2)
pha pha
inc SKT.TCBCache+S.SOCKET.TCP.INTAIL inc SKT.TmpCache+S.SOCKET.TCP.INTAIL
bne .4 bne .4
inc SKT.TCBCache+S.SOCKET.TCP.INTAIL+1 inc SKT.TmpCache+S.SOCKET.TCP.INTAIL+1
lda SKT.TCBCache+S.SOCKET.TCP.INTAIL+1 lda SKT.TmpCache+S.SOCKET.TCP.INTAIL+1
cmp /K.TCP.WSIZE cmp /K.TCP.WSIZE
bne .4 bne .4
stz SKT.TCBCache+S.SOCKET.TCP.INTAIL+1 stz SKT.TmpCache+S.SOCKET.TCP.INTAIL+1
lda ZPTmpPtr1 lda ZPTmpPtr1
sta ZPTmpPtr2 sta ZPTmpPtr2
lda ZPTmpPtr1+1 lda ZPTmpPtr1+1
@ -1024,37 +1025,37 @@ SKT.GetDataFromSktIn
ora ZPTmpPtr3+1 ora ZPTmpPtr3+1
beq .9 beq .9
lda SKT.TCBCache+S.SOCKET.TCP.INFREE lda SKT.TmpCache+S.SOCKET.TCP.INFREE
clc clc
adc ZPTmpPtr3 adc ZPTmpPtr3
sta SKT.TCBCache+S.SOCKET.TCP.INFREE sta SKT.TmpCache+S.SOCKET.TCP.INFREE
lda SKT.TCBCache+S.SOCKET.TCP.INFREE+1 lda SKT.TmpCache+S.SOCKET.TCP.INFREE+1
adc ZPTmpPtr3+1 adc ZPTmpPtr3+1
sta SKT.TCBCache+S.SOCKET.TCP.INFREE+1 sta SKT.TmpCache+S.SOCKET.TCP.INFREE+1
lda SKT.TCBCache+S.SOCKET.TCP.INUSED lda SKT.TmpCache+S.SOCKET.TCP.INUSED
sec sec
sbc ZPTmpPtr3 sbc ZPTmpPtr3
sta SKT.TCBCache+S.SOCKET.TCP.INUSED sta SKT.TmpCache+S.SOCKET.TCP.INUSED
lda SKT.TCBCache+S.SOCKET.TCP.INUSED+1 lda SKT.TmpCache+S.SOCKET.TCP.INUSED+1
sbc ZPTmpPtr3+1 sbc ZPTmpPtr3+1
sta SKT.TCBCache+S.SOCKET.TCP.INUSED+1 sta SKT.TmpCache+S.SOCKET.TCP.INUSED+1
lda SKT.TCBCache+S.SOCKET.TCP.OUTACKNUM+3 lda SKT.TmpCache+S.SOCKET.TCP.OUTACKNUM+3
clc clc
adc ZPTmpPtr3 adc ZPTmpPtr3
sta SKT.TCBCache+S.SOCKET.TCP.OUTACKNUM+3 sta SKT.TmpCache+S.SOCKET.TCP.OUTACKNUM+3
lda SKT.TCBCache+S.SOCKET.TCP.OUTACKNUM+2 lda SKT.TmpCache+S.SOCKET.TCP.OUTACKNUM+2
adc ZPTmpPtr3+1 adc ZPTmpPtr3+1
sta SKT.TCBCache+S.SOCKET.TCP.OUTACKNUM+2 sta SKT.TmpCache+S.SOCKET.TCP.OUTACKNUM+2
bcc .80 bcc .80
inc SKT.TCBCache+S.SOCKET.TCP.OUTACKNUM+1 inc SKT.TmpCache+S.SOCKET.TCP.OUTACKNUM+1
bne .80 bne .80
inc SKT.TCBCache+S.SOCKET.TCP.OUTACKNUM inc SKT.TmpCache+S.SOCKET.TCP.OUTACKNUM
.80 jsr SKT.StoreTCB .80 jsr SKT.StoreTCB
@ -1080,9 +1081,9 @@ SKT.GetDataFromSktIn
*-------------------------------------- *--------------------------------------
SKT.AddDataToSktOut SKT.AddDataToSktOut
jsr SKT.GetTCB jsr SKT.GetTCB
ldx SKT.TCBCache+S.SOCKET.TCP.OUTFREE ldx SKT.TmpCache+S.SOCKET.TCP.OUTFREE
cpx ZPDataInLen cpx ZPDataInLen
lda SKT.TCBCache+S.SOCKET.TCP.OUTFREE+1 lda SKT.TmpCache+S.SOCKET.TCP.OUTFREE+1
sbc ZPDataInLen+1 sbc ZPDataInLen+1
bcc .9 Not enough room in Q bcc .9 Not enough room in Q
@ -1093,11 +1094,11 @@ SKT.AddDataToSktOut
lda ZPTmpPtr1 lda ZPTmpPtr1
clc clc
adc SKT.TCBCache+S.SOCKET.TCP.OUTHEAD adc SKT.TmpCache+S.SOCKET.TCP.OUTHEAD
sta ZPTmpPtr2 sta ZPTmpPtr2
lda ZPTmpPtr1+1 lda ZPTmpPtr1+1
adc SKT.TCBCache+S.SOCKET.TCP.OUTHEAD+1 adc SKT.TmpCache+S.SOCKET.TCP.OUTHEAD+1
sta ZPTmpPtr2+1 Make ZPTmpPtr2=base+Tail sta ZPTmpPtr2+1 Make ZPTmpPtr2=base+Tail
lda ZPDataInLen lda ZPDataInLen
@ -1128,13 +1129,13 @@ SKT.AddDataToSktOut
bne .4 bne .4
inc ZPTmpPtr2+1 inc ZPTmpPtr2+1
.4 inc SKT.TCBCache+S.SOCKET.TCP.OUTHEAD .4 inc SKT.TmpCache+S.SOCKET.TCP.OUTHEAD
bne .1 bne .1
inc SKT.TCBCache+S.SOCKET.TCP.OUTHEAD+1 inc SKT.TmpCache+S.SOCKET.TCP.OUTHEAD+1
lda SKT.TCBCache+S.SOCKET.TCP.OUTHEAD+1 lda SKT.TmpCache+S.SOCKET.TCP.OUTHEAD+1
cmp /K.TCP.WSIZE cmp /K.TCP.WSIZE
bne .1 bne .1
stz SKT.TCBCache+S.SOCKET.TCP.OUTHEAD+1 stz SKT.TmpCache+S.SOCKET.TCP.OUTHEAD+1
lda ZPTmpPtr1 Dst Ptr=Buffer Base lda ZPTmpPtr1 Dst Ptr=Buffer Base
sta ZPTmpPtr2 sta ZPTmpPtr2
@ -1145,29 +1146,29 @@ SKT.AddDataToSktOut
.9 sec .9 sec
rts rts
.8 lda SKT.TCBCache+S.SOCKET.TCP.OUTFREE .8 lda SKT.TmpCache+S.SOCKET.TCP.OUTFREE
sec sec
sbc ZPDataInLen sbc ZPDataInLen
sta SKT.TCBCache+S.SOCKET.TCP.OUTFREE sta SKT.TmpCache+S.SOCKET.TCP.OUTFREE
lda SKT.TCBCache+S.SOCKET.TCP.OUTFREE+1 lda SKT.TmpCache+S.SOCKET.TCP.OUTFREE+1
sbc ZPDataInLen+1 sbc ZPDataInLen+1
sta SKT.TCBCache+S.SOCKET.TCP.OUTFREE+1 sta SKT.TmpCache+S.SOCKET.TCP.OUTFREE+1
lda SKT.TCBCache+S.SOCKET.TCP.OUTUSED lda SKT.TmpCache+S.SOCKET.TCP.OUTUSED
clc clc
adc ZPDataInLen adc ZPDataInLen
sta SKT.TCBCache+S.SOCKET.TCP.OUTUSED sta SKT.TmpCache+S.SOCKET.TCP.OUTUSED
lda SKT.TCBCache+S.SOCKET.TCP.OUTUSED+1 lda SKT.TmpCache+S.SOCKET.TCP.OUTUSED+1
adc ZPDataInLen+1 adc ZPDataInLen+1
sta SKT.TCBCache+S.SOCKET.TCP.OUTUSED+1 sta SKT.TmpCache+S.SOCKET.TCP.OUTUSED+1
lda SKT.TCBCache+S.SOCKET.TCP.OUTTOSEND lda SKT.TmpCache+S.SOCKET.TCP.OUTTOSEND
clc clc
adc ZPDataInLen adc ZPDataInLen
sta SKT.TCBCache+S.SOCKET.TCP.OUTTOSEND sta SKT.TmpCache+S.SOCKET.TCP.OUTTOSEND
lda SKT.TCBCache+S.SOCKET.TCP.OUTTOSEND+1 lda SKT.TmpCache+S.SOCKET.TCP.OUTTOSEND+1
adc ZPDataInLen+1 adc ZPDataInLen+1
sta SKT.TCBCache+S.SOCKET.TCP.OUTTOSEND+1 sta SKT.TmpCache+S.SOCKET.TCP.OUTTOSEND+1
jsr SKT.StoreTCB jsr SKT.StoreTCB
rts rts
*-------------------------------------- *--------------------------------------
@ -1184,11 +1185,11 @@ SKT.GetDataFromSktOut
lda ZPTmpPtr1 lda ZPTmpPtr1
clc clc
adc SKT.TCBCache+S.SOCKET.TCP.OUTTAILNEXT adc SKT.TmpCache+S.SOCKET.TCP.OUTTAILNEXT
sta ZPTmpPtr2 Make ZPTmpPtr2=base+nexttail sta ZPTmpPtr2 Make ZPTmpPtr2=base+nexttail
lda ZPTmpPtr1+1 lda ZPTmpPtr1+1
adc SKT.TCBCache+S.SOCKET.TCP.OUTTAILNEXT+1 adc SKT.TmpCache+S.SOCKET.TCP.OUTTAILNEXT+1
sta ZPTmpPtr2+1 sta ZPTmpPtr2+1
lda ZPDataOutLen lda ZPDataOutLen
@ -1219,13 +1220,13 @@ SKT.GetDataFromSktOut
bne .4 bne .4
inc ZPTmpPtr2+1 inc ZPTmpPtr2+1
.4 inc SKT.TCBCache+S.SOCKET.TCP.OUTTAILNEXT .4 inc SKT.TmpCache+S.SOCKET.TCP.OUTTAILNEXT
bne .1 bne .1
inc SKT.TCBCache+S.SOCKET.TCP.OUTTAILNEXT+1 inc SKT.TmpCache+S.SOCKET.TCP.OUTTAILNEXT+1
lda SKT.TCBCache+S.SOCKET.TCP.OUTTAILNEXT+1 lda SKT.TmpCache+S.SOCKET.TCP.OUTTAILNEXT+1
cmp /K.TCP.WSIZE cmp /K.TCP.WSIZE
bne .1 bne .1
stz SKT.TCBCache+S.SOCKET.TCP.OUTTAILNEXT+1 stz SKT.TmpCache+S.SOCKET.TCP.OUTTAILNEXT+1
lda ZPTmpPtr1 Dst Ptr=Buffer Base lda ZPTmpPtr1 Dst Ptr=Buffer Base
sta ZPTmpPtr2 sta ZPTmpPtr2
@ -1233,13 +1234,13 @@ SKT.GetDataFromSktOut
sta ZPTmpPtr2+1 sta ZPTmpPtr2+1
bra .1 bra .1
.8 lda SKT.TCBCache+S.SOCKET.TCP.OUTTOSEND .8 lda SKT.TmpCache+S.SOCKET.TCP.OUTTOSEND
sec sec
sbc ZPDataOutLen sbc ZPDataOutLen
sta SKT.TCBCache+S.SOCKET.TCP.OUTTOSEND sta SKT.TmpCache+S.SOCKET.TCP.OUTTOSEND
lda SKT.TCBCache+S.SOCKET.TCP.OUTTOSEND+1 lda SKT.TmpCache+S.SOCKET.TCP.OUTTOSEND+1
sbc ZPDataOutLen+1 sbc ZPDataOutLen+1
sta SKT.TCBCache+S.SOCKET.TCP.OUTTOSEND+1 sta SKT.TmpCache+S.SOCKET.TCP.OUTTOSEND+1
clc clc
rts rts
@ -1256,10 +1257,10 @@ SKT.AckDataToSktOut
.1 lda (ZPFrameInPtr),y .1 lda (ZPFrameInPtr),y
pha pha
sbc SKT.TCBCache+S.SOCKET.TCP.OUTSEQNUM,x sbc SKT.TmpCache+S.SOCKET.TCP.OUTSEQNUM,x
sta TmpDWord,x sta TmpDWord,x
pla ....and Set SEQ = new SEQ pla ....and Set SEQ = new SEQ
sta SKT.TCBCache+S.SOCKET.TCP.OUTSEQNUM,x sta SKT.TmpCache+S.SOCKET.TCP.OUTSEQNUM,x
dey dey
dex dex
bpl .1 bpl .1
@ -1271,65 +1272,50 @@ SKT.AckDataToSktOut
beq .8 beq .8
.2 clc .2 clc
adc SKT.TCBCache+S.SOCKET.TCP.OUTTAIL adc SKT.TmpCache+S.SOCKET.TCP.OUTTAIL
sta SKT.TCBCache+S.SOCKET.TCP.OUTTAIL sta SKT.TmpCache+S.SOCKET.TCP.OUTTAIL
txa txa
adc SKT.TCBCache+S.SOCKET.TCP.OUTTAIL+1 adc SKT.TmpCache+S.SOCKET.TCP.OUTTAIL+1
and /K.TCP.WSIZE-1 and /K.TCP.WSIZE-1
sta SKT.TCBCache+S.SOCKET.TCP.OUTTAIL+1 sta SKT.TmpCache+S.SOCKET.TCP.OUTTAIL+1
lda SKT.TCBCache+S.SOCKET.TCP.OUTFREE lda SKT.TmpCache+S.SOCKET.TCP.OUTFREE
clc clc
adc TmpDWord+3 adc TmpDWord+3
sta SKT.TCBCache+S.SOCKET.TCP.OUTFREE sta SKT.TmpCache+S.SOCKET.TCP.OUTFREE
lda SKT.TCBCache+S.SOCKET.TCP.OUTFREE+1 lda SKT.TmpCache+S.SOCKET.TCP.OUTFREE+1
adc TmpDWord+2 adc TmpDWord+2
sta SKT.TCBCache+S.SOCKET.TCP.OUTFREE+1 sta SKT.TmpCache+S.SOCKET.TCP.OUTFREE+1
lda SKT.TCBCache+S.SOCKET.TCP.OUTUSED lda SKT.TmpCache+S.SOCKET.TCP.OUTUSED
sec sec
sbc TmpDWord+3 sbc TmpDWord+3
sta SKT.TCBCache+S.SOCKET.TCP.OUTUSED sta SKT.TmpCache+S.SOCKET.TCP.OUTUSED
lda SKT.TCBCache+S.SOCKET.TCP.OUTUSED+1 lda SKT.TmpCache+S.SOCKET.TCP.OUTUSED+1
sbc TmpDWord+2 sbc TmpDWord+2
sta SKT.TCBCache+S.SOCKET.TCP.OUTUSED+1 sta SKT.TmpCache+S.SOCKET.TCP.OUTUSED+1
.8 rts .8 rts
*-------------------------------------- *--------------------------------------
SKT.NewTCB SKT.GetTCB ldy #S.SOCKET.TCP-S.SOCKET
.1 dey
clc
.9 rts
*--------------------------------------
SKT.GetTCB ldy #S.SOCKET.SQ.hTCB
lda (ZPPtrSKT),y lda (ZPPtrSKT),y
>SYSCALL GetMemPtr sta SKT.TmpCache,y
bcs * cpy #S.SOCKET
>STYA .1+1 bne .1
ldx #S.TCB-1
.1 lda $ffff,x
sta SKT.TCBCache,x
dex
bpl .1
rts rts
*-------------------------------------- *--------------------------------------
SKT.StoreTCB ldy #S.SOCKET.SQ.hTCB SKT.StoreTCB ldy #S.SOCKET.TCP-S.SOCKET
lda (ZPPtrSKT),y
>SYSCALL GetMemPtr .1 dey
bcs * lda SKT.TmpCache,y
>STYA .2+1 sta (ZPPtrSKT),y
cpy #S.SOCKET
bne .1
ldx #S.TCB-1
.1 lda SKT.TCBCache,x
.2 sta $ffff,x
dex
bpl .1
rts rts
*-------------------------------------- *--------------------------------------
SKT.Destroy ldy #S.SOCKET.SQ.hOutMem SKT.Destroy ldy #S.SOCKET.SQ.hOutMem
@ -1342,12 +1328,7 @@ SKT.Destroy ldy #S.SOCKET.SQ.hOutMem
beq .2 beq .2
>SYSCALL FreeMem >SYSCALL FreeMem
.2 ldy #S.SOCKET.SQ.hTCB .2 lda #0
lda (ZPPtrSKT),y
beq .3
>SYSCALL FreeMem
.3 lda #0
sta (ZPPtrSKT) sta (ZPPtrSKT)
clc clc
rts rts

View File

@ -3,7 +3,7 @@ PREFIX /A2OSX.BUILD
AUTO 4,1 AUTO 4,1
.LIST OFF .LIST OFF
*-------------------------------------- *--------------------------------------
TCP.IN jsr FRM.GetTargetSKT TCP.IN jsr FRM.GetTargetSKT.TCPUDP
jsr SKT.FindMatchingLocRem jsr SKT.FindMatchingLocRem
bcs TCP.IN.JMP.CLOSED no socket, go discard bcs TCP.IN.JMP.CLOSED no socket, go discard
@ -12,7 +12,7 @@ TCP.IN jsr FRM.GetTargetSKT
ldy #S.SOCKET.PROTO ldy #S.SOCKET.PROTO
lda (ZPPtrSKT),y lda (ZPPtrSKT),y
cmp #S.SOCKET.T.TCP cmp #S.IP.PROTOCOL.TCP
bne TCP.IN.JMP.CLOSED wrong protocol, go discard bne TCP.IN.JMP.CLOSED wrong protocol, go discard
ldy #S.TCP.OPTIONS ldy #S.TCP.OPTIONS
@ -93,9 +93,9 @@ TCP.IN.JMP.SYNSENT
sec Check if ACK=OUTNEXTSEQ+1 sec Check if ACK=OUTNEXTSEQ+1
.1 lda SKT.TCBCache+S.SOCKET.TCP.OUTNEXTSEQ,x .1 lda SKT.TmpCache+S.SOCKET.TCP.OUTNEXTSEQ,x
adc #0 adc #0
sta SKT.TCBCache+S.SOCKET.TCP.OUTNEXTSEQ,x sta SKT.TmpCache+S.SOCKET.TCP.OUTNEXTSEQ,x
eor (ZPFrameInPtr),y eor (ZPFrameInPtr),y
bne .9 bne .9
dey dey
@ -132,10 +132,10 @@ TCP.IN.JMP.SYNRCVD
sec sec
.1 lda SKT.TCBCache+S.SOCKET.TCP.OUTNEXTSEQ,x Check if ACK=OUTNEXTSEQ+1 .1 lda SKT.TmpCache+S.SOCKET.TCP.OUTNEXTSEQ,x Check if ACK=OUTNEXTSEQ+1
adc #0 adc #0
sta SKT.TCBCache+S.SOCKET.TCP.OUTSEQNUM,x setup SEQNUM sta SKT.TmpCache+S.SOCKET.TCP.OUTSEQNUM,x setup SEQNUM
sta SKT.TCBCache+S.SOCKET.TCP.OUTNEXTSEQ,x ...and update NEXTSEQ sta SKT.TmpCache+S.SOCKET.TCP.OUTNEXTSEQ,x ...and update NEXTSEQ
eor (ZPFrameInPtr),y eor (ZPFrameInPtr),y
bne .8 bne .8
dey dey
@ -253,8 +253,8 @@ TCP.IN.ACKTheSYN
.3 lda (ZPFrameInPtr),y Set OUTACK=SEQ+1 for new socket... .3 lda (ZPFrameInPtr),y Set OUTACK=SEQ+1 for new socket...
adc #0 adc #0
sta SKT.TCBCache+S.SOCKET.TCP.INLASTSEQNUM,x sta SKT.TmpCache+S.SOCKET.TCP.INLASTSEQNUM,x
sta SKT.TCBCache+S.SOCKET.TCP.OUTACKNUM,x sta SKT.TmpCache+S.SOCKET.TCP.OUTACKNUM,x
dey dey
dex dex
bpl .3 bpl .3
@ -273,9 +273,9 @@ TCP.IN.ACKTheFIN
sec sec
.3 lda SKT.TCBCache+S.SOCKET.TCP.OUTACKNUM,x .3 lda SKT.TmpCache+S.SOCKET.TCP.OUTACKNUM,x
adc #0 adc #0
sta SKT.TCBCache+S.SOCKET.TCP.OUTACKNUM,x sta SKT.TmpCache+S.SOCKET.TCP.OUTACKNUM,x
dey dey
dex dex
bpl .3 bpl .3
@ -331,8 +331,8 @@ TCP.IN.SetDataInPtrAndLen
*-------------------------------------- *--------------------------------------
TCP.OUT jsr SKT.GetTCB TCP.OUT jsr SKT.GetTCB
TCP.OUT.I lda SKT.TCBCache+S.SOCKET.TCP.OUTTOSEND+1 TCP.OUT.I lda SKT.TmpCache+S.SOCKET.TCP.OUTTOSEND+1
ldy SKT.TCBCache+S.SOCKET.TCP.OUTTOSEND ldy SKT.TmpCache+S.SOCKET.TCP.OUTTOSEND
bne .1 bne .1
@ -367,18 +367,18 @@ TCP.OUT.I lda SKT.TCBCache+S.SOCKET.TCP.OUTTOSEND+1
bcs TCP.OUT.9 bcs TCP.OUT.9
lda SKT.TCBCache+S.SOCKET.TCP.OUTNEXTSEQ+3 lda SKT.TmpCache+S.SOCKET.TCP.OUTNEXTSEQ+3
clc clc
adc ZPDataOutLen adc ZPDataOutLen
sta SKT.TCBCache+S.SOCKET.TCP.OUTNEXTSEQ+3 sta SKT.TmpCache+S.SOCKET.TCP.OUTNEXTSEQ+3
lda SKT.TCBCache+S.SOCKET.TCP.OUTNEXTSEQ+2 lda SKT.TmpCache+S.SOCKET.TCP.OUTNEXTSEQ+2
adc ZPDataOutLen+1 adc ZPDataOutLen+1
sta SKT.TCBCache+S.SOCKET.TCP.OUTNEXTSEQ+2 sta SKT.TmpCache+S.SOCKET.TCP.OUTNEXTSEQ+2
bcc .80 bcc .80
inc SKT.TCBCache+S.SOCKET.TCP.OUTNEXTSEQ+1 inc SKT.TmpCache+S.SOCKET.TCP.OUTNEXTSEQ+1
bne .80 bne .80
inc SKT.TCBCache+S.SOCKET.TCP.OUTNEXTSEQ inc SKT.TmpCache+S.SOCKET.TCP.OUTNEXTSEQ
.80 jmp SKT.StoreTCB exits with CC .80 jmp SKT.StoreTCB exits with CC
TCP.OUT.9 rts TCP.OUT.9 rts
@ -400,7 +400,7 @@ TCP.OUT.SendOptA.1
ldx #3 ldx #3
ldy #S.TCP.ACKNUM+3 ldy #S.TCP.ACKNUM+3
.1 lda SKT.TCBCache+S.SOCKET.TCP.OUTACKNUM,x .1 lda SKT.TmpCache+S.SOCKET.TCP.OUTACKNUM,x
sta (ZPFrameOutPtr),y sta (ZPFrameOutPtr),y
dey dey
dex dex
@ -409,17 +409,17 @@ TCP.OUT.SendOptA.1
.10 ldx #3 .10 ldx #3
ldy #S.TCP.SEQNUM+3 ldy #S.TCP.SEQNUM+3
.2 lda SKT.TCBCache+S.SOCKET.TCP.OUTNEXTSEQ,x .2 lda SKT.TmpCache+S.SOCKET.TCP.OUTNEXTSEQ,x
sta (ZPFrameOutPtr),y sta (ZPFrameOutPtr),y
dey dey
dex dex
bpl .2 bpl .2
ldy #S.TCP.WINDOW ldy #S.TCP.WINDOW
lda SKT.TCBCache+S.SOCKET.TCP.INFREE+1 lda SKT.TmpCache+S.SOCKET.TCP.INFREE+1
sta (ZPFrameOutPtr),y sta (ZPFrameOutPtr),y
iny iny
lda SKT.TCBCache+S.SOCKET.TCP.INFREE lda SKT.TmpCache+S.SOCKET.TCP.INFREE
sta (ZPFrameOutPtr),y sta (ZPFrameOutPtr),y
jsr FRM.SendIP jsr FRM.SendIP
@ -445,10 +445,10 @@ TCP.NewFrame ldx #S.IP.PROTOCOL.TCP
sta (ZPFrameOutPtr),y sta (ZPFrameOutPtr),y
ldy #S.TCP.WINDOW ldy #S.TCP.WINDOW
lda SKT.TCBCache+S.SOCKET.TCP.INFREE+1 lda SKT.TmpCache+S.SOCKET.TCP.INFREE+1
sta (ZPFrameOutPtr),y sta (ZPFrameOutPtr),y
iny iny
lda SKT.TCBCache+S.SOCKET.TCP.INFREE lda SKT.TmpCache+S.SOCKET.TCP.INFREE
sta (ZPFrameOutPtr),y sta (ZPFrameOutPtr),y
clc clc

View File

@ -3,7 +3,7 @@ PREFIX /A2OSX.BUILD
AUTO 4,1 AUTO 4,1
.LIST OFF .LIST OFF
*-------------------------------------- *--------------------------------------
UDP.IN jsr FRM.GetTargetSKT UDP.IN jsr FRM.GetTargetSKT.TCPUDP
jsr SKT.FindMatchingLocRem jsr SKT.FindMatchingLocRem
bcs .9 bcs .9

View File

@ -8,6 +8,7 @@ AUTO 4,1
*-------------------------------------- *--------------------------------------
.INB INC/MACROS.I .INB INC/MACROS.I
.INB INC/A2OSX.I .INB INC/A2OSX.I
.INB INC/MLI.I
.INB INC/MLI.E.I .INB INC/MLI.E.I
.INB INC/NIC.I .INB INC/NIC.I
.INB INC/ETH.I .INB INC/ETH.I
@ -81,10 +82,10 @@ CS.START cld
.DA SKT.Read .DA SKT.Read
.DA SKT.Write .DA SKT.Write
.DA SKT.Rcvd .DA SKT.Recv
.DA SKT.Send .DA SKT.Send
.DA SKT.RcvdFrom .DA SKT.RecvFrom
.DA SKT.SendTo .DA SKT.SendTo
.DA SKT.GetTable .DA SKT.GetTable
@ -376,13 +377,12 @@ FRM.QUEUE.LenH .BS K.FRMQUEUE.SIZE
*-------------------------------------- *--------------------------------------
RefCount .DA #0 RefCount .DA #0
DYNPORT.LAST .DA K.DYNPORT.START DYNPORT.LAST .DA K.DYNPORT.START
hDNSSocket1 .BS 1 hDNSSocket .BS 1
hDNSSocket2 .BS 1
DNS.TmpCache .BS S.DNSCACHE DNS.TmpCache .BS S.DNSCACHE
ARP.TmpCache .BS S.ARP ARP.TmpCache .BS S.ARP
SKT.Template .BS S.SOCKET
SKT.LOC.ADDR .BS S.SOCKADDR SKT.LOC.ADDR .BS S.SOCKADDR
SKT.REM.ADDR .BS S.SOCKADDR SKT.REM.ADDR .BS S.SOCKADDR
SKT.TmpCache .BS S.SOCKET.TCP
TmpDWord .BS 4 TmpDWord .BS 4
TmpOffset .BS 2 TmpOffset .BS 2
hFrameIn .BS 1 hFrameIn .BS 1

View File

@ -320,10 +320,10 @@ IO.WRITE.CDEV ldx #IOCTL.WRITE
>LDYA K.S.IOCTL+S.IOCTL.BYTECNT >LDYA K.S.IOCTL+S.IOCTL.BYTECNT
.9 rts .9 rts
*-------------------------------------- *--------------------------------------
IO.WRITE.SSOCK ldy #S.FD.SOCK.WRITE IO.WRITE.SSOCK ldy #S.FD.SSOCK.WRITE
.HS 2C BIT ABS .HS 2C BIT ABS
*-------------------------------------- *--------------------------------------
IO.READ.SSOCK ldy #S.FD.SOCK.READ IO.READ.SSOCK ldy #S.FD.SSOCK.READ
lda (pFD),y lda (pFD),y
tax Function Offset in LIB tax Function Offset in LIB
@ -333,7 +333,7 @@ IO.READ.SSOCK ldy #S.FD.SOCK.READ
jsr K.GetMemPtr jsr K.GetMemPtr
>STYA .1 >STYA .1
ldy #S.FD.SOCK.HSKT ldy #S.FD.SSOCK.HSKT
lda (pFD),y lda (pFD),y
.1 jmp $ffff .1 jmp $ffff