A2osX/BIN/ETCONFIG.S.txt

707 lines
14 KiB
Plaintext
Raw Normal View History

2019-03-11 07:01:40 +00:00
NEW
2019-05-27 06:01:59 +00:00
AUTO 3,1
2019-03-11 07:01:40 +00:00
.LIST OFF
.OP 65C02
.OR $2000
2020-05-04 20:46:21 +00:00
.TF bin/etconfig
2019-03-11 07:01:40 +00:00
*--------------------------------------
2020-08-09 19:47:42 +00:00
.INB inc/macros.i
.INB inc/a2osx.i
.INB inc/kernel.i
.INB inc/mli.i
.INB inc/mli.e.i
.INB inc/nic.i
.INB inc/eth.i
.INB inc/lib.net.i
.INB inc/libetalk.i
2019-03-11 07:01:40 +00:00
*--------------------------------------
TIMEOUT.MAX .EQ 200 20 sec.
PROBE.MAX .EQ 10
*--------------------------------------
.DUMMY
.OR ZPBIN
ZS.START
pETKCFG .BS 2
ZPFrameBase .BS 2
ZPFramePtr .BS 2
2020-05-04 20:46:21 +00:00
BufPtr .BS 2
2020-08-26 05:56:19 +00:00
2023-10-18 05:41:12 +00:00
DevID .BS 1
2020-08-26 05:56:19 +00:00
ProbeCnt .BS 1
TimeOut .BS 1
hFrame .BS 1
2023-10-18 05:41:12 +00:00
ZPPtr1 .BS 1
2019-03-11 07:01:40 +00:00
ZS.END .ED
*--------------------------------------
* File Header (16 Bytes)
*--------------------------------------
CS.START cld
jmp (.1,x)
.DA #$61 6502,Level 1 (65c02)
.DA #1 BIN Layout Version 1
.DA #S.PS.F.EVENT
.DA #0
.DA CS.END-CS.START Code Size (without Constants)
.DA DS.END-DS.START Data SegmentSize
2019-05-27 06:01:59 +00:00
.DA #64 Stack Size
2019-03-11 07:01:40 +00:00
.DA #ZS.END-ZS.START Zero Page Size
.DA 0
*--------------------------------------
* Relocation Table
2019-10-03 06:25:27 +00:00
*--------------------------------------
2019-03-11 07:01:40 +00:00
.1 .DA CS.INIT
.DA CS.RUN
.DA CS.DOEVENT
.DA CS.QUIT
L.LIBETALK .DA LIBETALK
L.MSG.USAGE .DA MSG.USAGE
L.MSG.NODEV .DA MSG.NODEV
L.MSG1.DEV .DA MSG1.DEV
L.MSG1.DEV.ARP .DA MSG1.DEV.ARP
L.MSG1.DEV.IP .DA MSG1.DEV.IP
L.MSG1.LINK.OK .DA MSG1.LINK.OK
L.MSG1.LINK.KO .DA MSG1.LINK.KO
L.MSG1.LINKSPEED .DA MSG1.LINKSPEED
L.MSG1.DPLX.FD .DA MSG1.DPLX.FD
L.MSG1.DPLX.HD .DA MSG1.DPLX.HD
L.MSG2 .DA MSG2
L.MSG2.C .DA MSG2.C
L.MSG2.U .DA MSG2.U
L.MSG2.ADDR .DA MSG2.ADDR
L.MSG2.ROUTER .DA MSG2.ROUTER
2023-10-18 05:41:12 +00:00
L.MSG2.MCAST .DA MSG2.MCAST
L.MSG2.NETRANGE .DA MSG2.NETRANGE
2019-03-11 07:01:40 +00:00
L.MSG2.OBJECT .DA MSG2.OBJECT
L.MSG.CFG .DA MSG.CFG
L.MSG.CFG.KO .DA MSG.CFG.KO
L.MSG.CFG.OK .DA MSG.CFG.OK
L.HOSTNAME .DA HOSTNAME
L.CFG.DefaultHost .DA CFG.DefaultHost
*--------------------------------------
L.MSG.PROBE .DA MSG.PROBE
L.MSG.PROBE.KO .DA MSG.PROBE.KO
L.MSG.PROBE.OK .DA MSG.PROBE.OK
L.AARP.PRB .DA AARP.PRB
2019-03-18 06:53:20 +00:00
L.DDP.GetNetInfo .DA DDP.GetNetInfo
2023-10-18 05:41:12 +00:00
L.NBP.Browse .DA NBP.Browse
2019-03-11 07:01:40 +00:00
.DA 0
*--------------------------------------
CS.INIT >LDYA L.LIBETALK
>SYSCALL LoadLib
bcs .9
2023-10-18 05:41:12 +00:00
2019-03-11 07:01:40 +00:00
sta hLIBETALK
.9 rts
*--------------------------------------
CS.RUN >LIBCALL hLIBETALK,LIBETALK.GETCFG
>STYA pETKCFG
2023-10-18 05:41:12 +00:00
ldy #S.NETCFG.DevID
lda (pETKCFG),y
2019-03-11 07:01:40 +00:00
bne CS.RUN.SETUP
2023-10-18 05:41:12 +00:00
2019-03-11 07:01:40 +00:00
>LDYA L.MSG.NODEV
2020-02-28 07:21:46 +00:00
>SYSCALL PutS
2019-03-11 07:01:40 +00:00
lda #MLI.E.NODEV
sec
rts
2020-04-07 06:01:38 +00:00
2023-10-18 05:41:12 +00:00
CS.RUN.SETUP sta DevID
lda (pETKCFG)
bmi .7
2020-05-04 20:46:21 +00:00
2023-10-18 05:41:12 +00:00
bne .1
jsr CS.RUN.EtcFiles
2020-04-07 06:01:38 +00:00
jsr CS.RUN.PROBE
2020-05-04 20:46:21 +00:00
2023-10-18 05:41:12 +00:00
.1 jsr CS.RUN.GETNETINFO
2020-05-04 20:46:21 +00:00
.7 jsr CS.RUN.DUMP
2019-03-11 07:01:40 +00:00
2023-10-18 05:41:12 +00:00
>PUSHW L.NBP.Browse
>LIBCALL hLIBETALK,LIBETALK.NBP.Lookop
2019-03-11 07:01:40 +00:00
.8 lda #0
sec
2020-04-07 06:01:38 +00:00
CS.RUN.SETUP.RTS
2019-03-11 07:01:40 +00:00
rts
*--------------------------------------
CS.RUN.DUMP >LEA.G DCB.NIC
2020-04-02 06:32:25 +00:00
ldx #S.IOCTL.S.GETDCB
jsr CS.RUN.IOCTL
bcs CS.RUN.SETUP.RTS
2019-03-11 07:01:40 +00:00
>LEA.G DIB
ldx #S.IOCTL.S.GETDIB
jsr CS.RUN.IOCTL
2020-04-07 06:01:38 +00:00
bcs CS.RUN.SETUP.RTS
2023-10-18 05:41:12 +00:00
*--------------------------------------
2020-04-07 06:01:38 +00:00
CS.RUN.DUMPNIC >PUSHW L.MSG1.DEV
2023-10-18 05:41:12 +00:00
>PUSHB DevID
2023-10-18 05:41:12 +00:00
tax
lda FDs.pLO-1,x
2019-03-11 07:01:40 +00:00
clc
adc #S.FD.DEV
tay
2023-10-18 05:41:12 +00:00
lda FDs.pHI-1,x
2019-03-11 07:01:40 +00:00
adc /S.FD.DEV
>PUSHYA
2020-04-07 06:01:38 +00:00
>PUSHEA.G DIB+S.DIB.IDS
ldy #DCB.NIC+S.DCB.NIC.MAC
ldx #6
.1 lda (pData),y
2019-03-11 07:01:40 +00:00
>PUSHA
2020-04-07 06:01:38 +00:00
iny
dex
bne .1
2019-03-11 07:01:40 +00:00
>PUSHBI 11
2020-04-07 06:01:38 +00:00
2020-02-28 07:21:46 +00:00
>SYSCALL PrintF
2020-04-07 06:01:38 +00:00
>PUSHW L.MSG1.DEV.ARP
2019-03-11 07:01:40 +00:00
>LDA.G DCB.NIC+S.DCB.NIC.FLAGS
and #S.DCB.NIC.FLAGS.ARPOFFLOAD
beq .2
2020-04-07 06:01:38 +00:00
2019-03-11 07:01:40 +00:00
lda #1
2020-04-07 06:01:38 +00:00
2019-03-11 07:01:40 +00:00
.2 >PUSHA
>PUSHBI 1
2020-04-07 06:01:38 +00:00
2020-02-28 07:21:46 +00:00
>SYSCALL PrintF
2020-04-07 06:01:38 +00:00
>PUSHW L.MSG1.DEV.IP
2019-03-11 07:01:40 +00:00
>LDA.G DCB.NIC+S.DCB.NIC.FLAGS
and #S.DCB.NIC.FLAGS.IPOFFLOAD
beq .3
lda #1
2020-04-07 06:01:38 +00:00
.3 >PUSHA
2019-03-11 07:01:40 +00:00
>PUSHBI 1
2020-04-07 06:01:38 +00:00
2020-02-28 07:21:46 +00:00
>SYSCALL PrintF
2019-03-11 07:01:40 +00:00
>LDA.G DCB.NIC+S.DCB.NIC.LINK
and #S.DCB.NIC.LINK.OK
bne CS.RUN.LINK
2023-10-18 05:41:12 +00:00
2019-03-11 07:01:40 +00:00
>LDYA L.MSG1.LINK.KO
2020-02-28 07:21:46 +00:00
>SYSCALL PutS
2023-10-18 05:41:12 +00:00
bra CS.RUN.DUMPETKCFG
*--------------------------------------
2019-03-11 07:01:40 +00:00
CS.RUN.LINK >LDYA L.MSG1.LINK.OK
2020-02-28 07:21:46 +00:00
>SYSCALL PutS
2020-04-07 06:01:38 +00:00
>PUSHW L.MSG1.LINKSPEED
2019-03-11 07:01:40 +00:00
>PUSHBI 0
2020-02-28 07:21:46 +00:00
>SYSCALL PrintF
2020-04-07 06:01:38 +00:00
2019-03-11 07:01:40 +00:00
>LDA.G DCB.NIC+S.DCB.NIC.SPEED
and #$0F
tax
2023-10-18 05:41:12 +00:00
2019-03-11 07:01:40 +00:00
.4 phx
lda #'0'
>SYSCALL PutChar
plx
dex
bne .4
2023-10-18 05:41:12 +00:00
2019-03-11 07:01:40 +00:00
>LDA.G DCB.NIC+S.DCB.NIC.LINK
and #S.DCB.NIC.LINK.FD
bne .5
2023-10-18 05:41:12 +00:00
2019-03-11 07:01:40 +00:00
>LDYA L.MSG1.DPLX.HD
bra .6
2023-10-18 05:41:12 +00:00
2019-03-11 07:01:40 +00:00
.5 >LDYA L.MSG1.DPLX.FD
2023-10-18 05:41:12 +00:00
.6 >SYSCALL PutS
*--------------------------------------
CS.RUN.DUMPETKCFG
>PUSHW L.MSG2
2020-04-07 06:01:38 +00:00
>PUSHBI 0
2020-02-28 07:21:46 +00:00
>SYSCALL PrintF
2023-10-18 05:41:12 +00:00
lda (pETKCFG)
2019-03-11 07:01:40 +00:00
beq .11
2023-10-18 05:41:12 +00:00
2019-03-11 07:01:40 +00:00
>LDYA L.MSG2.C
bra .10
2023-10-18 05:41:12 +00:00
2019-03-11 07:01:40 +00:00
.11 >LDYA L.MSG2.U
2023-10-18 05:41:12 +00:00
2020-02-28 07:21:46 +00:00
.10 >SYSCALL PutS
2019-03-11 07:01:40 +00:00
2020-04-07 06:01:38 +00:00
>PUSHW L.MSG2.ADDR
2023-10-18 05:41:12 +00:00
ldy #S.ETKCFG.NetID+1
lda (pETKCFG),y
>PUSHA
dey
lda (pETKCFG),y
>PUSHA
ldy #S.ETKCFG.NodID
lda (pETKCFG),y
>PUSHA
2019-03-11 07:01:40 +00:00
>PUSHBI 3
2020-02-28 07:21:46 +00:00
>SYSCALL PrintF
2020-04-07 06:01:38 +00:00
>PUSHW L.MSG2.ROUTER
2023-10-18 05:41:12 +00:00
ldy #S.ETKCFG.NetID+1
lda (pETKCFG),y
>PUSHA
dey
lda (pETKCFG),y
>PUSHA
ldy #S.ETKCFG.Router
lda (pETKCFG),y
>PUSHA
2019-03-11 07:01:40 +00:00
>PUSHBI 3
2020-02-28 07:21:46 +00:00
>SYSCALL PrintF
2020-04-07 06:01:38 +00:00
2023-10-18 05:41:12 +00:00
>PUSHW L.MSG2.MCAST
ldy #S.ETKCFG.MCAddress+1
.1 >PUSHB (pETKCFG),y
iny
cpy #S.ETKCFG.MCAddress+7
bcc .1
>PUSHBI 6
>SYSCALL PrintF
>PUSHW L.MSG2.NETRANGE
ldy #S.ETKCFG.NetStart+1
lda (pETKCFG),y
>PUSHA
dey
lda (pETKCFG),y
>PUSHA
ldy #S.ETKCFG.NetEnd+1
lda (pETKCFG),y
>PUSHA
dey
lda (pETKCFG),y
>PUSHA
>PUSHBI 4
>SYSCALL PrintF
2020-04-07 06:01:38 +00:00
>PUSHW L.MSG2.OBJECT
2023-10-18 05:41:12 +00:00
lda pETKCFG
clc
adc #S.ETKCFG.Object
tay
lda pETKCFG+1
adc /S.ETKCFG.Object
>PUSHYA
lda pETKCFG
clc
adc #S.ETKCFG.Zone
tay
lda pETKCFG+1
adc /S.ETKCFG.Zone
>PUSHYA
>PUSHBI 4
2020-02-28 07:21:46 +00:00
>SYSCALL PrintF
2023-10-18 05:41:12 +00:00
2019-03-11 07:01:40 +00:00
rts
*--------------------------------------
2020-04-07 06:01:38 +00:00
CS.RUN.PROBE >LDYA L.MSG.PROBE
>SYSCALL PutS
2019-03-11 07:01:40 +00:00
2023-10-18 05:41:12 +00:00
ldy #S.ETKCFG.MAC+5
2019-03-11 07:01:40 +00:00
ldx #5
2023-10-18 05:41:12 +00:00
.20 lda (pETKCFG),y
2019-03-11 07:01:40 +00:00
sta AARP.PRB.SHA,x
2023-10-18 05:41:12 +00:00
dey
2019-03-11 07:01:40 +00:00
dex
bpl .20
2020-05-04 20:46:21 +00:00
2020-08-26 05:56:19 +00:00
lda #$FF
2019-03-11 07:01:40 +00:00
sta AARP.PRB.SPA+1
sta AARP.PRB.TPA+1
2023-10-18 05:41:12 +00:00
lda #$FE
sta AARP.PRB.SPA+2
sta AARP.PRB.TPA+2
2023-11-12 13:20:15 +00:00
lda A2osX.T16
eor A2osX.T16+1
2019-03-11 07:01:40 +00:00
bne .1
2020-05-04 20:46:21 +00:00
2019-03-11 07:01:40 +00:00
inc
2023-10-18 05:41:12 +00:00
2019-03-11 07:01:40 +00:00
.1 cmp #$FE
bcc .2
eor #$80
2023-10-18 05:41:12 +00:00
2019-03-11 07:01:40 +00:00
.2 sta AARP.PRB.SPA+3
sta AARP.PRB.TPA+3
2023-10-18 05:41:12 +00:00
2019-03-11 07:01:40 +00:00
lda #PROBE.MAX
2020-08-26 05:56:19 +00:00
sta ProbeCnt
2020-05-04 20:46:21 +00:00
2019-03-11 07:01:40 +00:00
.3 >LDYA L.AARP.PRB
>STYA.G DEV.IOCTL+S.IOCTL.BUFPTR
2019-03-11 07:01:40 +00:00
>LDYAI AARP.PRB.LEN
>STYA.G DEV.IOCTL+S.IOCTL.BYTECNT
2020-04-07 06:01:38 +00:00
2023-10-18 05:41:12 +00:00
ldx #IOCTL.WRITE
jsr CS.RUN.IOCTL.X
2020-04-07 06:01:38 +00:00
2019-03-11 07:01:40 +00:00
>SLEEP
2020-08-26 05:56:19 +00:00
dec ProbeCnt
2019-05-27 06:01:59 +00:00
bne .3
2020-05-04 20:46:21 +00:00
lda AARP.PRB.SPA+2
2023-10-18 05:41:12 +00:00
ldy #S.ETKCFG.NetID
sta (pETKCFG),y
sta DDP.GetNetInfo+S.DDP2.SRC.NET+1
2020-05-04 20:46:21 +00:00
lda AARP.PRB.SPA+1
2023-10-18 05:41:12 +00:00
iny
sta (pETKCFG),y
sta DDP.GetNetInfo+S.DDP2.SRC.NET
2020-05-04 20:46:21 +00:00
lda AARP.PRB.SPA+3
2023-10-18 05:41:12 +00:00
ldy #S.ETKCFG.NodID
sta (pETKCFG),y
2020-05-04 20:46:21 +00:00
sta DDP.GetNetInfo+S.DDP2.SRC.NOD
2023-10-18 05:41:12 +00:00
lda (pETKCFG)
inc
sta (pETKCFG)
2020-05-04 20:46:21 +00:00
rts
*--------------------------------------
CS.RUN.GETNETINFO
2019-03-18 06:53:20 +00:00
>LDYA L.DDP.GetNetInfo
>STYA.G DEV.IOCTL+S.IOCTL.BUFPTR
2019-03-18 06:53:20 +00:00
>LDYAI DDP.GetNetInfo.LEN
>STYA.G DEV.IOCTL+S.IOCTL.BYTECNT
2020-04-07 06:01:38 +00:00
2023-10-18 05:41:12 +00:00
ldx #IOCTL.WRITE
jsr CS.RUN.IOCTL.X
bcs .9
2020-04-07 06:01:38 +00:00
2020-08-26 05:56:19 +00:00
lda #TIMEOUT.MAX
sta TimeOut
.1 >SLEEP
2023-10-18 05:41:12 +00:00
lda (pETKCFG)
bmi .8
2020-08-26 05:56:19 +00:00
2023-10-18 05:41:12 +00:00
dec TimeOut
bne .1
2020-08-26 05:56:19 +00:00
2023-10-18 05:41:12 +00:00
sec
2020-08-26 05:56:19 +00:00
rts
2023-10-18 05:41:12 +00:00
.8 >LDYA L.MSG.PROBE.OK
>SYSCALL PutS
.9 rts
*--------------------------------------
CS.RUN.IOCTL >STYA.G DEV.IOCTL+S.IOCTL.BUFPTR
txa
>STA.G DEV.IOCTL+S.IOCTL.S
2023-10-18 05:41:12 +00:00
ldx #IOCTL.STATUS
2023-10-18 05:41:12 +00:00
CS.RUN.IOCTL.X >PUSHB DevID
txa
>PUSHA
>PUSHEA.G DEV.IOCTL
>SYSCALL IOCTL
2019-03-11 07:01:40 +00:00
rts
*--------------------------------------
2023-10-18 05:41:12 +00:00
CS.RUN.EtcFiles >LDYAI 256
2019-03-11 07:01:40 +00:00
>SYSCALL GetMem
bcs .9
2020-04-07 06:01:38 +00:00
2020-05-04 20:46:21 +00:00
>STYA BufPtr
2019-03-11 07:01:40 +00:00
stx CFG.hBuf1
>LDYA L.HOSTNAME
jsr CFG.Read.PrintF
jsr CFG.Read.HOSTNAME
2023-10-18 05:41:12 +00:00
ldy #S.ETKCFG.Object
lda (pETKCFG),y
bne .2
2019-03-11 07:01:40 +00:00
2023-10-18 05:41:12 +00:00
lda pETKCFG
clc
adc #S.ETKCFG.Object+1
tay
lda pETKCFG+1
adc /S.ETKCFG.Object+1
2020-05-04 20:46:21 +00:00
2023-10-18 05:41:12 +00:00
>PUSHYA
2020-04-07 06:01:38 +00:00
>PUSHW L.CFG.DefaultHost
2023-11-12 13:20:15 +00:00
>PUSHW A2osX.T16
2019-03-11 07:01:40 +00:00
>PUSHBI 2
2020-08-25 14:54:30 +00:00
>SYSCALL SPrintF
2020-04-07 06:01:38 +00:00
2020-05-04 20:46:21 +00:00
lda #10
2023-10-18 05:41:12 +00:00
ldy #S.ETKCFG.Object
sta (pETKCFG),y
2020-04-07 06:01:38 +00:00
.2 lda CFG.hBuf1
2020-02-28 07:21:46 +00:00
>SYSCALL FreeMem
.9 rts
2019-03-11 07:01:40 +00:00
*--------------------------------------
2020-04-07 06:01:38 +00:00
CFG.Read.PrintF pha
>PUSHW L.MSG.CFG
pla
>PUSHYA
2019-03-11 07:01:40 +00:00
>PUSHBI 2
2020-02-28 07:21:46 +00:00
>SYSCALL PrintF
2019-03-11 07:01:40 +00:00
rts
*--------------------------------------
CFG.Read.HOSTNAME
2023-10-18 05:41:12 +00:00
lda pETKCFG
clc
adc #S.ETKCFG.Object
sta ZPPtr1
lda pETKCFG+1
adc /S.ETKCFG.Object
sta ZPPtr1+1
2019-03-11 07:01:40 +00:00
>LDYA L.HOSTNAME
jsr CFG.Read.Open
2020-04-07 06:01:38 +00:00
bcs .9
2020-05-04 20:46:21 +00:00
2019-03-11 07:01:40 +00:00
jsr CFG.Read.Result
bcs .9
2020-04-07 06:01:38 +00:00
2019-03-11 07:01:40 +00:00
.1 jsr CFG.Read.GetS
bcs .8
2020-04-07 06:01:38 +00:00
2020-05-04 20:46:21 +00:00
lda (BufPtr)
2019-03-11 07:01:40 +00:00
beq .1 empty line...
2023-10-18 05:41:12 +00:00
2019-03-11 07:01:40 +00:00
cmp #'#
beq .1 comment...
2020-04-07 06:01:38 +00:00
2019-03-11 07:01:40 +00:00
ldy #0
2020-05-04 20:46:21 +00:00
.2 lda (BufPtr),y
2019-03-11 07:01:40 +00:00
beq .8 end of name
2020-04-07 06:01:38 +00:00
2019-03-11 07:01:40 +00:00
iny
2023-10-18 05:41:12 +00:00
sta (ZPPtr1),y
2019-03-11 07:01:40 +00:00
cpy #32
bne .2
2020-04-07 06:01:38 +00:00
2023-10-18 05:41:12 +00:00
.8 tya
sta (ZPPtr1)
2020-05-04 20:46:21 +00:00
2019-03-11 07:01:40 +00:00
clc
.HS B0 BCS
.9 sec
jmp CFG.Read.Close
*--------------------------------------
CFG.Read.Result bcc .1
2023-10-18 05:41:12 +00:00
2020-04-07 06:01:38 +00:00
pha
>PUSHW L.MSG.CFG.KO
pla
2019-03-11 07:01:40 +00:00
>PUSHA
>PUSHBI 1
2020-02-28 07:21:46 +00:00
>SYSCALL PrintF
2019-03-11 07:01:40 +00:00
sec
rts
2020-04-07 06:01:38 +00:00
2019-03-11 07:01:40 +00:00
.1 >LDYA L.MSG.CFG.OK
2020-02-28 07:21:46 +00:00
>SYSCALL PutS
2019-03-11 07:01:40 +00:00
rts
*--------------------------------------
CFG.Read.Open stz CFG.hCfgFile
2020-04-07 06:01:38 +00:00
>PUSHYA
2019-03-11 07:01:40 +00:00
>PUSHBI O.RDONLY
2020-04-07 06:01:38 +00:00
>PUSHBI S.FI.T.TXT
>PUSHWZ
2020-03-09 16:24:08 +00:00
>SYSCALL FOpen
2019-03-11 07:01:40 +00:00
bcs .9
2020-04-07 06:01:38 +00:00
2019-03-11 07:01:40 +00:00
sta CFG.hCfgFile
2019-10-03 06:25:27 +00:00
* clc
.9 rts
2019-03-11 07:01:40 +00:00
*--------------------------------------
CFG.Read.Close php
pha
2019-10-03 06:25:27 +00:00
CFG.Read.Close2 lda CFG.hCfgFile
2019-03-11 07:01:40 +00:00
beq .8
2020-08-26 05:56:19 +00:00
2020-02-28 07:21:46 +00:00
>SYSCALL FClose
2020-08-26 05:56:19 +00:00
2019-03-11 07:01:40 +00:00
.8 pla
plp
rts
*--------------------------------------
2020-12-23 14:54:57 +00:00
CFG.Read.GetS >PUSHB CFG.hCfgFile
2020-05-04 20:46:21 +00:00
>PUSHW BufPtr
2020-12-23 14:54:57 +00:00
>PUSHWI 255
2020-08-25 14:54:30 +00:00
>SYSCALL FGetS
2019-03-11 07:01:40 +00:00
rts
*--------------------------------------
CS.DOEVENT lda (pEvent)
bpl .9 is it a TIMER event?
2020-08-26 05:56:19 +00:00
lda TimeOut
2019-03-11 07:01:40 +00:00
beq .9
2020-08-26 05:56:19 +00:00
dec TimeOut
2019-03-11 07:01:40 +00:00
.9 sec do not discard TIMER event
rts
*--------------------------------------
CS.QUIT lda hLIBETALK
beq .8
2023-10-18 05:41:12 +00:00
2019-03-11 07:01:40 +00:00
>SYSCALL UnloadLib
2023-10-18 05:41:12 +00:00
2019-03-11 07:01:40 +00:00
.8 clc
rts
*--------------------------------------
CS.END
2020-04-07 06:01:38 +00:00
LIBETALK .AZ "libetalk"
2019-03-11 07:01:40 +00:00
hLIBETALK .BS 1
*--------------------------------------
MSG.USAGE .CZ "Usage : ETCONFIG\r\n"
*--------------------------------------
MSG.NODEV .CZ "EtherTalk not bound to any device."
*--------------------------------------
MSG1.DEV .CS "NIC Device Configuration :\r\n"
2023-10-18 05:41:12 +00:00
.CS " Device ID : %d\r\n"
.CS " Device Name : %s\r\n"
.CS " Device Type : %S\r\n"
.CZ " HW Address : %02h:%02h:%02h:%02h:%02h:%02h\r\n"
MSG1.DEV.ARP .CZ " ARP Offload : %d\r\n"
MSG1.DEV.IP .CS " IP Offload : %d\r\n"
.CZ " Link Status : "
MSG1.LINK.OK .CZ "OK"
MSG1.LINK.KO .CZ "Media Disconnected"
MSG1.LINKSPEED .CZ " Link Speed : 1"
MSG1.DPLX.FD .CZ " Mbit/s,Full Duplex"
MSG1.DPLX.HD .CZ " Mbit/s,Half Duplex"
*--------------------------------------
MSG2 .CZ "EtherTalk Configuration : "
MSG2.C .CZ "Configured"
MSG2.U .CZ "Not Configured"
MSG2.ADDR .CZ " Network/Node : %D/%d\r\n"
MSG2.ROUTER .CZ " Router : %D/%d\r\n"
2023-10-18 05:41:12 +00:00
MSG2.MCAST .CZ " Multicast @ : %h:%h:%h:%h:%h:%h\r\n"
MSG2.NETRANGE .CZ " Netrange : %D/%D\r\n"
MSG2.OBJECT .CZ " Object.Zone : %S@%S\r\n"
*--------------------------------------
MSG.CFG .CZ "ETCONFIG:Reading %s..."
MSG.CFG.KO .CZ "Not Found. [%h]\r\n"
MSG.CFG.OK .CZ "OK."
2019-03-11 07:01:40 +00:00
*--------------------------------------
2020-04-07 06:01:38 +00:00
HOSTNAME .AZ "${ROOT}etc/hostname"
2019-03-11 07:01:40 +00:00
*--------------------------------------
CFG.DefaultHost .CZ "a2osx-%H"
2019-03-11 07:01:40 +00:00
*--------------------------------------
MSG.PROBE .CZ "ETCONFIG:Acquiring NODE..."
MSG.PROBE.KO .CZ "ETCONFIG:Time Out [%h].\r\n"
MSG.PROBE.OK .CZ "ETCONFIG:Success."
2019-03-11 07:01:40 +00:00
*--------------------------------------
CFG.hCfgFile .BS 1
CFG.hBuf1 .BS 1
*--------------------------------------
AARP.PRB .HS 090007FFFFFF S.ETH.DSTMAC
2023-10-18 05:41:12 +00:00
.BS 6
.DA /AARP.PRB.DEND-AARP.PRB.LLC
.DA #AARP.PRB.DEND-AARP.PRB.LLC
AARP.PRB.LLC
2019-03-11 07:01:40 +00:00
.HS AA S.ETH.802.2.DSTSAP
.HS AA S.ETH.802.2.SRCSAP
.HS 03 S.ETH.802.2.CTRL
2023-10-18 05:41:12 +00:00
.HS 00.00.00
.HS 80.F3 S.ETH.SNAP.PROTO
*--------------------------------------
2019-03-11 07:01:40 +00:00
.HS 00.01.80.9B.06.04
.HS 0003 Probe
AARP.PRB.SHA .BS 6
AARP.PRB.SPA .BS 4
AARP.PRB.THA .BS 6
AARP.PRB.TPA .BS 4
2023-10-18 05:41:12 +00:00
AARP.PRB.DEND .EQ *
2019-03-11 07:01:40 +00:00
.BS AARP.PRB+60-*
AARP.PRB.LEN .EQ 60
2019-03-18 06:53:20 +00:00
*--------------------------------------
DDP.GetNetInfo .HS 090007FFFFFF S.ETH.DSTMAC
.BS 6
2023-10-18 05:41:12 +00:00
.DA /DDP.GetNetInfo.DEND-DDP.GetNetInfo.LLC
.DA #DDP.GetNetInfo.DEND-DDP.GetNetInfo.LLC
2020-05-04 20:46:21 +00:00
DDP.GetNetInfo.LLC
2019-03-18 06:53:20 +00:00
.HS AA
.HS AA
.HS 03
2023-10-18 05:41:12 +00:00
.HS 08.00.07
.HS 80.9B S.ETH.SNAP.PROTO
2020-05-04 20:46:21 +00:00
*--------------------------------------
DDP.GetNetInfo.DDP
.DA #0,#DDP.GetNetInfo.DEND-DDP.GetNetInfo.DDP
2019-03-18 06:53:20 +00:00
.DA 0 S.DDP2.CHECKSUM
2020-05-04 20:46:21 +00:00
.DA 0 S.DDP2.DST.NET
.DA 0 S.DDP2.SRC.NET
.DA #$FF S.DDP2.DST.NOD
.DA #0 S.DDP2.SRC.NOD
2019-03-18 06:53:20 +00:00
.DA #6 S.DDP2.DST.SKT
2020-05-04 20:46:21 +00:00
.DA #6 S.DDP2.SRC.SKT
2019-03-18 06:53:20 +00:00
.DA #6 S.DDP2.TYPE
*--------------------------------------
2020-05-04 20:46:21 +00:00
.DA #5 ZIP.GetNetInfoReq
.HS 00
2019-03-18 06:53:20 +00:00
.HS 00.00.00.00
.HS 00 Zone Len
2020-05-04 20:46:21 +00:00
DDP.GetNetInfo.DEND .EQ *
2019-03-18 06:53:20 +00:00
.BS DDP.GetNetInfo+60-*
2019-10-03 06:25:27 +00:00
DDP.GetNetInfo.LEN .EQ 60
2019-03-11 07:01:40 +00:00
*--------------------------------------
2023-10-18 05:41:12 +00:00
NBP.Browse .PS "="
.PS "="
.PS "*"
.HS 00
*--------------------------------------
2019-03-11 07:01:40 +00:00
.DUMMY
.OR 0
DS.START
DIB .BS S.DIB
DEV.IOCTL .BS S.IOCTL
2019-03-11 07:01:40 +00:00
DCB.NIC .BS S.DCB.NIC
DS.END .ED
*--------------------------------------
MAN
2020-08-09 19:47:42 +00:00
SAVE usr/src/bin/etconfig.s
2019-03-11 07:01:40 +00:00
ASM