diff --git a/.Floppies/A2OSX.BUILD.po b/.Floppies/A2OSX.BUILD.po index 465744d1..3bef7590 100644 Binary files a/.Floppies/A2OSX.BUILD.po and b/.Floppies/A2OSX.BUILD.po differ diff --git a/BIN/HTTPGET.S.txt b/BIN/HTTPGET.S.txt index 886f0fe3..dd6251a6 100644 --- a/BIN/HTTPGET.S.txt +++ b/BIN/HTTPGET.S.txt @@ -470,9 +470,11 @@ CS.RUN.RESPONSE jsr Init.TimeOut bcc .2 cmp #E.NODATA - beq .1 bne .8 + lda #"." + >SYSCALL putchar + lda TimeOut bne .1 @@ -587,7 +589,7 @@ CS.DOEVENT lda (pEvent) CS.QUIT lda hSocket beq .1 - >LIBCALL hLIBTCPIP,LIBTCPIP.Shutdown +* >LIBCALL hLIBTCPIP,LIBTCPIP.Shutdown .1 lda hReqBuf beq .2 diff --git a/LIB/LIBTCPIP.S.SKT.txt b/LIB/LIBTCPIP.S.SKT.txt index 093111f7..dcbba68d 100644 --- a/LIB/LIBTCPIP.S.SKT.txt +++ b/LIB/LIBTCPIP.S.SKT.txt @@ -331,23 +331,44 @@ SKT.shutdown pha ldy #S.SOCKET.T lda (ZPPtrSKT),y - cmp #S.SOCKET.T.STREAM - beq SKT.shutdown.STREAM -*-------------------------------------- cmp #S.SOCKET.T.SEQPKT - bne SKT.shutdown.DGRAM + bcc SKT.shutdown.DGRAM + ldy #S.SOCKET.TCP.S + lda (ZPPtrSKT),y + cmp #S.SOCKET.TCP.S.TIMEWT + bcs .7 + pla - pha - jsr SKT.shutdown.TCP + jsr SKT.GetTCB + ldy #S.SOCKET.TCP.S + lda (ZPPtrSKT),y + cmp #S.SOCKET.TCP.S.ESTBLSH + bne .1 -* bcs SKT.shutdown.RTS + lda #S.TCP.OPTIONS.FIN+S.TCP.OPTIONS.ACK + jsr TCP.OUT.SendOptA Send FIN/ACK + bcs .9 + + lda #S.SOCKET.TCP.S.FINWT1 + jmp SKT.StoreTCB.S + +.1 cmp #S.SOCKET.TCP.S.CLWAIT + beq .3 + +.2 lda #S.TCP.OPTIONS.RST + jsr TCP.OUT.SendOptA Send RST + +.3 lda #S.SOCKET.TCP.S.TIMEWT + jmp SKT.StoreTCB.S + +.7 pla +.8 clc +.9 rts *-------------------------------------- SKT.shutdown.LISTEN -SKT.shutdown.RAW SKT.shutdown.DGRAM -SKT.shutdown.SEQPKT .1 jsr SKT.GetFromQueue bcs .3 @@ -370,35 +391,6 @@ SKT.shutdown.SEQPKT * clc SKT.shutdown.RTS rts -*-------------------------------------- -SKT.shutdown.STREAM - pla - -SKT.shutdown.TCP - jsr SKT.GetTCB - ldy #S.SOCKET.TCP.S - lda (ZPPtrSKT),y - cmp #S.SOCKET.TCP.S.ESTBLSH - bne .1 - - lda #S.TCP.OPTIONS.FIN+S.TCP.OPTIONS.ACK - jsr TCP.OUT.SendOptA Send FIN/ACK - bcs .9 - - lda #S.SOCKET.TCP.S.FINWT1 - jmp SKT.StoreTCB.S - -.1 cmp #S.SOCKET.TCP.S.CLWAIT - beq .3 - -.2 lda #S.TCP.OPTIONS.RST - jsr TCP.OUT.SendOptA Send RST - bcs .9 - -.3 lda #S.SOCKET.TCP.S.TIMEWT - jmp SKT.StoreTCB.S - -.9 rts */-------------------------------------- * # Read (STREAM) * ## C diff --git a/LIB/LIBTCPIP.S.TCP.txt b/LIB/LIBTCPIP.S.TCP.txt index d1f5a2bd..cd1c6a2b 100644 --- a/LIB/LIBTCPIP.S.TCP.txt +++ b/LIB/LIBTCPIP.S.TCP.txt @@ -400,7 +400,7 @@ TCP.SENDCLOSE ldx #0 cmp #AF.INET bne .8 - iny #S.SOCKET.T + iny #S.SOCKET.T lda (ZPPtrSKT),y cmp #S.SOCKET.T.SEQPKT bcc .8 @@ -439,18 +439,21 @@ TCP.SENDCLOSE ldx #0 bra .8 *-------------------------------------- .4 cpx #S.SOCKET.T.SEQPKT - bne .5 + bne .6 - jsr SKT.shutdown.SEQPKT - bra .8 +.5 jsr SKT.GetFromQueue + bcs .7 + + >SYSCALL2 FreeMem + bra .5 -.5 ldy #S.SOCKET.SQ.hInMem +.6 ldy #S.SOCKET.SQ.hInMem jsr TCP.SENDCLOSE.PIPE ldy #S.SOCKET.SQ.hOutMem jsr TCP.SENDCLOSE.PIPE - plx +.7 plx phx lda SKT.TABLE,x stz SKT.TABLE,x