2021-02-11 22:08:22 +00:00
|
|
|
|
NEW
|
|
|
|
|
AUTO 3,1
|
|
|
|
|
.LIST OFF
|
|
|
|
|
.OP 65C02
|
|
|
|
|
.OR $2000
|
|
|
|
|
.TF drv/pppssc.drv
|
2021-09-07 12:32:31 +00:00
|
|
|
|
*--------------------------------------
|
2021-12-02 21:28:26 +00:00
|
|
|
|
DBG .EQ 1
|
|
|
|
|
HWFC .EQ 0
|
|
|
|
|
SWFC .EQ 1
|
|
|
|
|
INBUF.SIZE .EQ 2048
|
2021-02-11 22:08:22 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
.INB inc/macros.i
|
|
|
|
|
.INB inc/a2osx.i
|
2021-09-07 12:32:31 +00:00
|
|
|
|
.INB inc/kernel.i
|
2021-02-11 22:08:22 +00:00
|
|
|
|
.INB inc/mli.e.i
|
|
|
|
|
.INB inc/com.i
|
|
|
|
|
.INB inc/com.6551.i
|
|
|
|
|
.INB inc/nic.i
|
2021-09-07 12:32:31 +00:00
|
|
|
|
.INB inc/eth.i
|
2022-11-02 06:54:30 +00:00
|
|
|
|
.INB inc/net.tcpip.i
|
2021-09-07 12:32:31 +00:00
|
|
|
|
.INB inc/libtcpip.i
|
2021-02-11 22:08:22 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
.DUMMY
|
|
|
|
|
.OR ZPBIN
|
|
|
|
|
ZS.START
|
|
|
|
|
ZPArgsPtr .BS 2
|
|
|
|
|
ZPPtr1 .BS 2
|
|
|
|
|
ZPPtr2 .BS 2
|
2021-09-07 12:32:31 +00:00
|
|
|
|
ZPPtr3 .BS 2
|
|
|
|
|
|
2021-02-11 22:08:22 +00:00
|
|
|
|
ZPBufLen .BS 2
|
|
|
|
|
FCS .BS 2
|
2021-12-02 21:28:26 +00:00
|
|
|
|
|
|
|
|
|
DWORD .BS 4
|
|
|
|
|
|
2021-02-11 22:08:22 +00:00
|
|
|
|
hETCFILE .BS 1
|
2021-09-07 12:32:31 +00:00
|
|
|
|
b7D .BS 1
|
2021-12-02 21:28:26 +00:00
|
|
|
|
bLCP .BS 1
|
|
|
|
|
bIPCP .BS 1
|
2021-09-07 12:32:31 +00:00
|
|
|
|
Len .BS 1
|
2021-12-02 21:28:26 +00:00
|
|
|
|
|
2021-02-11 22:08:22 +00:00
|
|
|
|
ZS.END .ED
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
* File Header (16 Bytes)
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
CS.START cld
|
|
|
|
|
jmp Dev.Detect cld,jmp abs=DRV
|
|
|
|
|
.DA #$61 6502,Level 1 (65c02)
|
|
|
|
|
.DA #1 DRV Layout Version 1
|
|
|
|
|
.DA 0
|
|
|
|
|
.DA CS.END-CS.START Code Length
|
|
|
|
|
.DA 0
|
|
|
|
|
.DA 0
|
|
|
|
|
.DA 0
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
* Relocation Table
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
L.MSG.DETECT .DA MSG.DETECT
|
|
|
|
|
L.MSG.DETECT.OK .DA MSG.DETECT.OK
|
|
|
|
|
L.MSG.DETECT.KO .DA MSG.DETECT.KO
|
|
|
|
|
L.DRV.CS.START .DA DRV.CS.START
|
|
|
|
|
L.FD.DEV .DA FD.DEV
|
|
|
|
|
L.FD.DEV.NAME .DA FD.DEV.NAME
|
|
|
|
|
L.ETCFILE .DA ETCFILE
|
|
|
|
|
L.MSG.ETCFILE .DA MSG.ETCFILE
|
2021-02-22 17:17:37 +00:00
|
|
|
|
L.MSG.UNEXPECTED .DA MSG.UNEXPECTED
|
|
|
|
|
L.MSG.SYNTAX .DA MSG.SYNTAX
|
2021-12-02 21:28:26 +00:00
|
|
|
|
L.MSG.SSCInit .DA MSG.SSCInit
|
2021-09-07 12:32:31 +00:00
|
|
|
|
L.MSG.LCPInit .DA MSG.LCPInit
|
2021-12-02 21:28:26 +00:00
|
|
|
|
L.MSG.IPCPInit .DA MSG.IPCPInit
|
2021-09-07 12:32:31 +00:00
|
|
|
|
L.MSG.LocalIP .DA MSG.LocalIP
|
|
|
|
|
L.MSG.RemoteIP .DA MSG.RemoteIP
|
|
|
|
|
.DO DBG=1
|
2021-02-17 16:15:43 +00:00
|
|
|
|
L.MSG.DUMPBUF .DA MSG.DUMPBUFS
|
|
|
|
|
.DA MSG.DUMPBUFR
|
2021-02-11 22:08:22 +00:00
|
|
|
|
L.MSG.HEXDUMP .DA MSG.HEXDUMP
|
2021-09-07 12:32:31 +00:00
|
|
|
|
.FIN
|
2021-12-02 21:28:26 +00:00
|
|
|
|
L.LCP.ConfReq .DA LCP.ConfReq
|
|
|
|
|
L.LCP.EchoRep .DA LCP.EchoRep
|
|
|
|
|
L.IPCP.ConfReq .DA IPCP.ConfReq
|
2021-09-07 12:32:31 +00:00
|
|
|
|
L.IN.Buf .DA IN.Buf
|
|
|
|
|
L.IN.Bufp1 .DA IN.Buf+1
|
|
|
|
|
L.OUT.Buf .DA OUT.Buf
|
2021-12-02 21:28:26 +00:00
|
|
|
|
J.LCP .DA LCP.IN.ConfReq
|
|
|
|
|
.DA LCP.IN.ConfAck
|
|
|
|
|
.DA LCP.IN.ConfNak
|
2021-09-07 12:32:31 +00:00
|
|
|
|
.DA LCP.Discard
|
|
|
|
|
.DA LCP.Discard
|
|
|
|
|
.DA LCP.Discard
|
|
|
|
|
.DA LCP.Discard
|
|
|
|
|
.DA LCP.Discard
|
2021-12-02 21:28:26 +00:00
|
|
|
|
.DA LCP.IN.EchoReq
|
2021-09-07 12:32:31 +00:00
|
|
|
|
.DA LCP.Discard
|
|
|
|
|
.DA LCP.Discard
|
|
|
|
|
.DA LCP.Discard
|
|
|
|
|
.DA LCP.Discard
|
|
|
|
|
.DA LCP.Discard
|
|
|
|
|
.DA LCP.Discard
|
2021-12-02 21:28:26 +00:00
|
|
|
|
J.IPCP .DA IPCP.IN.ConfReq
|
|
|
|
|
.DA IPCP.IN.ConfAck
|
|
|
|
|
.DA IPCP.IN.ConfNak
|
2021-09-07 12:32:31 +00:00
|
|
|
|
.DA IPCP.Discard
|
|
|
|
|
.DA IPCP.Discard
|
|
|
|
|
.DA IPCP.Discard
|
|
|
|
|
.DA IPCP.Discard
|
2021-02-11 22:08:22 +00:00
|
|
|
|
.DA 0 End Of Reloc Table
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
Dev.Detect >STYA ZPArgsPtr
|
|
|
|
|
|
|
|
|
|
>LDYA L.MSG.DETECT
|
|
|
|
|
>SYSCALL PutS
|
|
|
|
|
stz ZPPtr1
|
|
|
|
|
|
|
|
|
|
lda #$C1
|
|
|
|
|
sta ZPPtr1+1
|
|
|
|
|
|
|
|
|
|
.1 and #$0f
|
|
|
|
|
tay
|
2023-11-26 13:17:41 +00:00
|
|
|
|
lda A2osX.S-1,y
|
2021-02-11 22:08:22 +00:00
|
|
|
|
bne .3
|
|
|
|
|
|
|
|
|
|
ldx #DEVSIG.Length-1
|
|
|
|
|
|
|
|
|
|
.2 ldy DEVSIG.Offset,x
|
|
|
|
|
lda (ZPPtr1),y
|
|
|
|
|
cmp DEVSIG.Value,x
|
|
|
|
|
bne .3
|
|
|
|
|
|
|
|
|
|
dex
|
|
|
|
|
bpl .2
|
|
|
|
|
|
|
|
|
|
bra .4
|
|
|
|
|
|
|
|
|
|
.3 inc FD.DEV.NAME+3
|
|
|
|
|
inc ZPPtr1+1 no match, try next slot....
|
|
|
|
|
lda ZPPtr1+1
|
|
|
|
|
cmp #$C8
|
|
|
|
|
bne .1
|
|
|
|
|
|
|
|
|
|
>LDYA L.MSG.DETECT.KO
|
|
|
|
|
>SYSCALL PutS
|
|
|
|
|
|
|
|
|
|
lda #MLI.E.NODEV Not Found in any slot, exiting
|
|
|
|
|
sec
|
|
|
|
|
rts
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
2021-02-11 22:08:22 +00:00
|
|
|
|
.4 lda ZPPtr1+1
|
|
|
|
|
asl
|
|
|
|
|
asl
|
|
|
|
|
asl
|
|
|
|
|
asl
|
|
|
|
|
clc
|
|
|
|
|
adc #$8F
|
|
|
|
|
sta DEVSLOTn08F
|
2021-09-07 12:32:31 +00:00
|
|
|
|
*--------------------------------------
|
2021-02-11 22:08:22 +00:00
|
|
|
|
jsr SSC.Init
|
2021-12-02 21:28:26 +00:00
|
|
|
|
bcs .9
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
2021-02-11 22:08:22 +00:00
|
|
|
|
jsr PPP.ETCFILE
|
2021-09-07 12:32:31 +00:00
|
|
|
|
bcs .9
|
2021-03-11 21:40:55 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
jsr PPP.Init
|
2021-09-07 12:32:31 +00:00
|
|
|
|
bcs .9
|
2021-02-11 22:08:22 +00:00
|
|
|
|
|
|
|
|
|
>PUSHW L.MSG.DETECT.OK
|
|
|
|
|
>PUSHW L.FD.DEV.NAME
|
|
|
|
|
>PUSHBI 2
|
|
|
|
|
>SYSCALL PrintF
|
2021-09-07 12:32:31 +00:00
|
|
|
|
bcs .9
|
2021-02-11 22:08:22 +00:00
|
|
|
|
|
|
|
|
|
>PUSHWI DRV.END
|
|
|
|
|
>PUSHWI DRV.CS.END-DRV.CS.START
|
|
|
|
|
>PUSHWI DRV.CS.START
|
|
|
|
|
>LDYA L.DRV.CS.START
|
|
|
|
|
>SYSCALL InsDrv
|
2021-09-07 12:32:31 +00:00
|
|
|
|
.9 bcs .99
|
2021-02-11 22:08:22 +00:00
|
|
|
|
|
|
|
|
|
>STYA FD.DEV+S.FD.DEV.DRVPTR
|
|
|
|
|
|
|
|
|
|
>PUSHW L.FD.DEV
|
|
|
|
|
>PUSHW L.FD.DEV.NAME
|
|
|
|
|
>SYSCALL MKDev
|
2021-09-07 12:32:31 +00:00
|
|
|
|
bcs .99
|
2021-02-17 16:15:43 +00:00
|
|
|
|
|
2021-02-11 22:08:22 +00:00
|
|
|
|
lda FD.DEV.NAME+3
|
|
|
|
|
and #$0F
|
|
|
|
|
tax
|
|
|
|
|
lda #A2osX.S.NIC
|
2023-11-26 13:17:41 +00:00
|
|
|
|
sta A2osX.S-1,x
|
2021-02-11 22:08:22 +00:00
|
|
|
|
|
2021-09-07 12:32:31 +00:00
|
|
|
|
* clc
|
|
|
|
|
|
2021-03-11 21:40:55 +00:00
|
|
|
|
rts
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
.99 pha
|
|
|
|
|
jsr SSC.Close
|
|
|
|
|
pla
|
|
|
|
|
|
|
|
|
|
* sec
|
2021-03-11 21:40:55 +00:00
|
|
|
|
|
2021-02-11 22:08:22 +00:00
|
|
|
|
Dev.Detect.RTS rts
|
|
|
|
|
*--------------------------------------
|
2021-12-02 21:28:26 +00:00
|
|
|
|
PPP.Init >LDYA L.MSG.LCPInit
|
2021-09-07 12:32:31 +00:00
|
|
|
|
>SYSCALL PutS
|
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>LDYA L.LCP.EchoRep Pre calculate EchoRep FCS
|
2021-09-07 12:32:31 +00:00
|
|
|
|
jsr PPP.FCS16.Set
|
2021-02-11 22:08:22 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>LDYA L.LCP.ConfReq
|
2021-09-07 12:32:31 +00:00
|
|
|
|
jsr PPP.FCS16.Set
|
2021-02-17 16:15:43 +00:00
|
|
|
|
|
2021-09-07 12:32:31 +00:00
|
|
|
|
.DO DBG=1
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>LDYA L.LCP.ConfReq
|
2021-09-07 12:32:31 +00:00
|
|
|
|
ldx #0
|
|
|
|
|
jsr DumpBuf.PPP
|
|
|
|
|
.FIN
|
2021-02-11 22:08:22 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>LDYA L.LCP.ConfReq
|
2021-09-07 12:32:31 +00:00
|
|
|
|
jsr SSC.WritePPP
|
|
|
|
|
bcs .9
|
2021-02-20 10:18:02 +00:00
|
|
|
|
|
2021-09-07 12:32:31 +00:00
|
|
|
|
.1 jsr SSC.ReadPPP
|
2021-02-11 22:08:22 +00:00
|
|
|
|
bcs .9
|
2021-02-17 16:15:43 +00:00
|
|
|
|
|
2021-09-07 12:32:31 +00:00
|
|
|
|
tya
|
|
|
|
|
beq .1
|
|
|
|
|
|
|
|
|
|
sty ZPBufLen
|
|
|
|
|
stz ZPBufLen+1
|
2021-03-11 21:40:55 +00:00
|
|
|
|
|
2021-09-07 12:32:31 +00:00
|
|
|
|
.DO DBG=1
|
|
|
|
|
>LDYA L.IN.Buf
|
|
|
|
|
ldx #2
|
|
|
|
|
jsr DumpBuf.PPP
|
|
|
|
|
.FIN
|
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
jsr PPP.IN.JUMP
|
2021-02-11 22:08:22 +00:00
|
|
|
|
bcs .9
|
2021-02-17 16:15:43 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
bit bLCP
|
2021-09-07 12:32:31 +00:00
|
|
|
|
bpl .1
|
2021-12-02 21:28:26 +00:00
|
|
|
|
|
|
|
|
|
>LDYA L.MSG.IPCPInit
|
|
|
|
|
>SYSCALL PutS
|
|
|
|
|
|
|
|
|
|
jsr IPCP.OUT.ConfReq
|
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
.2 jsr SSC.ReadPPP
|
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
tya
|
|
|
|
|
beq .2
|
|
|
|
|
|
|
|
|
|
sty ZPBufLen
|
|
|
|
|
stz ZPBufLen+1
|
|
|
|
|
|
|
|
|
|
.DO DBG=1
|
|
|
|
|
>LDYA L.IN.Buf
|
|
|
|
|
ldx #2
|
|
|
|
|
jsr DumpBuf.PPP
|
|
|
|
|
.FIN
|
|
|
|
|
|
|
|
|
|
jsr PPP.IN.JUMP
|
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
bit bIPCP
|
|
|
|
|
bpl .2
|
|
|
|
|
|
2021-09-07 12:32:31 +00:00
|
|
|
|
* clc
|
|
|
|
|
rts
|
2021-02-17 16:15:43 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
.9 jsr SSC.Close
|
|
|
|
|
|
|
|
|
|
lda #MLI.E.IO
|
2021-09-07 12:32:31 +00:00
|
|
|
|
* sec
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2021-12-02 21:28:26 +00:00
|
|
|
|
PPP.IN.JUMP lda IN.Buf+3
|
2021-09-07 12:32:31 +00:00
|
|
|
|
cmp #$21
|
|
|
|
|
bne LCP.Discard
|
2021-02-17 16:15:43 +00:00
|
|
|
|
|
2021-09-07 12:32:31 +00:00
|
|
|
|
lda IN.Buf+2
|
|
|
|
|
cmp #$C0
|
|
|
|
|
bne .1
|
2021-02-17 16:15:43 +00:00
|
|
|
|
|
2021-09-07 12:32:31 +00:00
|
|
|
|
lda IN.Buf+4
|
|
|
|
|
beq LCP.Discard
|
2021-03-11 21:40:55 +00:00
|
|
|
|
|
2021-09-07 12:32:31 +00:00
|
|
|
|
cmp #16
|
|
|
|
|
bcs LCP.Discard
|
2021-02-11 22:08:22 +00:00
|
|
|
|
|
2021-09-07 12:32:31 +00:00
|
|
|
|
asl
|
|
|
|
|
tax
|
|
|
|
|
jmp (J.LCP-2,x)
|
2021-02-11 22:08:22 +00:00
|
|
|
|
|
2021-09-07 12:32:31 +00:00
|
|
|
|
.1 cmp #$80
|
|
|
|
|
bne LCP.Discard
|
2021-02-17 16:15:43 +00:00
|
|
|
|
|
2021-09-07 12:32:31 +00:00
|
|
|
|
lda IN.Buf+4
|
|
|
|
|
beq LCP.Discard
|
2021-02-11 22:08:22 +00:00
|
|
|
|
|
2021-09-07 12:32:31 +00:00
|
|
|
|
cmp #8
|
|
|
|
|
bcs LCP.Discard
|
|
|
|
|
|
|
|
|
|
asl
|
|
|
|
|
tax
|
|
|
|
|
jmp (J.IPCP-2,x)
|
2021-02-22 17:17:37 +00:00
|
|
|
|
*--------------------------------------
|
2021-09-07 12:32:31 +00:00
|
|
|
|
LCP.Discard
|
|
|
|
|
IPCP.Discard
|
2021-03-11 21:40:55 +00:00
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2021-12-02 21:28:26 +00:00
|
|
|
|
LCP.IN.ConfReq ldy #0
|
2021-03-11 21:40:55 +00:00
|
|
|
|
|
2021-09-07 12:32:31 +00:00
|
|
|
|
.1 lda IN.Buf,y FF03C021
|
|
|
|
|
sta OUT.Buf,y
|
|
|
|
|
iny
|
|
|
|
|
cpy #4
|
2021-03-11 21:40:55 +00:00
|
|
|
|
bne .1
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
|
|
|
|
lda #2 Configure-Ack
|
|
|
|
|
sta OUT.Buf,y
|
|
|
|
|
|
|
|
|
|
iny ID
|
|
|
|
|
|
|
|
|
|
lda IN.Buf,y
|
|
|
|
|
sta OUT.Buf,y
|
|
|
|
|
|
|
|
|
|
iny Len MSB
|
|
|
|
|
|
|
|
|
|
lda IN.Buf,y
|
|
|
|
|
sta OUT.Buf,y
|
|
|
|
|
sta ZPBufLen+1
|
|
|
|
|
|
|
|
|
|
iny Len LSB
|
|
|
|
|
|
|
|
|
|
lda IN.Buf,y
|
|
|
|
|
sta OUT.Buf,y
|
|
|
|
|
sta ZPBufLen
|
|
|
|
|
|
|
|
|
|
sec
|
|
|
|
|
sbc #4 minus LEN LEN ... FCS FCS
|
|
|
|
|
tax
|
|
|
|
|
|
|
|
|
|
iny First option ID
|
|
|
|
|
|
|
|
|
|
.2 lda IN.Buf,y
|
|
|
|
|
cmp #6 ACCM ?
|
|
|
|
|
bne .7
|
|
|
|
|
|
|
|
|
|
phy
|
|
|
|
|
phx
|
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
ldx #4
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
|
|
|
|
.3 lda IN.Buf+2,y
|
2021-12-02 21:28:26 +00:00
|
|
|
|
sta DWORD-1,x
|
2021-09-07 12:32:31 +00:00
|
|
|
|
iny
|
|
|
|
|
dex
|
2021-12-02 21:28:26 +00:00
|
|
|
|
bne .3
|
|
|
|
|
|
|
|
|
|
* ldx #0
|
|
|
|
|
|
|
|
|
|
ldy #0
|
|
|
|
|
|
|
|
|
|
.4 lda #1
|
|
|
|
|
|
|
|
|
|
.5 and DWORD,y
|
|
|
|
|
bne .6
|
|
|
|
|
|
|
|
|
|
stz ACCM.OUT,x
|
|
|
|
|
|
|
|
|
|
.6 inx
|
|
|
|
|
asl
|
|
|
|
|
bne .5
|
|
|
|
|
|
|
|
|
|
iny
|
|
|
|
|
cpy #4
|
|
|
|
|
bne .4
|
|
|
|
|
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
|
|
|
|
plx
|
|
|
|
|
ply
|
|
|
|
|
|
|
|
|
|
.7 jsr LCP.Ack.Copy
|
|
|
|
|
bne .2
|
|
|
|
|
|
|
|
|
|
lda ZPBufLen
|
2021-03-11 21:40:55 +00:00
|
|
|
|
clc
|
2021-09-07 12:32:31 +00:00
|
|
|
|
adc #6
|
|
|
|
|
sta ZPBufLen
|
2021-03-11 21:40:55 +00:00
|
|
|
|
bcc .8
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
|
|
|
|
inc ZPBufLen+1
|
|
|
|
|
|
|
|
|
|
.8 >LDYA L.OUT.Buf
|
|
|
|
|
jsr PPP.FCS16.Set
|
|
|
|
|
|
|
|
|
|
.DO DBG=1
|
|
|
|
|
>LDYA L.OUT.Buf
|
|
|
|
|
ldx #0
|
|
|
|
|
jsr DumpBuf.PPP
|
|
|
|
|
.FIN
|
|
|
|
|
|
|
|
|
|
>LDYA L.OUT.Buf
|
|
|
|
|
jmp SSC.WritePPP
|
2021-03-11 21:40:55 +00:00
|
|
|
|
*--------------------------------------
|
2021-09-07 12:32:31 +00:00
|
|
|
|
LCP.Ack.Copy txa
|
2021-02-22 17:17:37 +00:00
|
|
|
|
sec
|
2021-09-07 12:32:31 +00:00
|
|
|
|
sbc IN.Buf+1,y
|
|
|
|
|
|
|
|
|
|
pha
|
|
|
|
|
|
|
|
|
|
ldx IN.Buf+1,y
|
|
|
|
|
|
|
|
|
|
.1 lda IN.Buf,y
|
|
|
|
|
sta OUT.Buf,y
|
|
|
|
|
iny
|
|
|
|
|
dex
|
|
|
|
|
bne .1
|
|
|
|
|
|
|
|
|
|
plx
|
2021-02-22 17:17:37 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2021-09-07 12:32:31 +00:00
|
|
|
|
LCP.Ack.Next txa
|
2021-02-22 17:17:37 +00:00
|
|
|
|
sec
|
2021-09-07 12:32:31 +00:00
|
|
|
|
sbc IN.Buf+1,y
|
|
|
|
|
tax
|
|
|
|
|
|
|
|
|
|
tya
|
|
|
|
|
clc
|
|
|
|
|
adc IN.Buf+1,y
|
|
|
|
|
tay
|
|
|
|
|
|
2021-02-22 17:17:37 +00:00
|
|
|
|
rts
|
2021-02-11 22:08:22 +00:00
|
|
|
|
*--------------------------------------
|
2021-12-02 21:28:26 +00:00
|
|
|
|
LCP.IN.ConfAck sec
|
|
|
|
|
ror bLCP
|
2021-02-17 16:15:43 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
clc
|
|
|
|
|
rts
|
2021-09-07 12:32:31 +00:00
|
|
|
|
*--------------------------------------
|
2021-12-02 21:28:26 +00:00
|
|
|
|
LCP.IN.ConfNak
|
2021-02-17 16:15:43 +00:00
|
|
|
|
|
2021-09-07 12:32:31 +00:00
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2021-12-02 21:28:26 +00:00
|
|
|
|
LCP.IN.EchoReq .DO DBG=1
|
|
|
|
|
>LDYA L.LCP.EchoRep
|
2021-09-07 12:32:31 +00:00
|
|
|
|
ldx #0
|
|
|
|
|
jsr DumpBuf.PPP
|
|
|
|
|
.FIN
|
2021-02-17 16:15:43 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>LDYA L.LCP.EchoRep
|
2021-09-07 12:32:31 +00:00
|
|
|
|
jmp SSC.WritePPP
|
|
|
|
|
*--------------------------------------
|
2021-12-02 21:28:26 +00:00
|
|
|
|
IPCP.IN.ConfReq ldy #0
|
2021-02-20 10:18:02 +00:00
|
|
|
|
|
2021-09-07 12:32:31 +00:00
|
|
|
|
.1 lda IN.Buf,y FF038021
|
|
|
|
|
sta OUT.Buf,y
|
|
|
|
|
iny
|
|
|
|
|
cpy #4
|
|
|
|
|
bne .1
|
2021-02-20 10:18:02 +00:00
|
|
|
|
|
2021-09-07 12:32:31 +00:00
|
|
|
|
lda #2 Configure-Ack
|
|
|
|
|
sta OUT.Buf,y
|
2021-02-20 10:18:02 +00:00
|
|
|
|
|
2021-09-07 12:32:31 +00:00
|
|
|
|
iny ID
|
2021-02-20 10:18:02 +00:00
|
|
|
|
|
2021-09-07 12:32:31 +00:00
|
|
|
|
lda IN.Buf,y
|
|
|
|
|
sta OUT.Buf,y
|
|
|
|
|
|
|
|
|
|
iny Len MSB
|
|
|
|
|
|
|
|
|
|
lda IN.Buf,y
|
|
|
|
|
sta OUT.Buf,y
|
|
|
|
|
sta ZPBufLen+1
|
|
|
|
|
|
|
|
|
|
iny Len LSB
|
|
|
|
|
|
|
|
|
|
lda IN.Buf,y
|
|
|
|
|
sta OUT.Buf,y
|
|
|
|
|
sta ZPBufLen
|
|
|
|
|
|
|
|
|
|
sec
|
|
|
|
|
sbc #4 minus LEN LEN ... FCS FCS
|
|
|
|
|
tax
|
|
|
|
|
|
|
|
|
|
iny First option ID
|
|
|
|
|
|
|
|
|
|
.2 lda IN.Buf,y
|
|
|
|
|
cmp #3 IP ADDR ?
|
|
|
|
|
bne .7
|
|
|
|
|
|
|
|
|
|
phy
|
|
|
|
|
phx
|
|
|
|
|
|
|
|
|
|
>PUSHW L.MSG.RemoteIP
|
2021-02-11 22:08:22 +00:00
|
|
|
|
|
2021-02-17 16:15:43 +00:00
|
|
|
|
ldx #0
|
|
|
|
|
|
2021-09-07 12:32:31 +00:00
|
|
|
|
.3 lda IN.Buf+2,y
|
|
|
|
|
sta DCB.GW,x
|
|
|
|
|
>PUSHA
|
|
|
|
|
iny
|
|
|
|
|
inx
|
|
|
|
|
cpx #4
|
|
|
|
|
bne .3
|
|
|
|
|
|
|
|
|
|
>PUSHBI 4
|
|
|
|
|
>SYSCALL PrintF
|
2021-02-11 22:08:22 +00:00
|
|
|
|
|
2021-09-07 12:32:31 +00:00
|
|
|
|
plx
|
|
|
|
|
ply
|
2021-02-17 16:15:43 +00:00
|
|
|
|
|
2021-09-07 12:32:31 +00:00
|
|
|
|
.7 jsr LCP.Ack.Copy
|
|
|
|
|
bne .2
|
2021-02-17 16:15:43 +00:00
|
|
|
|
|
2021-09-07 12:32:31 +00:00
|
|
|
|
lda ZPBufLen
|
|
|
|
|
clc
|
|
|
|
|
adc #6
|
|
|
|
|
sta ZPBufLen
|
|
|
|
|
bcc .8
|
2021-02-17 16:15:43 +00:00
|
|
|
|
|
2021-09-07 12:32:31 +00:00
|
|
|
|
inc ZPBufLen+1
|
2021-02-17 16:15:43 +00:00
|
|
|
|
|
2021-09-07 12:32:31 +00:00
|
|
|
|
.8 >LDYA L.OUT.Buf
|
|
|
|
|
jsr PPP.FCS16.Set
|
2021-02-11 22:08:22 +00:00
|
|
|
|
|
2021-09-07 12:32:31 +00:00
|
|
|
|
.DO DBG=1
|
|
|
|
|
>LDYA L.OUT.Buf
|
|
|
|
|
ldx #0
|
|
|
|
|
jsr DumpBuf.PPP
|
|
|
|
|
.FIN
|
|
|
|
|
|
|
|
|
|
>LDYA L.OUT.Buf
|
|
|
|
|
jmp SSC.WritePPP
|
|
|
|
|
*--------------------------------------
|
2021-12-02 21:28:26 +00:00
|
|
|
|
IPCP.IN.ConfAck sec
|
|
|
|
|
ror bIPCP
|
2021-02-17 16:15:43 +00:00
|
|
|
|
|
2021-02-11 22:08:22 +00:00
|
|
|
|
* clc
|
2021-09-07 12:32:31 +00:00
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
2021-12-02 21:28:26 +00:00
|
|
|
|
IPCP.IN.ConfNak ldy #10
|
2021-09-07 12:32:31 +00:00
|
|
|
|
ldx #0
|
|
|
|
|
|
|
|
|
|
>PUSHW L.MSG.LocalIP
|
|
|
|
|
|
|
|
|
|
.1 lda IN.Buf,y
|
2021-12-02 21:28:26 +00:00
|
|
|
|
sta IPCP.ConfReq,y
|
2021-09-07 12:32:31 +00:00
|
|
|
|
sta DCB.IP,x
|
|
|
|
|
>PUSHA
|
|
|
|
|
inx
|
|
|
|
|
iny
|
|
|
|
|
cpy #14
|
|
|
|
|
bne .1
|
|
|
|
|
|
|
|
|
|
>PUSHBI 4
|
|
|
|
|
>SYSCALL PrintF
|
2021-02-11 22:08:22 +00:00
|
|
|
|
*--------------------------------------
|
2021-12-02 21:28:26 +00:00
|
|
|
|
IPCP.OUT.ConfReq
|
|
|
|
|
>LDYA L.IPCP.ConfReq
|
|
|
|
|
jsr PPP.FCS16.Set
|
2021-02-11 22:08:22 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
.DO DBG=1
|
|
|
|
|
>LDYA L.IPCP.ConfReq
|
|
|
|
|
ldx #0
|
|
|
|
|
jsr DumpBuf.PPP
|
|
|
|
|
.FIN
|
2021-02-11 22:08:22 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
>LDYA L.IPCP.ConfReq
|
|
|
|
|
jmp SSC.WritePPP
|
2021-02-11 22:08:22 +00:00
|
|
|
|
*--------------------------------------
|
2021-12-02 21:28:26 +00:00
|
|
|
|
SSC.Init >LDYA L.MSG.SSCInit
|
|
|
|
|
>SYSCALL PutS
|
|
|
|
|
|
|
|
|
|
jsr SSC.Close
|
2021-02-17 16:15:43 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
ldy #0
|
2021-02-11 22:08:22 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
.10 lda SSC.STATUS-$8F,x
|
|
|
|
|
bit #SSC.STATUS.nDCD+SSC.STATUS.nDSR true when 0
|
|
|
|
|
bne .20
|
|
|
|
|
|
|
|
|
|
iny
|
|
|
|
|
bne .10
|
|
|
|
|
|
|
|
|
|
* bra .9
|
2021-02-17 16:15:43 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
.20 lda #SSC.CTL.1S+SSC.CTL.8D+SSC.CTL.CLKINT+SSC.CTL.B115200
|
|
|
|
|
sta SSC.CTL-$8F,x
|
2021-02-17 16:15:43 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
lda #SSC.CMD.NOP+SSC.CMD.TE+SSC.CMD.RIRQDIS+SSC.CMD.DTR
|
|
|
|
|
sta SSC.CMD-$8F,x
|
2021-02-17 16:15:43 +00:00
|
|
|
|
|
|
|
|
|
ldy #0
|
|
|
|
|
|
2021-09-07 12:32:31 +00:00
|
|
|
|
.1 lda SSC.STATUS-$8F,x
|
2021-12-02 21:28:26 +00:00
|
|
|
|
bit #SSC.STATUS.nDCD+SSC.STATUS.nDSR true when 0
|
|
|
|
|
beq .2
|
|
|
|
|
|
2021-02-17 16:15:43 +00:00
|
|
|
|
iny
|
2021-09-07 12:32:31 +00:00
|
|
|
|
bne .1
|
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
.9 lda #MLI.E.IO
|
2021-02-17 16:15:43 +00:00
|
|
|
|
sec
|
|
|
|
|
rts
|
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
.2 lda SSC.DATA-$8F,x discard any garbage byte
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
.DO SWFC=1
|
|
|
|
|
lda #C.XOFF
|
2021-09-07 12:32:31 +00:00
|
|
|
|
sta SSC.DATA-$8F,x
|
2021-12-02 21:28:26 +00:00
|
|
|
|
.FIN
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
.DO HWFC=1
|
|
|
|
|
lda #SSC.CMD.NOP+SSC.CMD.RIRQDIS+SSC.CMD.DTR
|
|
|
|
|
sta SSC.CMD-$8F,x
|
|
|
|
|
.FIN
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
SSC.Close ldx DEVSLOTn08F
|
|
|
|
|
stz SSC.RESET-$8F,x
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
lda #SSC.CMD.RIRQDIS
|
|
|
|
|
sta SSC.CMD-$8F,x Applewin Bug ???
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
|
|
|
|
rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
SSC.ReadPPP php
|
2021-02-11 22:08:22 +00:00
|
|
|
|
sei
|
2021-02-17 16:15:43 +00:00
|
|
|
|
|
2021-02-11 22:08:22 +00:00
|
|
|
|
ldx DEVSLOTn08F
|
2021-02-17 16:15:43 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
.DO SWFC=1
|
|
|
|
|
lda #C.XON
|
|
|
|
|
sta SSC.DATA-$8F,x
|
|
|
|
|
.FIN
|
2021-02-11 22:08:22 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
.DO HWFC=1
|
|
|
|
|
lda #SSC.CMD.NOP+SSC.CMD.TE+SSC.CMD.RIRQDIS+SSC.CMD.DTR
|
|
|
|
|
sta SSC.CMD-$8F,x
|
|
|
|
|
.FIN
|
|
|
|
|
|
|
|
|
|
stz b7D
|
|
|
|
|
|
|
|
|
|
.10 ldy #0
|
2021-02-11 22:08:22 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
.1 lda SSC.STATUS-$8F,x
|
2021-02-22 20:43:53 +00:00
|
|
|
|
bit #SSC.STATUS.nDCD true when 0
|
2021-02-17 16:15:43 +00:00
|
|
|
|
bne .9
|
|
|
|
|
|
|
|
|
|
bit #SSC.STATUS.RDRF incoming char?
|
2021-02-11 22:08:22 +00:00
|
|
|
|
bne .3
|
2021-02-17 16:15:43 +00:00
|
|
|
|
|
|
|
|
|
iny
|
2021-12-02 21:28:26 +00:00
|
|
|
|
bne .1
|
2021-02-17 16:15:43 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
.8
|
|
|
|
|
.DO SWFC=1
|
|
|
|
|
lda #C.XOFF
|
|
|
|
|
sta SSC.DATA-$8F,x
|
|
|
|
|
.FIN
|
|
|
|
|
|
|
|
|
|
.DO HWFC=1
|
|
|
|
|
lda #SSC.CMD.NOP+SSC.CMD.RIRQDIS+SSC.CMD.DTR
|
|
|
|
|
sta SSC.CMD-$8F,x
|
|
|
|
|
.FIN
|
|
|
|
|
|
|
|
|
|
plp
|
2021-02-11 22:08:22 +00:00
|
|
|
|
clc
|
|
|
|
|
rts
|
|
|
|
|
|
2021-09-07 12:32:31 +00:00
|
|
|
|
.3 lda SSC.DATA-$8F,x
|
2021-12-02 21:28:26 +00:00
|
|
|
|
|
2021-09-07 12:32:31 +00:00
|
|
|
|
bit b7D
|
|
|
|
|
bmi .4
|
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
cmp #$7D
|
|
|
|
|
bne .40
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
|
|
|
|
ror b7D
|
|
|
|
|
bra .1
|
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
.4 stz b7D
|
|
|
|
|
eor #%00100000
|
|
|
|
|
|
|
|
|
|
.40 cmp #$FF
|
|
|
|
|
bne .10
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
|
|
|
|
sta IN.Buf
|
|
|
|
|
ldy #1
|
2021-12-02 21:28:26 +00:00
|
|
|
|
|
2021-09-07 12:32:31 +00:00
|
|
|
|
stz b7D
|
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
.5 lda #SSC.STATUS.RDRF
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
.50 bit SSC.STATUS-$8F,x incoming char?
|
|
|
|
|
beq .50
|
2021-02-11 22:08:22 +00:00
|
|
|
|
|
|
|
|
|
lda SSC.DATA-$8F,x
|
2021-09-07 12:32:31 +00:00
|
|
|
|
bit b7D
|
|
|
|
|
bmi .6
|
|
|
|
|
|
|
|
|
|
cmp #$7D
|
|
|
|
|
bne .7
|
|
|
|
|
|
|
|
|
|
ror b7D
|
|
|
|
|
bra .5
|
|
|
|
|
|
|
|
|
|
.6 stz b7D
|
|
|
|
|
eor #%00100000
|
2021-12-02 21:28:26 +00:00
|
|
|
|
|
2021-09-07 12:32:31 +00:00
|
|
|
|
sta IN.Buf,y
|
2021-02-11 22:08:22 +00:00
|
|
|
|
iny
|
2021-09-07 12:32:31 +00:00
|
|
|
|
bra .5
|
2021-02-17 16:15:43 +00:00
|
|
|
|
|
2021-09-07 12:32:31 +00:00
|
|
|
|
.7 cmp #$7E
|
|
|
|
|
beq .8
|
|
|
|
|
|
|
|
|
|
sta IN.Buf,y
|
|
|
|
|
iny
|
2021-12-02 21:28:26 +00:00
|
|
|
|
bne .5
|
|
|
|
|
|
|
|
|
|
.9 lda #MLI.E.IO
|
|
|
|
|
plp
|
|
|
|
|
sec
|
|
|
|
|
.99 rts
|
|
|
|
|
*--------------------------------------
|
|
|
|
|
SSC.WritePPP >STYA ZPPtr1
|
|
|
|
|
|
|
|
|
|
ldy #7
|
|
|
|
|
lda (ZPPtr1),y Len LO
|
|
|
|
|
clc
|
|
|
|
|
adc #6
|
|
|
|
|
sta ZPPtr3
|
|
|
|
|
|
|
|
|
|
php
|
|
|
|
|
sei
|
|
|
|
|
|
|
|
|
|
ldx DEVSLOTn08F
|
|
|
|
|
|
|
|
|
|
lda SSC.STATUS-$8F,x
|
|
|
|
|
bit #SSC.STATUS.nDCD true when 0
|
|
|
|
|
bne .9
|
|
|
|
|
|
|
|
|
|
.DO HWFC=1
|
|
|
|
|
lda #SSC.CMD.NOP+SSC.CMD.TE+SSC.CMD.RIRQDIS+SSC.CMD.DTR
|
|
|
|
|
sta SSC.CMD-$8F,x
|
|
|
|
|
.FIN
|
|
|
|
|
|
|
|
|
|
lda #SSC.STATUS.TDRE
|
|
|
|
|
|
|
|
|
|
.1 bit SSC.STATUS-$8F,x Register Empty ?
|
|
|
|
|
beq .1
|
|
|
|
|
|
|
|
|
|
lda #$7E
|
|
|
|
|
sta SSC.DATA-$8F,x
|
|
|
|
|
|
|
|
|
|
.2 lda (ZPPtr1)
|
|
|
|
|
|
|
|
|
|
cmp #$7D
|
|
|
|
|
beq .5
|
|
|
|
|
|
|
|
|
|
cmp #$7E
|
|
|
|
|
beq .5
|
|
|
|
|
|
|
|
|
|
cmp #32
|
|
|
|
|
bcs .6
|
|
|
|
|
|
|
|
|
|
tay
|
|
|
|
|
lda ACCM.OUT,y
|
|
|
|
|
beq .53
|
|
|
|
|
|
|
|
|
|
.5 lda #SSC.STATUS.TDRE
|
|
|
|
|
|
|
|
|
|
.51 bit SSC.STATUS-$8F,x Register Empty ?
|
|
|
|
|
beq .51
|
|
|
|
|
|
|
|
|
|
lda #$7D
|
|
|
|
|
sta SSC.DATA-$8F,x
|
|
|
|
|
|
|
|
|
|
lda #SSC.STATUS.TDRE
|
|
|
|
|
|
|
|
|
|
.52 bit SSC.STATUS-$8F,x Register Empty ?
|
|
|
|
|
beq .52
|
|
|
|
|
|
|
|
|
|
lda (ZPPtr1)
|
|
|
|
|
eor #%00100000
|
|
|
|
|
bra .6
|
|
|
|
|
|
|
|
|
|
.53 lda (ZPPtr1)
|
|
|
|
|
|
|
|
|
|
.6 sta SSC.DATA-$8F,x
|
|
|
|
|
|
|
|
|
|
inc ZPPtr1
|
|
|
|
|
bne .60
|
|
|
|
|
|
|
|
|
|
inc ZPPtr1+1
|
|
|
|
|
|
|
|
|
|
.60 dec ZPPtr3
|
|
|
|
|
bne .2
|
|
|
|
|
|
|
|
|
|
lda #SSC.STATUS.TDRE
|
|
|
|
|
|
|
|
|
|
.7 bit SSC.STATUS-$8F,x Register Empty ?
|
|
|
|
|
beq .7
|
|
|
|
|
|
|
|
|
|
lda #$7E
|
|
|
|
|
sta SSC.DATA-$8F,x
|
|
|
|
|
|
|
|
|
|
lda #SSC.STATUS.TDRE
|
|
|
|
|
|
|
|
|
|
.8 bit SSC.STATUS-$8F,x Register Empty ?
|
|
|
|
|
beq .8
|
|
|
|
|
|
|
|
|
|
.DO HWFC=1
|
|
|
|
|
lda #SSC.CMD.NOP+SSC.CMD.RIRQDIS+SSC.CMD.DTR
|
|
|
|
|
sta SSC.CMD-$8F,x
|
|
|
|
|
.FIN
|
|
|
|
|
|
|
|
|
|
plp
|
|
|
|
|
clc
|
|
|
|
|
rts
|
2021-02-17 16:15:43 +00:00
|
|
|
|
|
2021-02-11 22:08:22 +00:00
|
|
|
|
.9 lda #MLI.E.IO
|
2021-12-02 21:28:26 +00:00
|
|
|
|
|
2021-02-11 22:08:22 +00:00
|
|
|
|
plp
|
|
|
|
|
sec
|
2021-02-17 16:15:43 +00:00
|
|
|
|
rts
|
2021-02-11 22:08:22 +00:00
|
|
|
|
*--------------------------------------
|
2021-09-07 12:32:31 +00:00
|
|
|
|
.DO DBG=1
|
|
|
|
|
DumpBuf.PPP >STYA ZPPtr1
|
|
|
|
|
|
|
|
|
|
stz ZPPtr2
|
|
|
|
|
stz ZPPtr2+1
|
|
|
|
|
|
|
|
|
|
ldy #7
|
|
|
|
|
lda (ZPPtr1),y Len LO
|
|
|
|
|
clc
|
|
|
|
|
adc #6
|
|
|
|
|
sta ZPPtr3
|
|
|
|
|
|
|
|
|
|
dey
|
|
|
|
|
lda (ZPPtr1),y Len HI
|
|
|
|
|
adc #0
|
|
|
|
|
sta ZPPtr3+1
|
2021-02-11 22:08:22 +00:00
|
|
|
|
|
2021-02-17 16:15:43 +00:00
|
|
|
|
>PUSHW L.MSG.DUMPBUF,x
|
2021-09-07 12:32:31 +00:00
|
|
|
|
>PUSHW ZPPtr3
|
2021-02-11 22:08:22 +00:00
|
|
|
|
>PUSHBI 2
|
|
|
|
|
>SYSCALL PrintF
|
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
.1 >PUSHW L.MSG.HEXDUMP
|
2021-02-17 16:15:43 +00:00
|
|
|
|
>PUSHW ZPPtr2
|
2021-02-11 22:08:22 +00:00
|
|
|
|
|
|
|
|
|
ldy #0
|
|
|
|
|
|
|
|
|
|
.2 >PUSHB (ZPPtr1),y
|
|
|
|
|
iny
|
2021-09-07 12:32:31 +00:00
|
|
|
|
cpy #16
|
2021-02-11 22:08:22 +00:00
|
|
|
|
bne .2
|
|
|
|
|
|
2021-09-07 12:32:31 +00:00
|
|
|
|
>PUSHBI 18
|
2021-02-11 22:08:22 +00:00
|
|
|
|
>SYSCALL PrintF
|
|
|
|
|
bcs .9
|
|
|
|
|
|
|
|
|
|
lda ZPPtr1
|
2021-09-07 12:32:31 +00:00
|
|
|
|
adc #16
|
2021-02-11 22:08:22 +00:00
|
|
|
|
sta ZPPtr1
|
|
|
|
|
lda ZPPtr1+1
|
|
|
|
|
adc #0
|
|
|
|
|
sta ZPPtr1+1
|
|
|
|
|
|
2021-02-17 16:15:43 +00:00
|
|
|
|
lda ZPPtr2
|
2021-09-07 12:32:31 +00:00
|
|
|
|
adc #16
|
2021-02-17 16:15:43 +00:00
|
|
|
|
sta ZPPtr2
|
2021-12-02 21:28:26 +00:00
|
|
|
|
bcs .8
|
2021-02-17 16:15:43 +00:00
|
|
|
|
lda ZPPtr2+1
|
|
|
|
|
adc #0
|
|
|
|
|
sta ZPPtr2+1
|
|
|
|
|
|
2021-09-07 12:32:31 +00:00
|
|
|
|
lda ZPPtr3
|
2021-02-11 22:08:22 +00:00
|
|
|
|
sec
|
2021-09-07 12:32:31 +00:00
|
|
|
|
sbc #16
|
|
|
|
|
sta ZPPtr3
|
|
|
|
|
lda ZPPtr3+1
|
2021-02-11 22:08:22 +00:00
|
|
|
|
sbc #0
|
2021-09-07 12:32:31 +00:00
|
|
|
|
sta ZPPtr3+1
|
2021-02-11 22:08:22 +00:00
|
|
|
|
bcc .9
|
|
|
|
|
|
2021-09-07 12:32:31 +00:00
|
|
|
|
ora ZPPtr3
|
2021-02-11 22:08:22 +00:00
|
|
|
|
bne .1
|
|
|
|
|
|
2021-12-02 21:28:26 +00:00
|
|
|
|
.8 clc
|
2021-02-11 22:08:22 +00:00
|
|
|
|
|
|
|
|
|
.9 rts
|
2021-09-07 12:32:31 +00:00
|
|
|
|
.FIN
|
2021-02-11 22:08:22 +00:00
|
|
|
|
*--------------------------------------
|
2021-09-07 12:32:31 +00:00
|
|
|
|
PPP.FCS16.Check sec
|
|
|
|
|
.HS 90 BCC
|
|
|
|
|
PPP.FCS16.Set clc
|
|
|
|
|
php
|
|
|
|
|
|
|
|
|
|
>STYA ZPPtr1
|
2021-02-17 16:15:43 +00:00
|
|
|
|
|
|
|
|
|
lda #$ff
|
|
|
|
|
sta FCS
|
|
|
|
|
sta FCS+1
|
|
|
|
|
|
2021-09-07 12:32:31 +00:00
|
|
|
|
ldy #7
|
|
|
|
|
lda (ZPPtr1),y Len LO
|
|
|
|
|
clc
|
|
|
|
|
adc #4 add FF 00 XX XX but dont include FCS FCS
|
2021-02-17 16:15:43 +00:00
|
|
|
|
eor #$ff
|
|
|
|
|
sta ZPPtr2
|
|
|
|
|
|
2021-09-07 12:32:31 +00:00
|
|
|
|
dey
|
|
|
|
|
lda (ZPPtr1),y Len HI
|
|
|
|
|
adc #0
|
2021-02-17 16:15:43 +00:00
|
|
|
|
eor #$ff
|
|
|
|
|
sta ZPPtr2+1
|
|
|
|
|
|
2021-09-07 12:32:31 +00:00
|
|
|
|
ldy #0
|
|
|
|
|
|
2021-02-17 16:15:43 +00:00
|
|
|
|
.1 inc ZPPtr2
|
|
|
|
|
bne .2
|
|
|
|
|
|
|
|
|
|
inc ZPPtr2+1
|
2021-09-07 12:32:31 +00:00
|
|
|
|
beq .7
|
2021-02-17 16:15:43 +00:00
|
|
|
|
|
2021-09-07 12:32:31 +00:00
|
|
|
|
.2 lda (ZPPtr1),y
|
|
|
|
|
iny
|
2021-02-17 16:15:43 +00:00
|
|
|
|
bne .3
|
|
|
|
|
|
|
|
|
|
inc ZPPtr1+1
|
|
|
|
|
|
2021-09-07 12:32:31 +00:00
|
|
|
|
.3 eor FCS
|
2021-02-17 16:15:43 +00:00
|
|
|
|
tax
|
|
|
|
|
|
|
|
|
|
lda FCS.LO,x
|
|
|
|
|
eor FCS+1
|
|
|
|
|
sta FCS
|
|
|
|
|
|
|
|
|
|
lda FCS.HI,x
|
|
|
|
|
sta FCS+1
|
|
|
|
|
|
|
|
|
|
bra .1
|
|
|
|
|
|
2021-09-07 12:32:31 +00:00
|
|
|
|
.7 plp
|
|
|
|
|
bcc .8 CC = set
|
2021-02-17 16:15:43 +00:00
|
|
|
|
|
|
|
|
|
lda FCS
|
|
|
|
|
eor #$ff
|
2021-09-07 12:32:31 +00:00
|
|
|
|
eor (ZPPtr1),y
|
|
|
|
|
bne .9
|
|
|
|
|
|
2021-02-17 16:15:43 +00:00
|
|
|
|
iny
|
|
|
|
|
|
2021-09-07 12:32:31 +00:00
|
|
|
|
lda FCS+1
|
|
|
|
|
eor #$ff
|
|
|
|
|
eor (ZPPtr1),y
|
|
|
|
|
bne .9
|
|
|
|
|
|
|
|
|
|
clc
|
2021-02-17 16:15:43 +00:00
|
|
|
|
rts
|
2021-09-07 12:32:31 +00:00
|
|
|
|
|
|
|
|
|
.8 lda FCS
|
|
|
|
|
eor #$ff
|
|
|
|
|
sta (ZPPtr1),y
|
|
|
|
|
|
|
|
|
|
iny
|
|
|
|
|
|
|
|
|
|
lda FCS+1
|
|
|
|
|
eor #$ff
|
|
|
|
|
sta (ZPPtr1),y
|
|
|
|
|
|
|
|
|
|
.9 rts
|
2021-02-17 16:15:43 +00:00
|
|
|
|
*--------------------------------------
|
2021-09-07 12:32:31 +00:00
|
|
|
|
.INB usr/src/drv/pppssc.drv.s.e
|
2021-02-17 16:15:43 +00:00
|
|
|
|
*--------------------------------------
|
2021-09-07 12:32:31 +00:00
|
|
|
|
CS.END
|
2021-02-17 16:15:43 +00:00
|
|
|
|
*--------------------------------------
|
2021-02-11 22:08:22 +00:00
|
|
|
|
DEVSIG.Offset .HS 05070B0C
|
|
|
|
|
DEVSIG.Value .HS 38180131
|
|
|
|
|
DEVSIG.Length .EQ DEVSIG.Value-DEVSIG.Offset
|
2022-11-02 06:54:30 +00:00
|
|
|
|
MSG.DETECT .CZ "PPP Driver For Apple SSC."
|
|
|
|
|
MSG.DETECT.OK .CZ "PPP Installed As Device : %s\r\n"
|
|
|
|
|
MSG.DETECT.KO .CZ "No SSC Found."
|
2021-02-11 22:08:22 +00:00
|
|
|
|
ETCFILE .AZ "${ROOT}etc/ppp.conf"
|
|
|
|
|
*--------------------------------------
|
2022-11-02 06:54:30 +00:00
|
|
|
|
MSG.ETCFILE .CZ "Executing %s File...\r\n"
|
|
|
|
|
MSG.UNEXPECTED .CZ "\r\nERR:Unexpected reply From Modem\r\n{%s}\r\n"
|
|
|
|
|
MSG.SYNTAX .CZ "\r\nERR:Bad Syntax In ppp.conf\r\n{%s}\r\n"
|
|
|
|
|
MSG.SSCInit .CZ "Connecting..."
|
|
|
|
|
MSG.LCPInit .CZ "LCP Negotiation..."
|
|
|
|
|
MSG.IPCPInit .CZ "IPCP Negotiation..."
|
|
|
|
|
MSG.LocalIP .CZ "Local IP is %d.%d.%d.%d\r\n"
|
|
|
|
|
MSG.RemoteIP .CZ "Remote IP is %d.%d.%d.%d\r\n"
|
2021-09-07 12:32:31 +00:00
|
|
|
|
.DO DBG=1
|
2022-11-02 06:54:30 +00:00
|
|
|
|
MSG.DUMPBUFS .CZ ">>Send:%H\r\n"
|
|
|
|
|
MSG.DUMPBUFR .CZ "Recv<<:%H\r\n"
|
|
|
|
|
MSG.HEXDUMP .CZ "%H:%h %h %h %h %h %h %h %h:%h %h %h %h %h %h %h %h\r\n"
|
2021-09-07 12:32:31 +00:00
|
|
|
|
.FIN
|
2021-02-11 22:08:22 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
FD.DEV .DA #S.FD.T.CDEV
|
|
|
|
|
.DA #0 HANDLER
|
|
|
|
|
.DA #0 BUSID
|
|
|
|
|
.DA #0 DEVID
|
|
|
|
|
.DA 0 BUSPTR
|
|
|
|
|
.BS 2 DRVPTR
|
|
|
|
|
.DA 0 DCBPTR
|
|
|
|
|
.DA 0 BUFPTR
|
|
|
|
|
FD.DEV.NAME .AZ "eth1"
|
|
|
|
|
*--------------------------------------
|
2021-12-02 21:28:26 +00:00
|
|
|
|
LCP.ConfReq .HS FF03
|
2021-02-11 22:08:22 +00:00
|
|
|
|
.HS C021 LCP
|
2021-12-02 21:28:26 +00:00
|
|
|
|
LCP.ConfReq.DATA
|
2021-09-07 12:32:31 +00:00
|
|
|
|
.HS 01 Configure-Request
|
|
|
|
|
.HS FF ID
|
2021-12-02 21:28:26 +00:00
|
|
|
|
.DA /LCP.ConfReq.LEN,#LCP.ConfReq.LEN
|
2021-09-07 12:32:31 +00:00
|
|
|
|
* .HS 01.04 MRU
|
|
|
|
|
* .DA /1400,#1400
|
2021-12-02 21:28:26 +00:00
|
|
|
|
.DO SWFC=1
|
2021-02-11 22:08:22 +00:00
|
|
|
|
.HS 02.06.000A0000 ACCM
|
2021-12-02 21:28:26 +00:00
|
|
|
|
.ELSE
|
|
|
|
|
.HS 02.06.00000000 ACCM
|
|
|
|
|
.FIN
|
2021-09-07 12:32:31 +00:00
|
|
|
|
.HS 05.06.EA4C2B41 MAGIC
|
2021-03-11 21:40:55 +00:00
|
|
|
|
* .HS 07.02
|
|
|
|
|
* .HS 08.02
|
2021-12-02 21:28:26 +00:00
|
|
|
|
LCP.ConfReq.LEN .EQ *-LCP.ConfReq.DATA
|
2021-02-11 22:08:22 +00:00
|
|
|
|
.BS 2 FCS
|
2021-02-17 16:15:43 +00:00
|
|
|
|
*--------------------------------------
|
2021-12-02 21:28:26 +00:00
|
|
|
|
IPCP.ConfReq .HS FF03
|
2021-02-17 16:15:43 +00:00
|
|
|
|
.HS 8021 IPCP
|
2021-12-02 21:28:26 +00:00
|
|
|
|
IPCP.ConfReq.DATA
|
2021-09-07 12:32:31 +00:00
|
|
|
|
.HS 01 Configure-Request
|
|
|
|
|
.HS FF ID
|
2021-12-02 21:28:26 +00:00
|
|
|
|
.DA /IPCP.ConfReq.LEN,#IPCP.ConfReq.LEN
|
2021-09-07 12:32:31 +00:00
|
|
|
|
* .HS 02.06.00.2D.0F.00 VJ
|
2021-02-17 16:15:43 +00:00
|
|
|
|
.HS 03.06.00.00.00.00 IP Address
|
2021-12-02 21:28:26 +00:00
|
|
|
|
IPCP.ConfReq.LEN .EQ *-IPCP.ConfReq.DATA
|
2021-02-17 16:15:43 +00:00
|
|
|
|
.BS 2 FCS
|
2021-02-11 22:08:22 +00:00
|
|
|
|
*--------------------------------------
|
2021-09-07 12:32:31 +00:00
|
|
|
|
IN.Buf .BS 256
|
|
|
|
|
OUT.Buf .BS 256
|
2021-02-11 22:08:22 +00:00
|
|
|
|
*--------------------------------------
|
2021-09-07 12:32:31 +00:00
|
|
|
|
.INB usr/src/drv/pppssc.drv.s.d
|
2021-02-11 22:08:22 +00:00
|
|
|
|
*--------------------------------------
|
|
|
|
|
MAN
|
|
|
|
|
SAVE usr/src/drv/pppssc.drv.s
|
|
|
|
|
ASM
|