mirror of
https://github.com/A2osX/A2osX.git
synced 2024-12-29 01:33:40 +00:00
Kernel version 0.8 : DHCP, fix when multible DNS servers in options, long domain names...
This commit is contained in:
parent
67a73ae571
commit
67a4dc18db
BIN
A2OSX.BOOT.po
BIN
A2OSX.BOOT.po
Binary file not shown.
BIN
A2OSX.SRC.po
BIN
A2OSX.SRC.po
Binary file not shown.
@ -13,7 +13,7 @@ SET
|
||||
INSDRV CONSOLE.DRV
|
||||
STARTPROC GETTY CON ${A2OSX}SBIN/LOGIN
|
||||
# Serial Login
|
||||
#INSDRV SSC.I.DRV 9600 N 8 1 X
|
||||
#INSDRV SSC.DRV 9600 N 8 1 X
|
||||
#STARTPROC GETTY COM2 LOGIN
|
||||
#INSDRV PIC.DRV
|
||||
# Network Section
|
||||
@ -29,8 +29,8 @@ STARTPROC DHCPCLNT
|
||||
#CIFSMOUNT 192.168.1.5:/MSSHARE /MNT/MSSHARE
|
||||
# End Network Section
|
||||
# GUI Section
|
||||
#INSDRV DHGR.DRV
|
||||
INSDRV MOUSE.DRV
|
||||
INSDRV DHGR.DRV
|
||||
#STARTPROC DESKTOP
|
||||
# End GUI Section
|
||||
ECHO *** End A2osX Startup file ***
|
||||
|
@ -263,7 +263,7 @@ MSG2.DHCPSRVR >CSTR " DHCP Server : %d.%d.%d.%d\n"
|
||||
MSG2.IP >CSTR " IP/Mask : %d.%d.%d.%d/%d.%d.%d.%d\n"
|
||||
MSG2.GW >CSTR " Gateway : %d.%d.%d.%d\n"
|
||||
MSG2.DNS >CSTR " DNS : %d.%d.%d.%d,%d.%d.%d.%d\n"
|
||||
MSG2.HOSTNAME >CSTR " Hostname : %s.%s\n"
|
||||
MSG2.HOSTNAME >CSTR " Hostname : %S.%S\n"
|
||||
hLIBTCPIP .BS 1
|
||||
DevID .BS 1
|
||||
MAN
|
||||
|
@ -130,8 +130,8 @@ MSG.DETECT >CSTR "\nApple IIe/IIc DHGR Driver.\n"
|
||||
DEV.HEADER cld
|
||||
jmp (DRV.CS.START,x)
|
||||
.HS 00 DevID
|
||||
.DA #0 No Flag
|
||||
>PSTR "GFX" NAME
|
||||
.DA #S.DEV.F.EVENT
|
||||
>PSTR "GFX" NAME
|
||||
.HS 00 NAME must Be 5 bytes long
|
||||
.HS 00
|
||||
.HS 00.00.00.00
|
||||
@ -208,7 +208,14 @@ OPEN ldy #S.DEV.ID
|
||||
.8 clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
GETEVENT
|
||||
GETEVENT lda A2osX.ASCREEN
|
||||
cmp #3 is HGR1 screen active?
|
||||
bne .9 no....exit
|
||||
|
||||
.9 lda #0 Error = no event
|
||||
sec
|
||||
rts
|
||||
*--------------------------------------
|
||||
COUT
|
||||
IRQ sec
|
||||
rts
|
||||
|
@ -122,9 +122,10 @@ hArgs .BS 1
|
||||
*--------------------------------------
|
||||
DEV.HEADER cld
|
||||
jmp (DRV.CS.START,x)
|
||||
.HS 00 DevID
|
||||
.DA #S.DEV.F.EVENT+S.DEV.F.COUT+S.DEV.F.CHAR
|
||||
DEV.HEADER.NAME >PSTR "COM1" NAME
|
||||
.HS 00.00
|
||||
.HS 00
|
||||
.HS 00.00.00.00
|
||||
*--------------------------------------
|
||||
* Driver Code
|
||||
|
@ -157,9 +157,10 @@ hArgs .BS 1
|
||||
*--------------------------------------
|
||||
DEV.HEADER cld
|
||||
jmp (DRV.CS.START,x)
|
||||
.HS 00 DevID
|
||||
.DA #S.DEV.F.IRQ+S.DEV.F.EVENT+S.DEV.F.COUT+S.DEV.F.CHAR
|
||||
DEV.HEADER.NAME >PSTR "COM1" NAME
|
||||
.HS 00.00
|
||||
.HS 00
|
||||
.HS 00.00.00.00
|
||||
*--------------------------------------
|
||||
* Driver Code
|
||||
|
@ -105,7 +105,7 @@ S.IPCFG.GW .EQ 20
|
||||
S.IPCFG.DNS1 .EQ 24
|
||||
S.IPCFG.DNS2 .EQ 28
|
||||
S.IPCFG.HOSTNAME .EQ 32 1+15 char PSTR
|
||||
S.IPCFG.DOMAIN .EQ 48 1+35 char PSTR
|
||||
S.IPCFG.DOMAIN .EQ 48 1+79 char PSTR
|
||||
*
|
||||
S.IPCFG .EQ 128
|
||||
*--------------------------------------
|
||||
|
@ -105,18 +105,13 @@ CS.INIT >LDYA L.MSG.INIT
|
||||
CS.RUN clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.DOEVENT lda KBD
|
||||
bpl .1
|
||||
sta KBDSTROBE
|
||||
CS.DOEVENT ldy #S.EVT.hDEV
|
||||
|
||||
jsr Destop.Paint
|
||||
lda hDevMouse Mouse is active ?
|
||||
beq .1 go check KB
|
||||
|
||||
.1 lda hDevMouse Mouse is active ?
|
||||
beq .99 go check KB
|
||||
|
||||
ldy #S.EVT.hDEV
|
||||
cmp (pEvent),y Event coming from Mouse ?
|
||||
bne .1
|
||||
bne .1 go check KB
|
||||
|
||||
lda A2osX.ASCREEN GUI screen active ?
|
||||
cmp #3
|
||||
@ -148,9 +143,16 @@ CS.DOEVENT lda KBD
|
||||
>LDYA L.SetPixel.X
|
||||
ldx #DEVMGR.GFX.SETPIXEL
|
||||
jsr GoDevGFX
|
||||
|
||||
.98 clc
|
||||
.98 clc Mark event proceeded
|
||||
rts
|
||||
|
||||
.1 lda A2osX.ASCREEN GUI screen active ?
|
||||
cmp #3
|
||||
bne .99 not for us...
|
||||
|
||||
sec
|
||||
rts
|
||||
|
||||
|
||||
.99 sec
|
||||
rts
|
||||
|
@ -333,57 +333,62 @@ CheckDHCPOffer jsr CheckDHCPXID
|
||||
*--------------------------------------
|
||||
GetDHCPOption cmp #S.DHCP.OPTIONS.MASK
|
||||
bne .1
|
||||
ldy #S.IPCFG.MASK
|
||||
ldx #S.IPCFG.MASK
|
||||
bra GetDHCPOption.CopyIP
|
||||
|
||||
.1 cmp #S.DHCP.OPTIONS.GW
|
||||
bne .2
|
||||
ldy #S.IPCFG.GW
|
||||
|
||||
ldx #S.IPCFG.GW
|
||||
bra GetDHCPOption.CopyIP
|
||||
|
||||
.2 cmp #S.DHCP.OPTIONS.DNS
|
||||
bne .3
|
||||
ldy #S.IPCFG.DNS1
|
||||
|
||||
ldx #S.IPCFG.DNS1
|
||||
bra GetDHCPOption.CopyIP
|
||||
|
||||
.3 cmp #S.DHCP.OPTIONS.DOMAIN
|
||||
bne .9
|
||||
|
||||
ldy #1
|
||||
ldx #$FF
|
||||
.4 iny
|
||||
inx
|
||||
lda (ZPFramePtr),y
|
||||
sta UsrBuf256,x
|
||||
bne .4
|
||||
ldy #S.IPCFG.DOMAIN-1
|
||||
ldx #$FF
|
||||
|
||||
lda (ZPFramePtr),y Get String len
|
||||
cmp #80
|
||||
bcc .4
|
||||
lda #79
|
||||
|
||||
.4 sta IPCFG+S.IPCFG.DOMAIN store len
|
||||
tax
|
||||
|
||||
.5 iny
|
||||
inx
|
||||
lda UsrBuf256,x
|
||||
sta IPCFG,y
|
||||
lda (ZPFramePtr),y
|
||||
sta IPCFG+S.IPCFG.DOMAIN-1,y
|
||||
dex
|
||||
bne .5
|
||||
|
||||
|
||||
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
GetDHCPOption.CopyIP
|
||||
phy
|
||||
ldy #2
|
||||
ldx #0
|
||||
.1 lda (ZPFramePtr),y
|
||||
sta UsrBuf256,x
|
||||
ldy #1
|
||||
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
|
||||
iny
|
||||
inx
|
||||
cpx #4
|
||||
bne .1
|
||||
ply
|
||||
ldx #0
|
||||
.2 lda UsrBuf256,x
|
||||
sta IPCFG,y
|
||||
iny
|
||||
inx
|
||||
cpx #4
|
||||
|
||||
pla
|
||||
dec
|
||||
bne .2
|
||||
|
||||
rts
|
||||
*--------------------------------------
|
||||
CheckDHCPAck jsr CheckDHCPXID
|
||||
|
@ -421,25 +421,23 @@ Cmd.Exec.TIME clc
|
||||
>SYSCALL PStrFTime
|
||||
|
||||
>LDYAI UsrBuf256
|
||||
>SYSCALL PPrintFYA
|
||||
bcs .9
|
||||
lda #13
|
||||
>SYSCALL COutA
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
Cmd.Exec.ECHO lda ARGS
|
||||
beq Cmd.Exec.ECHO.SYN
|
||||
|
||||
beq .1
|
||||
|
||||
>LDYA L.ARGS
|
||||
>SYSCALL PPrintFYA
|
||||
clc
|
||||
rts
|
||||
bcs .9
|
||||
|
||||
Cmd.Exec.ECHO.SYN
|
||||
lda #SYSMGR.ERRSYN
|
||||
sec
|
||||
Cmd.Exec.ECHO.RTS
|
||||
rts
|
||||
.1 lda #13
|
||||
>SYSCALL COutA
|
||||
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
Cmd.Exec.READ
|
||||
clc
|
||||
|
@ -68,22 +68,29 @@ CFG.Read.HOSTNAME
|
||||
>SYSCALL GetMemPtrA
|
||||
>STYA ZPIPCfgPtr
|
||||
|
||||
lda CFG.FileLen+1
|
||||
bne .9
|
||||
ldy CFG.FileLen
|
||||
beq .9
|
||||
cpy #15
|
||||
bcs .9
|
||||
* read 15 chars MAX, until CR or EOF
|
||||
|
||||
sta IPCFG+S.IPCFG.HOSTNAME,y
|
||||
|
||||
.1 dey
|
||||
bmi .2
|
||||
lda (ZPIPCfgPtr),y
|
||||
sta IPCFG+S.IPCFG.HOSTNAME,y
|
||||
bra .1
|
||||
ldx #$15
|
||||
lda CFG.FileLen+1
|
||||
bne .1 File is more than 256....?
|
||||
|
||||
.2 jsr CFG.Read.CleanUp
|
||||
ldx CFG.FileLen
|
||||
beq .9 len is 0 !!!
|
||||
|
||||
.1 ldy #0
|
||||
|
||||
.2 lda (ZPIPCfgPtr),y
|
||||
cmp #13
|
||||
beq .8 A CR, end of name
|
||||
|
||||
iny
|
||||
sta IPCFG+S.IPCFG.HOSTNAME,y
|
||||
dex
|
||||
bne .2
|
||||
|
||||
.8 sty IPCFG+S.IPCFG.HOSTNAME
|
||||
|
||||
jsr CFG.Read.CleanUp
|
||||
clc
|
||||
rts
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user