2017-12-22 21:24:30 +00:00
|
|
|
|
NEW
|
2018-11-17 17:17:13 +00:00
|
|
|
|
PREFIX
|
2017-12-22 21:24:30 +00:00
|
|
|
|
AUTO 4,1
|
2016-10-17 06:21:04 +00:00
|
|
|
|
.LIST OFF
|
|
|
|
|
*--------------------------------------
|
2019-01-14 07:11:50 +00:00
|
|
|
|
CFG.SET >PULLW ZPTmpPtr1 IPCFG
|
2018-07-26 15:26:39 +00:00
|
|
|
|
|
2019-01-16 14:37:21 +00:00
|
|
|
|
ldy #S.IPCFG-1
|
2018-07-26 15:26:39 +00:00
|
|
|
|
|
|
|
|
|
.1 lda (ZPTmpPtr1),y
|
|
|
|
|
sta IPCFG,y
|
2019-01-16 14:37:21 +00:00
|
|
|
|
dey
|
|
|
|
|
bpl .1
|
2018-07-26 15:26:39 +00:00
|
|
|
|
|
2018-08-08 15:13:37 +00:00
|
|
|
|
ldx #5
|
|
|
|
|
|
2019-01-17 15:05:48 +00:00
|
|
|
|
.2 lda IPCFG+S.NETCFG.MAC,x
|
2018-08-08 15:13:37 +00:00
|
|
|
|
sta ARP.REQ.SRCMAC,x
|
|
|
|
|
sta ARP.REQ.SHA,x
|
|
|
|
|
sta ARP.REP.SRCMAC,x
|
|
|
|
|
sta ARP.REP.SHA,x
|
|
|
|
|
dex
|
2019-01-17 15:05:48 +00:00
|
|
|
|
bpl .2
|
2018-08-08 15:13:37 +00:00
|
|
|
|
|
|
|
|
|
ldx #3
|
|
|
|
|
|
2019-01-17 15:05:48 +00:00
|
|
|
|
.3 lda IPCFG+S.IPCFG.IP,x
|
2018-10-09 15:47:06 +00:00
|
|
|
|
sta SA.LOCAL+S.SOCKADDR.ADDR,x
|
2018-08-08 15:13:37 +00:00
|
|
|
|
sta ARP.REQ.SPA,x
|
|
|
|
|
sta ARP.REP.SPA,x
|
|
|
|
|
dex
|
2019-01-17 15:05:48 +00:00
|
|
|
|
bpl .3
|
2018-08-08 15:13:37 +00:00
|
|
|
|
|
2019-01-17 15:05:48 +00:00
|
|
|
|
lda IPCFG+S.NETCFG.DevFlags
|
2018-07-26 15:26:39 +00:00
|
|
|
|
and #S.DCB.NIC.FLAGS.ARPOFFLOAD
|
2019-01-17 15:05:48 +00:00
|
|
|
|
beq .5
|
2016-10-17 06:21:04 +00:00
|
|
|
|
|
2019-01-17 15:05:48 +00:00
|
|
|
|
>LDYA L.DCB.NIC
|
|
|
|
|
>STYA IOCTL+S.IOCTL.BUFPTR
|
|
|
|
|
lda #S.IOCTL.STATCODE.GETDCB
|
|
|
|
|
sta IOCTL+S.IOCTL.STATCODE
|
|
|
|
|
|
|
|
|
|
>PUSHW L.IOCTL
|
|
|
|
|
>PUSHBI IOCTL.STATUS
|
|
|
|
|
lda IPCFG+S.NETCFG.DevID
|
|
|
|
|
>SYSCALL IOCTL
|
|
|
|
|
|
|
|
|
|
ldx #11 IP/MASK/GW
|
2018-07-23 06:28:47 +00:00
|
|
|
|
|
2019-01-17 15:05:48 +00:00
|
|
|
|
.4 lda IPCFG+S.IPCFG.IP,x
|
2018-07-23 06:28:47 +00:00
|
|
|
|
sta DCB.NIC+S.DCB.NIC.IP,x
|
|
|
|
|
dex
|
2019-01-17 15:05:48 +00:00
|
|
|
|
bpl .4
|
2018-07-23 06:28:47 +00:00
|
|
|
|
|
2018-07-26 15:26:39 +00:00
|
|
|
|
lda S.IOCTL.CTRLCODE.SETDCB
|
|
|
|
|
sta S.IOCTL.CTRLCODE
|
2018-07-23 06:28:47 +00:00
|
|
|
|
|
2018-07-26 15:26:39 +00:00
|
|
|
|
>PUSHW L.IOCTL
|
|
|
|
|
>PUSHBI IOCTL.CONTROL
|
2019-01-17 15:05:48 +00:00
|
|
|
|
lda IPCFG+S.NETCFG.DevID
|
2018-07-26 15:26:39 +00:00
|
|
|
|
>SYSCALL IOCTL
|
|
|
|
|
bcs .9
|
2016-10-17 06:21:04 +00:00
|
|
|
|
|
2019-01-17 15:05:48 +00:00
|
|
|
|
.5 lda hDNSSocket
|
|
|
|
|
beq .6
|
2018-10-10 15:39:22 +00:00
|
|
|
|
jsr SKT.Shutdown
|
2018-10-08 15:41:00 +00:00
|
|
|
|
stz hDNSSocket
|
2016-10-17 06:21:04 +00:00
|
|
|
|
|
2019-01-17 15:05:48 +00:00
|
|
|
|
.6 lda IPCFG+S.IPCFG.DNS1
|
2018-10-08 15:41:00 +00:00
|
|
|
|
beq .8
|
2018-10-09 15:47:06 +00:00
|
|
|
|
|
|
|
|
|
>PUSHBI 0 no protocol
|
2018-10-08 15:41:00 +00:00
|
|
|
|
lda #S.SOCKET.T.DGRAM
|
|
|
|
|
jsr SKT.Socket
|
2016-10-17 06:21:04 +00:00
|
|
|
|
bcs .9
|
|
|
|
|
|
2018-10-08 15:41:00 +00:00
|
|
|
|
sta hDNSSocket
|
2016-10-17 06:21:04 +00:00
|
|
|
|
|
2018-10-09 15:47:06 +00:00
|
|
|
|
stz SA.LOCAL+S.SOCKADDR.PORT
|
|
|
|
|
stz SA.LOCAL+S.SOCKADDR.PORT+1
|
|
|
|
|
|
|
|
|
|
>PUSHW L.SA.LOCAL
|
|
|
|
|
lda hDNSSocket
|
2019-01-17 15:05:48 +00:00
|
|
|
|
jmp SKT.Bind
|
2018-10-09 15:47:06 +00:00
|
|
|
|
|
2018-07-26 06:03:49 +00:00
|
|
|
|
.8 clc
|
2016-10-17 06:21:04 +00:00
|
|
|
|
.9 rts
|
|
|
|
|
*--------------------------------------
|
2019-01-14 07:11:50 +00:00
|
|
|
|
CFG.GET >LDYA L.IPCFG
|
2016-10-17 06:21:04 +00:00
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
MAN
|
2018-11-17 17:17:13 +00:00
|
|
|
|
SAVE USR/SRC/LIB/LIBTCPIP.S.CFG
|
|
|
|
|
LOAD USR/SRC/LIB/LIBTCPIP.S
|
2016-10-17 06:21:04 +00:00
|
|
|
|
ASM
|