Kernel version 0.9 : TCP, bugfix in SEQ & ACK (#4)

This commit is contained in:
Rémy GIBERT 2017-03-31 08:28:43 +02:00
parent 5284913187
commit 3d676326c6
5 changed files with 18 additions and 19 deletions

Binary file not shown.

Binary file not shown.

View File

@ -180,7 +180,7 @@ S.TCB.INFREE .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.NEXTSEQ .EQ 24 Send:Next SEQ to use when sending more data
S.TCB.LASTSEQ .EQ 28 Rcvd:Last SEQ accepted data from remote
*
S.TCB .EQ 32

View File

@ -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
@ -1043,20 +1043,7 @@ SKT.GetDataFromSktOut
sta ZPTmpPtr2+1
bra .1
.8 lda SKT.TCBCache+S.TCB.SEQNUM+3
clc
adc ZPDataOutLen
sta SKT.TCBCache+S.TCB.SEQNUM+3
lda SKT.TCBCache+S.TCB.SEQNUM+2
adc ZPDataOutLen+1
sta SKT.TCBCache+S.TCB.SEQNUM+2
bcc .80
inc SKT.TCBCache+S.TCB.SEQNUM+1
bne .80
inc SKT.TCBCache+S.TCB.SEQNUM
.80 clc
.8 clc
rts
*--------------------------------------
* From TCP.IN
@ -1136,7 +1123,6 @@ SKT.NewTCB >PUSHWI S.TCB
.2 lda A2osX.TIMER16,x
sta SKT.TCBCache+S.TCB.SEQNUM,x
sta SKT.TCBCache+S.TCB.NEXTSEQ,x
dex
bpl .2

View File

@ -198,7 +198,6 @@ TCP.IN.JMP.SYNRCVD
.1 lda SKT.TCBCache+S.TCB.SEQNUM,x Check if ACK=my SEQ+1
adc #0
sta SKT.TCBCache+S.TCB.SEQNUM,x
sta SKT.TCBCache+S.TCB.NEXTSEQ,x
eor (ZPFrameInPtr),y
bne .8
dey
@ -422,7 +421,21 @@ TCP.OUT.I lda SKT.TCBCache+S.TCB.OUTUSED+1
jsr TCP.OUT.Send
bcs TCP.OUT.9
jmp SKT.StoreTCB
lda SKT.TCBCache+S.TCB.SEQNUM+3
clc
adc ZPDataOutLen
sta SKT.TCBCache+S.TCB.SEQNUM+3
lda SKT.TCBCache+S.TCB.SEQNUM+2
adc ZPDataOutLen+1
sta SKT.TCBCache+S.TCB.SEQNUM+2
bcc .80
inc SKT.TCBCache+S.TCB.SEQNUM+1
bne .80
inc SKT.TCBCache+S.TCB.SEQNUM
.80 jmp SKT.StoreTCB
TCP.OUT.9 rts
*--------------------------------------
TCP.OUT.SendOpt sta .1+1