diff --git a/.Floppies/A2OSX.BUILD.po b/.Floppies/A2OSX.BUILD.po index 942cd0a3..e7c99521 100644 Binary files a/.Floppies/A2OSX.BUILD.po and b/.Floppies/A2OSX.BUILD.po differ diff --git a/.Floppies/A2OSX.SRC.po b/.Floppies/A2OSX.SRC.po index 49f62d20..39adefc8 100644 Binary files a/.Floppies/A2OSX.SRC.po and b/.Floppies/A2OSX.SRC.po differ diff --git a/LIB/LIBTCPIP.S.CFG.txt b/LIB/LIBTCPIP.S.CFG.txt index 558c017f..1a5e910d 100644 --- a/LIB/LIBTCPIP.S.CFG.txt +++ b/LIB/LIBTCPIP.S.CFG.txt @@ -9,8 +9,8 @@ SET.IPCFG >PULLW ZPTmpPtr1 IPCFG >LDYA L.DCB.NIC >STYA IOCTL+S.IOCTL.BUFPTR - lda S.IOCTL.STATCODE.GETDCB - sta S.IOCTL.STATCODE + lda #S.IOCTL.STATCODE.GETDCB + sta IOCTL+S.IOCTL.STATCODE ldx #IOCTL.STATUS jsr SET.IPCFG.IOCTL @@ -108,8 +108,7 @@ SET.IPCFG >PULLW ZPTmpPtr1 IPCFG stx hDNSSocket2 -.8 >LDYA ZPTmpPtr1 - clc +.8 clc .9 rts SET.IPCFG.IOCTL >PUSHW L.IOCTL diff --git a/LIB/LIBTCPIP.S.FRM.txt b/LIB/LIBTCPIP.S.FRM.txt index 23186e58..ca965e0d 100644 --- a/LIB/LIBTCPIP.S.FRM.txt +++ b/LIB/LIBTCPIP.S.FRM.txt @@ -129,11 +129,11 @@ FRM.SendIP ldx #3 Copy SRC.IP even if IP offload ldy #S.IP.TOTAL.LENGTH+1 lda ZPFrameOutLen sec - sbc #S.ETH-2 + sbc #S.ETH sta (ZPFrameOutPtr),y dey lda ZPFrameOutLen+1 - sbc /S.ETH-2 + sbc /S.ETH sta (ZPFrameOutPtr),y lda #0 diff --git a/LIB/LIBTCPIP.S.SKT.txt b/LIB/LIBTCPIP.S.SKT.txt index 3979f07b..0bb2782f 100644 --- a/LIB/LIBTCPIP.S.SKT.txt +++ b/LIB/LIBTCPIP.S.SKT.txt @@ -131,7 +131,8 @@ SKT.Close jsr SKT.Get.I get SKT in ZPPtrSKT, S.SOCKET.SOCK in A cmp #S.SOCKET.SOCK.STREAM beq .10 TCP - bcc .9 no #S.SOCKET.SOCK.DGRAM, nor #S.SOCKET.SOCK.RAW + cmp #S.SOCKET.SOCK.RAW+1 + bcs .9 no #S.SOCKET.SOCK.DGRAM, nor #S.SOCKET.SOCK.RAW .1 ldy #S.SOCKET.HQ.TAIL lda (ZPPtrSKT),y diff --git a/LIB/LIBTCPIP.S.TCP.txt b/LIB/LIBTCPIP.S.TCP.txt index 35496653..d15fa3b7 100644 --- a/LIB/LIBTCPIP.S.TCP.txt +++ b/LIB/LIBTCPIP.S.TCP.txt @@ -551,11 +551,11 @@ TCP.ComputeChecksum lda ZPFrameOutLen sec - sbc #S.IP-2 + sbc #S.IP sta ZPDataInLen lda ZPFrameOutLen+1 - sbc /S.IP-2 + sbc /S.IP sta ZPDataInLen+1 clc diff --git a/LIB/LIBTCPIP.S.UDP.txt b/LIB/LIBTCPIP.S.UDP.txt index 0c32ec4d..da41c9cd 100644 --- a/LIB/LIBTCPIP.S.UDP.txt +++ b/LIB/LIBTCPIP.S.UDP.txt @@ -87,11 +87,11 @@ UDP.ComputeChecksum lda ZPFrameOutLen sec - sbc #S.IP-2 + sbc #S.IP sta ZPDataInLen lda ZPFrameOutLen+1 - sbc /S.IP-2 + sbc /S.IP sta ZPDataInLen+1 clc diff --git a/SBIN/DHCPCLNT.S.txt b/SBIN/DHCPCLNT.S.txt index 89459429..bdc49e05 100644 --- a/SBIN/DHCPCLNT.S.txt +++ b/SBIN/DHCPCLNT.S.txt @@ -56,23 +56,25 @@ CS.INIT >LDYA L.LIBTCPIP >LIBCALL hLIBTCPIP,LIBTCPIP.GET.IPCFG bcs .9 + >STYA ZPIPCfgPtr lda (ZPIPCfgPtr) and #S.IPCFG.STATUS.OK bne .99 Already Configured, exit - + ldy #S.IPCFG.HDEV lda (ZPIPCfgPtr),y beq .98 ldy #S.IPCFG-1 + .1 lda (ZPIPCfgPtr),y sta IPCFG,y dey bne .1 - stz IPCFG + stz IPCFG+S.IPCFG.STATUS ldx #3 @@ -82,7 +84,8 @@ CS.INIT >LDYA L.LIBTCPIP dex bpl .11 - ldx #5 + ldx #5 + .2 lda IPCFG+S.IPCFG.MAC,x sta DHCP.DISC.CHADDR,x sta DHCP.REQ.CHADDR,x @@ -111,16 +114,14 @@ CS.RUN >PUSHW L.Socket jmp CS.RUN.KO .1 txa - ldy #hSocket - sta (pData),y + >STA.G hSocket >LDYA L.MSG.CFG1 >SYSCALL printf jsr Init.Timeout -CS.RUN.SDISC ldy #hSocket - >PUSHB (pData),y +CS.RUN.SDISC >PUSHB.G hSocket >PUSHW L.DHCP.DISC >PUSHWI DHCP.DISC.LEN >LIBCALL hLIBTCPIP,LIBTCPIP.SKT.Write @@ -156,8 +157,7 @@ CS.RUN.SREQ ldx #3 >LDYA L.MSG.CFG2 >SYSCALL printf - ldy #hSocket - >PUSHB (pData),y + >PUSHB.G hSocket >PUSHW L.DHCP.REQ >PUSHWI DHCP.REQ.LEN >LIBCALL hLIBTCPIP,LIBTCPIP.SKT.Write @@ -210,21 +210,15 @@ CS.RUN.KO pha sec rts *-------------------------------------- -CS.RUN.SKT.RCVD ldy #hSocket - lda (pData),y +CS.RUN.SKT.RCVD >LDA.G hSocket >LIBCALL hLIBTCPIP,LIBTCPIP.SKT.ReadFrame bcs .9 - ldy #hFrame - sta (pData),y + >STA.G hFrame + >SYSCALL GetMemPtr >STYA ZPFrameBase .9 rts *-------------------------------------- -CS.RUN.DISCARD ldy #hFrame - lda (pData),y - >SYSCALL FreeMem - rts -*-------------------------------------- CS.DOEVENT lda (pEvent) bpl .9 is it a TIMER event? @@ -238,10 +232,9 @@ CS.DOEVENT lda (pEvent) .9 sec do not discard TIMER event rts *-------------------------------------- -CS.QUIT ldy #hSocket - lda (pData),y +CS.QUIT >LDA.G hSocket beq .1 - + >LIBCALL hLIBTCPIP,LIBTCPIP.SKT.Close .1 lda hLIBTCPIP @@ -324,6 +317,10 @@ CheckDHCPOffer jsr CheckDHCPXID sec rts *-------------------------------------- +CS.RUN.DISCARD >LDA.G hFrame + >SYSCALL FreeMem + rts +*-------------------------------------- GetDHCPOption cmp #S.DHCP.OPTIONS.MASK bne .1 ldx #S.IPCFG.MASK diff --git a/SBIN/SHELL.S.CMD.txt b/SBIN/SHELL.S.CMD.txt index 298d42ea..7f012ef5 100644 --- a/SBIN/SHELL.S.CMD.txt +++ b/SBIN/SHELL.S.CMD.txt @@ -76,11 +76,11 @@ Cmd.Exec lda #0 >STA.G CMD.hFullpath * SET +X - >LDYA ZPCMDBuf - >SYSCALL puts +* >LDYA ZPCMDBuf +* >SYSCALL puts - sta $C055 - >DEBUG +* sta $C055 +* >DEBUG >LDYA ZPCMDBuf >SYSCALL ExpandStr diff --git a/SYS/KERNEL.S.CORE.txt b/SYS/KERNEL.S.CORE.txt index b561f557..db61dc5a 100644 --- a/SYS/KERNEL.S.CORE.txt +++ b/SYS/KERNEL.S.CORE.txt @@ -78,6 +78,7 @@ CORE.Run lda CORE.PSCount ldy #S.PS.PID lda (pPs),y + beq * jsr CORE.PSFree.A bra .8