mirror of
https://github.com/A2osX/A2osX.git
synced 2025-01-26 03:31:24 +00:00
Kernel 0.94
This commit is contained in:
parent
dc5d111cf6
commit
2b0f02c7a3
Binary file not shown.
@ -470,9 +470,11 @@ CS.RUN.RESPONSE jsr Init.TimeOut
|
||||
bcc .2
|
||||
|
||||
cmp #E.NODATA
|
||||
beq .1
|
||||
bne .8
|
||||
|
||||
lda #"."
|
||||
>SYSCALL putchar
|
||||
|
||||
lda TimeOut
|
||||
bne .1
|
||||
|
||||
@ -587,7 +589,7 @@ CS.DOEVENT lda (pEvent)
|
||||
CS.QUIT lda hSocket
|
||||
beq .1
|
||||
|
||||
>LIBCALL hLIBTCPIP,LIBTCPIP.Shutdown
|
||||
* >LIBCALL hLIBTCPIP,LIBTCPIP.Shutdown
|
||||
|
||||
.1 lda hReqBuf
|
||||
beq .2
|
||||
|
@ -331,23 +331,44 @@ SKT.shutdown pha
|
||||
|
||||
ldy #S.SOCKET.T
|
||||
lda (ZPPtrSKT),y
|
||||
cmp #S.SOCKET.T.STREAM
|
||||
beq SKT.shutdown.STREAM
|
||||
*--------------------------------------
|
||||
cmp #S.SOCKET.T.SEQPKT
|
||||
bne SKT.shutdown.DGRAM
|
||||
bcc SKT.shutdown.DGRAM
|
||||
|
||||
ldy #S.SOCKET.TCP.S
|
||||
lda (ZPPtrSKT),y
|
||||
cmp #S.SOCKET.TCP.S.TIMEWT
|
||||
bcs .7
|
||||
|
||||
pla
|
||||
pha
|
||||
|
||||
jsr SKT.shutdown.TCP
|
||||
jsr SKT.GetTCB
|
||||
ldy #S.SOCKET.TCP.S
|
||||
lda (ZPPtrSKT),y
|
||||
cmp #S.SOCKET.TCP.S.ESTBLSH
|
||||
bne .1
|
||||
|
||||
* bcs SKT.shutdown.RTS
|
||||
lda #S.TCP.OPTIONS.FIN+S.TCP.OPTIONS.ACK
|
||||
jsr TCP.OUT.SendOptA Send FIN/ACK
|
||||
bcs .9
|
||||
|
||||
lda #S.SOCKET.TCP.S.FINWT1
|
||||
jmp SKT.StoreTCB.S
|
||||
|
||||
.1 cmp #S.SOCKET.TCP.S.CLWAIT
|
||||
beq .3
|
||||
|
||||
.2 lda #S.TCP.OPTIONS.RST
|
||||
jsr TCP.OUT.SendOptA Send RST
|
||||
|
||||
.3 lda #S.SOCKET.TCP.S.TIMEWT
|
||||
jmp SKT.StoreTCB.S
|
||||
|
||||
.7 pla
|
||||
.8 clc
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
SKT.shutdown.LISTEN
|
||||
SKT.shutdown.RAW
|
||||
SKT.shutdown.DGRAM
|
||||
SKT.shutdown.SEQPKT
|
||||
.1 jsr SKT.GetFromQueue
|
||||
bcs .3
|
||||
|
||||
@ -370,35 +391,6 @@ SKT.shutdown.SEQPKT
|
||||
* clc
|
||||
SKT.shutdown.RTS
|
||||
rts
|
||||
*--------------------------------------
|
||||
SKT.shutdown.STREAM
|
||||
pla
|
||||
|
||||
SKT.shutdown.TCP
|
||||
jsr SKT.GetTCB
|
||||
ldy #S.SOCKET.TCP.S
|
||||
lda (ZPPtrSKT),y
|
||||
cmp #S.SOCKET.TCP.S.ESTBLSH
|
||||
bne .1
|
||||
|
||||
lda #S.TCP.OPTIONS.FIN+S.TCP.OPTIONS.ACK
|
||||
jsr TCP.OUT.SendOptA Send FIN/ACK
|
||||
bcs .9
|
||||
|
||||
lda #S.SOCKET.TCP.S.FINWT1
|
||||
jmp SKT.StoreTCB.S
|
||||
|
||||
.1 cmp #S.SOCKET.TCP.S.CLWAIT
|
||||
beq .3
|
||||
|
||||
.2 lda #S.TCP.OPTIONS.RST
|
||||
jsr TCP.OUT.SendOptA Send RST
|
||||
bcs .9
|
||||
|
||||
.3 lda #S.SOCKET.TCP.S.TIMEWT
|
||||
jmp SKT.StoreTCB.S
|
||||
|
||||
.9 rts
|
||||
*/--------------------------------------
|
||||
* # Read (STREAM)
|
||||
* ## C
|
||||
|
@ -400,7 +400,7 @@ TCP.SENDCLOSE ldx #0
|
||||
cmp #AF.INET
|
||||
bne .8
|
||||
|
||||
iny #S.SOCKET.T
|
||||
iny #S.SOCKET.T
|
||||
lda (ZPPtrSKT),y
|
||||
cmp #S.SOCKET.T.SEQPKT
|
||||
bcc .8
|
||||
@ -439,18 +439,21 @@ TCP.SENDCLOSE ldx #0
|
||||
bra .8
|
||||
*--------------------------------------
|
||||
.4 cpx #S.SOCKET.T.SEQPKT
|
||||
bne .5
|
||||
bne .6
|
||||
|
||||
jsr SKT.shutdown.SEQPKT
|
||||
bra .8
|
||||
.5 jsr SKT.GetFromQueue
|
||||
bcs .7
|
||||
|
||||
>SYSCALL2 FreeMem
|
||||
bra .5
|
||||
|
||||
.5 ldy #S.SOCKET.SQ.hInMem
|
||||
.6 ldy #S.SOCKET.SQ.hInMem
|
||||
jsr TCP.SENDCLOSE.PIPE
|
||||
|
||||
ldy #S.SOCKET.SQ.hOutMem
|
||||
jsr TCP.SENDCLOSE.PIPE
|
||||
|
||||
plx
|
||||
.7 plx
|
||||
phx
|
||||
lda SKT.TABLE,x
|
||||
stz SKT.TABLE,x
|
||||
|
Loading…
x
Reference in New Issue
Block a user