A2osX/DRV/PPPSSC.DRV.S.txt

1060 lines
17 KiB
Plaintext
Raw Normal View History

2021-02-11 22:08:22 +00:00
NEW
AUTO 3,1
.LIST OFF
.OP 65C02
.OR $2000
.TF drv/pppssc.drv
*--------------------------------------
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
.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
.INB inc/eth.i
.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
ZPPtr3 .BS 2
2021-02-11 22:08:22 +00:00
ZPBufLen .BS 2
FCS .BS 2
DWORD .BS 4
2021-02-11 22:08:22 +00:00
hETCFILE .BS 1
b7D .BS 1
bLCP .BS 1
bIPCP .BS 1
Len .BS 1
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
L.MSG.SSCInit .DA MSG.SSCInit
L.MSG.LCPInit .DA MSG.LCPInit
L.MSG.IPCPInit .DA MSG.IPCPInit
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
.FIN
L.LCP.ConfReq .DA LCP.ConfReq
L.LCP.EchoRep .DA LCP.EchoRep
L.IPCP.ConfReq .DA IPCP.ConfReq
L.IN.Buf .DA IN.Buf
L.IN.Bufp1 .DA IN.Buf+1
L.OUT.Buf .DA OUT.Buf
J.LCP .DA LCP.IN.ConfReq
.DA LCP.IN.ConfAck
.DA LCP.IN.ConfNak
.DA LCP.Discard
.DA LCP.Discard
.DA LCP.Discard
.DA LCP.Discard
.DA LCP.Discard
.DA LCP.IN.EchoReq
.DA LCP.Discard
.DA LCP.Discard
.DA LCP.Discard
.DA LCP.Discard
.DA LCP.Discard
.DA LCP.Discard
J.IPCP .DA IPCP.IN.ConfReq
.DA IPCP.IN.ConfAck
.DA IPCP.IN.ConfNak
.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
lda A2osX.S,y
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-02-11 22:08:22 +00:00
.4 lda ZPPtr1+1
asl
asl
asl
asl
clc
adc #$8F
sta DEVSLOTn08F
*--------------------------------------
2021-02-11 22:08:22 +00:00
jsr SSC.Init
bcs .9
2021-02-11 22:08:22 +00:00
jsr PPP.ETCFILE
bcs .9
2021-03-11 21:40:55 +00:00
jsr PPP.Init
bcs .9
2021-02-11 22:08:22 +00:00
>PUSHW L.MSG.DETECT.OK
>PUSHW L.FD.DEV.NAME
>PUSHBI 2
>SYSCALL PrintF
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
.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
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
sta A2osX.S,x
* clc
2021-03-11 21:40:55 +00:00
rts
.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
*--------------------------------------
PPP.Init >LDYA L.MSG.LCPInit
>SYSCALL PutS
>LDYA L.LCP.EchoRep Pre calculate EchoRep FCS
jsr PPP.FCS16.Set
2021-02-11 22:08:22 +00:00
>LDYA L.LCP.ConfReq
jsr PPP.FCS16.Set
2021-02-17 16:15:43 +00:00
.DO DBG=1
>LDYA L.LCP.ConfReq
ldx #0
jsr DumpBuf.PPP
.FIN
2021-02-11 22:08:22 +00:00
>LDYA L.LCP.ConfReq
jsr SSC.WritePPP
bcs .9
2021-02-20 10:18:02 +00:00
.1 jsr SSC.ReadPPP
2021-02-11 22:08:22 +00:00
bcs .9
2021-02-17 16:15:43 +00:00
tya
beq .1
sty ZPBufLen
stz ZPBufLen+1
2021-03-11 21:40:55 +00:00
.DO DBG=1
>LDYA L.IN.Buf
ldx #2
jsr DumpBuf.PPP
.FIN
jsr PPP.IN.JUMP
2021-02-11 22:08:22 +00:00
bcs .9
2021-02-17 16:15:43 +00:00
bit bLCP
bpl .1
>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
* clc
rts
2021-02-17 16:15:43 +00:00
.9 jsr SSC.Close
lda #MLI.E.IO
* sec
rts
*--------------------------------------
PPP.IN.JUMP lda IN.Buf+3
cmp #$21
bne LCP.Discard
2021-02-17 16:15:43 +00:00
lda IN.Buf+2
cmp #$C0
bne .1
2021-02-17 16:15:43 +00:00
lda IN.Buf+4
beq LCP.Discard
2021-03-11 21:40:55 +00:00
cmp #16
bcs LCP.Discard
2021-02-11 22:08:22 +00:00
asl
tax
jmp (J.LCP-2,x)
2021-02-11 22:08:22 +00:00
.1 cmp #$80
bne LCP.Discard
2021-02-17 16:15:43 +00:00
lda IN.Buf+4
beq LCP.Discard
2021-02-11 22:08:22 +00:00
cmp #8
bcs LCP.Discard
asl
tax
jmp (J.IPCP-2,x)
2021-02-22 17:17:37 +00:00
*--------------------------------------
LCP.Discard
IPCP.Discard
2021-03-11 21:40:55 +00:00
clc
rts
*--------------------------------------
LCP.IN.ConfReq ldy #0
2021-03-11 21:40:55 +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
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
ldx #4
.3 lda IN.Buf+2,y
sta DWORD-1,x
iny
dex
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
plx
ply
.7 jsr LCP.Ack.Copy
bne .2
lda ZPBufLen
2021-03-11 21:40:55 +00:00
clc
adc #6
sta ZPBufLen
2021-03-11 21:40:55 +00:00
bcc .8
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
*--------------------------------------
LCP.Ack.Copy txa
2021-02-22 17:17:37 +00:00
sec
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
*--------------------------------------
LCP.Ack.Next txa
2021-02-22 17:17:37 +00:00
sec
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
*--------------------------------------
LCP.IN.ConfAck sec
ror bLCP
2021-02-17 16:15:43 +00:00
clc
rts
*--------------------------------------
LCP.IN.ConfNak
2021-02-17 16:15:43 +00:00
clc
rts
*--------------------------------------
LCP.IN.EchoReq .DO DBG=1
>LDYA L.LCP.EchoRep
ldx #0
jsr DumpBuf.PPP
.FIN
2021-02-17 16:15:43 +00:00
>LDYA L.LCP.EchoRep
jmp SSC.WritePPP
*--------------------------------------
IPCP.IN.ConfReq ldy #0
2021-02-20 10:18:02 +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
lda #2 Configure-Ack
sta OUT.Buf,y
2021-02-20 10:18:02 +00:00
iny ID
2021-02-20 10:18:02 +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
.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
plx
ply
2021-02-17 16:15:43 +00:00
.7 jsr LCP.Ack.Copy
bne .2
2021-02-17 16:15:43 +00:00
lda ZPBufLen
clc
adc #6
sta ZPBufLen
bcc .8
2021-02-17 16:15:43 +00:00
inc ZPBufLen+1
2021-02-17 16:15:43 +00:00
.8 >LDYA L.OUT.Buf
jsr PPP.FCS16.Set
2021-02-11 22:08:22 +00:00
.DO DBG=1
>LDYA L.OUT.Buf
ldx #0
jsr DumpBuf.PPP
.FIN
>LDYA L.OUT.Buf
jmp SSC.WritePPP
*--------------------------------------
IPCP.IN.ConfAck sec
ror bIPCP
2021-02-17 16:15:43 +00:00
2021-02-11 22:08:22 +00:00
* clc
rts
*--------------------------------------
IPCP.IN.ConfNak ldy #10
ldx #0
>PUSHW L.MSG.LocalIP
.1 lda IN.Buf,y
sta IPCP.ConfReq,y
sta DCB.IP,x
>PUSHA
inx
iny
cpy #14
bne .1
>PUSHBI 4
>SYSCALL PrintF
2021-02-11 22:08:22 +00:00
*--------------------------------------
IPCP.OUT.ConfReq
>LDYA L.IPCP.ConfReq
jsr PPP.FCS16.Set
2021-02-11 22:08:22 +00:00
.DO DBG=1
>LDYA L.IPCP.ConfReq
ldx #0
jsr DumpBuf.PPP
.FIN
2021-02-11 22:08:22 +00:00
>LDYA L.IPCP.ConfReq
jmp SSC.WritePPP
2021-02-11 22:08:22 +00:00
*--------------------------------------
SSC.Init >LDYA L.MSG.SSCInit
>SYSCALL PutS
jsr SSC.Close
2021-02-17 16:15:43 +00:00
ldy #0
2021-02-11 22:08:22 +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
.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
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
.1 lda SSC.STATUS-$8F,x
bit #SSC.STATUS.nDCD+SSC.STATUS.nDSR true when 0
beq .2
2021-02-17 16:15:43 +00:00
iny
bne .1
.9 lda #MLI.E.IO
2021-02-17 16:15:43 +00:00
sec
rts
.2 lda SSC.DATA-$8F,x discard any garbage byte
.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
clc
rts
*--------------------------------------
SSC.Close ldx DEVSLOTn08F
stz SSC.RESET-$8F,x
lda #SSC.CMD.RIRQDIS
sta SSC.CMD-$8F,x Applewin Bug ???
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
.DO SWFC=1
lda #C.XON
sta SSC.DATA-$8F,x
.FIN
2021-02-11 22:08:22 +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
.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
bne .1
2021-02-17 16:15:43 +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
.3 lda SSC.DATA-$8F,x
bit b7D
bmi .4
cmp #$7D
bne .40
ror b7D
bra .1
.4 stz b7D
eor #%00100000
.40 cmp #$FF
bne .10
sta IN.Buf
ldy #1
stz b7D
.5 lda #SSC.STATUS.RDRF
.50 bit SSC.STATUS-$8F,x incoming char?
beq .50
2021-02-11 22:08:22 +00:00
lda SSC.DATA-$8F,x
bit b7D
bmi .6
cmp #$7D
bne .7
ror b7D
bra .5
.6 stz b7D
eor #%00100000
sta IN.Buf,y
2021-02-11 22:08:22 +00:00
iny
bra .5
2021-02-17 16:15:43 +00:00
.7 cmp #$7E
beq .8
sta IN.Buf,y
iny
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-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
*--------------------------------------
.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
>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
cpy #16
2021-02-11 22:08:22 +00:00
bne .2
>PUSHBI 18
2021-02-11 22:08:22 +00:00
>SYSCALL PrintF
bcs .9
lda ZPPtr1
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
adc #16
2021-02-17 16:15:43 +00:00
sta ZPPtr2
bcs .8
2021-02-17 16:15:43 +00:00
lda ZPPtr2+1
adc #0
sta ZPPtr2+1
lda ZPPtr3
2021-02-11 22:08:22 +00:00
sec
sbc #16
sta ZPPtr3
lda ZPPtr3+1
2021-02-11 22:08:22 +00:00
sbc #0
sta ZPPtr3+1
2021-02-11 22:08:22 +00:00
bcc .9
ora ZPPtr3
2021-02-11 22:08:22 +00:00
bne .1
.8 clc
2021-02-11 22:08:22 +00:00
.9 rts
.FIN
2021-02-11 22:08:22 +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
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
dey
lda (ZPPtr1),y Len HI
adc #0
2021-02-17 16:15:43 +00:00
eor #$ff
sta ZPPtr2+1
ldy #0
2021-02-17 16:15:43 +00:00
.1 inc ZPPtr2
bne .2
inc ZPPtr2+1
beq .7
2021-02-17 16:15:43 +00:00
.2 lda (ZPPtr1),y
iny
2021-02-17 16:15:43 +00:00
bne .3
inc ZPPtr1+1
.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
.7 plp
bcc .8 CC = set
2021-02-17 16:15:43 +00:00
lda FCS
eor #$ff
eor (ZPPtr1),y
bne .9
2021-02-17 16:15:43 +00:00
iny
lda FCS+1
eor #$ff
eor (ZPPtr1),y
bne .9
clc
2021-02-17 16:15:43 +00:00
rts
.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
*--------------------------------------
.INB usr/src/drv/pppssc.drv.s.e
2021-02-17 16:15:43 +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
MSG.DETECT .AZ "PPP Driver For Apple SSC."
MSG.DETECT.OK .AZ "PPP Installed As Device : %s\r\n"
MSG.DETECT.KO .AZ "No SSC Found."
ETCFILE .AZ "${ROOT}etc/ppp.conf"
*--------------------------------------
MSG.ETCFILE .AZ "Executing %s File...\r\n"
2021-02-22 17:17:37 +00:00
MSG.UNEXPECTED .AZ "\r\nERR:Unexpected reply From Modem\r\n{%s}\r\n"
MSG.SYNTAX .AZ "\r\nERR:Bad Syntax In ppp.conf\r\n{%s}\r\n"
MSG.SSCInit .AZ "Connecting..."
MSG.LCPInit .AZ "LCP Negotiation..."
MSG.IPCPInit .AZ "IPCP Negotiation..."
MSG.LocalIP .AZ "Local IP is %d.%d.%d.%d\r\n"
MSG.RemoteIP .AZ "Remote IP is %d.%d.%d.%d\r\n"
.DO DBG=1
MSG.DUMPBUFS .AZ ">>Send:%H\r\n"
MSG.DUMPBUFR .AZ "Recv<<:%H\r\n"
MSG.HEXDUMP .AZ "%H:%h %h %h %h %h %h %h %h:%h %h %h %h %h %h %h %h\r\n"
.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"
*--------------------------------------
LCP.ConfReq .HS FF03
2021-02-11 22:08:22 +00:00
.HS C021 LCP
LCP.ConfReq.DATA
.HS 01 Configure-Request
.HS FF ID
.DA /LCP.ConfReq.LEN,#LCP.ConfReq.LEN
* .HS 01.04 MRU
* .DA /1400,#1400
.DO SWFC=1
2021-02-11 22:08:22 +00:00
.HS 02.06.000A0000 ACCM
.ELSE
.HS 02.06.00000000 ACCM
.FIN
.HS 05.06.EA4C2B41 MAGIC
2021-03-11 21:40:55 +00:00
* .HS 07.02
* .HS 08.02
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
*--------------------------------------
IPCP.ConfReq .HS FF03
2021-02-17 16:15:43 +00:00
.HS 8021 IPCP
IPCP.ConfReq.DATA
.HS 01 Configure-Request
.HS FF ID
.DA /IPCP.ConfReq.LEN,#IPCP.ConfReq.LEN
* .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
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
*--------------------------------------
IN.Buf .BS 256
OUT.Buf .BS 256
2021-02-11 22:08:22 +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