mirror of
https://github.com/A2osX/A2osX.git
synced 2024-08-27 07:29:04 +00:00
89 lines
1.6 KiB
Plaintext
89 lines
1.6 KiB
Plaintext
NEW
|
||
AUTO 3,1
|
||
.LIST OFF
|
||
*--------------------------------------
|
||
CFG.SET >PULLW ZPTmpPtr1 IPCFG
|
||
|
||
ldy #S.IPCFG-1
|
||
|
||
.1 lda (ZPTmpPtr1),y
|
||
sta IPCFG,y
|
||
dey
|
||
bpl .1
|
||
|
||
ldx #5
|
||
|
||
.2 lda IPCFG+S.NETCFG.MAC,x
|
||
sta ARP.REQ.SRCMAC,x
|
||
sta ARP.REQ.SHA,x
|
||
sta ARP.REP.SRCMAC,x
|
||
sta ARP.REP.SHA,x
|
||
dex
|
||
bpl .2
|
||
|
||
ldx #3
|
||
|
||
.3 lda IPCFG+S.IPCFG.IP,x
|
||
sta SA.LOCAL+S.SOCKADDR.ADDR,x
|
||
sta ARP.REQ.SPA,x
|
||
sta ARP.REP.SPA,x
|
||
dex
|
||
bpl .3
|
||
|
||
lda IPCFG+S.NETCFG.DevFlags
|
||
and #S.DCB.NIC.FLAGS.ARPOFFLOAD
|
||
beq .5
|
||
|
||
>LDYA L.DCB.NIC
|
||
>STYA IOCTL+S.IOCTL.BUFPTR
|
||
|
||
lda #S.IOCTL.STATCODE.GETDCB
|
||
sta IOCTL+S.IOCTL.STATCODE
|
||
|
||
ldx #IOCTL.STATUS
|
||
jsr CFG.SET.IOCTL
|
||
bcs .9
|
||
|
||
ldx #11 IP/MASK/GW
|
||
|
||
.4 lda IPCFG+S.IPCFG.IP,x
|
||
sta DCB.NIC+S.DCB.NIC.IP,x
|
||
dex
|
||
bpl .4
|
||
|
||
lda #S.IOCTL.CTRLCODE.SETDCB
|
||
sta IOCTL+S.IOCTL.CTRLCODE
|
||
|
||
ldx #IOCTL.CONTROL
|
||
jsr CFG.SET.IOCTL
|
||
bcs .9
|
||
|
||
.5 lda IPCFG+S.IPCFG.IP no IP address yes...so no DNS socket
|
||
beq .8
|
||
|
||
stz SA.LOCAL+S.SOCKADDR.PORT
|
||
stz SA.LOCAL+S.SOCKADDR.PORT+1
|
||
|
||
>PUSHW L.SA.LOCAL
|
||
lda hDNSSocket
|
||
jmp SKT.Bind
|
||
|
||
.8 clc
|
||
.9 rts
|
||
*--------------------------------------
|
||
CFG.SET.IOCTL >PUSHB IPCFG+S.NETCFG.DevID
|
||
txa
|
||
>PUSHA
|
||
>PUSHW L.IOCTL
|
||
>SYSCALL2 IOCTL
|
||
rts
|
||
*--------------------------------------
|
||
CFG.GET >LDYA L.IPCFG
|
||
clc
|
||
rts
|
||
*--------------------------------------
|
||
MAN
|
||
SAVE usr/src/lib/libtcpip.s.cfg
|
||
LOAD usr/src/lib/libtcpip.s
|
||
ASM
|