mirror of
https://github.com/A2osX/A2osX.git
synced 2024-12-28 10:29:49 +00:00
Kernel 0.9.2
This commit is contained in:
parent
556c800444
commit
b026260d61
Binary file not shown.
Binary file not shown.
@ -51,12 +51,7 @@ CS.INIT >LDYA L.LIBTCPIP
|
||||
bcs .9
|
||||
sta hLIBTCPIP
|
||||
|
||||
lda (pPs)
|
||||
ora #S.PS.F.EVENT Now accept events
|
||||
sta (pPs)
|
||||
|
||||
clc
|
||||
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
CS.RUN >LIBCALL hLIBTCPIP,LIBTCPIP.GET.IPCFG is TCPIP loaded ?
|
||||
|
@ -22,7 +22,8 @@ CS.START cld
|
||||
jmp (.1,x)
|
||||
.DA #$61 6502,Level 1 (65c02)
|
||||
.DA #1 BIN Layout Version 1
|
||||
.DA 0
|
||||
.DA #S.PS.F.EVENT
|
||||
.DA #0
|
||||
.DA CS.END-CS.START Code Length To Relocate
|
||||
.DA DS.END-DS.START Data Segment to Allocate
|
||||
.DA #16 SS
|
||||
@ -67,9 +68,6 @@ CS.INIT ldy #S.PS.ARGC
|
||||
dex
|
||||
bpl .1
|
||||
|
||||
lda (pPs)
|
||||
ora #S.PS.F.EVENT Now accept events
|
||||
sta (pPs)
|
||||
clc
|
||||
rts
|
||||
|
||||
|
@ -142,7 +142,7 @@ FRM.SendIP ldx #3 Copy SRC.IP even if IP offload
|
||||
iny
|
||||
sta (ZPFrameOutPtr),y
|
||||
|
||||
stz IP.CHECKSUM RESET.IP.CHECKSUM
|
||||
stz IP.CHECKSUM RESET IP CHECKSUM
|
||||
stz IP.CHECKSUM+1
|
||||
|
||||
clc
|
||||
|
@ -19,42 +19,17 @@ IP.IN ldy #S.IP.PROTOCOL
|
||||
jsr TCP.IN TCP will NOT discard FrameIn
|
||||
|
||||
.9 lda hFrameIn
|
||||
beq .8
|
||||
>SYSCALL FreeMem
|
||||
rts
|
||||
|
||||
.8 clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
IP.ComputeICMPChecksum
|
||||
stz IP.CHECKSUM
|
||||
stz IP.CHECKSUM+1
|
||||
|
||||
lda ZPFrameOutLen
|
||||
sec
|
||||
sbc #S.ICMP.TYPE
|
||||
eor #$ff
|
||||
tax
|
||||
|
||||
lda ZPFrameOutLen+1
|
||||
sbc /S.ICMP.TYPE
|
||||
eor #$ff
|
||||
|
||||
ldy #S.ICMP.CHECKSUM
|
||||
|
||||
jmp IP.ComputeChecksum
|
||||
*--------------------------------------
|
||||
IP.ComputeUDPChecksum
|
||||
ldy #S.UDP.LENGTH
|
||||
lda (ZPFrameOutPtr),y
|
||||
clc
|
||||
|
||||
* adc /S.IP.PROTOCOL.UDP (all zero)
|
||||
sta IP.CHECKSUM
|
||||
|
||||
iny
|
||||
lda (ZPFrameOutPtr),y
|
||||
adc #S.IP.PROTOCOL.UDP
|
||||
sta IP.CHECKSUM+1
|
||||
|
||||
jsr IP.AddSrcDstIPToChecksum
|
||||
|
||||
lda ZPFrameOutLen
|
||||
sec
|
||||
sbc #S.IP
|
||||
@ -65,6 +40,37 @@ IP.ComputeUDPChecksum
|
||||
sbc /S.IP
|
||||
eor #$ff
|
||||
|
||||
ldy #S.ICMP.CHECKSUM
|
||||
|
||||
clc
|
||||
|
||||
jmp IP.ComputeChecksum
|
||||
*--------------------------------------
|
||||
IP.ComputeUDPChecksum
|
||||
clc
|
||||
|
||||
ldy #S.UDP.LENGTH+1
|
||||
lda (ZPFrameOutPtr),y
|
||||
|
||||
adc #S.IP.PROTOCOL.UDP
|
||||
sta IP.CHECKSUM+1
|
||||
|
||||
dey
|
||||
lda (ZPFrameOutPtr),y
|
||||
adc /S.IP.PROTOCOL.UDP (all zero)
|
||||
sta IP.CHECKSUM
|
||||
|
||||
jsr IP.AddSrcDstIPToChecksum
|
||||
|
||||
ldy #S.UDP.LENGTH+1
|
||||
lda (ZPFrameOutPtr),y
|
||||
eor #$ff
|
||||
tax
|
||||
|
||||
dey
|
||||
lda (ZPFrameOutPtr),y
|
||||
eor #$ff
|
||||
|
||||
ldy #S.UDP.CHECKSUM
|
||||
bra IP.ComputeChecksum
|
||||
*--------------------------------------
|
||||
@ -165,7 +171,6 @@ IP.ComputeChecksum
|
||||
*--------------------------------------
|
||||
IP.AddSrcDstIPToChecksum
|
||||
ldy #S.IP.SRC
|
||||
|
||||
ldx #4 4 words for SRC & DST IP
|
||||
|
||||
.1 lda (ZPFrameOutPtr),y
|
||||
@ -178,6 +183,7 @@ IP.AddSrcDstIPToChecksum
|
||||
iny
|
||||
dex
|
||||
bne .1
|
||||
|
||||
rts
|
||||
*--------------------------------------
|
||||
IP.FillSKT.TemplateSrcDstIPP
|
||||
|
@ -363,7 +363,7 @@ hFrameIn .BS 1
|
||||
hFrameOut .BS 1
|
||||
HST.SScanF .AZ "%d.%d.%d.%d"
|
||||
IP.ID .BS 2
|
||||
IP.CHECKSUM .BS 4
|
||||
IP.CHECKSUM .BS 2
|
||||
*--------------------------------------
|
||||
MAN
|
||||
SAVE /A2OSX.SRC/LIB/LIBTCPIP.S
|
||||
|
@ -24,7 +24,8 @@ CS.START cld
|
||||
jmp (.1,x)
|
||||
.DA #$61 6502,Level 1 (65c02)
|
||||
.DA #1 BIN Layout Version 1
|
||||
.DA 0
|
||||
.DA #S.PS.F.EVENT
|
||||
.DA #0
|
||||
.DA CS.END-CS.START CS
|
||||
.DA DS.END-DS.START DS
|
||||
.DA #64 SS
|
||||
@ -92,10 +93,6 @@ CS.INIT >LDYA L.LIBTCPIP
|
||||
dex
|
||||
bpl .2
|
||||
|
||||
lda (pPs)
|
||||
ora #S.PS.F.EVENT Now accept events
|
||||
sta (pPs)
|
||||
|
||||
clc
|
||||
.9 rts
|
||||
|
||||
@ -114,8 +111,7 @@ CS.RUN >PUSHW L.Socket
|
||||
bcc .1
|
||||
jmp CS.RUN.KO
|
||||
|
||||
.1 txa
|
||||
>STA.G hSocket
|
||||
.1 >STA.G hSocket
|
||||
|
||||
>LDYA L.MSG.CFG1
|
||||
>SYSCALL puts
|
||||
@ -125,6 +121,7 @@ CS.RUN >PUSHW L.Socket
|
||||
CS.RUN.SDISC >PUSHWI DHCP.DISC.LEN
|
||||
>PUSHW L.DHCP.DISC
|
||||
>LDA.G hSocket
|
||||
|
||||
>LIBCALL hLIBTCPIP,LIBTCPIP.SKT.Send
|
||||
bcc .1
|
||||
jmp CS.RUN.KO
|
||||
|
@ -175,7 +175,7 @@ CS.RUN >LDA.G bReadMode READ Command ?
|
||||
.10 jsr CL.RESET reset CmdBuf
|
||||
>STA.G bSecureRead Clear password mode
|
||||
|
||||
.12 jsr CL.PrintPrompt
|
||||
jsr CL.PrintPrompt
|
||||
bcs .9
|
||||
|
||||
.1 >SLEEP
|
||||
|
@ -163,10 +163,7 @@ CS.RUN.SERVER >LDA.G hSrvSocket
|
||||
>SYSCALL printf
|
||||
bcs .9
|
||||
|
||||
>PUSHW L.NOD.NAME
|
||||
>LDA.G hClientSocket
|
||||
>LIBCALL hLIBTCPIP,LIBTCPIP.SKT.MkNod
|
||||
bcs .9
|
||||
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user