diff --git a/A2OSX.BOOT.po b/A2OSX.BOOT.po index 7e67d03f..7e06f7b1 100644 Binary files a/A2OSX.BOOT.po and b/A2OSX.BOOT.po differ diff --git a/A2OSX.SRC.po b/A2OSX.SRC.po index 1a10c9a0..e142948e 100644 Binary files a/A2OSX.SRC.po and b/A2OSX.SRC.po differ diff --git a/A2osX.STARTUP.txt b/A2osX.STARTUP.txt index 17ea7c96..693c3d7b 100644 --- a/A2osX.STARTUP.txt +++ b/A2osX.STARTUP.txt @@ -10,16 +10,16 @@ SET INSDRV CONSOLE.DRV STARTPROC GETTY CON SBIN/LOGIN # Serial Login -INSDRV SSC.I.DRV 9600 N 8 1 X -STARTPROC GETTY COM2 SBIN/LOGIN -INSDRV PIC.DRV +#INSDRV SSC.I.DRV 9600 N 8 1 X +#STARTPROC GETTY COM2 SBIN/LOGIN +#INSDRV PIC.DRV # Network Section -INSDRV UTHERNET.DRV 000E3A123456 -INSDRV UTHERNET2.DRV 0008DC123456 -INSDRV LANCEGS.DRV -STARTPROC TCPIP -STARTPROC DHCPCLNT -STARTPROC HTTPD +#INSDRV UTHERNET.DRV 000E3A123456 +#INSDRV UTHERNET2.DRV 0008DC123456 +#INSDRV LANCEGS.DRV +#STARTPROC TCPIP +#STARTPROC DHCPCLNT +#STARTPROC HTTPD #TELNETD #MOUNT TFTP 192.168.1.5:/A2OSX /MNT/A2OSX #MOUNT CIFS 192.168.1.5:/MSSHARE /MNT/MSSHARE diff --git a/INC/LIBTCPIP.I.txt b/INC/LIBTCPIP.I.txt index fae0be70..7df04bd1 100644 --- a/INC/LIBTCPIP.I.txt +++ b/INC/LIBTCPIP.I.txt @@ -27,14 +27,14 @@ LIBTCPIP.GET.IPCFG .EQ 6 LIBTCPIP.NEW.ICMP.FRAME .EQ 8 *LIBTCPIP.NEW.TCP.FRAME .EQ 10 -LIBTCPIP.NEW.UDP.FRAME .EQ 12 +*LIBTCPIP.NEW.UDP.FRAME .EQ 12 *LIBTCPIP.NEW.IP.FRAME .EQ 14 *LIBTCPIP.NEW.ARP.FRAME .EQ 16 *LIBTCPIP.NEW.ETH.FRAME .EQ 18 LIBTCPIP.SEND.ICMP.FRAME .EQ 20 *LIBTCPIP.SEND.TCP.FRAME .EQ 22 -LIBTCPIP.SEND.UDP.FRAME .EQ 24 +*LIBTCPIP.SEND.UDP.FRAME .EQ 24 *LIBTCPIP.SEND.IP.FRAME .EQ 26 *LIBTCPIP.SEND.ARP.FRAME .EQ 28 *LIBTCPIP.SEND.ETH.FRAME .EQ 30 @@ -80,7 +80,6 @@ ERR.ARP.ERROR .EQ $B4 ERR.DEV .EQ $B3 -ERR.DEV.TIMEOUT .EQ $B2 ERR.DEV.NOBUFFER .EQ $B1 ERR.DEV.NOFRAME .EQ $B0 *-------------------------------------- @@ -174,7 +173,8 @@ S.SOCKET.DQ.TAIL .EQ 17 S.SOCKET.DQ .EQ 18 S.SOCKET.DQ.MAX .EQ 14 14 hMem (frames) * Stream type Queue -S.SOCKET.SQ.hMem .EQ 16 +S.SOCKET.SQ.hInMem .EQ 16 +S.SOCKET.SQ.hOutMem .EQ 17 S.SOCKET.SQ.SIZE .EQ 18 S.SOCKET.SQ.HEAD .EQ 20 S.SOCKET.SQ.TAIL .EQ 22 diff --git a/LIB/LIBTCPIP.S.SKT.txt b/LIB/LIBTCPIP.S.SKT.txt index ef8634ec..3d9014b2 100644 --- a/LIB/LIBTCPIP.S.SKT.txt +++ b/LIB/LIBTCPIP.S.SKT.txt @@ -364,56 +364,6 @@ SKT.AddToQueueS .9 sec rts *-------------------------------------- -SKT.TCPSendSYNACKA - jsr SKT.GetA - - ldy #S.SOCKET.SRC.ADDR+3 - ldx #3 -.1 lda (ZPPtrSKT),y - sta TCP.MSG+S.IP.SRC,x - dey - dex - bpl .1 - - ldy #S.SOCKET.SRC.PORT - lda (ZPPtrSKT),y - sta TCP.MSG+S.TCP.SRCPORT+1 - iny - lda (ZPPtrSKT),y - sta TCP.MSG+S.TCP.SRCPORT - - ldy #S.SOCKET.DST.ADDR+3 - ldx #3 -.2 lda (ZPPtrSKT),y - sta TCP.MSG+S.IP.DST,x - dey - dex - bpl .2 - - ldy #S.SOCKET.DST.PORT - lda (ZPPtrSKT),y - sta TCP.MSG+S.TCP.DSTPORT+1 - iny - lda (ZPPtrSKT),y - sta TCP.MSG+S.TCP.DSTPORT - - ldy #S.SOCKET.SQ.SEQNUM+7 - ldx #7 -.3 lda (ZPPtrSKT),y - sta TCP.MSG+S.TCP.SEQ.NUMBER,x - dey - dex - bpl .3 - - lda #S.TCP.OPTIONS.SYN+S.TCP.OPTIONS.ACK - sta TCP.MSG+S.TCP.OPTIONS - - >PUSHW L.TCP.MSG - jsr SEND.TCP.FRAME - - clc - rts -*-------------------------------------- MAN SAVE LIB/LIBTCPIP.S.SKT LOAD LIB/LIBTCPIP.S diff --git a/LIB/LIBTCPIP.S.TCP.txt b/LIB/LIBTCPIP.S.TCP.txt index 4426b4ab..2e315737 100644 --- a/LIB/LIBTCPIP.S.TCP.txt +++ b/LIB/LIBTCPIP.S.TCP.txt @@ -118,17 +118,28 @@ TCP.IN.LISTEN.NEW jsr SKT.NEW bcs .9 - txa - ldy #S.SOCKET.PARENT - sta (ZPPtrSKT),y - jsr SKT.TCPSendSYNACKA - + phy + pha + ldy #S.SOCKET.STATUS lda #S.SOCKET.STATUS.SYNRCVD sta (ZPPtrSKT),y + txa + ldy #S.SOCKET.PARENT + sta (ZPPtrSKT),y + + pla + sta ZPPtrSKT+1 + pla + sta ZPPtrSKT + + jsr TCP.SendSYNACK + + + clc .9 rts *-------------------------------------- @@ -175,6 +186,24 @@ TCP.IN.ESTABLISHED lda #S.SOCKET.STATUS.ESTBLSH sta (ZPPtrSKT),y + >PUSHW K.TCP.WSIZE + >PUSHBI 0 + >SYSCALL SYS.GetMem + bcs * + txa + + ldy #S.SOCKET.SQ.hInMem + sta (ZPPtrSKT),y + + >PUSHW K.TCP.WSIZE + >PUSHBI 0 + >SYSCALL SYS.GetMem + bcs * + txa + + ldy #S.SOCKET.SQ.hOutMem + sta (ZPPtrSKT),y + ldy #S.SOCKET.PARENT lda (ZPPtrSKT),y jsr SKT.GetA @@ -195,6 +224,53 @@ TCP.IN.ESTABLISHED .99 clc rts *-------------------------------------- +TCP.SendSYNACK ldy #S.SOCKET.SRC.ADDR+3 + ldx #3 +.1 lda (ZPPtrSKT),y + sta TCP.MSG+S.IP.SRC,x + dey + dex + bpl .1 + + ldy #S.SOCKET.SRC.PORT + lda (ZPPtrSKT),y + sta TCP.MSG+S.TCP.SRCPORT+1 + iny + lda (ZPPtrSKT),y + sta TCP.MSG+S.TCP.SRCPORT + + ldy #S.SOCKET.DST.ADDR+3 + ldx #3 +.2 lda (ZPPtrSKT),y + sta TCP.MSG+S.IP.DST,x + dey + dex + bpl .2 + + ldy #S.SOCKET.DST.PORT + lda (ZPPtrSKT),y + sta TCP.MSG+S.TCP.DSTPORT+1 + iny + lda (ZPPtrSKT),y + sta TCP.MSG+S.TCP.DSTPORT + + ldy #S.SOCKET.SQ.SEQNUM+7 + ldx #7 +.3 lda (ZPPtrSKT),y + sta TCP.MSG+S.TCP.SEQ.NUMBER,x + dey + dex + bpl .3 + + lda #S.TCP.OPTIONS.SYN+S.TCP.OPTIONS.ACK + sta TCP.MSG+S.TCP.OPTIONS + + >PUSHW L.TCP.MSG + jsr SEND.TCP.FRAME + + clc + rts +*-------------------------------------- TCP.ComputeChecksum lda #0 RESET.TCP.CHECKSUM ldy #S.TCP.CHECKSUM