diff --git a/.Floppies/A2OSX.BUILD.po b/.Floppies/A2OSX.BUILD.po index 24c18722..d3dfb3ae 100644 Binary files a/.Floppies/A2OSX.BUILD.po and b/.Floppies/A2OSX.BUILD.po differ diff --git a/.Floppies/A2OSX.TEST.po b/.Floppies/A2OSX.TEST.po index e7823be9..75c9070d 100644 Binary files a/.Floppies/A2OSX.TEST.po and b/.Floppies/A2OSX.TEST.po differ diff --git a/BIN/HTTPGET.S.txt b/BIN/HTTPGET.S.txt index 67718fb1..05534f22 100644 --- a/BIN/HTTPGET.S.txt +++ b/BIN/HTTPGET.S.txt @@ -21,32 +21,28 @@ ZS.START ZPIPCfgPtr .BS 2 ZPHostPtr .BS 2 ZPPtr .BS 2 +ArgIndex .BS 1 +hSocket .BS 1 hReqBuf .BS 1 ZPReqBufPtr .BS 2 ZPReqBufLen .BS 2 +bResponse .BS 1 +TimeOut .BS 1 +bURI .BS 1 hEncodedBuf .BS 1 ZPEncodedBufPtr .BS 2 ZPEncodedBufLen .BS 2 - -ZPRespBufPtr .BS 2 -ZPRespBufLen .BS 2 - -ArgIndex .BS 1 -hSocket .BS 1 - hSendBuf .BS 1 ZPSendBufPtr .BS 2 +hRespBuf .BS 1 +ZPRespBufPtr .BS 2 +ZPRespBufLen .BS 2 hFile .BS 1 ZPFileName .BS 2 -hRespBuf .BS 1 -bResponse .BS 1 -TimeOut .BS 1 -bURI .BS 1 - ZS.END .ED *-------------------------------------- * File Header (16 Bytes) @@ -109,9 +105,7 @@ CS.RUN.IPOK ldy #S.IPCFG.IP+3 dex bpl .1 - inc ArgIndex - lda ArgIndex - >SYSCALL ArgV + jsr CS.RUN.GETNEXTARG bcs .9 >STYA ZPHostPtr @@ -140,15 +134,14 @@ CS.RUN.ESYN lda #E.SYN sec CS.RUN.RTS rts *-------------------------------------- -CS.RUN.HOSTOK inc ArgIndex - lda ArgIndex - >SYSCALL ArgV +CS.RUN.HOSTOK jsr CS.RUN.GETNEXTARG bcc .10 - + .8 jmp CS.RUN.ARGSOK .10 >STYA ZPPtr lda (ZPPtr) + cmp #'-' beq .1 @@ -158,9 +151,7 @@ CS.RUN.HOSTOK inc ArgIndex >STYA SA.REMOTE+S.SOCKADDR.PORT - inc ArgIndex - lda ArgIndex - >SYSCALL ArgV + jsr CS.RUN.GETNEXTARG bcs .8 >STYA ZPPtr @@ -183,9 +174,7 @@ CS.RUN.HOSTOK inc ArgIndex bit bURI bmi CS.RUN.ESYN - inc ArgIndex - lda ArgIndex - >SYSCALL ArgV + jsr CS.RUN.GETNEXTARG .9 bcs CS.RUN.ESYN @@ -202,9 +191,7 @@ CS.RUN.HOSTOK inc ArgIndex bit bURI bmi CS.RUN.ESYN - inc ArgIndex - lda ArgIndex - >SYSCALL ArgV + jsr CS.RUN.GETNEXTARG bcs .9 >PUSHYA @@ -224,7 +211,7 @@ CS.RUN.HOSTOK inc ArgIndex jmp CS.RUN.HOSTOK .3 cmp #'O' - bcs .9 + bne .9 inc ArgIndex lda ArgIndex @@ -234,6 +221,12 @@ CS.RUN.HOSTOK inc ArgIndex >STYA ZPFileName jmp CS.RUN.HOSTOK *-------------------------------------- +CS.RUN.GETNEXTARG + inc ArgIndex + lda ArgIndex + >SYSCALL ArgV + rts +*-------------------------------------- CS.RUN.ARGSOK >PUSHW L.MSG.CONNECT ldx #0 @@ -484,28 +477,10 @@ CS.RUN.RESPONSE jsr Init.TimeOut bra .80 -.2 >SYSCALL GetMemPtr - >STYA ZPRespBufPtr +.2 jsr CS.RUN.GETRESPONSE - ldy #S.IP.TOTAL.LENGTH+1 - lda (ZPRespBufPtr),y - sec - sbc #S.TCP-S.IP - sta ZPRespBufLen - - dey - - lda (ZPRespBufPtr),y - sbc /S.TCP-S.IP - sta ZPRespBufLen+1 - - lda ZPRespBufPtr - clc - adc #S.TCP - sta ZPRespBufPtr - bcc .3 - - inc ZPRespBufPtr+1 + lda #"!" + >SYSCALL putchar .3 bit bResponse bmi .6 @@ -550,6 +525,10 @@ CS.RUN.RESPONSE jsr Init.TimeOut .7 >SYSCALL FWrite bcs .9 + + lda hRespBuf + stz hRespBuf + >SYSCALL FreeMem jmp CS.RUN.RESPONSE @@ -566,6 +545,33 @@ CS.RUN.RESPONSE jsr Init.TimeOut sec .9 rts *-------------------------------------- +CS.RUN.GETRESPONSE + sta hRespBuf + >SYSCALL GetMemPtr + >STYA ZPRespBufPtr + + ldy #S.IP.TOTAL.LENGTH+1 + lda (ZPRespBufPtr),y + sec + sbc #S.TCP-S.IP + sta ZPRespBufLen + + dey + + lda (ZPRespBufPtr),y + sbc /S.TCP-S.IP + sta ZPRespBufLen+1 + + lda ZPRespBufPtr + clc + adc #S.TCP + sta ZPRespBufPtr + bcc .8 + + inc ZPRespBufPtr+1 + +.8 rts +*-------------------------------------- CS.DOEVENT lda (pEvent) bpl .9 is it a TIMER event? diff --git a/BIN/IPCONFIG.S.DHCP.txt b/BIN/IPCONFIG.S.DHCP.txt index 66559862..36531275 100644 --- a/BIN/IPCONFIG.S.DHCP.txt +++ b/BIN/IPCONFIG.S.DHCP.txt @@ -322,7 +322,7 @@ CheckDHCPAck jsr CheckDHCPXID sec rts *-------------------------------------- -CS.RUN.DISCARD sta hFrame +CS.RUN.DISCARD lda hFrame >SYSCALL FreeMem rts *--------------------------------------