mirror of
https://github.com/A2osX/A2osX.git
synced 2025-01-24 05:35:33 +00:00
Kernel 0.94
This commit is contained in:
parent
703f201d2d
commit
877838ef55
Binary file not shown.
Binary file not shown.
@ -5,6 +5,7 @@ NEW
|
||||
DHCP.INIT lda IPCFG+S.NETCFG.STATUS
|
||||
and #S.IPCFG.STATUS.OK
|
||||
bne .99 Already Configured, exit
|
||||
|
||||
stz IPCFG+S.NETCFG.STATUS
|
||||
|
||||
ldx #3
|
||||
@ -22,6 +23,7 @@ DHCP.INIT lda IPCFG+S.NETCFG.STATUS
|
||||
sta DHCP.REQ.CHADDR,x
|
||||
dex
|
||||
bpl .2
|
||||
|
||||
clc
|
||||
.9 rts
|
||||
|
||||
@ -91,6 +93,7 @@ DHCP.RUN.SREQ >PUSHW L.MSG.DHCP.CFG2
|
||||
inx
|
||||
cpx #4
|
||||
bne .1
|
||||
|
||||
>PUSHBI 4
|
||||
>SYSCALL PrintF
|
||||
|
||||
@ -167,6 +170,9 @@ DHCP.RUN.SKT.RECV
|
||||
cmp #E.NODATA
|
||||
bne .9
|
||||
|
||||
lda #'@'
|
||||
>SYSCALL putchar
|
||||
|
||||
lda TimeOut
|
||||
bne .1
|
||||
|
||||
@ -183,11 +189,13 @@ DHCP.QUIT lda hSocket
|
||||
beq .1
|
||||
|
||||
>LIBCALL hLIBTCPIP,LIBTCPIP.Shutdown
|
||||
|
||||
.1 clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
CheckDHCPOffer jsr CheckDHCPXID
|
||||
bcs .9
|
||||
|
||||
lda ZPFrameBase
|
||||
clc
|
||||
adc #S.DHCP.OPTIONS
|
||||
@ -199,10 +207,12 @@ CheckDHCPOffer jsr CheckDHCPXID
|
||||
lda (ZPFramePtr)
|
||||
cmp #S.DHCP.OPTIONS.MSGTYPE
|
||||
bne .9
|
||||
|
||||
ldy #2
|
||||
lda (ZPFramePtr),y
|
||||
cmp #S.DHCP.OPTIONS.DHCPOffer
|
||||
bne .9
|
||||
|
||||
* ldy #S.DHCP.YIADDR+11 Copy YIADDR,SIADDR+GIADDR
|
||||
* ldx #11
|
||||
*.1 lda (ZPFrameBase),y
|
||||
@ -210,19 +220,25 @@ CheckDHCPOffer jsr CheckDHCPXID
|
||||
* dey
|
||||
* dex
|
||||
* bpl .1
|
||||
|
||||
ldy #S.DHCP.YIADDR+3
|
||||
ldx #3
|
||||
|
||||
.2 lda (ZPFrameBase),y
|
||||
sta DHCP.REQ.OPT.REQIP,x
|
||||
sta IPCFG+S.IPCFG.IP,x
|
||||
dey
|
||||
dex
|
||||
bpl .2
|
||||
|
||||
ldy #S.DHCP.SIADDR+3
|
||||
lda (ZPFrameBase),y
|
||||
bne .3
|
||||
|
||||
ldy #S.IP.SRC+3
|
||||
|
||||
.3 ldx #3
|
||||
|
||||
.4 lda (ZPFrameBase),y
|
||||
sta IPCFG+S.IPCFG.DHCPSRVR,x
|
||||
sta DHCP.REQ.OPT.SVRIP,x
|
||||
@ -232,35 +248,47 @@ CheckDHCPOffer jsr CheckDHCPXID
|
||||
|
||||
.5 inc ZPFramePtr skip Option 53 (DHCPOffer:530102)
|
||||
bne .6
|
||||
|
||||
inc ZPFramePtr+1
|
||||
|
||||
.6 lda (ZPFramePtr)
|
||||
sec
|
||||
adc ZPFramePtr add option len + 1
|
||||
sta ZPFramePtr
|
||||
bcc .7
|
||||
|
||||
inc ZPFramePtr+1
|
||||
|
||||
.7 lda (ZPFramePtr)
|
||||
cmp #S.DHCP.OPTIONS.END
|
||||
beq .8
|
||||
|
||||
jsr GetDHCPOption May override SVRIP
|
||||
bra .5
|
||||
|
||||
.8 jsr CS.RUN.DISCARD
|
||||
clc
|
||||
rts
|
||||
|
||||
.9 jsr CS.RUN.DISCARD
|
||||
sec
|
||||
rts
|
||||
*--------------------------------------
|
||||
GetDHCPOption cmp #S.DHCP.OPTIONS.MASK
|
||||
bne .1
|
||||
|
||||
ldx #S.IPCFG.MASK
|
||||
bra GetDHCPOption.CopyIP
|
||||
|
||||
.1 cmp #S.DHCP.OPTIONS.GW
|
||||
bne .2
|
||||
|
||||
ldx #S.IPCFG.GW
|
||||
bra GetDHCPOption.CopyIP
|
||||
|
||||
.2 cmp #S.DHCP.OPTIONS.DNS
|
||||
bne .3
|
||||
|
||||
ldx #S.IPCFG.DNS1
|
||||
bra GetDHCPOption.CopyIP
|
||||
|
||||
@ -269,21 +297,29 @@ GetDHCPOption cmp #S.DHCP.OPTIONS.MASK
|
||||
|
||||
ldy #5
|
||||
ldx #3
|
||||
|
||||
.31 lda (ZPFramePtr),y
|
||||
sta DHCP.REQ.OPT.SVRIP,x
|
||||
dey
|
||||
dex
|
||||
bpl .31
|
||||
|
||||
rts
|
||||
|
||||
.4 cmp #S.DHCP.OPTIONS.DOMAIN
|
||||
bne .9
|
||||
|
||||
ldy #1
|
||||
lda (ZPFramePtr),y Get String len
|
||||
cmp #45
|
||||
bcc .6
|
||||
|
||||
lda #44
|
||||
|
||||
.6 sta IPCFG+S.IPCFG.DOMAIN store len
|
||||
|
||||
tax
|
||||
|
||||
.7 iny
|
||||
lda (ZPFramePtr),y
|
||||
sta IPCFG+S.IPCFG.DOMAIN-1,y
|
||||
@ -297,8 +333,11 @@ GetDHCPOption.CopyIP
|
||||
lda (ZPFramePtr),y Get Byte count
|
||||
cmp #9
|
||||
bcc .1
|
||||
|
||||
lda #8 max 8 bytes (2 DNS)
|
||||
|
||||
.1 iny
|
||||
|
||||
.2 pha
|
||||
lda (ZPFramePtr),y
|
||||
sta IPCFG,x
|
||||
@ -307,10 +346,12 @@ GetDHCPOption.CopyIP
|
||||
pla
|
||||
dec
|
||||
bne .2
|
||||
|
||||
rts
|
||||
*--------------------------------------
|
||||
CheckDHCPAck jsr CheckDHCPXID
|
||||
bcs .9
|
||||
|
||||
lda ZPFrameBase
|
||||
clc
|
||||
adc #S.DHCP.OPTIONS
|
||||
@ -322,13 +363,16 @@ CheckDHCPAck jsr CheckDHCPXID
|
||||
lda (ZPFramePtr)
|
||||
cmp #S.DHCP.OPTIONS.MSGTYPE
|
||||
bne .9
|
||||
|
||||
ldy #2
|
||||
lda (ZPFramePtr),y
|
||||
cmp #S.DHCP.OPTIONS.DHCPAck
|
||||
bne .9
|
||||
|
||||
jsr CS.RUN.DISCARD
|
||||
clc
|
||||
rts
|
||||
|
||||
.9 jsr CS.RUN.DISCARD
|
||||
sec
|
||||
rts
|
||||
@ -339,14 +383,18 @@ CS.RUN.DISCARD lda hFrame
|
||||
*--------------------------------------
|
||||
CheckDHCPXID ldy #S.DHCP.XID+3
|
||||
ldx #3
|
||||
|
||||
.1 lda (ZPFrameBase),y
|
||||
cmp DHCP.DISC.XID,x same XID ?
|
||||
bne .9
|
||||
|
||||
dey
|
||||
dex
|
||||
bpl .1
|
||||
|
||||
clc
|
||||
rts
|
||||
|
||||
.9 sec
|
||||
rts
|
||||
*--------------------------------------
|
||||
|
@ -13,6 +13,12 @@ IP.IN ldy #S.IP.PROTOCOL
|
||||
bne .3
|
||||
|
||||
jsr FRM.GetTargetSKT.TCPUDP
|
||||
|
||||
* lda SKT.LOC.ADDR+S.SOCKADDR.PORT
|
||||
* cmp #68
|
||||
* bne .77
|
||||
* >DEBUG
|
||||
*.77
|
||||
jsr SKT.FindMatchingLocRem
|
||||
bcs .9
|
||||
|
||||
|
@ -221,7 +221,7 @@ CS.INIT.CONF >LDYAI 64
|
||||
>SYSCALL PrintF
|
||||
|
||||
>PUSHW pBuf
|
||||
>PUSHBI S.PS.F.HOLD
|
||||
>PUSHBI 0 S.PS.F.HOLD
|
||||
>SYSCALL ExecL
|
||||
jsr CS.RUN.CheckErr
|
||||
>SLEEP
|
||||
|
Loading…
x
Reference in New Issue
Block a user