From b190cfe5c99e39799778a8945d52af2a543fd125 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20GIBERT?= Date: Wed, 29 Mar 2017 08:33:26 +0200 Subject: [PATCH] Kernel version 0.9 : TCP, bugfix in SEQ & ACK (#3) --- A2OSX.BOOT.po | Bin 143360 -> 143360 bytes A2OSX.SRC.po | Bin 819200 -> 819200 bytes LIB/LIBPAK.S.txt | 417 ++++++++++++++++++++--------------------- LIB/LIBTCPIP.S.SKT.txt | 19 +- LIB/LIBTCPIP.S.TCP.txt | 28 ++- 5 files changed, 239 insertions(+), 225 deletions(-) diff --git a/A2OSX.BOOT.po b/A2OSX.BOOT.po index cc032277a789d1b7f494e909c7d9a4abe7cdfa9d..531e339a32cf1feebecf28dc9e2b1e1aed7b71c2 100644 GIT binary patch delta 4703 zcmaJ^4OCP|mVVVg(tt|)ON$^y`x+Eo{Ncw(SF&R~J7;wSqsh#!=5KnFkb#XvWlx+v zb0$k~hR!gA$27c|X_?dQy!6_RZFo$#?j{najY*6)tY+TX{EVnb^V5$eO8a6E5Rl&c zx-mL)Hp@BGt6O!e?yaxBy7#sr?nGKH_nF7gS6t;YKg?ZKwr$JK z$F>(dP9^^4+@&;>pp6SFsR0Try@HcSm5xqop40x@6TQUUf~kPP!socv{*Wuo)OYE} z`7E~hDzhp(m2?I9;7}kC(by8JCxFeayH%2Opx~&Yn`&9~jqF#x(*1UkN+7w|iE+w2Z7qa+izsFc7GXPX`yK{_{`K%)bC)=2;LZ$Wa6i7jvNn^58t*B_f{*37 zDSmDso3u_bvL+G~M}uAp`av&>w-5CXv3D6S#ZEH9tut-WGwd|eIK{9pkjCc;K>Z?d zRuJb)#Q7uQMfhhX-;>~OCW(9fWWxC;5}!$?WxaBiy9}IVOM!CwToALqMK`X>ZR^e3 zR7vXf6V8VXz0O()?l9RG;lIoE+&MDp-U&qWr8n@Xc|x#|mI+?fVc~w?n~i$73%whm zo$SqA{5%me;9f7iK*WV!D=29|DL<4~&_nLif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+2X6ph|$kFTw0GqHYX#+x~J zZFxhb>ML_sU&-DrVed#2!roby!nA0ClvdEffo=!^S-gf4SeH?PYsn*7Bb5rWEypJo zNLE8D6=li_oV-w)oC+qQy2@a>U!ea%S?&1Tg;FNhf!D#018jsYqrqS)27zYtG!W82rIC|F0%!Xgl=ixc*yQt;Wh%Lv(siChEFT(3j3XUoA8`KP; zMzXxw&tB2KzmQmBb$a*72jBVeS0CIedSqlEa^%t6AbnShfDtOXA2Z@;`C2$e$?}!!MLe z&aZS9`5T2P6;A<-^gGl2>8S4ipt`sHS9d`+>u@d&G%oL2wE|`T$>FR2Fk}||)r)`h zlY!&!=nd;Zhm76z1e=D3Oj5*xbNWlNmU%SQLAOuTKS#IeocXwHvXYJ$)pG;++;i!J zr(BV2mIZYC*!b;v3!~eUL}UCK926!XL7)-;F-dU^lA8q@Jd4oq zC1ihI`cjtrT3GIbFt-eHr+v9zXH0JGRcEZ|r_N}jiCHa0Qah_NIshPZB|b1&$r#ib zuYkQ%l_-MYHfiv8u?O|H;M{QrnLC&Y0A)CQz1PsL}AyQ_Rc1hrqbg?UW_Tm z=IP4!yieVGmcsG4tX#2XNK@RB?_uJuW5BLBEH^eF1`h0iZL?(mxf!KU2Y6YQh-Rjw6NAjg%D>O5rGz z5?~_UL`tHYnPEiByIbIG`u0enlu#L&ZY7_7SbU*iq*>EoikbNH!z`tBc+xEC|V9x#hQ9i&Zp{;pP zr%d_>P-Z@a7cN&aLJ#*xvV)O~L$;l9mqPj_D3Qx9L4$Tj>RJfaX?vok$_h{PULLYA - >STYA S.Pak.Src Init for pass #1 - >STYA S.Pak.SrcPtr +Pak >PULLYA + >STYA Pak.Src Init for pass #1 + >STYA Pak.SrcPtr >PULLA Get Src Len LO eor #$ff - sta S.Pak.SrcCnt - sta S.Pak.Cnt Init for pass #1 + sta Pak.SrcCnt + sta Pak.Cnt Init for pass #1 tax >PULLA Get Src Len HI eor #$ff - sta S.Pak.SrcCnt+1 - sta S.Pak.Cnt+1 Init for pass #1 + sta Pak.SrcCnt+1 + sta Pak.Cnt+1 Init for pass #1 tay - >PULLW S.Pak.DstPtr + >PULLW Pak.DstPtr txa - jsr S.Pak.PutByte + jsr Pak.PutByte tya - jsr S.Pak.PutByte + jsr Pak.PutByte ldx #9 -.1 stz S.Pak.Stat.Size,x Reset Stats +.1 stz Pak.Stat.Size,x Reset Stats dex bpl .1 * PASS #1 : Count occurence for each value... -S.Pak.1 ldx #0 -.1 stz S.Pak.CntL,x - stz S.Pak.CntH,x +Pak.1 ldx #0 +.1 stz Pak.CntL,x + stz Pak.CntH,x inx bne .1 ldy #0 -.2 inc S.Pak.Cnt +.2 inc Pak.Cnt bne .3 - inc S.Pak.Cnt+1 + inc Pak.Cnt+1 beq .5 -.3 lda (S.Pak.SrcPtr),y +.3 lda (Pak.SrcPtr),y tax - inc S.Pak.CntL,x + inc Pak.CntL,x bne .4 - inc S.Pak.CntH,x + inc Pak.CntH,x .4 iny bne .2 - inc S.Pak.SrcPtr+1 + inc Pak.SrcPtr+1 bra .2 * ...Search for Top 24 .5 ldy #23 -.6 stz S.Pak.Cnt Init best score to 0 - stz S.Pak.Cnt+1 +.6 stz Pak.Cnt Init best score to 0 + stz Pak.Cnt+1 - stz S.Pak.Byte + stz Pak.Byte ldx #0 -.7 lda S.Pak.CntL,x is it better at X - cmp S.Pak.Cnt - lda S.Pak.CntH,x - sbc S.Pak.Cnt+1 +.7 lda Pak.CntL,x is it better at X + cmp Pak.Cnt + lda Pak.CntH,x + sbc Pak.Cnt+1 bcs .8 not better - stx S.Pak.Byte - lda S.Pak.CntL,x - sta S.Pak.Cnt - lda S.Pak.CntH,x - sta S.Pak.Cnt+1 + stx Pak.Byte + lda Pak.CntL,x + sta Pak.Cnt + lda Pak.CntH,x + sta Pak.Cnt+1 .8 inx bne .7 - lda S.Pak.Byte - sta S.Pak.Short,y - stz S.Pak.CntL,x Discard this entry - stz S.Pak.CntH,x + lda Pak.Byte + sta Pak.Short,y + stz Pak.CntL,x Discard this entry + stz Pak.CntH,x dey bpl .6 ldx #15 -.9 lda S.Pak.Short4,x Store SHORT4 in reverse order - jsr S.Pak.PutByte +.9 lda Pak.Short4,x Store SHORT4 in reverse order + jsr Pak.PutByte dex bpl .9 ldx #7 -.10 lda S.Pak.Short3,x Store SHORT3 in reverse order - jsr S.Pak.PutByte +.10 lda Pak.Short3,x Store SHORT3 in reverse order + jsr Pak.PutByte dex bpl .10 >LDYAI S.PAK Total Header Size - >STYA S.Pak.Stat.Size + >STYA Pak.Stat.Size * PASS #2 : -S.Pak.2 >LDYA S.Pak.Src Init for pass #2 - >STYA S.Pak.SrcPtr - >STYA S.Pak.SrcBlPtr +Pak.2 >LDYA Pak.Src Init for pass #2 + >STYA Pak.SrcPtr + >STYA Pak.SrcBlPtr - >LDYA S.Pak.SrcCnt - >STYA S.Pak.Cnt + >LDYA Pak.SrcCnt + >STYA Pak.Cnt lda #8 - sta S.Pak.PutBit+1 Initialize properly for first "PutBit" Call - stz S.Pak.Byte + sta Pak.PutBit+1 Initialize properly for first "PutBit" Call + stz Pak.Byte - stz S.Pak.PipeLen + stz Pak.PipeLen -S.Pak.2.LOOP ldx S.Pak.PipeLen Always fill Bytes in the PIPE until full +Pak.2.LOOP ldx Pak.PipeLen Always fill Bytes in the PIPE until full -.1 jsr S.Pak.GetByte Load PIPE.... +.1 jsr Pak.GetByte Load PIPE.... bcs .2 end of Buffer ? - sta S.Pak.Pipe,x + sta Pak.Pipe,x inx cpx #PIPELEN PIPE Full ? bne .1 clc -.2 stx S.Pak.PipeLen +.2 stx Pak.PipeLen txa PIPE empty ....exit beq .99 * try finding REPeating same bytes..... -S.Pak.2.REP dex - beq S.Pak.2.SHORT Only one char in PIPE... +Pak.2.REP dex + beq Pak.2.SHORT Only one char in PIPE... ldx #0 -.1 lda S.Pak.Pipe,x - cmp S.Pak.Pipe+1,x +.1 lda Pak.Pipe,x + cmp Pak.Pipe+1,x bne .2 inx - cpx S.Pak.PipeLen + cpx Pak.PipeLen bne .1 .2 dex if one char.....no REP - beq .S.Pak.2.BL + beq Pak.2.BL dex if 2, -> REP ONE (not 2) phx REP 1 + 0 or more....save REP count for later.... - jsr S.Pak.2.STORE1 a = byte to store + jsr Pak.2.STORE1 a = byte to store lda #%11100000 plx @@ -248,82 +248,82 @@ S.Pak.2.REP dex beq .3 ora #%00010000 ldy #4 - jsr S.Pak.PutYBits + jsr Pak.PutYBits txa beq .4 if not REP 2 or more no extra count ldy #4 - jsr S.Pak.PutYBits + jsr Pak.PutYBits .4 pla clc adc #2 tay - jsr S.Pak.StripPipe Remove REP bytes from PIPE + jsr Pak.StripPipe Remove REP bytes from PIPE - ldy #STATS.REP - jsr S.Pak.UpdateStats - jmp S.Pak.2.LOOP -S.Pak.2.BL + ldx #STATS.REP + jsr Pak.UpdateStats + jmp Pak.2.LOOP +Pak.2.BL * Try finding best matching BackLink between SrcBlPtr and SrcPtr (max 512) -.4 lda S.Pak.SrcPtr +.4 lda Pak.SrcPtr sec - sbc S.Pak.PipeLen - sta S.Pak.Limit setup Limit to SrcPtr-PIPE - lda S.Pak.SrcPtr+1 + sbc Pak.PipeLen + sta Pak.Limit setup Limit to SrcPtr-PIPE + lda Pak.SrcPtr+1 sbc #0 - sta S.Pak.Limit+1 + sta Pak.Limit+1 -.40 lda S.Pak.SrcBlPtr - sta S.Pak.SrcBlPtrT - lda S.Pak.SrcBlPtr+1 - sta S.Pak.SrcBlPtrT+1 +.40 lda Pak.SrcBlPtr + sta Pak.SrcBlPtrT + lda Pak.SrcBlPtr+1 + sta Pak.SrcBlPtrT+1 .5 txa Get PIPE Len clc make sure SrcBlPtrT+PIPE < Limit - adc S.Pak.SrcBlPtrT + adc Pak.SrcBlPtrT tay - lda S.Pak.SrcBlPtrT+1 + lda Pak.SrcBlPtrT+1 adc #0 - cpy S.Pak.Limit - sbc S.Pak.Limit+1 + cpy Pak.Limit + sbc Pak.Limit+1 bcc .10 not enough room txa dec tay -.8 lda (S.Pak.SrcBlPtrT),y - cmp S.Pak.Pipe,y +.8 lda (Pak.SrcBlPtrT),y + cmp Pak.Pipe,y bne .9 dey bpl .8 -* Found a BL at S.Pak.SrcBlPtrT, Store it and remove X bytes from PIPE +* Found a BL at Pak.SrcBlPtrT, Store it and remove X bytes from PIPE phx save BL length lda #%1100000 ldy #3 - jsr S.Pak.PutYBits + jsr Pak.PutYBits - lda S.Pak.Limit + lda Pak.Limit sec - sbc S.Pak.SrcBlPtrT + sbc Pak.SrcBlPtrT php save C ldy #8 - jsr S.Pak.PutYBits + jsr Pak.PutYBits plp - lda S.Pak.Limit+1 + lda Pak.Limit+1 sec - sbc S.Pak.SrcBlPtrT+1 + sbc Pak.SrcBlPtrT+1 - jsr S.Pak.PutBit + jsr Pak.PutBit ply Get back BL len phy - jsr S.Pak.StripPipe Remove LEN bytes from PIPE + jsr Pak.StripPipe Remove LEN bytes from PIPE pla Get back BL len sec @@ -333,283 +333,280 @@ S.Pak.2.BL asl asl ldy #4 store 4 bits len - jsr S.Pak.PutYBits - ldy #STATS.BL - jsr S.Pak.UpdateStats - jmp S.Pak.2.LOOP + jsr Pak.PutYBits + ldx #STATS.BL + jsr Pak.UpdateStats + jmp Pak.2.LOOP * No match...try starting at next byte -.9 inc S.Pak.SrcBlPtrT +.9 inc Pak.SrcBlPtrT bne .5 - inc S.Pak.SrcBlPtrT+1 + inc Pak.SrcBlPtrT+1 bra .5 .10 dex reduce PIPE cpx #2 2 bytes remaining? no need to BL, a BL is 16bits wide..... bne .40 and start over from BLPtr * NO Bl Found, STORE -S.Pak.STORE lda S.Pak.Pipe - jsr S.Pak.2.STORE1 +Pak.STORE lda Pak.Pipe + jsr Pak.2.STORE1 ldy #1 - jsr S.Pak.StripPipe - jmp S.Pak.2.LOOP + jsr Pak.StripPipe + jmp Pak.2.LOOP *-------------------------------------- -S.Pak.2.STORE1 +Pak.2.STORE1 rts *-------------------------------------- -S.Pak.GetByte inc S.UnPak.Cnt +Pak.GetByte inc UnPak.Cnt bne .1 - inc S.UnPak.Cnt+1 + inc UnPak.Cnt+1 .1 beq .9 - lda (S.Pak.SrcPtr) + lda (Pak.SrcPtr) pha - inc S.Pak.SrcPtr + inc Pak.SrcPtr bne .2 - inc S.Pak.SrcPtr+1 + inc Pak.SrcPtr+1 .2 clc rts .9 sec rts *-------------------------------------- -S.Pak.PutYBits asl - jsr S.Pak.PutBit +Pak.PutYBits asl + jsr Pak.PutBit dey - bne S.Pak.PutYBits + bne Pak.PutYBits rts *-------------------------------------- -* S.Pak.PutBit (bit in C) +* Pak.PutBit (bit in C) *-------------------------------------- -S.Pak.PutBit ldx #$ff +Pak.PutBit ldx #$ff pha bne .1 - lda S.Pak.Byte - jsr S.Pak.PutByte - stz S.Pak.Byte + lda Pak.Byte + jsr Pak.PutByte + stz Pak.Byte ldx #8 .1 dex - stx S.Pak.PutBit+1 + stx Pak.PutBit+1 bcc .8 Nothing to "light up" - lda S.Pak.Byte - lda S.Pak.BitMask,x - sta S.Pak.Byte + lda Pak.Byte + lda Pak.BitMask,x + sta Pak.Byte .8 pla rts *-------------------------------------- -S.Pak.PutByte sta (S.UnPak.DstPtr) - inc S.UnPak.DstPtr +Pak.PutByte sta (Pak.DstPtr) + inc Pak.DstPtr bne .1 - inc S.UnPak.DstPtr+1 + inc Pak.DstPtr+1 -.1 inc S.Pak.Stat.Size +.1 inc Pak.Stat.Size bne .2 - inc S.Pak.Stat.Size+1 + inc Pak.Stat.Size+1 .2 rts *-------------------------------------- * Y = count to remove from PIPE *-------------------------------------- -S.Pak.StripPipe ldx S.Pak.PipeLen +Pak.StripPipe ldx Pak.PipeLen beq .9 ldx #0 -.1 lda S.Pak.Pipe+1,x - sta S.Pak.Pipe,x +.1 lda Pak.Pipe+1,x + sta Pak.Pipe,x inx - cpx S.Pak.PipeLen + cpx Pak.PipeLen bne .1 - dec S.Pak.PipeLen + dec Pak.PipeLen dey - bne S.Pak.StripPipe + bne Pak.StripPipe .9 rts *-------------------------------------- -S.Pak.UpdateStats - inc S.Pak.Stat.Size,y +Pak.UpdateStats inc Pak.Stat.Size,x bne .8 - inc S.Pak.Stat.Size+1,y + inc Pak.Stat.Size+1,x .8 rts *-------------------------------------- -S.Pak.BitMask .HS 0102040810204080 -S.Pak.Src .BS 2 -S.Pak.SrcCnt .BS 2 -S.Pak.Cnt .BS 2 -S.Pak.CntL .BS 256 -S.Pak.CntH .BS 256 -S.Pak.Short4 .BS 16 -S.Pak.Short3 .BS 8 -S.Pak.Byte .BS 1 -S.Pak.Limit .BS 2 -S.Pak.PipeLen .BS 1 -S.Pak.Pipe .BS 18 +Pak.BitMask .HS 0102040810204080 +Pak.Src .BS 2 +Pak.SrcCnt .BS 2 +Pak.Cnt .BS 2 +Pak.CntL .BS 256 +Pak.CntH .BS 256 +Pak.Short4 .BS 16 +Pak.Short3 .BS 8 +Pak.Byte .BS 1 +Pak.Limit .BS 2 +Pak.PipeLen .BS 1 +Pak.Pipe .BS 18 *-------------------------------------- -S.Pak.Stat.Size .BS 2 -S.Pak.Stat.BL .BS 2 -S.Pak.Stat.REP .BS 2 -S.Pak.Stat.S3 .BS 2 -S.Pak.Stat.S4 .BS 2 +Pak.Stat.Size .BS 2 +Pak.Stat.BL .BS 2 +Pak.Stat.REP .BS 2 +Pak.Stat.S3 .BS 2 +Pak.Stat.S4 .BS 2 *-------------------------------------- -* S.UnPak +* UnPak * In : * PULLW = Src PTR Compressed Buffer * PULLW = Dst PTR *-------------------------------------- -S.UnPak.SrcPtr .EQ ZPLIB -S.UnPak.DstPtr .EQ ZPLIB+2 -S.UnPak.ShrtTbl .EQ ZPLIB+4 -S.UnPak.Cnt .EQ ZPLIB+6 +UnPak.SrcPtr .EQ ZPLIB +UnPak.DstPtr .EQ ZPLIB+2 +UnPak.ShrtTbl .EQ ZPLIB+4 +UnPak.Cnt .EQ ZPLIB+6 *-------------------------------------- -S.UnPak >PULLW S.UnPak.SrcPtr +UnPak >PULLW UnPak.SrcPtr >PULLA Get Dst PTR LO sec sbc #1 - sta S.UnPak.DstPtr + sta UnPak.DstPtr >PULLA Get Dst PTR HI sbc #0 - sta S.UnPak.DstPtr+1 setup Dst PTR-1 + sta UnPak.DstPtr+1 setup Dst PTR-1 - jsr S.UnPak.GetByte Get !LEN for counting up to $0000 - sta S.UnPak.Cnt + jsr UnPak.GetByte Get !LEN for counting up to $0000 + sta UnPak.Cnt - jsr S.UnPak.GetByte - sta S.UnPak.Cnt+1 + jsr UnPak.GetByte + sta UnPak.Cnt+1 - >LDYA S.UnPak.SrcPtr Get PTR to Short Table..... - >STYA S.UnPak.ShrtTbl and save it for SHORTx + >LDYA UnPak.SrcPtr Get PTR to Short Table..... + >STYA UnPak.ShrtTbl and save it for SHORTx lda #8 - sta S.UnPak.GetBit+1 Initialize properly for first "GetBit" Call + sta UnPak.GetBit+1 Initialize properly for first "GetBit" Call -.1 inc S.UnPak.Cnt +.1 inc UnPak.Cnt bne .2 - inc S.UnPak.Cnt+1 + inc UnPak.Cnt+1 beq .99 -.2 jsr S.UnPak.GetBit +.2 jsr UnPak.GetBit bcs .4 CMD.... *---- STORE - jsr S.UnPak.GetBit + jsr UnPak.GetBit ldx #1 bcc .3 if CC one byte - jsr S.UnPak.Get4Bits CC + jsr UnPak.Get4Bits CC adc #2 range is 2->17 tax -.3 jsr S.UnPak.Get8Bits - jsr S.UnPak.PutByte +.3 jsr UnPak.Get8Bits + jsr UnPak.PutByte dex bne .3 bra .1 .99 rts *---- CMD -.4 jsr S.UnPak.GetBit +.4 jsr UnPak.GetBit bcs .6 BACKLINK or REP... *---- CMD : SHORT lda #0 ldy #4 - jsr S.UnPak.GetBit if CS short3 + jsr UnPak.GetBit if CS short3 rol make offset 00000001 asl ....00000010 beq .5 dey if short3, only 3 bits -.5 jsr S.UnPak.GetBit +.5 jsr UnPak.GetBit rol dey bne .5 tay if s3, offset is 00010xxx - lda (S.UnPak.ShrtTbl),y if s4, offset is 0000xxxx - jsr S.UnPak.PutByte + lda (UnPak.ShrtTbl),y if s4, offset is 0000xxxx + jsr UnPak.PutByte bra .1 *---- CMD : BACKLINK or REP -.6 jsr S.UnPak.GetBit +.6 jsr UnPak.GetBit bcs .8 if CS -> REP *---- CMD : BACKLINK - jsr S.UnPak.Get8Bits get Offset LO, (CC) + jsr UnPak.Get8Bits get Offset LO, (CC) eor #$ff !offset LO - adc S.UnPak.DstPtr equiv. SUB offset + adc UnPak.DstPtr equiv. SUB offset sta .7+1 PTR to Backlink LO - lda S.UnPak.DstPtr+1 + lda UnPak.DstPtr+1 bcs .61 if ADC sets C, no need to dec HI dec -.61 jsr S.UnPak.GetBit get Offset HI in C +.61 jsr UnPak.GetBit get Offset HI in C bcc .62 dec .62 sta .7+2 PTR to Backlink HI - jsr S.UnPak.Get4Bits CC + jsr UnPak.Get4Bits CC adc #3 Backlink are ate least 3 bytes... tax ldy #0 .7 lda $ffff,y Self Modified code : PTR to Backlink - jsr S.UnPak.PutByte + jsr UnPak.PutByte iny dex bne .7 beq .1 *---- CMD : REP -.8 jsr S.UnPak.GetBit +.8 jsr UnPak.GetBit ldx #1 bcc .9 REP 1 - jsr S.UnPak.Get4Bits REP xxxx, CC + jsr UnPak.Get4Bits REP xxxx, CC adc #2 range is 2->17 tax -.9 lda (S.UnPak.DstPtr) Get Last Byte - jsr S.UnPak.PutByte +.9 lda (UnPak.DstPtr) Get Last Byte + jsr UnPak.PutByte dex bne .9 - beq .1 + jmp .1 *-------------------------------------- -S.UnPak.Get8Bits - ldy #8 +UnPak.Get8Bits ldy #8 .HS 2C bit abs -S.UnPak.Get4Bits - ldy #4 +UnPak.Get4Bits ldy #4 lda #0 make sure to reset A before reading less than 8 bits only -.1 jsr S.UnPak.GetBit and to exit with CC if even if 8 bits read +.1 jsr UnPak.GetBit and to exit with CC if even if 8 bits read rol dey bne .1 rts always CC *-------------------------------------- -S.UnPak.GetBit ldx #$ff Self Modified code +UnPak.GetBit ldx #$ff Self Modified code bne .1 - jsr S.UnPak.NxtByte + jsr UnPak.NxtByte ldx #8 .1 dex - stx S.UnPak.GetBit+1 + stx UnPak.GetBit+1 pha Don't trash A - lda (S.UnPak.SrcPtr) - and S.UnPak.BitMask,x + lda (UnPak.SrcPtr) + and UnPak.BitMask,x cmp #1 if 0:CC, i>0 CS pla rts Bit is in C *-------------------------------------- -S.UnPak.GetByte lda (S.UnPak.SrcPtr) -S.UnPak.NxtByte inc S.UnPak.SrcPtr +UnPak.GetByte lda (UnPak.SrcPtr) +UnPak.NxtByte inc UnPak.SrcPtr bne .8 - inc S.UnPak.SrcPtr+1 + inc UnPak.SrcPtr+1 .8 rts *-------------------------------------- -S.UnPak.PutByte inc S.UnPak.DstPtr +UnPak.PutByte inc UnPak.DstPtr bne .8 - inc S.UnPak.DstPtr+1 -.8 sta (S.UnPak.DstPtr) + inc UnPak.DstPtr+1 +.8 sta (UnPak.DstPtr) rts *-------------------------------------- -S.UnPak.BitMask .HS 8040201008040201 +UnPak.BitMask .HS 8040201008040201 MAN SAVE LIB/LIBPAK.S ASM diff --git a/LIB/LIBTCPIP.S.SKT.txt b/LIB/LIBTCPIP.S.SKT.txt index 74c35d27..c6020572 100644 --- a/LIB/LIBTCPIP.S.SKT.txt +++ b/LIB/LIBTCPIP.S.SKT.txt @@ -838,7 +838,7 @@ SKT.GetDataFromSktIn bmi .9 ....and TextMode selected, NO ending CR found lda ZPTmpPtr3 Do we have transfered something? - eor ZPTmpPtr3+1 + ora ZPTmpPtr3+1 beq .9 lda SKT.TCBCache+S.TCB.INFREE @@ -1060,14 +1060,14 @@ SKT.AckDataToSktOut pha sbc SKT.TCBCache+S.TCB.SEQNUM,x sta TmpDWord,x - pla ....and Set ACK = new ACK + pla ....and Set SEQ = new SEQ sta SKT.TCBCache+S.TCB.SEQNUM,x dey dex bpl .1 - lda TmpDWord - ldx TmpDWord+1 + lda TmpDWord+3 + ldx TmpDWord+2 bne .2 tay beq .8 @@ -1083,21 +1083,22 @@ SKT.AckDataToSktOut lda SKT.TCBCache+S.TCB.OUTFREE clc - adc TmpDWord + adc TmpDWord+3 sta SKT.TCBCache+S.TCB.OUTFREE lda SKT.TCBCache+S.TCB.OUTFREE+1 - adc TmpDWord+1 + adc TmpDWord+2 sta SKT.TCBCache+S.TCB.OUTFREE+1 lda SKT.TCBCache+S.TCB.OUTUSED sec - sbc TmpDWord + sbc TmpDWord+3 sta SKT.TCBCache+S.TCB.OUTUSED lda SKT.TCBCache+S.TCB.OUTUSED+1 - sbc TmpDWord+1 + sbc TmpDWord+2 sta SKT.TCBCache+S.TCB.OUTUSED+1 + .8 rts *-------------------------------------- SKT.NewTCB >PUSHWI S.TCB @@ -1119,11 +1120,9 @@ SKT.NewTCB >PUSHWI S.TCB sta SKT.TCBCache+S.TCB.OUTFREE+1 ldx #3 - sec .2 lda A2osX.TIMER16,x sta SKT.TCBCache+S.TCB.SEQNUM,x - adc #0 sta SKT.TCBCache+S.TCB.NEXTSEQ,x dex bpl .2 diff --git a/LIB/LIBTCPIP.S.TCP.txt b/LIB/LIBTCPIP.S.TCP.txt index 604b7f35..3c606b6f 100644 --- a/LIB/LIBTCPIP.S.TCP.txt +++ b/LIB/LIBTCPIP.S.TCP.txt @@ -193,8 +193,12 @@ TCP.IN.JMP.SYNRCVD ldx #3 ldy #S.TCP.ACK.NUMBER+3 -.1 lda SKT.TCBCache+S.TCB.NEXTSEQ,x Check if ACK=my SEQ+1 - sta SKT.TCBCache+S.TCB.SEQNUM,x + sec + +.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 @@ -390,7 +394,9 @@ TCP.OUT.I lda SKT.TCBCache+S.TCB.OUTUSED+1 bne .1 tax - beq .1 Y,A=0 : no data to send + bne .1 + +* Y,A=0 : no data to send ldy #S.SOCKET.TCP.OPTIONS lda (ZPPtrSKT),y @@ -428,8 +434,20 @@ TCP.OUT.SendOpt sta .1+1 TCP.OUT.Send ldy #S.TCP.OPTIONS sta (ZPFrameOutPtr),y - ldx #7 - ldy #S.TCP.SEQ.NUMBER+7 + bit #S.TCP.OPTIONS.ACK + bne .1 + + ldx #3 + ldy #S.TCP.ACK.NUMBER+3 + +.10 lda SKT.TCBCache+S.TCB.ACKNUM,x + sta (ZPFrameOutPtr),y + dey + dex + bpl .10 + +.1 ldx #3 + ldy #S.TCP.SEQ.NUMBER+3 .2 lda SKT.TCBCache+S.TCB.NEXTSEQ,x sta (ZPFrameOutPtr),y