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
|
||||
ldy #S.TCP.OPTIONS
|
||||
ora #S.TCP.OPTIONS.ACK
|
||||
sta (ZPFrameOutPtr),y
|
||||
|
||||
and #S.TCP.OPTIONS.ACK
|
||||
beq .11
|
||||
|
||||
ldx #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
|
||||
dey
|
||||
dex
|
||||
bpl .10
|
||||
bra .1
|
||||
bpl .1
|
||||
|
||||
.11 ldy #S.TCP.ACKNUM
|
||||
lda #0
|
||||
|
||||
.12 sta (ZPFrameOutPtr),y
|
||||
iny
|
||||
cpy #S.TCP.ACKNUM+4
|
||||
bne .12
|
||||
|
||||
.1 ldx #3
|
||||
ldx #3
|
||||
ldy #S.TCP.SEQNUM+3
|
||||
|
||||
.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.ABORT .DA MSG.ABORT
|
||||
L.MSG.INCOMING .DA MSG.INCOMING
|
||||
L.HTTP.200OK .DA HTTP.200OK
|
||||
.DA 0
|
||||
*--------------------------------------
|
||||
CS.INIT >LDYA L.LIBTCPIP
|
||||
@ -112,7 +113,7 @@ CS.RUN.INIT ldx #3
|
||||
|
||||
beq .3
|
||||
|
||||
* jsr CS.RUN.CLIENT
|
||||
jsr CS.RUN.CLIENT
|
||||
|
||||
.3 ldy #SktIndex
|
||||
lda (pData),y
|
||||
@ -160,6 +161,7 @@ CS.RUN.SERVER ldy #hSrvSocket
|
||||
|
||||
.2 pla
|
||||
sta (pData),y
|
||||
sta .4+1
|
||||
|
||||
>LIBCALL hLIBTCPIP,LIBTCPIP.SKT.GetA
|
||||
>STYA ZPSktPtr
|
||||
@ -172,12 +174,16 @@ CS.RUN.SERVER ldy #hSrvSocket
|
||||
dex
|
||||
bpl .3
|
||||
|
||||
.4 lda #$ff
|
||||
>PUSHA
|
||||
|
||||
>LDYA L.MSG.INCOMING
|
||||
>SYSCALL CPrintFYA
|
||||
.8 clc
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
CS.RUN.CLIENT >PUSHA hSocket
|
||||
CS.RUN.CLIENT sta hClntSocket
|
||||
>PUSHA hSocket
|
||||
>PUSHWI UsrBuf256
|
||||
>PUSHWI 256
|
||||
>LIBCALL hLIBTCPIP,LIBTCPIP.SKT.GetS
|
||||
@ -186,6 +192,9 @@ CS.RUN.CLIENT >PUSHA hSocket
|
||||
>LDYAI UsrBuf256
|
||||
>SYSCALL CPrintFYA
|
||||
|
||||
>PUSHB hClntSocket
|
||||
>PUSHW L.HTTP.200OK
|
||||
>LIBCALL hLIBTCPIP,LIBTCPIP.SKT.PutS
|
||||
|
||||
.1 clc
|
||||
rts
|
||||
@ -233,13 +242,16 @@ Wait.TimeOut sec
|
||||
CS.END
|
||||
*--------------------------------------
|
||||
LIBTCPIP >PSTR "libtcpip.o"
|
||||
MSG.TCPWAIT >CSTR "HTTPD:Waiting for TCP/IP initializing...\n"
|
||||
MSG.INITOK >CSTR "HTTPD:Init Ok, Listening.\n"
|
||||
MSG.TCPIPERR >CSTR "HTTPD:TCP/IP Not initialized properly\n"
|
||||
MSG.SKTERR >CSTR "HTTPD:Listen Error\n"
|
||||
MSG.ABORT >CSTR "HTTPD:User Aborted\n"
|
||||
MSG.INCOMING >CSTR "HTTPD:Incoming Connection From : %d.%d.%d.%d\n"
|
||||
MSG.TCPWAIT >CSTR "HTTPD:Waiting for TCP/IP initializing...\r\n"
|
||||
MSG.INITOK >CSTR "HTTPD:Init Ok, Listening.\r\n"
|
||||
MSG.TCPIPERR >CSTR "HTTPD:TCP/IP Not initialized properly\r\n"
|
||||
MSG.SKTERR >CSTR "HTTPD:Listen Error\r\n"
|
||||
MSG.ABORT >CSTR "HTTPD:User Aborted\r\n"
|
||||
MSG.INCOMING >CSTR "HTTPD:Incoming Connection [SKT=%h] From : %d.%d.%d.%d\r\n"
|
||||
hLIBTCPIP .BS 1
|
||||
hClntSocket .BS 1
|
||||
*--------------------------------------
|
||||
HTTP.200OK >PSTR "HTTP/1.1 200 OK\r\n"
|
||||
*--------------------------------------
|
||||
Socket .DA #S.SOCKET.SOCK.STREAM
|
||||
.DA #S.SOCKET.SO.ACCEPTCONN
|
||||
|
Loading…
x
Reference in New Issue
Block a user