mirror of
https://github.com/A2osX/A2osX.git
synced 2025-01-12 01:30:36 +00:00
Kernel version 0.9 : TCP.......WORKING!!!!
This commit is contained in:
parent
8c20ced888
commit
e495429cbd
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -452,30 +452,19 @@ TCP.OUT.SendOptA
|
|||||||
|
|
||||||
TCP.OUT.SendOptA.1
|
TCP.OUT.SendOptA.1
|
||||||
ldy #S.TCP.OPTIONS
|
ldy #S.TCP.OPTIONS
|
||||||
|
ora #S.TCP.OPTIONS.ACK
|
||||||
sta (ZPFrameOutPtr),y
|
sta (ZPFrameOutPtr),y
|
||||||
|
|
||||||
and #S.TCP.OPTIONS.ACK
|
|
||||||
beq .11
|
|
||||||
|
|
||||||
ldx #3
|
ldx #3
|
||||||
ldy #S.TCP.ACKNUM+3
|
ldy #S.TCP.ACKNUM+3
|
||||||
|
|
||||||
.10 lda SKT.TCBCache+S.TCB.OUTACKNUM,x
|
.1 lda SKT.TCBCache+S.TCB.OUTACKNUM,x
|
||||||
sta (ZPFrameOutPtr),y
|
sta (ZPFrameOutPtr),y
|
||||||
dey
|
dey
|
||||||
dex
|
dex
|
||||||
bpl .10
|
bpl .1
|
||||||
bra .1
|
|
||||||
|
|
||||||
.11 ldy #S.TCP.ACKNUM
|
ldx #3
|
||||||
lda #0
|
|
||||||
|
|
||||||
.12 sta (ZPFrameOutPtr),y
|
|
||||||
iny
|
|
||||||
cpy #S.TCP.ACKNUM+4
|
|
||||||
bne .12
|
|
||||||
|
|
||||||
.1 ldx #3
|
|
||||||
ldy #S.TCP.SEQNUM+3
|
ldy #S.TCP.SEQNUM+3
|
||||||
|
|
||||||
.2 lda SKT.TCBCache+S.TCB.OUTNEXTSEQ,x
|
.2 lda SKT.TCBCache+S.TCB.OUTNEXTSEQ,x
|
||||||
|
@ -44,6 +44,7 @@ L.MSG.TCPIPERR .DA MSG.TCPIPERR
|
|||||||
L.MSG.SKTERR .DA MSG.SKTERR
|
L.MSG.SKTERR .DA MSG.SKTERR
|
||||||
L.MSG.ABORT .DA MSG.ABORT
|
L.MSG.ABORT .DA MSG.ABORT
|
||||||
L.MSG.INCOMING .DA MSG.INCOMING
|
L.MSG.INCOMING .DA MSG.INCOMING
|
||||||
|
L.HTTP.200OK .DA HTTP.200OK
|
||||||
.DA 0
|
.DA 0
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
CS.INIT >LDYA L.LIBTCPIP
|
CS.INIT >LDYA L.LIBTCPIP
|
||||||
@ -112,7 +113,7 @@ CS.RUN.INIT ldx #3
|
|||||||
|
|
||||||
beq .3
|
beq .3
|
||||||
|
|
||||||
* jsr CS.RUN.CLIENT
|
jsr CS.RUN.CLIENT
|
||||||
|
|
||||||
.3 ldy #SktIndex
|
.3 ldy #SktIndex
|
||||||
lda (pData),y
|
lda (pData),y
|
||||||
@ -160,6 +161,7 @@ CS.RUN.SERVER ldy #hSrvSocket
|
|||||||
|
|
||||||
.2 pla
|
.2 pla
|
||||||
sta (pData),y
|
sta (pData),y
|
||||||
|
sta .4+1
|
||||||
|
|
||||||
>LIBCALL hLIBTCPIP,LIBTCPIP.SKT.GetA
|
>LIBCALL hLIBTCPIP,LIBTCPIP.SKT.GetA
|
||||||
>STYA ZPSktPtr
|
>STYA ZPSktPtr
|
||||||
@ -172,12 +174,16 @@ CS.RUN.SERVER ldy #hSrvSocket
|
|||||||
dex
|
dex
|
||||||
bpl .3
|
bpl .3
|
||||||
|
|
||||||
|
.4 lda #$ff
|
||||||
|
>PUSHA
|
||||||
|
|
||||||
>LDYA L.MSG.INCOMING
|
>LDYA L.MSG.INCOMING
|
||||||
>SYSCALL CPrintFYA
|
>SYSCALL CPrintFYA
|
||||||
.8 clc
|
.8 clc
|
||||||
.9 rts
|
.9 rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
CS.RUN.CLIENT >PUSHA hSocket
|
CS.RUN.CLIENT sta hClntSocket
|
||||||
|
>PUSHA hSocket
|
||||||
>PUSHWI UsrBuf256
|
>PUSHWI UsrBuf256
|
||||||
>PUSHWI 256
|
>PUSHWI 256
|
||||||
>LIBCALL hLIBTCPIP,LIBTCPIP.SKT.GetS
|
>LIBCALL hLIBTCPIP,LIBTCPIP.SKT.GetS
|
||||||
@ -186,7 +192,10 @@ CS.RUN.CLIENT >PUSHA hSocket
|
|||||||
>LDYAI UsrBuf256
|
>LDYAI UsrBuf256
|
||||||
>SYSCALL CPrintFYA
|
>SYSCALL CPrintFYA
|
||||||
|
|
||||||
|
>PUSHB hClntSocket
|
||||||
|
>PUSHW L.HTTP.200OK
|
||||||
|
>LIBCALL hLIBTCPIP,LIBTCPIP.SKT.PutS
|
||||||
|
|
||||||
.1 clc
|
.1 clc
|
||||||
rts
|
rts
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
@ -233,13 +242,16 @@ Wait.TimeOut sec
|
|||||||
CS.END
|
CS.END
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
LIBTCPIP >PSTR "libtcpip.o"
|
LIBTCPIP >PSTR "libtcpip.o"
|
||||||
MSG.TCPWAIT >CSTR "HTTPD:Waiting for TCP/IP initializing...\n"
|
MSG.TCPWAIT >CSTR "HTTPD:Waiting for TCP/IP initializing...\r\n"
|
||||||
MSG.INITOK >CSTR "HTTPD:Init Ok, Listening.\n"
|
MSG.INITOK >CSTR "HTTPD:Init Ok, Listening.\r\n"
|
||||||
MSG.TCPIPERR >CSTR "HTTPD:TCP/IP Not initialized properly\n"
|
MSG.TCPIPERR >CSTR "HTTPD:TCP/IP Not initialized properly\r\n"
|
||||||
MSG.SKTERR >CSTR "HTTPD:Listen Error\n"
|
MSG.SKTERR >CSTR "HTTPD:Listen Error\r\n"
|
||||||
MSG.ABORT >CSTR "HTTPD:User Aborted\n"
|
MSG.ABORT >CSTR "HTTPD:User Aborted\r\n"
|
||||||
MSG.INCOMING >CSTR "HTTPD:Incoming Connection From : %d.%d.%d.%d\n"
|
MSG.INCOMING >CSTR "HTTPD:Incoming Connection [SKT=%h] From : %d.%d.%d.%d\r\n"
|
||||||
hLIBTCPIP .BS 1
|
hLIBTCPIP .BS 1
|
||||||
|
hClntSocket .BS 1
|
||||||
|
*--------------------------------------
|
||||||
|
HTTP.200OK >PSTR "HTTP/1.1 200 OK\r\n"
|
||||||
*--------------------------------------
|
*--------------------------------------
|
||||||
Socket .DA #S.SOCKET.SOCK.STREAM
|
Socket .DA #S.SOCKET.SOCK.STREAM
|
||||||
.DA #S.SOCKET.SO.ACCEPTCONN
|
.DA #S.SOCKET.SO.ACCEPTCONN
|
||||||
|
Loading…
x
Reference in New Issue
Block a user