mirror of
https://github.com/A2osX/A2osX.git
synced 2025-01-13 08:29:46 +00:00
Kernel version 0.9 : TCP, bugfix (#5) ...
This commit is contained in:
parent
993ace3a59
commit
dd0c5ee75c
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -170,17 +170,20 @@ S.SOCKET.SQ.hOutMem .EQ 18
|
||||
*
|
||||
S.SOCKET .EQ 32
|
||||
*--------------------------------------
|
||||
S.TCB.INHEAD .EQ 0
|
||||
S.TCB.INTAIL .EQ 2
|
||||
S.TCB.OUTHEAD .EQ 4
|
||||
S.TCB.OUTTAIL .EQ 6
|
||||
S.TCB.INUSED .EQ 8
|
||||
S.TCB.OUTUSED .EQ 10
|
||||
S.TCB.INFREE .EQ 12
|
||||
S.TCB.INTAIL .EQ 0
|
||||
S.TCB.INHEAD .EQ 2
|
||||
S.TCB.INFREE .EQ 4
|
||||
S.TCB.INUSED .EQ 6
|
||||
*
|
||||
S.TCB.OUTTAIL .EQ 8
|
||||
S.TCB.NEXTOUTTAIL .EQ 10
|
||||
S.TCB.OUTHEAD .EQ 12
|
||||
S.TCB.OUTFREE .EQ 14
|
||||
S.TCB.SEQNUM .EQ 16 Send:SEQ not yet ACKed
|
||||
S.TCB.ACKNUM .EQ 20 Rcvd:Last ACK recieved from remote
|
||||
|
||||
S.TCB.TOSEND .EQ 16
|
||||
S.TCB.OUTUSED .EQ 18
|
||||
*
|
||||
S.TCB.SEQNUM .EQ 20 Send:SEQ not yet ACKed
|
||||
S.TCB.ACKNUM .EQ 24 Rcvd:Last ACK recieved from remote
|
||||
S.TCB.LASTSEQ .EQ 28 Rcvd:Last SEQ accepted data from remote
|
||||
*
|
||||
S.TCB .EQ 32
|
||||
|
@ -880,7 +880,7 @@ SKT.GetDataFromSktIn
|
||||
ora #S.TCP.OPTIONS.ACK
|
||||
sta (ZPPtrSKT),y
|
||||
|
||||
* jsr TCP.OUT.I SKT.GetTCB already called, Try to ACK read DATA
|
||||
jsr TCP.OUT.I SKT.GetTCB already called, Try to ACK read DATA
|
||||
|
||||
>LDYA ZPTmpPtr3
|
||||
clc
|
||||
@ -977,7 +977,15 @@ SKT.AddDataToSktOut
|
||||
adc ZPDataInLen+1
|
||||
sta SKT.TCBCache+S.TCB.OUTUSED+1
|
||||
|
||||
jmp SKT.StoreTCB
|
||||
lda SKT.TCBCache+S.TCB.TOSEND
|
||||
clc
|
||||
adc ZPDataInLen
|
||||
sta SKT.TCBCache+S.TCB.TOSEND
|
||||
lda SKT.TCBCache+S.TCB.TOSEND+1
|
||||
adc ZPDataInLen+1
|
||||
sta SKT.TCBCache+S.TCB.TOSEND+1
|
||||
jsr SKT.StoreTCB
|
||||
jmp TCP.OUT.I
|
||||
*--------------------------------------
|
||||
* From TCP.OUT
|
||||
* Src : hOutMem/OUTTAIL
|
||||
@ -990,15 +998,13 @@ SKT.GetDataFromSktOut
|
||||
>SYSCALL GetMemPtrA
|
||||
>STYA ZPTmpPtr1 Make ZPTmpPtr1=buffer base
|
||||
|
||||
lda SKT.TCBCache+S.TCB.OUTTAIL
|
||||
sta ZPTmpPtr3 Make ZPTmpPtr3=actual TAIL
|
||||
lda ZPTmpPtr1
|
||||
clc
|
||||
adc ZPTmpPtr1
|
||||
sta ZPTmpPtr2 Make ZPTmpPtr2=buffer base+TAIL
|
||||
adc SKT.TCBCache+S.TCB.NEXTOUTTAIL
|
||||
sta ZPTmpPtr2 Make ZPTmpPtr2=base+nexttail
|
||||
|
||||
lda SKT.TCBCache+S.TCB.OUTTAIL+1
|
||||
sta ZPTmpPtr3+1
|
||||
adc ZPTmpPtr1+1
|
||||
lda ZPTmpPtr1+1
|
||||
adc SKT.TCBCache+S.TCB.NEXTOUTTAIL+1
|
||||
sta ZPTmpPtr2+1
|
||||
|
||||
lda ZPDataOutLen
|
||||
@ -1029,13 +1035,13 @@ SKT.GetDataFromSktOut
|
||||
bne .4
|
||||
inc ZPTmpPtr2+1
|
||||
|
||||
.4 inc ZPTmpPtr3
|
||||
.4 inc SKT.TCBCache+S.TCB.NEXTOUTTAIL
|
||||
bne .1
|
||||
inc ZPTmpPtr3+1
|
||||
lda ZPTmpPtr3+1
|
||||
inc SKT.TCBCache+S.TCB.NEXTOUTTAIL+1
|
||||
lda SKT.TCBCache+S.TCB.NEXTOUTTAIL+1
|
||||
cmp /K.TCP.WSIZE
|
||||
bne .1
|
||||
stz ZPTmpPtr3+1
|
||||
stz SKT.TCBCache+S.TCB.NEXTOUTTAIL+1
|
||||
|
||||
lda ZPTmpPtr1 Dst Ptr=Buffer Base
|
||||
sta ZPTmpPtr2
|
||||
@ -1043,7 +1049,15 @@ SKT.GetDataFromSktOut
|
||||
sta ZPTmpPtr2+1
|
||||
bra .1
|
||||
|
||||
.8 clc
|
||||
.8 lda SKT.TCBCache+S.TCB.TOSEND
|
||||
sec
|
||||
sbc ZPDataOutLen
|
||||
sta SKT.TCBCache+S.TCB.TOSEND
|
||||
lda SKT.TCBCache+S.TCB.TOSEND+1
|
||||
sbc ZPDataOutLen+1
|
||||
sta SKT.TCBCache+S.TCB.TOSEND+1
|
||||
|
||||
clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
* From TCP.IN
|
||||
@ -1085,7 +1099,6 @@ SKT.AckDataToSktOut
|
||||
clc
|
||||
adc TmpDWord+3
|
||||
sta SKT.TCBCache+S.TCB.OUTFREE
|
||||
|
||||
lda SKT.TCBCache+S.TCB.OUTFREE+1
|
||||
adc TmpDWord+2
|
||||
sta SKT.TCBCache+S.TCB.OUTFREE+1
|
||||
@ -1094,7 +1107,6 @@ SKT.AckDataToSktOut
|
||||
sec
|
||||
sbc TmpDWord+3
|
||||
sta SKT.TCBCache+S.TCB.OUTUSED
|
||||
|
||||
lda SKT.TCBCache+S.TCB.OUTUSED+1
|
||||
sbc TmpDWord+2
|
||||
sta SKT.TCBCache+S.TCB.OUTUSED+1
|
||||
|
@ -387,8 +387,8 @@ TCP.IN.SetDataInPtrAndLen
|
||||
*--------------------------------------
|
||||
TCP.OUT jsr SKT.GetTCB
|
||||
|
||||
TCP.OUT.I lda SKT.TCBCache+S.TCB.OUTUSED+1
|
||||
ldy SKT.TCBCache+S.TCB.OUTUSED
|
||||
TCP.OUT.I lda SKT.TCBCache+S.TCB.TOSEND+1
|
||||
ldy SKT.TCBCache+S.TCB.TOSEND
|
||||
|
||||
bne .1
|
||||
|
||||
@ -448,7 +448,7 @@ TCP.OUT.SendOpt sta .1+1
|
||||
TCP.OUT.Send ldy #S.TCP.OPTIONS
|
||||
sta (ZPFrameOutPtr),y
|
||||
bit #S.TCP.OPTIONS.ACK
|
||||
* beq .1
|
||||
beq .1
|
||||
|
||||
ldx #3
|
||||
ldy #S.TCP.ACK.NUMBER+3
|
||||
|
Loading…
x
Reference in New Issue
Block a user