Kernel version 0.9 : TCP, fix in PutC not writing in the right buffer ;-)

This commit is contained in:
Rémy GIBERT 2017-03-23 08:32:11 +01:00
parent 68110dc42a
commit 0ff04e7815
7 changed files with 33 additions and 25 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -179,8 +179,8 @@ S.TCB.OUTUSED .EQ 10
S.TCB.INFREE .EQ 12
S.TCB.OUTFREE .EQ 14
S.TCB.SEQNUM .EQ 16
S.TCB.NEXTSEQNUM .EQ 20
S.TCB.ACKNUM .EQ 24
S.TCB.ACKNUM .EQ 20
S.TCB.NEXTSEQNUM .EQ 24
*
S.TCB .EQ 32
*--------------------------------------

View File

@ -407,7 +407,7 @@ SKT.Write.TCP ldy #S.SOCKET.TCP.STATUS
jsr SKT.AddDataToSktOut
bcs .90
jsr TCP.OUT try to push, ignore error....
jsr TCP.OUT.I try to push, ignore error....
clc
rts
@ -467,14 +467,14 @@ SKT.PutC >PULLB TmpByte
>PULLA
ldx #1
stx ZPDataOutLen
stz ZPDataOutLen+1
stx ZPDataInLen
stz ZPDataInLen+1
ldx L.TmpByte
stx ZPDataOutPtr
stx ZPDataInPtr
ldx L.TmpByte+1
stx ZPDataOutPtr+1
stx ZPDataInPtr+1
jmp SKT.Write.I
*/--------------------------------------
@ -486,14 +486,14 @@ SKT.PutC >PULLB TmpByte
* ##Out :
*\--------------------------------------
SKT.PutS >PULLW ZPDataOutPtr
lda (ZPDataOutPtr)
lda (ZPDataInPtr)
sta ZPDataOutLen
stz ZPDataOutLen+1
sta ZPDataInLen
stz ZPDataInLen+1
inc ZPDataOutPtr
inc ZPDataInPtr
bne .1
inc ZPDataOutPtr+1
inc ZPDataInPtr+1
.1 jmp SKT.Write.I
*/--------------------------------------
@ -864,10 +864,10 @@ SKT.GetDataFromSktIn
SKT.AddDataToSktOut
jsr SKT.GetTCB
ldx ZPDataInLen
cpx SKT.TCBCache+S.TCB.OUTFREE
lda ZPDataInLen+1
sbc SKT.TCBCache+S.TCB.OUTFREE+1
ldx SKT.TCBCache+S.TCB.OUTFREE
cpx ZPDataInLen
lda SKT.TCBCache+S.TCB.OUTFREE+1
sbc ZPDataInLen+1
bcc .9 Not enough room in Q
ldy #S.SOCKET.SQ.hOutMem
@ -1128,7 +1128,6 @@ SKT.NewTCB >PUSHWI S.TCB
.2 lda A2osX.TIMER16,x
sta SKT.TCBCache+S.TCB.SEQNUM,x
sta SKT.TCBCache+S.TCB.NEXTSEQNUM,x
dex
bpl .2

View File

@ -423,10 +423,10 @@ TCP.OUT.I ldy SKT.TCBCache+S.TCB.OUTUSED
ldy #S.TCP.OPTIONS
sta (ZPFrameOutPtr),y
ldx #3
ldy #S.TCP.ACK.NUMBER+3
ldx #7
ldy #S.TCP.SEQ.NUMBER+7
.3 lda SKT.TCBCache+S.TCB.ACKNUM,x
.3 lda SKT.TCBCache+S.TCB.SEQNUM,x
sta (ZPFrameOutPtr),y
dey
dex

View File

@ -106,7 +106,7 @@ CS.RUN.INIT ldx #3
jsr CS.RUN.SERVER
bcs CS.RUN.ERR
* jsr CS.RUN.CLIENT
jsr CS.RUN.CLIENT
bra .2
.9 >LDYA L.MSG.SKTERR
@ -178,6 +178,15 @@ CS.RUN.CLIENT ldy #SktIndex
tax
beq .8 NO DATA
cmp #ERR.SKT.BAD
bne .8
ldy #SktIndex
lda (pData),y
tay
lda #0
sta (pData),y
bra .8
.10 sta .2+1
@ -186,12 +195,12 @@ CS.RUN.CLIENT ldy #SktIndex
>SYSCALL CPrintFYA
.1 lda #$ff hSocket
* >PUSHA
>PUSHA
.2 lda #$ff data
* >PUSHA
>PUSHA
* >LIBCALL hLIBTCPIP,LIBTCPIP.SKT.PutC
>LIBCALL hLIBTCPIP,LIBTCPIP.SKT.PutC
.8 ldy #SktIndex
lda (pData),y