Tidied code, standardised naming and added the protocol selection function

This commit is contained in:
John LeFebvre 2024-01-17 23:05:47 +00:00
parent c83582a68a
commit 463723ce8f

View File

@ -18,7 +18,9 @@ EV.OK .EQ $CE
EV.CANCEL .EQ $CF EV.CANCEL .EQ $CF
SCR.X1 .EQ 3 SCR.X1 .EQ 3
SCR.X2 .EQ 27 SCR.X2 .EQ 27
SCR.X3 .EQ 51 SCR.X3 .EQ 52
SCR.Y1 .EQ 1
SCR.Y2 .EQ 12
*-------------------------------------- *--------------------------------------
* Zero Page Segment, up to 32 bytes * Zero Page Segment, up to 32 bytes
*-------------------------------------- *--------------------------------------
@ -63,33 +65,32 @@ L.LIBTUI .DA LIBTUI
*-------------------------------------- *--------------------------------------
L.NETSTART .DA NETSTART L.NETSTART .DA NETSTART
L.HOSTNAME .DA HOSTNAME L.HOSTNAME .DA HOSTNAME
L.NETWORK .DA NETWORK
L.NETWORKIP .DA NETWORKIP
L.NETWORKET .DA NETWORKET
L.TCPIP.CONF .DA TCPIP.CONF L.TCPIP.CONF .DA TCPIP.CONF
L.SCRN.Title .DA SCRN.Title L.SCRN.Title .DA SCRN.Title
L.SCRN.Status .DA SCRN.Status L.SCRN.Status .DA SCRN.Status
L.SCRN.StatusSv .DA SCRN.StatusSv L.SCRN.StatusSv .DA SCRN.StatusSv
L.HOST.Label .DA HOST.Label L.HOST.Label .DA HOST.Label
L.HOST.Text .DA HOST.Text
L.IFACE.Label .DA IFACE.Label L.IFACE.Label .DA IFACE.Label
L.IFACE.List .DA IFACE.List L.IFACE.List .DA IFACE.List
L.AUTOIP.Label .DA AUTOIP.Label L.AUTOIP.Label .DA AUTOIP.Label
L.AUTOIP.List .DA AUTOIP.List L.AUTOIP.List .DA AUTOIP.List
L.PROTO.Label .DA PROTO.Label
L.LIBTCPIP.Label .DA LIBTCPIP.Label
L.LIBETALK.Label .DA LIBETALK.Label
L.SERV.Label .DA SERV.Label L.SERV.Label .DA SERV.Label
L.TELNET.Label .DA TELNET.Label L.TELNET.Label .DA TELNET.Label
L.HTTPD.Label .DA HTTPD.Label L.HTTPD.Label .DA HTTPD.Label
L.BBSD.Label .DA BBSD.Label L.BBSD.Label .DA BBSD.Label
L.MANUAL.Label .DA MANUAL.Label L.MANUAL.Label .DA MANUAL.Label
L.IPADDR.Label .DA IPADDR.Label L.IPADDR.Label .DA IPADDR.Label
L.IPADDR.Text .DA IPADDR.Text
L.MASK.Label .DA MASK.Label L.MASK.Label .DA MASK.Label
L.MASK.Text .DA MASK.Text
L.GATEWAY.Label .DA GATEWAY.Label L.GATEWAY.Label .DA GATEWAY.Label
L.GATEWAY.Text .DA GATEWAY.Text
L.NS1.Label .DA NS1.Label L.NS1.Label .DA NS1.Label
L.NS1.Text .DA NS1.Text
L.NS2.Label .DA NS2.Label L.NS2.Label .DA NS2.Label
L.NS2.Text .DA NS2.Text
L.DOM.Label .DA DOM.Label L.DOM.Label .DA DOM.Label
L.DOM.Text .DA DOM.Text
L.BUTQ.Label .DA BUTQ.Label L.BUTQ.Label .DA BUTQ.Label
L.BUTS.Label .DA BUTS.Label L.BUTS.Label .DA BUTS.Label
L.DLGS.Title .DA DLGS.Title L.DLGS.Title .DA DLGS.Title
@ -101,14 +102,20 @@ L.NS.Hdr .DA NS.Hdr
L.NS.Uth .DA NS.Uth L.NS.Uth .DA NS.Uth
L.NS.Lanc .DA NS.Lanc L.NS.Lanc .DA NS.Lanc
L.NS.U2 .DA NS.U2 L.NS.U2 .DA NS.U2
L.NS.U2ai .DA NS.U2ai L.NS.Dan2Eth .DA NS.Dan2Eth
L.NS.Udeth .DA NS.Udeth
L.NS.Udeth.D .DA NS.Udeth.D
L.NS.networkd .DA NS.networkd L.NS.networkd .DA NS.networkd
L.NS.libtcpip .DA NS.libtcpip
L.NS.libetalk .DA NS.libetalk
L.NS.amper .DA NS.amper
L.NS.telnetd .DA NS.telnetd L.NS.telnetd .DA NS.telnetd
L.NS.httpd .DA NS.httpd L.NS.httpd .DA NS.httpd
L.NS.bbsd .DA NS.bbsd L.NS.bbsd .DA NS.bbsd
L.IP.Hash .DA IP.Hash L.IP.Hash .DA IP.Hash
L.Host.Hdr .DA Host.Hdr L.Host.Hdr .DA Host.Hdr
L.CRLF .DA CRLF L.EOL .DA EOL
*L.Str.debug .DA Str.debug
L.IP.Keywords .DA IP.Keywords L.IP.Keywords .DA IP.Keywords
J.IP.Keywords .DA CS.IPR.addr J.IP.Keywords .DA CS.IPR.addr
.DA CS.IPR.mask .DA CS.IPR.mask
@ -131,29 +138,30 @@ CS.RUN >LDYA 80
>STYA ZPTmpPtr1 >STYA ZPTmpPtr1
stx hBuf1 stx hBuf1
jsr CS.HOSTR jsr CS.HOSTR Read HOSTNAME file
jsr CS.IPR jsr CS.IPR Read TCPIP.CONF file
jsr CS.File.Close CS.IPR doesn't close the file jsr CS.File.Close CS.IPR doesn't close the file
* rts debug; stop before displaying TUI
>LIBCALL hLIBTUI,LIBTUI.Init >LIBCALL hLIBTUI,LIBTUI.Init
bcs CS.RUN.RTS bcs CS.RUN.RTS
sta hCTX sta hCTX
jsr CS.SCRN.Init jsr CS.SCRN.Init
bcs CS.RUN.RTS bcs CS.RUN.RTS
jsr CS.HOSTR.Init jsr CS.HOST.INIT
bcs CS.RUN.RTS bcs CS.RUN.RTS
jsr CS.IFACE.Init jsr CS.IFACE.Init
bcs CS.RUN.RTS bcs CS.RUN.RTS
jsr CS.AUTOIP.Init jsr CS.AUTOIP.Init
bcs CS.RUN.RTS bcs CS.RUN.RTS
jsr CS.PROTO.Init
bcs CS.RUN.RTS
jsr CS.SERV.Init jsr CS.SERV.Init
bcs CS.RUN.RTS bcs CS.RUN.RTS
jsr CS.IP.Init jsr CS.IP.Init
bcs CS.RUN.RTS bcs CS.RUN.RTS
jsr CS.BUT.Init jsr CS.BUT.Init
bcs CS.RUN.RTS bcs CS.RUN.RTS
jsr CS.SCRN.Draw Will Call SCRN.Draw jsr CS.SCRN.Draw Will Call SCRN.Draw
lda hItem1 lda hItem1
>LIBCALL hLIBTUI,LIBTUI.Activate >LIBCALL hLIBTUI,LIBTUI.Activate
@ -174,7 +182,7 @@ CS.RUN.LOOP2 lda hSCRN
bne CS.RUN.LOOP2 bne CS.RUN.LOOP2
CS.RUN.QUIT lda hSCRN CS.RUN.QUIT lda hSCRN
>LIBCALL hLIBTUI,LIBTUI.Destroy >LIBCALL hLIBTUI,LIBTUI.Destroy
lda hBuf1 CS.RUN.QUIT2 lda hBuf1
>SYSCALL FreeMem >SYSCALL FreeMem
lda hLIBTUI lda hLIBTUI
>SYSCALL UnloadLib >SYSCALL UnloadLib
@ -182,34 +190,36 @@ CS.RUN.QUIT lda hSCRN
sec sec
CS.RUN.RTS rts CS.RUN.RTS rts
*-------------------------------------- *--------------------------------------
CS.HOSTR >LDYA L.HOSTNAME etc/hostname CS.HOSTR >LDYA L.HOSTNAME etc/hostname
JSR CS.File.OpenRD JSR CS.File.OpenRD
bcc CS.HOSTR.Loop bcc CS.HOSTR.Loop
rts rts
CS.HOSTR.Loop jsr CS.File.Read CS.HOSTR.Loop jsr CS.File.Read
bcs .1 bcs .1
lda (ZPTmpPtr1) lda (ZPTmpPtr1)
beq CS.HOSTR.Loop
cmp #'#' cmp #'#'
beq CS.HOSTR.Loop beq CS.HOSTR.Loop
.1 >LDYA L.HOST.Text .1 >LEA.G HOST.Buf
>STYA ZPTmpPtr4 >STYA ZPTmpPtr4
ldy #0 Copy setting to var string ldy #0 Copy setting to var string
CS.HOSTR.Loop2 lda (ZPTmpPtr1),y CS.HOSTR.Loop2 lda (ZPTmpPtr1),y
cmp #0
beq .2 beq .2
sta (ZPTmpPtr4),y sta (ZPTmpPtr4),y
iny iny
cpy #$10 cpy #$0F
bcc CS.HOSTR.Loop2 bcc CS.HOSTR.Loop2
.2 lda #0 .2 lda #0
sta (ZPTmpPtr4),y sta (ZPTmpPtr4),y
clc * clc
jmp CS.File.Close jmp CS.File.Close
*-------------------------------------- *--------------------------------------
CS.IPR >LDYA L.TCPIP.CONF etc/tcpip.conf CS.IPR >LDYA L.TCPIP.CONF etc/tcpip.conf
JSR CS.File.OpenRD JSR CS.File.OpenRD
bcc CS.IPR.Loop bcc CS.IPR.Loop
rts rts
CS.IPR.Loop jsr CS.File.Read *was READIP CS.IPR.Loop jsr CS.File.Read
bcs .8 bcs .8
.1 ldy #$ff .1 ldy #$ff
.2 iny .2 iny
@ -270,7 +280,7 @@ CS.IPR.Keyword lda ZPTmpPtr1+1 Move ptr to after keyword+space
inc ZPTmpPtr3+1 inc ZPTmpPtr3+1
.81 jmp (J.IP.Keywords,x) .81 jmp (J.IP.Keywords,x)
CS.IPR.addr >LDYA L.IPADDR.Text CS.IPR.addr >LEA.G IPADDR.Buf
>STYA ZPTmpPtr4 >STYA ZPTmpPtr4
CS.IPR.Copy ldy #0 Copy setting to correct var CS.IPR.Copy ldy #0 Copy setting to correct var
CS.IPR.Copy.L lda (ZPTmpPtr3),y CS.IPR.Copy.L lda (ZPTmpPtr3),y
@ -283,21 +293,21 @@ CS.IPR.Copy.L lda (ZPTmpPtr3),y
sta (ZPTmpPtr4),y sta (ZPTmpPtr4),y
clc clc
rts rts
CS.IPR.mask >LDYA L.MASK.Text CS.IPR.mask >LEA.G MASK.Buf
>STYA ZPTmpPtr4 >STYA ZPTmpPtr4
jmp CS.IPR.Copy jmp CS.IPR.Copy
CS.IPR.gway >LDYA L.GATEWAY.Text CS.IPR.gway >LEA.G GATEWAY.Buf
>STYA ZPTmpPtr4 >STYA ZPTmpPtr4
jmp CS.IPR.Copy jmp CS.IPR.Copy
CS.IPR.ns1 >LDYA L.NS1.Text CS.IPR.ns1 >LEA.G NS1.Buf
>STYA ZPTmpPtr4 >STYA ZPTmpPtr4
lda (ZPTmpPtr4) lda (ZPTmpPtr4)
bne CS.IPR.ns2 NS1 already populated bne CS.IPR.ns2 NS1 already populated
jmp CS.IPR.Copy jmp CS.IPR.Copy
CS.IPR.ns2 >LDYA L.NS2.Text CS.IPR.ns2 >LEA.G NS2.Buf
>STYA ZPTmpPtr4 >STYA ZPTmpPtr4
jmp CS.IPR.Copy jmp CS.IPR.Copy
CS.IPR.dom >LDYA L.DOM.Text CS.IPR.dom >LEA.G DOM.Buf
>STYA ZPTmpPtr4 >STYA ZPTmpPtr4
jsr CS.IPR.Copy jsr CS.IPR.Copy
sec last one so sec sec last one so sec
@ -361,17 +371,17 @@ CS.SCRN.Init >PUSHB hCTX hParent
>LIBCALL hLIBTUI,LIBTUI.SetProp >LIBCALL hLIBTUI,LIBTUI.SetProp
.9 rts .9 rts
*-------------------------------------- *--------------------------------------
CS.HOSTR.Init >PUSHB hSCRN hParent CS.HOST.INIT >PUSHB hSCRN hParent
>PUSHBI SCR.X1 >PUSHBI SCR.X1
>PUSHBI 2 Y1 >PUSHBI SCR.Y1
>PUSHW L.HOST.Label >PUSHW L.HOST.Label
>LIBCALL hLIBTUI,LIBTUI.NewLabel >LIBCALL hLIBTUI,LIBTUI.NewLabel
bcs .9 bcs .9
>PUSHB hSCRN hParent >PUSHB hSCRN hParent
>PUSHBI SCR.X1+9 X1 >PUSHBI SCR.X1+9
>PUSHBI 2 Y1 >PUSHBI SCR.Y1
>PUSHBI 18 W >PUSHBI 18 W
>PUSHW L.HOST.Text >PUSHEA.G HOST.Buf
>PUSHWI 15 Len >PUSHWI 15 Len
>LIBCALL hLIBTUI,LIBTUI.NewTLine >LIBCALL hLIBTUI,LIBTUI.NewTLine
sta hItem1 sta hItem1
@ -379,15 +389,13 @@ CS.HOSTR.Init >PUSHB hSCRN hParent
*-------------------------------------- *--------------------------------------
CS.IFACE.Init >PUSHB hSCRN hParent CS.IFACE.Init >PUSHB hSCRN hParent
>PUSHBI SCR.X1 >PUSHBI SCR.X1
>PUSHBI 4 Y1 >PUSHBI SCR.Y1+2
>PUSHW L.IFACE.Label >PUSHW L.IFACE.Label
>LIBCALL hLIBTUI,LIBTUI.NewLabel >LIBCALL hLIBTUI,LIBTUI.NewLabel
bcs .9 bcs .9
* lda #2
* >STA.G IFACE.Var
>PUSHB hSCRN hParent >PUSHB hSCRN hParent
>PUSHBI SCR.X1 >PUSHBI SCR.X1
>PUSHBI 5 Y1 >PUSHBI SCR.Y1+3
>PUSHBI 0 HK >PUSHBI 0 HK
>PUSHBI 0 EV >PUSHBI 0 EV
>PUSHW L.IFACE.List >PUSHW L.IFACE.List
@ -397,13 +405,13 @@ CS.IFACE.Init >PUSHB hSCRN hParent
*-------------------------------------- *--------------------------------------
CS.AUTOIP.Init >PUSHB hSCRN hParent CS.AUTOIP.Init >PUSHB hSCRN hParent
>PUSHBI SCR.X2 >PUSHBI SCR.X2
>PUSHBI 4 Y1 >PUSHBI SCR.Y1+2
>PUSHW L.AUTOIP.Label >PUSHW L.AUTOIP.Label
>LIBCALL hLIBTUI,LIBTUI.NewLabel >LIBCALL hLIBTUI,LIBTUI.NewLabel
bcs .9 bcs .9
>PUSHB hSCRN hParent >PUSHB hSCRN hParent
>PUSHBI SCR.X2 >PUSHBI SCR.X2
>PUSHBI 5 Y1 >PUSHBI SCR.Y1+3
>PUSHBI 0 HK >PUSHBI 0 HK
>PUSHBI 0 EV >PUSHBI 0 EV
>PUSHW L.AUTOIP.List >PUSHW L.AUTOIP.List
@ -411,16 +419,41 @@ CS.AUTOIP.Init >PUSHB hSCRN hParent
>LIBCALL hLIBTUI,LIBTUI.NewRadio >LIBCALL hLIBTUI,LIBTUI.NewRadio
.9 rts .9 rts
CS.PROTO.Init >PUSHB hSCRN hParent
>PUSHBI SCR.X2
>PUSHBI SCR.Y1+6
>PUSHW L.PROTO.Label
>LIBCALL hLIBTUI,LIBTUI.NewLabel
bcs .1
>PUSHB hSCRN hParent
>PUSHBI SCR.X2
>PUSHBI SCR.Y1+7
>PUSHBI 0 HK
>PUSHBI 0 EV
>PUSHW L.LIBTCPIP.Label
>PUSHEA.G LIBTCPIP.Var
>LIBCALL hLIBTUI,LIBTUI.NewCBox
.1 bcs .9
>PUSHB hSCRN hParent
>PUSHBI SCR.X2
>PUSHBI SCR.Y1+8
>PUSHBI 0 HK
>PUSHBI 0 EV
>PUSHW L.LIBETALK.Label
>PUSHEA.G LIBETALK.Var
>LIBCALL hLIBTUI,LIBTUI.NewCBox
.9 rts
CS.SERV.Init >PUSHB hSCRN hParent CS.SERV.Init >PUSHB hSCRN hParent
>PUSHBI SCR.X3 >PUSHBI SCR.X3
>PUSHBI 4 Y1 >PUSHBI SCR.Y1+2
>PUSHW L.SERV.Label >PUSHW L.SERV.Label
>LIBCALL hLIBTUI,LIBTUI.NewLabel >LIBCALL hLIBTUI,LIBTUI.NewLabel
bcc .1 bcc .1
rts rts
.1 >PUSHB hSCRN hParent .1 >PUSHB hSCRN hParent
>PUSHBI SCR.X3 >PUSHBI SCR.X3
>PUSHBI 5 Y1 >PUSHBI SCR.Y1+3
>PUSHBI 0 >PUSHBI 0
>PUSHBI 0 >PUSHBI 0
>PUSHW L.TELNET.Label >PUSHW L.TELNET.Label
@ -430,7 +463,7 @@ CS.SERV.Init >PUSHB hSCRN hParent
rts rts
.2 >PUSHB hSCRN hParent .2 >PUSHB hSCRN hParent
>PUSHBI SCR.X3 >PUSHBI SCR.X3
>PUSHBI 6 Y1 >PUSHBI SCR.Y1+4
>PUSHBI 0 >PUSHBI 0
>PUSHBI 0 >PUSHBI 0
>PUSHW L.HTTPD.Label >PUSHW L.HTTPD.Label
@ -440,7 +473,7 @@ CS.SERV.Init >PUSHB hSCRN hParent
rts rts
.3 >PUSHB hSCRN hParent .3 >PUSHB hSCRN hParent
>PUSHBI SCR.X3 >PUSHBI SCR.X3
>PUSHBI 7 Y1 >PUSHBI SCR.Y1+5
>PUSHBI 0 >PUSHBI 0
>PUSHBI 0 >PUSHBI 0
>PUSHW L.BBSD.Label >PUSHW L.BBSD.Label
@ -450,85 +483,85 @@ CS.SERV.Init >PUSHB hSCRN hParent
CS.IP.Init >PUSHB hSCRN hParent CS.IP.Init >PUSHB hSCRN hParent
>PUSHBI SCR.X1 >PUSHBI SCR.X1
>PUSHBI 11 Y1 >PUSHBI SCR.Y2
>PUSHW L.MANUAL.Label >PUSHW L.MANUAL.Label
>LIBCALL hLIBTUI,LIBTUI.NewLabel >LIBCALL hLIBTUI,LIBTUI.NewLabel
>PUSHB hSCRN hParent >PUSHB hSCRN hParent
>PUSHBI SCR.X1 >PUSHBI SCR.X1
>PUSHBI 13 Y1 >PUSHBI SCR.Y2+2
>PUSHW L.IPADDR.Label >PUSHW L.IPADDR.Label
>LIBCALL hLIBTUI,LIBTUI.NewLabel >LIBCALL hLIBTUI,LIBTUI.NewLabel
>PUSHB hSCRN hParent >PUSHB hSCRN hParent
>PUSHBI SCR.X1 >PUSHBI SCR.X1
>PUSHBI 14 Y1 >PUSHBI SCR.Y2+3
>PUSHBI 18 W >PUSHBI 18 W
>PUSHW L.IPADDR.Text >PUSHEA.G IPADDR.Buf
>PUSHWI 15 Len >PUSHWI 15 Len
>LIBCALL hLIBTUI,LIBTUI.NewTLine >LIBCALL hLIBTUI,LIBTUI.NewTLine
>PUSHB hSCRN hParent >PUSHB hSCRN hParent
>PUSHBI SCR.X2 >PUSHBI SCR.X2
>PUSHBI 13 Y1 >PUSHBI SCR.Y2+2
>PUSHW L.MASK.Label >PUSHW L.MASK.Label
>LIBCALL hLIBTUI,LIBTUI.NewLabel >LIBCALL hLIBTUI,LIBTUI.NewLabel
>PUSHB hSCRN hParent >PUSHB hSCRN hParent
>PUSHBI SCR.X2 >PUSHBI SCR.X2
>PUSHBI 14 Y1 >PUSHBI SCR.Y2+3
>PUSHBI 18 W >PUSHBI 18 W
>PUSHW L.MASK.Text >PUSHEA.G MASK.Buf
>PUSHWI 15 Len >PUSHWI 15 Len
>LIBCALL hLIBTUI,LIBTUI.NewTLine >LIBCALL hLIBTUI,LIBTUI.NewTLine
>PUSHB hSCRN hParent >PUSHB hSCRN hParent
>PUSHBI SCR.X3 >PUSHBI SCR.X3
>PUSHBI 13 Y1 >PUSHBI SCR.Y2+2
>PUSHW L.GATEWAY.Label >PUSHW L.GATEWAY.Label
>LIBCALL hLIBTUI,LIBTUI.NewLabel >LIBCALL hLIBTUI,LIBTUI.NewLabel
>PUSHB hSCRN hParent >PUSHB hSCRN hParent
>PUSHBI SCR.X3 >PUSHBI SCR.X3
>PUSHBI 14 Y1 >PUSHBI SCR.Y2+3
>PUSHBI 18 W >PUSHBI 18 W
>PUSHW L.GATEWAY.Text >PUSHEA.G GATEWAY.Buf
>PUSHWI 15 Len >PUSHWI 15 Len
>LIBCALL hLIBTUI,LIBTUI.NewTLine >LIBCALL hLIBTUI,LIBTUI.NewTLine
>PUSHB hSCRN hParent >PUSHB hSCRN hParent
>PUSHBI SCR.X1 >PUSHBI SCR.X1
>PUSHBI 16 Y1 >PUSHBI SCR.Y2+5
>PUSHW L.NS1.Label >PUSHW L.NS1.Label
>LIBCALL hLIBTUI,LIBTUI.NewLabel >LIBCALL hLIBTUI,LIBTUI.NewLabel
>PUSHB hSCRN hParent >PUSHB hSCRN hParent
>PUSHBI SCR.X1 >PUSHBI SCR.X1
>PUSHBI 17 Y1 >PUSHBI SCR.Y2+6
>PUSHBI 18 W >PUSHBI 18 W
>PUSHW L.NS1.Text >PUSHEA.G NS1.Buf
>PUSHWI 15 Len >PUSHWI 15 Len
>LIBCALL hLIBTUI,LIBTUI.NewTLine >LIBCALL hLIBTUI,LIBTUI.NewTLine
>PUSHB hSCRN hParent >PUSHB hSCRN hParent
>PUSHBI SCR.X2 >PUSHBI SCR.X2
>PUSHBI 16 Y1 >PUSHBI SCR.Y2+5
>PUSHW L.NS2.Label >PUSHW L.NS2.Label
>LIBCALL hLIBTUI,LIBTUI.NewLabel >LIBCALL hLIBTUI,LIBTUI.NewLabel
>PUSHB hSCRN hParent >PUSHB hSCRN hParent
>PUSHBI SCR.X2 >PUSHBI SCR.X2
>PUSHBI 17 Y1 >PUSHBI SCR.Y2+6
>PUSHBI 18 W >PUSHBI 18 W
>PUSHW L.NS2.Text >PUSHEA.G NS2.Buf
>PUSHWI 15 Len >PUSHWI 15 Len
>LIBCALL hLIBTUI,LIBTUI.NewTLine >LIBCALL hLIBTUI,LIBTUI.NewTLine
>PUSHB hSCRN hParent >PUSHB hSCRN hParent
>PUSHBI SCR.X3 >PUSHBI SCR.X3
>PUSHBI 16 Y1 >PUSHBI SCR.Y2+5
>PUSHW L.DOM.Label >PUSHW L.DOM.Label
>LIBCALL hLIBTUI,LIBTUI.NewLabel >LIBCALL hLIBTUI,LIBTUI.NewLabel
>PUSHB hSCRN hParent >PUSHB hSCRN hParent
>PUSHBI SCR.X3 >PUSHBI SCR.X3
>PUSHBI 17 Y1 >PUSHBI SCR.Y2+6
>PUSHBI 25 W >PUSHBI 25 W
>PUSHW L.DOM.Text >PUSHEA.G DOM.Buf
>PUSHWI 65 Len >PUSHWI 65 Len
>LIBCALL hLIBTUI,LIBTUI.NewTLine >LIBCALL hLIBTUI,LIBTUI.NewTLine
rts rts
@ -605,12 +638,13 @@ CS.DLG.Loop lda hDLGS
>PUSHBI S.OBJ.pSTATUS >PUSHBI S.OBJ.pSTATUS
>PUSHW L.SCRN.StatusSv >PUSHW L.SCRN.StatusSv
>LIBCALL hLIBTUI,LIBTUI.SetProp >LIBCALL hLIBTUI,LIBTUI.SetProp
jsr CS.IPW jsr CS.IPW write tcpip.conf
jsr CS.HOSTW jsr CS.HOSTW write hostname
jsr CS.NETW write startup system script
>LDA.G DLGS.Var >LDA.G DLGS.Var
* cmp #0 * cmp #0
beq .1 beq .1
jsr CS.SHW jsr CS.SHW write startup shell script
bra .2 bra .2
.1 cmp #EV.CANCEL .1 cmp #EV.CANCEL
bne CS.DLG.Loop bne CS.DLG.Loop
@ -633,10 +667,10 @@ CS.HOSTW >LDYA L.HOSTNAME
>PUSHW L.HOST.Hdr >PUSHW L.HOST.Hdr
>SYSCALL FPutS >SYSCALL FPutS
>PUSHB hFile >PUSHB hFile
>PUSHW L.HOST.Text >PUSHEA.G HOST.Buf
>SYSCALL FPutS >SYSCALL FPutS
>PUSHB hFile >PUSHB hFile
>PUSHW L.CRLF >PUSHW L.EOL
>SYSCALL FPutS >SYSCALL FPutS
jmp CS.File.Close jmp CS.File.Close
*-------------------------------------- *--------------------------------------
@ -653,10 +687,10 @@ CS.IPW.addr >PUSHB hFile
>PUSHW L.IPADDR.Label >PUSHW L.IPADDR.Label
>SYSCALL FPutS >SYSCALL FPutS
>PUSHB hFile >PUSHB hFile
>PUSHW L.IPADDR.Text >PUSHEA.G IPADDR.Buf
>SYSCALL FPutS >SYSCALL FPutS
>PUSHB hFile >PUSHB hFile
>PUSHW L.CRLF >PUSHW L.EOL
>SYSCALL FPutS >SYSCALL FPutS
>LDA.G AUTOIP.Var >LDA.G AUTOIP.Var
bne CS.IPW.mask bne CS.IPW.mask
@ -667,10 +701,10 @@ CS.IPW.mask >PUSHB hFile
>PUSHW L.MASK.Label >PUSHW L.MASK.Label
>SYSCALL FPutS >SYSCALL FPutS
>PUSHB hFile >PUSHB hFile
>PUSHW L.MASK.Text >PUSHEA.G MASK.Buf
>SYSCALL FPutS >SYSCALL FPutS
>PUSHB hFile >PUSHB hFile
>PUSHW L.CRLF >PUSHW L.EOL
>SYSCALL FPutS >SYSCALL FPutS
>LDA.G AUTOIP.Var >LDA.G AUTOIP.Var
bne CS.IPW.gway bne CS.IPW.gway
@ -681,10 +715,10 @@ CS.IPW.gway >PUSHB hFile
>PUSHW L.GATEWAY.Label >PUSHW L.GATEWAY.Label
>SYSCALL FPutS >SYSCALL FPutS
>PUSHB hFile >PUSHB hFile
>PUSHW L.GATEWAY.Text >PUSHEA.G GATEWAY.Buf
>SYSCALL FPutS >SYSCALL FPutS
>PUSHB hFile >PUSHB hFile
>PUSHW L.CRLF >PUSHW L.EOL
>SYSCALL FPutS >SYSCALL FPutS
>LDA.G AUTOIP.Var >LDA.G AUTOIP.Var
bne CS.IPW.ns1 bne CS.IPW.ns1
@ -695,10 +729,10 @@ CS.IPW.ns1 >PUSHB hFile
>PUSHW L.NS1.Label >PUSHW L.NS1.Label
>SYSCALL FPutS >SYSCALL FPutS
>PUSHB hFile >PUSHB hFile
>PUSHW L.NS1.Text >PUSHEA.G NS1.Buf
>SYSCALL FPutS >SYSCALL FPutS
>PUSHB hFile >PUSHB hFile
>PUSHW L.CRLF >PUSHW L.EOL
>SYSCALL FPutS >SYSCALL FPutS
>LDA.G AUTOIP.Var >LDA.G AUTOIP.Var
bne CS.IPW.ns2 bne CS.IPW.ns2
@ -709,10 +743,10 @@ CS.IPW.ns2 >PUSHB hFile
>PUSHW L.NS1.Label Must use NS1 label again >PUSHW L.NS1.Label Must use NS1 label again
>SYSCALL FPutS >SYSCALL FPutS
>PUSHB hFile >PUSHB hFile
>PUSHW L.NS2.Text >PUSHEA.G NS2.Buf
>SYSCALL FPutS >SYSCALL FPutS
>PUSHB hFile >PUSHB hFile
>PUSHW L.CRLF >PUSHW L.EOL
>SYSCALL FPutS >SYSCALL FPutS
>LDA.G AUTOIP.Var >LDA.G AUTOIP.Var
bne CS.IPW.dom bne CS.IPW.dom
@ -723,10 +757,10 @@ CS.IPW.dom >PUSHB hFile
>PUSHW L.DOM.Label >PUSHW L.DOM.Label
>SYSCALL FPutS >SYSCALL FPutS
>PUSHB hFile >PUSHB hFile
>PUSHW L.DOM.Text >PUSHEA.G DOM.Buf
>SYSCALL FPutS >SYSCALL FPutS
>PUSHB hFile >PUSHB hFile
>PUSHW L.CRLF >PUSHW L.EOL
>SYSCALL FPutS >SYSCALL FPutS
jmp CS.File.Close jmp CS.File.Close
*-------------------------------------- *--------------------------------------
@ -743,44 +777,87 @@ CS.SHW >LDYA L.Netstart Write network startup shell script
>PUSHB hFile >PUSHB hFile
>PUSHW L.NS.Uth >PUSHW L.NS.Uth
>SYSCALL FPutS >SYSCALL FPutS
bra .2 bra .3
.1 cmp #1 .1 cmp #1
bne .3 bne .2
>PUSHB hFile >PUSHB hFile
>PUSHW L.NS.Lanc >PUSHW L.NS.Lanc
>SYSCALL FPutS >SYSCALL FPutS
.2 bra CS.SHW.netd bra .3
.3 cmp #2 .2 cmp #2
bne .4 bne .4
>PUSHB hFile >PUSHB hFile
>PUSHW L.NS.U2 >PUSHW L.NS.U2
>SYSCALL FPutS >SYSCALL FPutS
bra CS.SHW.netd .3 bra CS.SHW.netd
.4 cmp #3 .4 cmp #3
bne .5
>PUSHB hFile
>PUSHW L.NS.Dan2Eth
>SYSCALL FPutS
bra CS.SHW.netd
.5 cmp #4
bne .6
>PUSHB hFile
>PUSHW L.NS.UdEth
>SYSCALL FPutS
bra CS.SHW.netd
.6 cmp #5
bne CS.SHW.netd bne CS.SHW.netd
>PUSHB hFile >PUSHB hFile
>PUSHW L.NS.U2ai >PUSHW L.NS.UdEth.D
>SYSCALL FPutS >SYSCALL FPutS
CS.SHW.netd >PUSHB hFile CS.SHW.netd >PUSHB hFile
>PUSHW L.NS.networkd >PUSHW L.NS.networkd
>SYSCALL FPutS >SYSCALL FPutS
>LDA.G LIBTCPIP.Var
beq CS.SHW.etalk
>PUSHB hFile
>PUSHW L.NS.libtcpip
>SYSCALL FPutS
CS.SHW.etalk >LDA.G LIBETALK.Var
beq CS.SHW.amper
>PUSHB hFile
>PUSHW L.NS.libetalk
>SYSCALL FPutS
cs.SHW.amper >PUSHB hFile
>PUSHW L.NS.amper
>SYSCALL FPutS
>LDA.G TELNET.Var >LDA.G TELNET.Var
bpl CS.SHW.httpd beq CS.SHW.httpd
>PUSHB hFile >PUSHB hFile
>PUSHW L.NS.telnetd >PUSHW L.NS.telnetd
>SYSCALL FPutS >SYSCALL FPutS
CS.SHW.httpd >LDA.G HTTPD.Var CS.SHW.httpd >LDA.G HTTPD.Var
bpl CS.SHW.bbsd beq CS.SHW.bbsd
>PUSHB hFile >PUSHB hFile
>PUSHW L.NS.httpd >PUSHW L.NS.httpd
>SYSCALL FPutS >SYSCALL FPutS
CS.SHW.bbsd >LDA.G BBSD.Var CS.SHW.bbsd >LDA.G BBSD.Var
bpl CS.SHW.close beq CS.SHW.close
>PUSHB hFile >PUSHB hFile
>PUSHW L.NS.bbsd >PUSHW L.NS.bbsd
>SYSCALL FPutS >SYSCALL FPutS
CS.SHW.close jmp CS.File.Close CS.SHW.close jmp CS.File.Close
.9 rts *.9 rts
*--------------------------------------
CS.NETW >LDYA L.NETWORK Write network startup system script
jsr CS.File.OpenWR
bcc .0
rts
.0 >LDA.G LIBTCPIP.Var
bpl CS.NETW.etalk
>PUSHB hFile
>PUSHW L.NETWORKIP
>SYSCALL FPutS
CS.NETW.etalk >LDA.G LIBETALK.Var
bpl .9
>PUSHB hFile
>PUSHW L.NETWORKET
>SYSCALL FPutS
.9 jmp CS.File.Close
*-------------------------------------- *--------------------------------------
CS.DOEVENT sec do not discard TIMER event CS.DOEVENT sec do not discard TIMER event
rts rts
@ -822,6 +899,9 @@ hLIBTUI .BS 1
NETSTART .AZ "${HOME}netstart" NETSTART .AZ "${HOME}netstart"
HOSTNAME .AZ "${ROOT}etc/hostname" HOSTNAME .AZ "${ROOT}etc/hostname"
TCPIP.CONF .AZ "${ROOT}etc/tcpip.conf" TCPIP.CONF .AZ "${ROOT}etc/tcpip.conf"
NETWORK .AZ "$[ROOT]etc/network"
NETWORKIP .CZ "ipconfig/r"
NETWORKET .CZ "etconfig/r"
*-------------------------------------- *--------------------------------------
IP.Keywords .PS "address" IP.Keywords .PS "address"
.PS "netmask" .PS "netmask"
@ -835,42 +915,36 @@ SCRN.Status .AZ " "
SCRN.StatusSv .AZ " Settings saved successfully" SCRN.StatusSv .AZ " Settings saved successfully"
*-------------------------------------- *--------------------------------------
HOST.Label .AZ "Hostname:" HOST.Label .AZ "Hostname:"
Host.Text .BS 15 *Host.Text .BS 16
*-------------------------------------- *--------------------------------------
IFACE.Label .AZ "Interface" IFACE.Label .AZ "Interface"
IFACE.List .AS "Uthernet" IFACE.List .CS "Uthernet\r"
.DA #C.CR .CS "LanCeGS\r"
.AS "LanceGS" .CS "Uthernet2\r"
.DA #C.CR .CS "Dan2Eth\r"
.AS "Uthernet2" .CS "UdEth\r"
.DA #C.CR .CZ "UdEth.D (DMA)"
.AS "Uther2.ai"
.DA #0
*-------------------------------------- *--------------------------------------
AUTOIP.Label .AZ "Auto or Manual IP" AUTOIP.Label .AZ "Auto or Manual IP"
AUTOIP.List .AS "Auto/DHCP" AUTOIP.List .CS "Auto/DHCP\r"
.DA #C.CR .CZ "Manual/Static"
.AZ "Manual/Static" *--------------------------------------
.DA #0 PROTO.Label .AZ "Protocol"
LIBTCPIP.Label .AZ "TCP/IP"
LIBETALK.Label .AZ "Ethertalk"
*-------------------------------------- *--------------------------------------
SERV.Label .AZ "Services" SERV.Label .AZ "Services"
TELNET.Label .AZ "telnetd" TELNET.Label .AZ "telnetd"
HTTPD.Label .AZ "httpd" HTTPD.Label .AZ "httpd"
BBSD.Label .AZ "bbsd" BBSD.Label .AZ "bbsd"
*-------------------------------------- *--------------------------------------
MANUAL.Label .AZ "MANUAL SETTINGS (Ignored for Auto/DHCP)" MANUAL.Label .AZ "MANUAL IP SETTINGS (Ignored for Auto/DHCP)"
IPADDR.Label .AZ "address " IPADDR.Label .AZ "address "
IPADDR.Text .BS 15
MASK.Label .AZ "netmask " MASK.Label .AZ "netmask "
MASK.Text .BS 16
GATEWAY.Label .AZ "gateway " GATEWAY.Label .AZ "gateway "
GATEWAY.Text .BS 16
NS1.Label .AZ "nameserver " NS1.Label .AZ "nameserver "
NS1.Text .BS 16
NS2.Label .AZ "nameserver 2" NS2.Label .AZ "nameserver 2"
NS2.Text .BS 16
DOM.Label .AZ "dnsdomain " DOM.Label .AZ "dnsdomain "
DOM.Text .BS 65
*-------------------------------------- *--------------------------------------
BUTS.Label .AZ "(^S)ave..." BUTS.Label .AZ "(^S)ave..."
BUTQ.Label .AZ "(^Q)uit" BUTQ.Label .AZ "(^Q)uit"
@ -880,30 +954,45 @@ DLGS.Label .AZ "Create NETSTART script in user home directory"
BUT.OK .AZ " OK " BUT.OK .AZ " OK "
BUT.Cancel .AZ "Cancel" BUT.Cancel .AZ "Cancel"
*-------------------------------------- *--------------------------------------
CRLF .CZ "\r\n" EOL .CZ "\r"
NS.Hdr .CZ "#!/bin/sh\r\n" NS.Hdr .CZ "#!/bin/sh\r"
NS.Uth .CZ "insdrv uthernet.drv 00:0E:3A:12:34:56\r\n" NS.Uth .CZ "insdrv uthernet.drv 00:0E:3A:12:34:56\r"
NS.Lanc .CZ "insdrv lancegs.drv 00:0E:3A:12:34:56\r\n" NS.Lanc .CZ "insdrv lancegs.drv 00:0E:3A:12:34:56\r"
NS.U2 .CZ "insdrv uthernet2.drv 00:08:DC:12:34:56\r\n" NS.U2 .CZ "insdrv uthernet2.drv 00:08:DC:12:34:56\r"
NS.U2ai .CZ "insdrv uther2.ai.drv 00:08:DC:12:34:56\r\n" NS.Dan2Eth .CZ "insdrv dan2eth.drv 00:08:DC:12:34:56\r"
NS.networkd .CZ "NOHUP networkd libtcpip &\r\n" NS.Udeth .CZ "insdrv udeth.drv 00:08:DC:12:34:56\r"
NS.telnetd .CZ "NOHUP telnetd 6502 &\r\n" NS.Udeth.D .CZ "insdrv udeth.d.drv 00:08:DC:12:34:56\r"
NS.httpd .CZ "NOHUP httpd &\r\n" NS.networkd .CZ "NOHUP networkd "
NS.bbsd .CZ "NOHUP bbsd &\r\n" NS.libtcpip .CZ "libtcpip "
*NS.debug .AZ "var=%d " NS.libetalk .CZ "libetalk "
NS.amper .CZ "&\r"
NS.telnetd .CZ "NOHUP telnetd 6502 &\r"
NS.httpd .CZ "NOHUP httpd &\r"
NS.bbsd .CZ "NOHUP bbsd &\r"
*Str.debug .AZ "var = "
IP.Hash .AZ "#" IP.Hash .AZ "#"
HOST.Hdr .CZ "# Put hostname here (max 15 characters)\r\n" HOST.Hdr .CZ "# Put hostname here (max 15 characters)\r"
*-------------------------------------- *--------------------------------------
.DUMMY .DUMMY
.OR 0 .OR 0
DS.START DS.START
SCRN.TitleBuf .BS 1
IFACE.Var .BS 1 IFACE.Var .BS 1
AUTOIP.Var .BS 1 AUTOIP.Var .BS 1
LIBTCPIP.Var .BS 1
LIBETALK.Var .BS 1
TELNET.Var .BS 1 TELNET.Var .BS 1
HTTPD.Var .BS 1 HTTPD.Var .BS 1
BBSD.Var .BS 1 BBSD.Var .BS 1
DLGS.VAR .BS 1 DLGS.Var .BS 1
HOST.Buf .BS 16
IPADDR.Buf .BS 16
MASK.Buf .BS 16
GATEWAY.Buf .BS 16
NS1.Buf .BS 16
NS2.Buf .BS 16
DOM.Buf .BS 16
SCRN.TitleBuf .BS 10
Overflow.Buf .BS 80
DS.END .ED DS.END .ED
*-------------------------------------- *--------------------------------------
MAN MAN