mirror of
https://github.com/A2osX/A2osX.git
synced 2025-04-06 18:37:12 +00:00
Kernel 0.94+
This commit is contained in:
parent
cde368b69e
commit
6ece240fc8
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -384,7 +384,10 @@ CS.RUN.LL.DISKII
|
||||
sec
|
||||
rts
|
||||
|
||||
.8 >PUSHW L.MSG.CRLF
|
||||
.8 ldx #0
|
||||
jsr CS.RUN.SeekToX
|
||||
|
||||
>PUSHW L.MSG.CRLF
|
||||
>PUSHBI 0
|
||||
>SYSCALL PrintF
|
||||
bcs .9
|
||||
@ -395,24 +398,20 @@ CS.RUN.LL.DISKII
|
||||
bit bVerify
|
||||
bpl .80
|
||||
|
||||
ldx #0
|
||||
jsr CS.RUN.SeekToX
|
||||
|
||||
jsr CS.RUN.LL.DISKII.V
|
||||
bcs .99
|
||||
|
||||
jsr CS.RUN.MotorOn
|
||||
|
||||
lda #20
|
||||
lda #5
|
||||
jsr CS.RUN.Wait
|
||||
|
||||
.80
|
||||
>PUSHB DSSS0000
|
||||
.80 >PUSHB DSSS0000
|
||||
>LIBCALL hLIBBLKDEV,LIBBLKDEV.D2Recalibrate
|
||||
|
||||
lda #20
|
||||
lda #5
|
||||
jsr CS.RUN.Wait
|
||||
|
||||
clc
|
||||
.99 rts
|
||||
*--------------------------------------
|
||||
CS.RUN.LL.DISKII.V
|
||||
|
@ -78,7 +78,7 @@ J.CS.RUN.PRINT .DA CS.RUN.PRINT.REG
|
||||
CS.INIT clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.RUN
|
||||
CS.RUN
|
||||
.1 >INC.G ArgCount
|
||||
>SYSCALL ArgV
|
||||
bcs .6
|
||||
|
446
BIN/PPPTEST.S.txt
Normal file
446
BIN/PPPTEST.S.txt
Normal file
@ -0,0 +1,446 @@
|
||||
NEW
|
||||
AUTO 3,1
|
||||
.LIST OFF
|
||||
.OP 65C02
|
||||
.OR $2000
|
||||
.TF root/ppptest
|
||||
*--------------------------------------
|
||||
.INB inc/macros.i
|
||||
.INB inc/a2osx.i
|
||||
*--------------------------------------
|
||||
TIMEOUT.MAX .EQ 200 20 sec.
|
||||
BUFSIZE .EQ 256
|
||||
*--------------------------------------
|
||||
.DUMMY
|
||||
.OR ZPBIN
|
||||
ZS.START
|
||||
ZPBufPtr .BS 2
|
||||
ZPBufLen .BS 2
|
||||
ZPPtr1 .BS 2
|
||||
ZPPtr2 .BS 2
|
||||
|
||||
FCS .BS 2
|
||||
hBuf .BS 1
|
||||
hDev .BS 1
|
||||
TimeOut .BS 1
|
||||
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 S.PS.F
|
||||
.DA #0
|
||||
.DA CS.END-CS.START Code Size (without Constants)
|
||||
.DA DS.END-DS.START Data Segment Size
|
||||
.DA #32 Stack Size
|
||||
.DA #ZS.END-ZS.START Zero Page Size
|
||||
.DA 0
|
||||
*--------------------------------------
|
||||
.1 .DA CS.INIT
|
||||
.DA CS.RUN
|
||||
.DA CS.DOEVENT
|
||||
.DA CS.QUIT
|
||||
L.MSG.USAGE .DA MSG.USAGE
|
||||
L.MSG.DEVOK .DA MSG.DEVOK
|
||||
L.MSG.AT .DA MSG.AT
|
||||
L.MSG.BUFLEN .DA MSG.BUFLEN
|
||||
L.MSG.HEXDUMP .DA MSG.HEXDUMP
|
||||
L.PPP.1 .DA PPP.1
|
||||
.DA 0
|
||||
*--------------------------------------
|
||||
CS.INIT clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.RUN lda #1
|
||||
>SYSCALL ArgV
|
||||
bcs .9
|
||||
|
||||
>PUSHYA
|
||||
>PUSHBI O.RDWR
|
||||
>PUSHBI 0 type
|
||||
>PUSHWZ auxtype
|
||||
>SYSCALL FOpen
|
||||
bcs .99
|
||||
|
||||
sta hDev
|
||||
>LDYA L.MSG.DEVOK
|
||||
>SYSCALL PutS
|
||||
|
||||
>LDYAI BUFSIZE
|
||||
>SYSCALL GetMem
|
||||
bcs .99
|
||||
|
||||
>STYA ZPBufPtr
|
||||
stx hBuf
|
||||
|
||||
bra CS.RUN.TEST
|
||||
* jmp CS.RUN.LOOP
|
||||
|
||||
.9 >LDYA L.MSG.USAGE
|
||||
>SYSCALL PutS
|
||||
|
||||
lda #E.SYN
|
||||
sec
|
||||
.99 rts
|
||||
*--------------------------------------
|
||||
CS.RUN.TEST
|
||||
* jsr ATInit
|
||||
* bcs .9
|
||||
|
||||
>LDYAI PPP.1.LEN
|
||||
>STYA ZPBufLen
|
||||
>LDYA L.PPP.1
|
||||
jsr PPPFCS16
|
||||
|
||||
>LDYA L.PPP.1
|
||||
jsr DumpBuf
|
||||
|
||||
>PUSHWI PPP.1.LEN
|
||||
>PUSHW L.PPP.1
|
||||
lda hDev
|
||||
|
||||
>SYSCALL FWrite
|
||||
bcs .9
|
||||
|
||||
>SLEEP
|
||||
|
||||
>PUSHWI BUFSIZE
|
||||
>PUSHW ZPBufPtr
|
||||
lda hDev
|
||||
>SYSCALL FRead
|
||||
bcs .9
|
||||
>STYA ZPBufLen
|
||||
|
||||
>LDYA ZPBufPtr
|
||||
jsr DumpBuf
|
||||
|
||||
lda #0
|
||||
sec
|
||||
|
||||
.9
|
||||
CS.RUN.RTS rts
|
||||
*--------------------------------------
|
||||
CS.RUN.LOOP >SLEEP
|
||||
|
||||
lda hDev
|
||||
>SYSCALL FEOF
|
||||
bcs CS.RUN.RTS
|
||||
tay
|
||||
bne .1 EOF, no char
|
||||
|
||||
>PUSHWI BUFSIZE
|
||||
>PUSHW ZPBufPtr
|
||||
lda hDev
|
||||
>SYSCALL FRead
|
||||
bcs CS.RUN.RTS
|
||||
|
||||
>PUSHYA len
|
||||
>PUSHW ZPBufPtr
|
||||
ldy #S.PS.hStdOut
|
||||
lda (pPS),y
|
||||
|
||||
>SYSCALL FWrite
|
||||
bcs .9
|
||||
|
||||
.1 ldy #S.PS.hStdIn
|
||||
lda (pPS),y
|
||||
|
||||
>SYSCALL FEOF
|
||||
bcs .9
|
||||
tay
|
||||
bne CS.RUN.LOOP EOF = true, no char from STDIN
|
||||
|
||||
>PUSHWI BUFSIZE
|
||||
>PUSHW ZPBufPtr
|
||||
ldy #S.PS.hStdIn
|
||||
lda (pPS),y
|
||||
>SYSCALL FRead
|
||||
bcs .9
|
||||
|
||||
tax
|
||||
lda (ZPBufPtr)
|
||||
cmp #$14 Ctrl-T
|
||||
beq .9
|
||||
|
||||
txa
|
||||
|
||||
>PUSHYA len
|
||||
>PUSHW ZPBufPtr
|
||||
lda hDev
|
||||
>SYSCALL FWrite
|
||||
bcs .9
|
||||
jmp CS.RUN.LOOP
|
||||
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
CS.DOEVENT lda (pEvent)
|
||||
bpl .9 is it a TIMER event?
|
||||
|
||||
lda TimeOut
|
||||
beq .9
|
||||
|
||||
dec TimeOut
|
||||
.9 sec do not discard TIMER event
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.QUIT lda hDev
|
||||
beq .1
|
||||
|
||||
>SYSCALL FClose
|
||||
|
||||
.1 lda hBuf
|
||||
beq .2
|
||||
|
||||
>SYSCALL FreeMem
|
||||
|
||||
.2 clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
ATInit lda #250
|
||||
sta TimeOut
|
||||
|
||||
>PUSHWI MSG.AT.LEN
|
||||
>PUSHW L.MSG.AT
|
||||
lda hDev
|
||||
>SYSCALL FWrite
|
||||
bcs .9
|
||||
|
||||
.1 lda hDev
|
||||
>SYSCALL FEOF
|
||||
bcs .9
|
||||
|
||||
tay
|
||||
beq .2
|
||||
|
||||
>SLEEP
|
||||
|
||||
dec TimeOut
|
||||
bne .1
|
||||
|
||||
rts
|
||||
|
||||
.2 >PUSHWI BUFSIZE
|
||||
>PUSHW ZPBufPtr
|
||||
lda hDev
|
||||
>SYSCALL FRead
|
||||
bcs .9
|
||||
|
||||
>PUSHYA len
|
||||
>PUSHW ZPBufPtr
|
||||
ldy #S.PS.hStdOut
|
||||
lda (pPS),y
|
||||
bcc .1
|
||||
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
* U16 fcs = 0xFFFF;
|
||||
*
|
||||
* while (len--)
|
||||
* {
|
||||
* fcs=(fcs >> 8) ^ fcstab[(fcs ^ *cp++) & 0xff];
|
||||
* }
|
||||
* return (~fcs);
|
||||
*--------------------------------------
|
||||
PPPFCS16 >STYA ZPPtr1
|
||||
|
||||
lda #$ff
|
||||
sta FCS
|
||||
sta FCS+1
|
||||
|
||||
lda ZPBufLen
|
||||
sec
|
||||
sbc #4 minus 7E .... FCS FCS 7E
|
||||
eor #$ff
|
||||
sta ZPPtr2
|
||||
|
||||
lda ZPBufLen+1
|
||||
sbc #0
|
||||
eor #$ff
|
||||
sta ZPPtr2+1
|
||||
|
||||
.1 inc ZPPtr2
|
||||
bne .2
|
||||
|
||||
inc ZPPtr2+1
|
||||
beq .8
|
||||
|
||||
.2 inc ZPPtr1
|
||||
bne .3
|
||||
|
||||
inc ZPPtr1+1
|
||||
|
||||
.3 lda (ZPPtr1)
|
||||
eor FCS
|
||||
tax
|
||||
|
||||
lda FCS.LO,x
|
||||
eor FCS+1
|
||||
sta FCS
|
||||
|
||||
lda FCS.HI,x
|
||||
sta FCS+1
|
||||
|
||||
bra .1
|
||||
|
||||
.8 lda FCS+1
|
||||
eor #$ff
|
||||
ldy #1
|
||||
sta (ZPPtr1),y
|
||||
|
||||
lda FCS
|
||||
eor #$ff
|
||||
iny
|
||||
sta (ZPPtr1),y
|
||||
|
||||
rts
|
||||
*--------------------------------------
|
||||
DumpBuf >STYA ZPPtr1
|
||||
|
||||
>PUSHW L.MSG.BUFLEN
|
||||
>PUSHW ZPBufLen
|
||||
>PUSHBI 2
|
||||
>SYSCALL PrintF
|
||||
bcs .9
|
||||
|
||||
.1 >PUSHW L.MSG.HEXDUMP
|
||||
|
||||
ldy #0
|
||||
|
||||
.2 >PUSHB (ZPPtr1),y
|
||||
iny
|
||||
cpy #16
|
||||
bne .2
|
||||
|
||||
>PUSHBI 16
|
||||
>SYSCALL PrintF
|
||||
bcs .9
|
||||
|
||||
lda ZPPtr1
|
||||
adc #16
|
||||
sta ZPPtr1
|
||||
lda ZPPtr1+1
|
||||
adc #0
|
||||
sta ZPPtr1+1
|
||||
|
||||
lda ZPBufLen
|
||||
sec
|
||||
sbc #16
|
||||
sta ZPBufLen
|
||||
lda ZPBufLen+1
|
||||
sbc #0
|
||||
sta ZPBufLen+1
|
||||
bcc .9
|
||||
ora ZPBufLen
|
||||
bne .1
|
||||
|
||||
clc
|
||||
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
CS.END
|
||||
MSG.USAGE .AZ "Usage : TERM device "
|
||||
MSG.DEVOK .AZ "Openning Device..."
|
||||
MSG.AT .AS "ATI0"
|
||||
.HS 0D0A
|
||||
MSG.AT.LEN .EQ *-MSG.AT
|
||||
MSG.BUFLEN .AZ "BufLen:%H\r\n"
|
||||
MSG.HEXDUMP .AZ "%h:%h:%h:%h:%h:%h:%h:%h:%h:%h:%h:%h:%h:%h:%h:%h\r\n"
|
||||
*--------------------------------------
|
||||
FCS.LO .DA #$0000,#$1189,#$2312,#$329b,#$4624,#$57ad,#$6536,#$74bf
|
||||
.DA #$8c48,#$9dc1,#$af5a,#$bed3,#$ca6c,#$dbe5,#$e97e,#$f8f7
|
||||
.DA #$1081,#$0108,#$3393,#$221a,#$56a5,#$472c,#$75b7,#$643e
|
||||
.DA #$9cc9,#$8d40,#$bfdb,#$ae52,#$daed,#$cb64,#$f9ff,#$e876
|
||||
.DA #$2102,#$308b,#$0210,#$1399,#$6726,#$76af,#$4434,#$55bd
|
||||
.DA #$ad4a,#$bcc3,#$8e58,#$9fd1,#$eb6e,#$fae7,#$c87c,#$d9f5
|
||||
.DA #$3183,#$200a,#$1291,#$0318,#$77a7,#$662e,#$54b5,#$453c
|
||||
.DA #$bdcb,#$ac42,#$9ed9,#$8f50,#$fbef,#$ea66,#$d8fd,#$c974
|
||||
.DA #$4204,#$538d,#$6116,#$709f,#$0420,#$15a9,#$2732,#$36bb
|
||||
.DA #$ce4c,#$dfc5,#$ed5e,#$fcd7,#$8868,#$99e1,#$ab7a,#$baf3
|
||||
.DA #$5285,#$430c,#$7197,#$601e,#$14a1,#$0528,#$37b3,#$263a
|
||||
.DA #$decd,#$cf44,#$fddf,#$ec56,#$98e9,#$8960,#$bbfb,#$aa72
|
||||
.DA #$6306,#$728f,#$4014,#$519d,#$2522,#$34ab,#$0630,#$17b9
|
||||
.DA #$ef4e,#$fec7,#$cc5c,#$ddd5,#$a96a,#$b8e3,#$8a78,#$9bf1
|
||||
.DA #$7387,#$620e,#$5095,#$411c,#$35a3,#$242a,#$16b1,#$0738
|
||||
.DA #$ffcf,#$ee46,#$dcdd,#$cd54,#$b9eb,#$a862,#$9af9,#$8b70
|
||||
.DA #$8408,#$9581,#$a71a,#$b693,#$c22c,#$d3a5,#$e13e,#$f0b7
|
||||
.DA #$0840,#$19c9,#$2b52,#$3adb,#$4e64,#$5fed,#$6d76,#$7cff
|
||||
.DA #$9489,#$8500,#$b79b,#$a612,#$d2ad,#$c324,#$f1bf,#$e036
|
||||
.DA #$18c1,#$0948,#$3bd3,#$2a5a,#$5ee5,#$4f6c,#$7df7,#$6c7e
|
||||
.DA #$a50a,#$b483,#$8618,#$9791,#$e32e,#$f2a7,#$c03c,#$d1b5
|
||||
.DA #$2942,#$38cb,#$0a50,#$1bd9,#$6f66,#$7eef,#$4c74,#$5dfd
|
||||
.DA #$b58b,#$a402,#$9699,#$8710,#$f3af,#$e226,#$d0bd,#$c134
|
||||
.DA #$39c3,#$284a,#$1ad1,#$0b58,#$7fe7,#$6e6e,#$5cf5,#$4d7c
|
||||
.DA #$c60c,#$d785,#$e51e,#$f497,#$8028,#$91a1,#$a33a,#$b2b3
|
||||
.DA #$4a44,#$5bcd,#$6956,#$78df,#$0c60,#$1de9,#$2f72,#$3efb
|
||||
.DA #$d68d,#$c704,#$f59f,#$e416,#$90a9,#$8120,#$b3bb,#$a232
|
||||
.DA #$5ac5,#$4b4c,#$79d7,#$685e,#$1ce1,#$0d68,#$3ff3,#$2e7a
|
||||
.DA #$e70e,#$f687,#$c41c,#$d595,#$a12a,#$b0a3,#$8238,#$93b1
|
||||
.DA #$6b46,#$7acf,#$4854,#$59dd,#$2d62,#$3ceb,#$0e70,#$1ff9
|
||||
.DA #$f78f,#$e606,#$d49d,#$c514,#$b1ab,#$a022,#$92b9,#$8330
|
||||
.DA #$7bc7,#$6a4e,#$58d5,#$495c,#$3de3,#$2c6a,#$1ef1,#$0f78
|
||||
*--------------------------------------
|
||||
FCS.HI .DA /$0000,/$1189,/$2312,/$329b,/$4624,/$57ad,/$6536,/$74bf
|
||||
.DA /$8c48,/$9dc1,/$af5a,/$bed3,/$ca6c,/$dbe5,/$e97e,/$f8f7
|
||||
.DA /$1081,/$0108,/$3393,/$221a,/$56a5,/$472c,/$75b7,/$643e
|
||||
.DA /$9cc9,/$8d40,/$bfdb,/$ae52,/$daed,/$cb64,/$f9ff,/$e876
|
||||
.DA /$2102,/$308b,/$0210,/$1399,/$6726,/$76af,/$4434,/$55bd
|
||||
.DA /$ad4a,/$bcc3,/$8e58,/$9fd1,/$eb6e,/$fae7,/$c87c,/$d9f5
|
||||
.DA /$3183,/$200a,/$1291,/$0318,/$77a7,/$662e,/$54b5,/$453c
|
||||
.DA /$bdcb,/$ac42,/$9ed9,/$8f50,/$fbef,/$ea66,/$d8fd,/$c974
|
||||
.DA /$4204,/$538d,/$6116,/$709f,/$0420,/$15a9,/$2732,/$36bb
|
||||
.DA /$ce4c,/$dfc5,/$ed5e,/$fcd7,/$8868,/$99e1,/$ab7a,/$baf3
|
||||
.DA /$5285,/$430c,/$7197,/$601e,/$14a1,/$0528,/$37b3,/$263a
|
||||
.DA /$decd,/$cf44,/$fddf,/$ec56,/$98e9,/$8960,/$bbfb,/$aa72
|
||||
.DA /$6306,/$728f,/$4014,/$519d,/$2522,/$34ab,/$0630,/$17b9
|
||||
.DA /$ef4e,/$fec7,/$cc5c,/$ddd5,/$a96a,/$b8e3,/$8a78,/$9bf1
|
||||
.DA /$7387,/$620e,/$5095,/$411c,/$35a3,/$242a,/$16b1,/$0738
|
||||
.DA /$ffcf,/$ee46,/$dcdd,/$cd54,/$b9eb,/$a862,/$9af9,/$8b70
|
||||
.DA /$8408,/$9581,/$a71a,/$b693,/$c22c,/$d3a5,/$e13e,/$f0b7
|
||||
.DA /$0840,/$19c9,/$2b52,/$3adb,/$4e64,/$5fed,/$6d76,/$7cff
|
||||
.DA /$9489,/$8500,/$b79b,/$a612,/$d2ad,/$c324,/$f1bf,/$e036
|
||||
.DA /$18c1,/$0948,/$3bd3,/$2a5a,/$5ee5,/$4f6c,/$7df7,/$6c7e
|
||||
.DA /$a50a,/$b483,/$8618,/$9791,/$e32e,/$f2a7,/$c03c,/$d1b5
|
||||
.DA /$2942,/$38cb,/$0a50,/$1bd9,/$6f66,/$7eef,/$4c74,/$5dfd
|
||||
.DA /$b58b,/$a402,/$9699,/$8710,/$f3af,/$e226,/$d0bd,/$c134
|
||||
.DA /$39c3,/$284a,/$1ad1,/$0b58,/$7fe7,/$6e6e,/$5cf5,/$4d7c
|
||||
.DA /$c60c,/$d785,/$e51e,/$f497,/$8028,/$91a1,/$a33a,/$b2b3
|
||||
.DA /$4a44,/$5bcd,/$6956,/$78df,/$0c60,/$1de9,/$2f72,/$3efb
|
||||
.DA /$d68d,/$c704,/$f59f,/$e416,/$90a9,/$8120,/$b3bb,/$a232
|
||||
.DA /$5ac5,/$4b4c,/$79d7,/$685e,/$1ce1,/$0d68,/$3ff3,/$2e7a
|
||||
.DA /$e70e,/$f687,/$c41c,/$d595,/$a12a,/$b0a3,/$8238,/$93b1
|
||||
.DA /$6b46,/$7acf,/$4854,/$59dd,/$2d62,/$3ceb,/$0e70,/$1ff9
|
||||
.DA /$f78f,/$e606,/$d49d,/$c514,/$b1ab,/$a022,/$92b9,/$8330
|
||||
.DA /$7bc7,/$6a4e,/$58d5,/$495c,/$3de3,/$2c6a,/$1ef1,/$0f78
|
||||
*--------------------------------------
|
||||
PPP.1 .HS 7E
|
||||
|
||||
* .HS ff.03.C0.21.01.01.00.17.02.06.00.0a.00.00.05.06
|
||||
* .HS 00.2a.2b.78.07.02.08.02.0d.03.06
|
||||
* .HS A5.F8
|
||||
|
||||
PPP.1.START .HS FF03
|
||||
.HS C021 LCP
|
||||
PPP.1.LCP .HS 01 Configure-Request
|
||||
.HS 01 ID
|
||||
.DA /PPP.1.LCP.LEN,#PPP.1.LCP.LEN
|
||||
.HS 01.04.05DC MRU
|
||||
.HS 02.06.000A0000 ACCM
|
||||
.HS 05.06.2A2B7807 MAGIC
|
||||
PPP.1.LCP.LEN .EQ *-PPP.1.LCP
|
||||
.BS 2 FCS
|
||||
.HS 7E
|
||||
PPP.1.LEN .EQ *-PPP.1
|
||||
*--------------------------------------
|
||||
.DUMMY
|
||||
.OR 0
|
||||
DS.START
|
||||
DS.END
|
||||
.ED
|
||||
*--------------------------------------
|
||||
MAN
|
||||
SAVE root/ppptest.s
|
||||
ASM
|
@ -101,8 +101,8 @@ CMD.CD.YA >PUSHYA
|
||||
.12 >LDYA ZPPtr1
|
||||
jsr IO.StatYA
|
||||
bcs .19
|
||||
|
||||
cmp #S.FI.T.DIR
|
||||
|
||||
cmp /S.STAT.MODE.DIR
|
||||
beq .11
|
||||
|
||||
lda #MLI.E.INVPATH
|
||||
@ -431,7 +431,7 @@ CMD.RD lda (ZPArgVBufPtr)
|
||||
jsr IO.StatArgVBufPtr
|
||||
bcs .99
|
||||
|
||||
cmp #S.FI.T.DIR
|
||||
cmp /S.STAT.MODE.DIR
|
||||
bne CMD.REN.CSYN
|
||||
|
||||
>LDYA ZPArgVBufPtr
|
||||
|
@ -156,7 +156,7 @@ EXP.OP.UNARY.ESYN
|
||||
EXP.OP.UNARY.D jsr IO.StatArgVBufPtr
|
||||
bcs EXP.OP.UNARY.DEF.9
|
||||
|
||||
cmp #S.FI.T.DIR
|
||||
cmp /S.STAT.MODE.DIR
|
||||
bne EXP.OP.UNARY.DEF.9
|
||||
bra EXP.OP.UNARY.DEF.8
|
||||
|
||||
@ -167,7 +167,7 @@ EXP.OP.UNARY.E jsr IO.StatArgVBufPtr
|
||||
EXP.OP.UNARY.F jsr IO.StatArgVBufPtr
|
||||
bcs EXP.OP.UNARY.DEF.9
|
||||
|
||||
cmp #S.FI.T.DIR
|
||||
cmp /S.STAT.MODE.DIR
|
||||
beq EXP.OP.UNARY.DEF.9
|
||||
|
||||
EXP.OP.UNARY.DEF.8
|
||||
|
@ -155,8 +155,9 @@ IO.StatYA >PUSHYA
|
||||
>SYSCALL Stat
|
||||
bcs .9
|
||||
|
||||
ldy #S.STAT.P.TYPE
|
||||
ldy #S.STAT.MODE+1
|
||||
lda (ZPCLBuf),y
|
||||
and #$F0
|
||||
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
|
@ -317,9 +317,10 @@ CS.RUN.CheckDir >PUSHW ZPFullPathPtr
|
||||
|
||||
rts
|
||||
|
||||
.1 ldy #STAT+S.STAT.P.TYPE
|
||||
.1 ldy #STAT+S.STAT.MODE
|
||||
lda (pData),y
|
||||
cmp #$F
|
||||
and #$F0
|
||||
cmp /S.STAT.MODE.DIR
|
||||
bne .99
|
||||
clc
|
||||
rts
|
||||
|
@ -184,9 +184,11 @@ CS.RUN.LOOP ldy #S.PS.hStdIn
|
||||
jsr CS.RUN.DEV
|
||||
bcc CS.RUN.LOOP
|
||||
rts
|
||||
.5 ldy #S.STAT.P.TYPE
|
||||
|
||||
.5 ldy #S.STAT.MODE+1
|
||||
lda (ZPFileStat),y
|
||||
cmp #$0F Directory ?
|
||||
and #$F0
|
||||
cmp /S.STAT.MODE.DIR
|
||||
bne .6
|
||||
|
||||
jsr CS.RUN.DIR
|
||||
|
@ -13,6 +13,9 @@ NEW
|
||||
.INB inc/nic.i
|
||||
*--------------------------------------
|
||||
INBUF.SIZE .EQ $800
|
||||
*AT+CGDCONT=1,"IP","APN","0.0.0.0",0,0
|
||||
*AT+CGDCONT=1,"PPP","APN","0.0.0.0",0,0
|
||||
*ATD*99#1
|
||||
*--------------------------------------
|
||||
.DUMMY
|
||||
.OR ZPBIN
|
||||
@ -53,11 +56,15 @@ L.FD.DEV .DA FD.DEV
|
||||
L.FD.DEV.NAME .DA FD.DEV.NAME
|
||||
L.ETCFILE .DA ETCFILE
|
||||
L.MSG.ETCFILE .DA MSG.ETCFILE
|
||||
L.MSG.BUFLEN .DA MSG.BUFLEN
|
||||
L.MSG.DUMPBUF .DA MSG.DUMPBUFS
|
||||
.DA MSG.DUMPBUFR
|
||||
L.MSG.HEXDUMP .DA MSG.HEXDUMP
|
||||
L.PPP.CfgReg .DA PPP.CfgReg
|
||||
L.MSG.STRING .DA MSG.STRING
|
||||
L.PPP.LCPReq .DA PPP.LCPReq
|
||||
L.PPP.IPCPReq .DA PPP.IPCPReq
|
||||
L.RCV.Buf .DA RCV.Buf
|
||||
L.RCV.Bufp1 .DA RCV.Buf+1
|
||||
L.RCV.Bufp2 .DA RCV.Buf+2
|
||||
.DA 0 End Of Reloc Table
|
||||
*--------------------------------------
|
||||
Dev.Detect >STYA ZPArgsPtr
|
||||
@ -107,7 +114,7 @@ Dev.Detect >STYA ZPArgsPtr
|
||||
clc
|
||||
adc #$8F
|
||||
sta DEVSLOTn08F
|
||||
|
||||
|
||||
jsr SSC.Init
|
||||
jsr PPP.ETCFILE
|
||||
jsr PPP.Init
|
||||
@ -131,14 +138,14 @@ Dev.Detect >STYA ZPArgsPtr
|
||||
>PUSHW L.FD.DEV.NAME
|
||||
>SYSCALL MKDev
|
||||
bcs .9
|
||||
|
||||
|
||||
lda FD.DEV.NAME+3
|
||||
and #$0F
|
||||
tax
|
||||
lda #A2osX.S.NIC
|
||||
sta A2osX.S,x
|
||||
|
||||
.9
|
||||
.9
|
||||
Dev.Detect.RTS rts
|
||||
*--------------------------------------
|
||||
PPP.ETCFILE >PUSHW L.ETCFILE
|
||||
@ -149,7 +156,7 @@ PPP.ETCFILE >PUSHW L.ETCFILE
|
||||
bcs Dev.Detect.RTS
|
||||
|
||||
sta hETCFILE
|
||||
|
||||
|
||||
>PUSHW L.MSG.ETCFILE
|
||||
>PUSHW L.ETCFILE
|
||||
>PUSHBI 2
|
||||
@ -164,25 +171,30 @@ PPP.ETCFILE >PUSHW L.ETCFILE
|
||||
lda RCV.Buf
|
||||
cmp #'?'
|
||||
bne .7
|
||||
|
||||
|
||||
>LDYA L.RCV.Buf
|
||||
>SYSCALL PutS
|
||||
|
||||
|
||||
>LDYA L.RCV.Bufp1
|
||||
jsr SSC.WriteYA
|
||||
bcs .9
|
||||
|
||||
|
||||
.2 jsr SSC.Read
|
||||
bcs .9
|
||||
|
||||
|
||||
tya
|
||||
beq .2
|
||||
|
||||
|
||||
lda #0
|
||||
sta RCV.Buf,y
|
||||
>LDYA L.RCV.Buf
|
||||
>SYSCALL PutS
|
||||
|
||||
|
||||
>PUSHW L.MSG.STRING
|
||||
tya
|
||||
>PUSHA
|
||||
>PUSHW L.RCV.Bufp2
|
||||
>PUSHBI 3
|
||||
>SYSCALL PrintF
|
||||
|
||||
.7 bra .1
|
||||
|
||||
.8 cmp #MLI.E.EOF
|
||||
@ -190,7 +202,7 @@ PPP.ETCFILE >PUSHW L.ETCFILE
|
||||
|
||||
lda #0
|
||||
clc
|
||||
|
||||
|
||||
.9 php
|
||||
pha
|
||||
lda hETCFILE
|
||||
@ -200,36 +212,53 @@ PPP.ETCFILE >PUSHW L.ETCFILE
|
||||
|
||||
.99 rts
|
||||
*--------------------------------------
|
||||
PPP.Init >LDYAI PPP.CfgReg.LEN
|
||||
PPP.Init >LDYAI PPP.LCPReq.LEN
|
||||
>STYA ZPBufLen
|
||||
>LDYA L.PPP.CfgReg
|
||||
>LDYA L.PPP.LCPReq
|
||||
jsr PPPFCS16
|
||||
|
||||
>LDYA L.PPP.CfgReg
|
||||
>LDYA L.PPP.LCPReq
|
||||
ldx #0
|
||||
jsr DumpBuf
|
||||
|
||||
>LDYA L.PPP.CfgReg
|
||||
ldx #PPP.CfgReg.LEN
|
||||
|
||||
>LDYA L.PPP.LCPReq
|
||||
ldx #PPP.LCPReq.LEN
|
||||
|
||||
jsr SSC.WriteYAX
|
||||
bcs .9
|
||||
|
||||
|
||||
>LDYAI PPP.IPCPReq.LEN
|
||||
>STYA ZPBufLen
|
||||
>LDYA L.PPP.IPCPReq
|
||||
jsr PPPFCS16
|
||||
|
||||
>LDYA L.PPP.IPCPReq
|
||||
ldx #0
|
||||
jsr DumpBuf
|
||||
|
||||
>LDYA L.PPP.IPCPReq
|
||||
ldx #PPP.IPCPReq.LEN
|
||||
|
||||
jsr SSC.WriteYAX
|
||||
bcs .9
|
||||
|
||||
.1 jsr SSC.Read
|
||||
bcs .9
|
||||
|
||||
|
||||
tya
|
||||
beq .1
|
||||
|
||||
|
||||
sty ZPBufLen
|
||||
stz ZPBufLen+1
|
||||
|
||||
|
||||
>LDYA L.RCV.Buf
|
||||
ldx #2
|
||||
jsr DumpBuf
|
||||
|
||||
sec
|
||||
|
||||
|
||||
* clc
|
||||
.9 rts
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
SSC.Init ldx DEVSLOTn08F
|
||||
stz SSC.RESET-$8F,x
|
||||
@ -254,74 +283,102 @@ SSC.WriteYA >STYA ZPPtr1
|
||||
lda #C.CR
|
||||
sta (ZPPtr1),y
|
||||
iny
|
||||
|
||||
|
||||
lda #C.LF
|
||||
sta (ZPPtr1),y
|
||||
iny
|
||||
|
||||
|
||||
sty Len
|
||||
|
||||
|
||||
bra SSC.Write
|
||||
|
||||
SSC.WriteYAX >STYA ZPPtr1
|
||||
stx Len
|
||||
|
||||
|
||||
SSC.Write php
|
||||
sei
|
||||
|
||||
|
||||
ldx DEVSLOTn08F
|
||||
|
||||
lda SSC.STATUS-$8F,x
|
||||
|
||||
ldy #0
|
||||
|
||||
.1 phy
|
||||
|
||||
ldy #0
|
||||
|
||||
.2 lda SSC.STATUS-$8F,x
|
||||
bit #SSC.STATUS.nDSR true when 0
|
||||
bne .9
|
||||
|
||||
ldy #0
|
||||
|
||||
.1 lda SSC.STATUS-$8F,x
|
||||
and #SSC.STATUS.TDRE Register Empty ?
|
||||
beq .1
|
||||
bit #SSC.STATUS.TDRE Register Empty ?
|
||||
bne .3
|
||||
|
||||
iny
|
||||
bne .2
|
||||
|
||||
.9 lda #MLI.E.IO
|
||||
plp
|
||||
sec
|
||||
rts
|
||||
|
||||
.3 ply
|
||||
|
||||
lda (ZPPtr1),y
|
||||
pha
|
||||
and #$7F
|
||||
cmp #C.XON
|
||||
beq .4
|
||||
|
||||
cmp #C.XOFF
|
||||
bne .6
|
||||
|
||||
.4 lda #$7D
|
||||
sta SSC.DATA-$8F,x
|
||||
|
||||
.5 lda SSC.STATUS-$8F,x
|
||||
bit #SSC.STATUS.TDRE
|
||||
beq .5
|
||||
|
||||
pla
|
||||
ora #$20
|
||||
.HS F0 BEQ
|
||||
|
||||
.6 pla
|
||||
|
||||
sta SSC.DATA-$8F,x
|
||||
iny
|
||||
cpy Len
|
||||
bne .1
|
||||
|
||||
.2 lda SSC.STATUS-$8F,x
|
||||
and #SSC.STATUS.TDRE Register Empty ?
|
||||
|
||||
|
||||
plp
|
||||
clc
|
||||
rts
|
||||
|
||||
.9 plp
|
||||
lda #MLI.E.IO
|
||||
sec
|
||||
rts
|
||||
*--------------------------------------
|
||||
SSC.Read php
|
||||
sei
|
||||
|
||||
|
||||
ldx DEVSLOTn08F
|
||||
|
||||
|
||||
ldy #0
|
||||
|
||||
.1 lda SSC.STATUS-$8F,x
|
||||
|
||||
.1 phy
|
||||
|
||||
ldy #0
|
||||
|
||||
.2 lda SSC.STATUS-$8F,x
|
||||
bit #SSC.STATUS.nDSR true when 0
|
||||
bne .9
|
||||
|
||||
phy
|
||||
|
||||
ldy #0
|
||||
|
||||
.2 bit #SSC.STATUS.RDRF incoming char?
|
||||
bit #SSC.STATUS.RDRF incoming char?
|
||||
bne .3
|
||||
|
||||
dey
|
||||
|
||||
iny
|
||||
bne .2
|
||||
|
||||
|
||||
ply
|
||||
|
||||
|
||||
plp
|
||||
clc
|
||||
rts
|
||||
@ -331,45 +388,56 @@ SSC.Read php
|
||||
lda SSC.DATA-$8F,x
|
||||
sta RCV.Buf,y
|
||||
iny
|
||||
|
||||
|
||||
bra .1
|
||||
|
||||
|
||||
.9 lda #MLI.E.IO
|
||||
plp
|
||||
sec
|
||||
rts
|
||||
rts
|
||||
*--------------------------------------
|
||||
DumpBuf >STYA ZPPtr1
|
||||
|
||||
>PUSHW L.MSG.BUFLEN
|
||||
>PUSHW L.MSG.DUMPBUF,x
|
||||
>PUSHW ZPBufLen
|
||||
>PUSHBI 2
|
||||
>SYSCALL PrintF
|
||||
bcs .9
|
||||
|
||||
stz ZPPtr2
|
||||
stz ZPPtr2+1
|
||||
|
||||
.1 >PUSHW L.MSG.HEXDUMP
|
||||
>PUSHW ZPPtr2
|
||||
|
||||
ldy #0
|
||||
|
||||
.2 >PUSHB (ZPPtr1),y
|
||||
iny
|
||||
cpy #16
|
||||
cpy #8
|
||||
bne .2
|
||||
|
||||
>PUSHBI 16
|
||||
>PUSHBI 10
|
||||
>SYSCALL PrintF
|
||||
bcs .9
|
||||
|
||||
lda ZPPtr1
|
||||
adc #16
|
||||
adc #8
|
||||
sta ZPPtr1
|
||||
lda ZPPtr1+1
|
||||
adc #0
|
||||
sta ZPPtr1+1
|
||||
|
||||
lda ZPPtr2
|
||||
adc #8
|
||||
sta ZPPtr2
|
||||
lda ZPPtr2+1
|
||||
adc #0
|
||||
sta ZPPtr2+1
|
||||
|
||||
lda ZPBufLen
|
||||
sec
|
||||
sbc #16
|
||||
sbc #8
|
||||
sta ZPBufLen
|
||||
lda ZPBufLen+1
|
||||
sbc #0
|
||||
@ -383,18 +451,139 @@ DumpBuf >STYA ZPPtr1
|
||||
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
PPPFCS16 >STYA ZPPtr1
|
||||
|
||||
lda #$ff
|
||||
sta FCS
|
||||
sta FCS+1
|
||||
|
||||
lda ZPBufLen
|
||||
sec
|
||||
sbc #4 minus 7E .... FCS FCS 7E
|
||||
eor #$ff
|
||||
sta ZPPtr2
|
||||
|
||||
lda ZPBufLen+1
|
||||
sbc #0
|
||||
eor #$ff
|
||||
sta ZPPtr2+1
|
||||
|
||||
.1 inc ZPPtr2
|
||||
bne .2
|
||||
|
||||
inc ZPPtr2+1
|
||||
beq .8
|
||||
|
||||
.2 inc ZPPtr1 skip First 7E
|
||||
bne .3
|
||||
|
||||
inc ZPPtr1+1
|
||||
|
||||
.3 lda (ZPPtr1)
|
||||
eor FCS
|
||||
tax
|
||||
|
||||
lda FCS.LO,x
|
||||
eor FCS+1
|
||||
sta FCS
|
||||
|
||||
lda FCS.HI,x
|
||||
sta FCS+1
|
||||
|
||||
bra .1
|
||||
|
||||
.8 lda FCS+1
|
||||
eor #$ff
|
||||
ldy #1
|
||||
sta (ZPPtr1),y
|
||||
|
||||
lda FCS
|
||||
eor #$ff
|
||||
iny
|
||||
sta (ZPPtr1),y
|
||||
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.END
|
||||
FCS.LO .DA #$0000,#$1189,#$2312,#$329b,#$4624,#$57ad,#$6536,#$74bf
|
||||
.DA #$8c48,#$9dc1,#$af5a,#$bed3,#$ca6c,#$dbe5,#$e97e,#$f8f7
|
||||
.DA #$1081,#$0108,#$3393,#$221a,#$56a5,#$472c,#$75b7,#$643e
|
||||
.DA #$9cc9,#$8d40,#$bfdb,#$ae52,#$daed,#$cb64,#$f9ff,#$e876
|
||||
.DA #$2102,#$308b,#$0210,#$1399,#$6726,#$76af,#$4434,#$55bd
|
||||
.DA #$ad4a,#$bcc3,#$8e58,#$9fd1,#$eb6e,#$fae7,#$c87c,#$d9f5
|
||||
.DA #$3183,#$200a,#$1291,#$0318,#$77a7,#$662e,#$54b5,#$453c
|
||||
.DA #$bdcb,#$ac42,#$9ed9,#$8f50,#$fbef,#$ea66,#$d8fd,#$c974
|
||||
.DA #$4204,#$538d,#$6116,#$709f,#$0420,#$15a9,#$2732,#$36bb
|
||||
.DA #$ce4c,#$dfc5,#$ed5e,#$fcd7,#$8868,#$99e1,#$ab7a,#$baf3
|
||||
.DA #$5285,#$430c,#$7197,#$601e,#$14a1,#$0528,#$37b3,#$263a
|
||||
.DA #$decd,#$cf44,#$fddf,#$ec56,#$98e9,#$8960,#$bbfb,#$aa72
|
||||
.DA #$6306,#$728f,#$4014,#$519d,#$2522,#$34ab,#$0630,#$17b9
|
||||
.DA #$ef4e,#$fec7,#$cc5c,#$ddd5,#$a96a,#$b8e3,#$8a78,#$9bf1
|
||||
.DA #$7387,#$620e,#$5095,#$411c,#$35a3,#$242a,#$16b1,#$0738
|
||||
.DA #$ffcf,#$ee46,#$dcdd,#$cd54,#$b9eb,#$a862,#$9af9,#$8b70
|
||||
.DA #$8408,#$9581,#$a71a,#$b693,#$c22c,#$d3a5,#$e13e,#$f0b7
|
||||
.DA #$0840,#$19c9,#$2b52,#$3adb,#$4e64,#$5fed,#$6d76,#$7cff
|
||||
.DA #$9489,#$8500,#$b79b,#$a612,#$d2ad,#$c324,#$f1bf,#$e036
|
||||
.DA #$18c1,#$0948,#$3bd3,#$2a5a,#$5ee5,#$4f6c,#$7df7,#$6c7e
|
||||
.DA #$a50a,#$b483,#$8618,#$9791,#$e32e,#$f2a7,#$c03c,#$d1b5
|
||||
.DA #$2942,#$38cb,#$0a50,#$1bd9,#$6f66,#$7eef,#$4c74,#$5dfd
|
||||
.DA #$b58b,#$a402,#$9699,#$8710,#$f3af,#$e226,#$d0bd,#$c134
|
||||
.DA #$39c3,#$284a,#$1ad1,#$0b58,#$7fe7,#$6e6e,#$5cf5,#$4d7c
|
||||
.DA #$c60c,#$d785,#$e51e,#$f497,#$8028,#$91a1,#$a33a,#$b2b3
|
||||
.DA #$4a44,#$5bcd,#$6956,#$78df,#$0c60,#$1de9,#$2f72,#$3efb
|
||||
.DA #$d68d,#$c704,#$f59f,#$e416,#$90a9,#$8120,#$b3bb,#$a232
|
||||
.DA #$5ac5,#$4b4c,#$79d7,#$685e,#$1ce1,#$0d68,#$3ff3,#$2e7a
|
||||
.DA #$e70e,#$f687,#$c41c,#$d595,#$a12a,#$b0a3,#$8238,#$93b1
|
||||
.DA #$6b46,#$7acf,#$4854,#$59dd,#$2d62,#$3ceb,#$0e70,#$1ff9
|
||||
.DA #$f78f,#$e606,#$d49d,#$c514,#$b1ab,#$a022,#$92b9,#$8330
|
||||
.DA #$7bc7,#$6a4e,#$58d5,#$495c,#$3de3,#$2c6a,#$1ef1,#$0f78
|
||||
*--------------------------------------
|
||||
FCS.HI .DA /$0000,/$1189,/$2312,/$329b,/$4624,/$57ad,/$6536,/$74bf
|
||||
.DA /$8c48,/$9dc1,/$af5a,/$bed3,/$ca6c,/$dbe5,/$e97e,/$f8f7
|
||||
.DA /$1081,/$0108,/$3393,/$221a,/$56a5,/$472c,/$75b7,/$643e
|
||||
.DA /$9cc9,/$8d40,/$bfdb,/$ae52,/$daed,/$cb64,/$f9ff,/$e876
|
||||
.DA /$2102,/$308b,/$0210,/$1399,/$6726,/$76af,/$4434,/$55bd
|
||||
.DA /$ad4a,/$bcc3,/$8e58,/$9fd1,/$eb6e,/$fae7,/$c87c,/$d9f5
|
||||
.DA /$3183,/$200a,/$1291,/$0318,/$77a7,/$662e,/$54b5,/$453c
|
||||
.DA /$bdcb,/$ac42,/$9ed9,/$8f50,/$fbef,/$ea66,/$d8fd,/$c974
|
||||
.DA /$4204,/$538d,/$6116,/$709f,/$0420,/$15a9,/$2732,/$36bb
|
||||
.DA /$ce4c,/$dfc5,/$ed5e,/$fcd7,/$8868,/$99e1,/$ab7a,/$baf3
|
||||
.DA /$5285,/$430c,/$7197,/$601e,/$14a1,/$0528,/$37b3,/$263a
|
||||
.DA /$decd,/$cf44,/$fddf,/$ec56,/$98e9,/$8960,/$bbfb,/$aa72
|
||||
.DA /$6306,/$728f,/$4014,/$519d,/$2522,/$34ab,/$0630,/$17b9
|
||||
.DA /$ef4e,/$fec7,/$cc5c,/$ddd5,/$a96a,/$b8e3,/$8a78,/$9bf1
|
||||
.DA /$7387,/$620e,/$5095,/$411c,/$35a3,/$242a,/$16b1,/$0738
|
||||
.DA /$ffcf,/$ee46,/$dcdd,/$cd54,/$b9eb,/$a862,/$9af9,/$8b70
|
||||
.DA /$8408,/$9581,/$a71a,/$b693,/$c22c,/$d3a5,/$e13e,/$f0b7
|
||||
.DA /$0840,/$19c9,/$2b52,/$3adb,/$4e64,/$5fed,/$6d76,/$7cff
|
||||
.DA /$9489,/$8500,/$b79b,/$a612,/$d2ad,/$c324,/$f1bf,/$e036
|
||||
.DA /$18c1,/$0948,/$3bd3,/$2a5a,/$5ee5,/$4f6c,/$7df7,/$6c7e
|
||||
.DA /$a50a,/$b483,/$8618,/$9791,/$e32e,/$f2a7,/$c03c,/$d1b5
|
||||
.DA /$2942,/$38cb,/$0a50,/$1bd9,/$6f66,/$7eef,/$4c74,/$5dfd
|
||||
.DA /$b58b,/$a402,/$9699,/$8710,/$f3af,/$e226,/$d0bd,/$c134
|
||||
.DA /$39c3,/$284a,/$1ad1,/$0b58,/$7fe7,/$6e6e,/$5cf5,/$4d7c
|
||||
.DA /$c60c,/$d785,/$e51e,/$f497,/$8028,/$91a1,/$a33a,/$b2b3
|
||||
.DA /$4a44,/$5bcd,/$6956,/$78df,/$0c60,/$1de9,/$2f72,/$3efb
|
||||
.DA /$d68d,/$c704,/$f59f,/$e416,/$90a9,/$8120,/$b3bb,/$a232
|
||||
.DA /$5ac5,/$4b4c,/$79d7,/$685e,/$1ce1,/$0d68,/$3ff3,/$2e7a
|
||||
.DA /$e70e,/$f687,/$c41c,/$d595,/$a12a,/$b0a3,/$8238,/$93b1
|
||||
.DA /$6b46,/$7acf,/$4854,/$59dd,/$2d62,/$3ceb,/$0e70,/$1ff9
|
||||
.DA /$f78f,/$e606,/$d49d,/$c514,/$b1ab,/$a022,/$92b9,/$8330
|
||||
.DA /$7bc7,/$6a4e,/$58d5,/$495c,/$3de3,/$2c6a,/$1ef1,/$0f78
|
||||
*--------------------------------------
|
||||
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."
|
||||
MSG.STRING .AZ "[%h]:{%s}\r\n"
|
||||
ETCFILE .AZ "${ROOT}etc/ppp.conf"
|
||||
*--------------------------------------
|
||||
MSG.ETCFILE .AZ "Executing %s File...\r\n"
|
||||
MSG.BUFLEN .AZ "BufLen:%H\r\n"
|
||||
MSG.HEXDUMP .AZ "%h:%h:%h:%h:%h:%h:%h:%h:%h:%h:%h:%h:%h:%h:%h:%h\r\n"
|
||||
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\r\n"
|
||||
*--------------------------------------
|
||||
FD.DEV .DA #S.FD.T.CDEV
|
||||
.DA #0 HANDLER
|
||||
@ -406,20 +595,38 @@ FD.DEV .DA #S.FD.T.CDEV
|
||||
.DA 0 BUFPTR
|
||||
FD.DEV.NAME .AZ "eth1"
|
||||
*--------------------------------------
|
||||
PPP.CfgReg .HS 7E
|
||||
PPP.CfgReg.START
|
||||
PPP.LCPReq .HS 7E
|
||||
PPP.LCPReq.START
|
||||
.HS FF03
|
||||
.HS C021 LCP
|
||||
PPP.CfgReg.LCP .HS 01 Configure-Request
|
||||
PPP.LCPReq.DATA .HS 01 Configure-Request
|
||||
.HS 01 ID
|
||||
.DA /PPP.CfgReg.LCP.LEN,#PPP.CfgReg.LCP.LEN
|
||||
.HS 01.04.05DC MRU
|
||||
.DA /PPP.LCPReq.DATA.LEN,#PPP.LCPReq.DATA.LEN
|
||||
.HS 01.04 MRU
|
||||
.DA /576,#576
|
||||
.HS 02.06.000A0000 ACCM
|
||||
.HS 05.06.55334466 MAGIC
|
||||
PPP.CfgReg.LCP.LEN .EQ *-PPP.CfgReg.LCP
|
||||
.HS 05.06.002A2B78 MAGIC
|
||||
.HS 07.02
|
||||
.HS 08.02
|
||||
PPP.LCPReq.DATA.LEN .EQ *-PPP.LCPReq.DATA
|
||||
* .HS 0000 PADDING
|
||||
.BS 2 FCS
|
||||
.HS 7E
|
||||
PPP.CfgReg.LEN .EQ *-PPP.CfgReg
|
||||
PPP.LCPReq.LEN .EQ *-PPP.LCPReq
|
||||
*--------------------------------------
|
||||
PPP.IPCPReq .HS 7E
|
||||
PPP.IPCPReq.START
|
||||
.HS FF03
|
||||
.HS 8021 IPCP
|
||||
PPP.IPCPReq.DATA .HS 01 Configure-Request
|
||||
.HS 01 ID
|
||||
.DA /PPP.IPCPReq.DATA.LEN,#PPP.IPCPReq.DATA.LEN
|
||||
.HS 03.06.00.00.00.00 IP Address
|
||||
PPP.IPCPReq.DATA.LEN .EQ *-PPP.IPCPReq.DATA
|
||||
* .HS 0000 PADDING
|
||||
.BS 2 FCS
|
||||
.HS 7E
|
||||
PPP.IPCPReq.LEN .EQ *-PPP.IPCPReq
|
||||
*--------------------------------------
|
||||
RCV.Buf .BS 256
|
||||
*--------------------------------------
|
||||
@ -564,7 +771,7 @@ CLOSE php
|
||||
|
||||
lda #S.DIB.S.OPENED
|
||||
trb DIB+S.DIB.S
|
||||
|
||||
|
||||
lda hINBUF
|
||||
>SYSCALL2 FreeMem
|
||||
|
||||
@ -767,125 +974,7 @@ IRQ.8 clc
|
||||
IRQ.9 sec
|
||||
rts
|
||||
*--------------------------------------
|
||||
PPPFCS16 >STYA ZPPtr1
|
||||
|
||||
lda #$ff
|
||||
sta FCS
|
||||
sta FCS+1
|
||||
|
||||
lda ZPBufLen
|
||||
sec
|
||||
sbc #4 minus 7E .... FCS FCS 7E
|
||||
eor #$ff
|
||||
sta ZPPtr2
|
||||
|
||||
lda ZPBufLen+1
|
||||
sbc #0
|
||||
eor #$ff
|
||||
sta ZPPtr2+1
|
||||
|
||||
.1 inc ZPPtr2
|
||||
bne .2
|
||||
|
||||
inc ZPPtr2+1
|
||||
beq .8
|
||||
|
||||
.2 inc ZPPtr1
|
||||
bne .3
|
||||
|
||||
inc ZPPtr1+1
|
||||
|
||||
.3 lda (ZPPtr1)
|
||||
eor FCS
|
||||
tax
|
||||
|
||||
lda FCS.LO,x
|
||||
eor FCS+1
|
||||
sta FCS
|
||||
|
||||
lda FCS.HI,x
|
||||
sta FCS+1
|
||||
|
||||
bra .1
|
||||
|
||||
.8 lda FCS+1
|
||||
eor #$ff
|
||||
ldy #1
|
||||
sta (ZPPtr1),y
|
||||
|
||||
lda FCS
|
||||
eor #$ff
|
||||
iny
|
||||
sta (ZPPtr1),y
|
||||
|
||||
rts
|
||||
*--------------------------------------
|
||||
DRV.CS.END
|
||||
FCS.LO .DA #$0000,#$1189,#$2312,#$329b,#$4624,#$57ad,#$6536,#$74bf
|
||||
.DA #$8c48,#$9dc1,#$af5a,#$bed3,#$ca6c,#$dbe5,#$e97e,#$f8f7
|
||||
.DA #$1081,#$0108,#$3393,#$221a,#$56a5,#$472c,#$75b7,#$643e
|
||||
.DA #$9cc9,#$8d40,#$bfdb,#$ae52,#$daed,#$cb64,#$f9ff,#$e876
|
||||
.DA #$2102,#$308b,#$0210,#$1399,#$6726,#$76af,#$4434,#$55bd
|
||||
.DA #$ad4a,#$bcc3,#$8e58,#$9fd1,#$eb6e,#$fae7,#$c87c,#$d9f5
|
||||
.DA #$3183,#$200a,#$1291,#$0318,#$77a7,#$662e,#$54b5,#$453c
|
||||
.DA #$bdcb,#$ac42,#$9ed9,#$8f50,#$fbef,#$ea66,#$d8fd,#$c974
|
||||
.DA #$4204,#$538d,#$6116,#$709f,#$0420,#$15a9,#$2732,#$36bb
|
||||
.DA #$ce4c,#$dfc5,#$ed5e,#$fcd7,#$8868,#$99e1,#$ab7a,#$baf3
|
||||
.DA #$5285,#$430c,#$7197,#$601e,#$14a1,#$0528,#$37b3,#$263a
|
||||
.DA #$decd,#$cf44,#$fddf,#$ec56,#$98e9,#$8960,#$bbfb,#$aa72
|
||||
.DA #$6306,#$728f,#$4014,#$519d,#$2522,#$34ab,#$0630,#$17b9
|
||||
.DA #$ef4e,#$fec7,#$cc5c,#$ddd5,#$a96a,#$b8e3,#$8a78,#$9bf1
|
||||
.DA #$7387,#$620e,#$5095,#$411c,#$35a3,#$242a,#$16b1,#$0738
|
||||
.DA #$ffcf,#$ee46,#$dcdd,#$cd54,#$b9eb,#$a862,#$9af9,#$8b70
|
||||
.DA #$8408,#$9581,#$a71a,#$b693,#$c22c,#$d3a5,#$e13e,#$f0b7
|
||||
.DA #$0840,#$19c9,#$2b52,#$3adb,#$4e64,#$5fed,#$6d76,#$7cff
|
||||
.DA #$9489,#$8500,#$b79b,#$a612,#$d2ad,#$c324,#$f1bf,#$e036
|
||||
.DA #$18c1,#$0948,#$3bd3,#$2a5a,#$5ee5,#$4f6c,#$7df7,#$6c7e
|
||||
.DA #$a50a,#$b483,#$8618,#$9791,#$e32e,#$f2a7,#$c03c,#$d1b5
|
||||
.DA #$2942,#$38cb,#$0a50,#$1bd9,#$6f66,#$7eef,#$4c74,#$5dfd
|
||||
.DA #$b58b,#$a402,#$9699,#$8710,#$f3af,#$e226,#$d0bd,#$c134
|
||||
.DA #$39c3,#$284a,#$1ad1,#$0b58,#$7fe7,#$6e6e,#$5cf5,#$4d7c
|
||||
.DA #$c60c,#$d785,#$e51e,#$f497,#$8028,#$91a1,#$a33a,#$b2b3
|
||||
.DA #$4a44,#$5bcd,#$6956,#$78df,#$0c60,#$1de9,#$2f72,#$3efb
|
||||
.DA #$d68d,#$c704,#$f59f,#$e416,#$90a9,#$8120,#$b3bb,#$a232
|
||||
.DA #$5ac5,#$4b4c,#$79d7,#$685e,#$1ce1,#$0d68,#$3ff3,#$2e7a
|
||||
.DA #$e70e,#$f687,#$c41c,#$d595,#$a12a,#$b0a3,#$8238,#$93b1
|
||||
.DA #$6b46,#$7acf,#$4854,#$59dd,#$2d62,#$3ceb,#$0e70,#$1ff9
|
||||
.DA #$f78f,#$e606,#$d49d,#$c514,#$b1ab,#$a022,#$92b9,#$8330
|
||||
.DA #$7bc7,#$6a4e,#$58d5,#$495c,#$3de3,#$2c6a,#$1ef1,#$0f78
|
||||
*--------------------------------------
|
||||
FCS.HI .DA /$0000,/$1189,/$2312,/$329b,/$4624,/$57ad,/$6536,/$74bf
|
||||
.DA /$8c48,/$9dc1,/$af5a,/$bed3,/$ca6c,/$dbe5,/$e97e,/$f8f7
|
||||
.DA /$1081,/$0108,/$3393,/$221a,/$56a5,/$472c,/$75b7,/$643e
|
||||
.DA /$9cc9,/$8d40,/$bfdb,/$ae52,/$daed,/$cb64,/$f9ff,/$e876
|
||||
.DA /$2102,/$308b,/$0210,/$1399,/$6726,/$76af,/$4434,/$55bd
|
||||
.DA /$ad4a,/$bcc3,/$8e58,/$9fd1,/$eb6e,/$fae7,/$c87c,/$d9f5
|
||||
.DA /$3183,/$200a,/$1291,/$0318,/$77a7,/$662e,/$54b5,/$453c
|
||||
.DA /$bdcb,/$ac42,/$9ed9,/$8f50,/$fbef,/$ea66,/$d8fd,/$c974
|
||||
.DA /$4204,/$538d,/$6116,/$709f,/$0420,/$15a9,/$2732,/$36bb
|
||||
.DA /$ce4c,/$dfc5,/$ed5e,/$fcd7,/$8868,/$99e1,/$ab7a,/$baf3
|
||||
.DA /$5285,/$430c,/$7197,/$601e,/$14a1,/$0528,/$37b3,/$263a
|
||||
.DA /$decd,/$cf44,/$fddf,/$ec56,/$98e9,/$8960,/$bbfb,/$aa72
|
||||
.DA /$6306,/$728f,/$4014,/$519d,/$2522,/$34ab,/$0630,/$17b9
|
||||
.DA /$ef4e,/$fec7,/$cc5c,/$ddd5,/$a96a,/$b8e3,/$8a78,/$9bf1
|
||||
.DA /$7387,/$620e,/$5095,/$411c,/$35a3,/$242a,/$16b1,/$0738
|
||||
.DA /$ffcf,/$ee46,/$dcdd,/$cd54,/$b9eb,/$a862,/$9af9,/$8b70
|
||||
.DA /$8408,/$9581,/$a71a,/$b693,/$c22c,/$d3a5,/$e13e,/$f0b7
|
||||
.DA /$0840,/$19c9,/$2b52,/$3adb,/$4e64,/$5fed,/$6d76,/$7cff
|
||||
.DA /$9489,/$8500,/$b79b,/$a612,/$d2ad,/$c324,/$f1bf,/$e036
|
||||
.DA /$18c1,/$0948,/$3bd3,/$2a5a,/$5ee5,/$4f6c,/$7df7,/$6c7e
|
||||
.DA /$a50a,/$b483,/$8618,/$9791,/$e32e,/$f2a7,/$c03c,/$d1b5
|
||||
.DA /$2942,/$38cb,/$0a50,/$1bd9,/$6f66,/$7eef,/$4c74,/$5dfd
|
||||
.DA /$b58b,/$a402,/$9699,/$8710,/$f3af,/$e226,/$d0bd,/$c134
|
||||
.DA /$39c3,/$284a,/$1ad1,/$0b58,/$7fe7,/$6e6e,/$5cf5,/$4d7c
|
||||
.DA /$c60c,/$d785,/$e51e,/$f497,/$8028,/$91a1,/$a33a,/$b2b3
|
||||
.DA /$4a44,/$5bcd,/$6956,/$78df,/$0c60,/$1de9,/$2f72,/$3efb
|
||||
.DA /$d68d,/$c704,/$f59f,/$e416,/$90a9,/$8120,/$b3bb,/$a232
|
||||
.DA /$5ac5,/$4b4c,/$79d7,/$685e,/$1ce1,/$0d68,/$3ff3,/$2e7a
|
||||
.DA /$e70e,/$f687,/$c41c,/$d595,/$a12a,/$b0a3,/$8238,/$93b1
|
||||
.DA /$6b46,/$7acf,/$4854,/$59dd,/$2d62,/$3ceb,/$0e70,/$1ff9
|
||||
.DA /$f78f,/$e606,/$d49d,/$c514,/$b1ab,/$a022,/$92b9,/$8330
|
||||
.DA /$7bc7,/$6a4e,/$58d5,/$495c,/$3de3,/$2c6a,/$1ef1,/$0f78
|
||||
*--------------------------------------
|
||||
DEVSLOTn08F .BS 1
|
||||
hINBUF .BS 1
|
||||
|
@ -162,6 +162,8 @@ C.FF .EQ 12
|
||||
C.CR .EQ 13
|
||||
C.SO .EQ 14
|
||||
C.SI .EQ 15
|
||||
C.XON .EQ 17
|
||||
C.XOFF .EQ 19
|
||||
C.FS .EQ 21
|
||||
C.ESC .EQ 27
|
||||
C.SPACE .EQ 32
|
||||
|
@ -24,40 +24,41 @@ D2Recalibrate >PULLB DrvSlt
|
||||
jsr CheckDiskII
|
||||
bcs .9
|
||||
|
||||
ldx Slotn0
|
||||
ldy #168
|
||||
|
||||
.1 lda IO.D2.Ph0Off,x
|
||||
lda #168
|
||||
|
||||
ldy Slotn0
|
||||
lda IO.D2.Ph0On,y
|
||||
|
||||
lda #IO.D2.SeekTimeR
|
||||
jsr D2.Wait100usecA
|
||||
|
||||
dey
|
||||
dey
|
||||
|
||||
tya
|
||||
|
||||
.1 dec
|
||||
dec
|
||||
|
||||
pha
|
||||
|
||||
and #6
|
||||
ora Slotn0
|
||||
tax
|
||||
lda IO.D2.Ph0On,x
|
||||
phy
|
||||
plx
|
||||
tay
|
||||
lda IO.D2.Ph0On,y
|
||||
|
||||
lda #IO.D2.SeekTimeR
|
||||
jsr D2.Wait100usecA
|
||||
|
||||
tya
|
||||
bne .1
|
||||
|
||||
ldy #20
|
||||
|
||||
.2 jsr D2.Wait25600usec
|
||||
dey
|
||||
bne .2
|
||||
|
||||
lda IO.D2.Ph0Off,x
|
||||
|
||||
lda #IO.D2.SeekTimeR
|
||||
jsr D2.Wait100usecA
|
||||
|
||||
pla
|
||||
bne .1
|
||||
|
||||
jsr D2.Wait25600usec
|
||||
|
||||
lda IO.D2.Ph0Off,y
|
||||
|
||||
clc
|
||||
.9 rts
|
||||
*/--------------------------------------
|
||||
@ -75,7 +76,7 @@ D2MoveHead >PULLB MoveTo
|
||||
clc
|
||||
.9 rts
|
||||
|
||||
D2MoveHead.SEI lda MoveFrom
|
||||
D2MoveHead.SEI lda MoveFrom
|
||||
tay
|
||||
|
||||
and #6
|
||||
@ -121,8 +122,15 @@ D2MoveHead.SEI lda MoveFrom
|
||||
ora Slotn0
|
||||
tay
|
||||
|
||||
lda Slotn0
|
||||
ora #IO.D2.RData
|
||||
sta .4+1
|
||||
sta .5+1
|
||||
|
||||
sta IO.D2.Ph0On,x
|
||||
.4 lda IO.D2.RData SELF MODIFIED
|
||||
sta IO.D2.Ph0On,y
|
||||
.5 lda IO.D2.RData SELF MODIFIED
|
||||
lda #IO.D2.SeekTimeF
|
||||
jsr D2.Wait100usecA
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -129,8 +129,8 @@ L59BD lda bloknml
|
||||
* motor should be up to speed,
|
||||
* if it looks stopped then the drive is not present
|
||||
|
||||
jsr XRW.CheckMotorOn is drive present ?
|
||||
beq XRW.E.ND
|
||||
* jsr XRW.CheckMotorOn is drive present ?
|
||||
* beq XRW.E.ND
|
||||
*--------------------------------------
|
||||
L538E lda A4L get command #
|
||||
bne .1
|
||||
@ -215,7 +215,12 @@ XRW.TrackSelect lda #2
|
||||
jsr XRW.Seek Seek from Track 41 -> 0
|
||||
bra .1
|
||||
|
||||
.4 cmp XRW.ReqTrack
|
||||
.4 ldy XRW.UnitIndex (4)
|
||||
lda XRW.AddrField.V (4)
|
||||
sta XRW.D2VolNum-1,y (4)
|
||||
lda XRW.AddrField.T (4)
|
||||
sta XRW.D2Trk-1,y (4)
|
||||
cmp XRW.ReqTrack
|
||||
beq .8
|
||||
|
||||
lda XRW.BadSeek
|
||||
@ -227,16 +232,16 @@ XRW.TrackSelect lda #2
|
||||
.5 lda XRW.SeekTime
|
||||
bmi .6 seektime already > 128
|
||||
|
||||
* clc
|
||||
* adc #IO.D2.SeekTimeI
|
||||
* sta XRW.SeekTime
|
||||
clc
|
||||
adc #IO.D2.SeekTimeI
|
||||
sta XRW.SeekTime
|
||||
|
||||
* sta XRW.D2SeekTime-1,y
|
||||
sta XRW.D2SeekTime-1,y
|
||||
|
||||
.6 lda XRW.ReqTrack
|
||||
jsr XRW.Seek
|
||||
bra .3
|
||||
|
||||
|
||||
.8 clc
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
@ -297,20 +302,12 @@ XRW.ReadAddr ldy #$FC
|
||||
tay if final checksum non-zero,
|
||||
bne .99 (2) then error.
|
||||
|
||||
ldy XRW.UnitIndex (4)
|
||||
|
||||
.9 lda IO.D2.RData,x (4)
|
||||
bpl .9 (2)
|
||||
|
||||
eor #$DE (2)
|
||||
bne .99 (2)
|
||||
|
||||
lda XRW.AddrField.V (4)
|
||||
sta XRW.D2VolNum-1,y (4)
|
||||
lda XRW.AddrField.T (4)
|
||||
sta XRW.D2Trk-1,y (4)
|
||||
ldy XRW.AddrField.S (4)
|
||||
|
||||
clc (2)
|
||||
rts (6)
|
||||
|
||||
@ -376,12 +373,12 @@ XRW.Seek ldx XRW.UnitIndex
|
||||
|
||||
.4 lda XRW.SeekTime
|
||||
jsr XRW.Wait100usecA
|
||||
|
||||
|
||||
lda XRW.CurrentQTrack
|
||||
cmp XRW.TargetQTrack
|
||||
bne .1
|
||||
|
||||
.8 jsr XRW.Wait25600usec
|
||||
jsr XRW.Wait25600usec
|
||||
|
||||
XRW.SEEKOFF sta IO.D2.Ph0Off,x
|
||||
sta IO.D2.Ph0Off,y
|
||||
@ -394,22 +391,23 @@ XRW.SEEK2QT pha
|
||||
and #6
|
||||
ora A2L
|
||||
tax
|
||||
|
||||
|
||||
pla
|
||||
inc
|
||||
|
||||
XRW.SEEK2QT2 and #6
|
||||
ora A2L
|
||||
tay
|
||||
|
||||
lda A2L
|
||||
ora #IO.D2.RData
|
||||
sta .1+1
|
||||
sta .2+1
|
||||
|
||||
sta IO.D2.Ph0On,x
|
||||
.1 lda IO.D2.RData SELF MODIFIED
|
||||
.1 lda IO.D2.RData SELF MODIFIED
|
||||
sta IO.D2.Ph0On,y
|
||||
.2 lda IO.D2.RData SELF MODIFIED
|
||||
.2 lda IO.D2.RData SELF MODIFIED
|
||||
rts
|
||||
*--------------------------------------
|
||||
XRW.Trk2Qtrk asl x2
|
||||
@ -562,18 +560,19 @@ XRW.SectorIO bit XRW.bWrite
|
||||
|
||||
.2 jsr XRW.ReadAddr
|
||||
bcs .3 (2)
|
||||
|
||||
cpy XRW.ReqSector (4)
|
||||
|
||||
lda XRW.AddrField.S (4)
|
||||
cmp XRW.ReqSector (4)
|
||||
bne .3 (2)
|
||||
|
||||
|
||||
bit XRW.bWrite (4)
|
||||
bmi XRW.Write (3)
|
||||
|
||||
jmp XRW.Read
|
||||
|
||||
|
||||
.3 inc XRW.RetryCnt
|
||||
bpl .2
|
||||
|
||||
|
||||
sec
|
||||
|
||||
.9 rts
|
||||
@ -728,7 +727,7 @@ wrefd5 ldx #$60 (2) restore slot. warning: modified by prenib
|
||||
|
||||
bmi .2 (3)
|
||||
.2 nop (2)
|
||||
|
||||
|
||||
lda #$FF (2)
|
||||
jsr wnibl (6+9,6) write turn off byte.
|
||||
|
||||
@ -955,7 +954,7 @@ XRW.CheckMotorOnX
|
||||
.9 rts Z if motor OFF
|
||||
*--------------------------------------
|
||||
XRW.DEBUG sta CLRPAGE2
|
||||
|
||||
|
||||
lda #"R"
|
||||
bit XRW.bWrite
|
||||
bpl .1
|
||||
@ -965,7 +964,7 @@ XRW.DEBUG sta CLRPAGE2
|
||||
.1 sta $723
|
||||
|
||||
ldx #$24
|
||||
|
||||
|
||||
lda XRW.ReqTrack
|
||||
jsr .6
|
||||
|
||||
@ -977,6 +976,7 @@ XRW.DEBUG sta CLRPAGE2
|
||||
lsr
|
||||
lsr
|
||||
jsr .7
|
||||
|
||||
pla
|
||||
|
||||
.7 and #$0F
|
||||
|
@ -149,8 +149,9 @@ InitSrcDirYA >PUSHYA
|
||||
bcs .1 File/DIR does not exists, go extract pattern
|
||||
|
||||
.DO X.ENTER.SUBDIR=1
|
||||
>LDA.G STAT+S.STAT.P.TYPE
|
||||
cmp #S.FI.T.DIR
|
||||
>LDA.G STAT+S.STAT.MODE+1
|
||||
and #$F0
|
||||
cmp /S.STAT.MODE.DIR
|
||||
bne .4 TYPE not a DIR, extract....
|
||||
bra .5 TYPE=DIR, do not extract pattern
|
||||
.ELSE
|
||||
@ -262,8 +263,9 @@ InitDstDirYA >PUSHYA
|
||||
>SYSCALL Stat
|
||||
bcs .1 File/DIR does not exists, go extract DstFileName
|
||||
|
||||
>LDA.G STAT+S.STAT.P.TYPE
|
||||
cmp #S.FI.T.DIR
|
||||
>LDA.G STAT+S.STAT.MODE+1
|
||||
and #$F0
|
||||
cmp /S.STAT.MODE.DIR
|
||||
beq .5 Dst is a directory...no destfilename
|
||||
|
||||
.1 jsr GetPtr1Len Search end of string.....
|
||||
|
@ -300,7 +300,9 @@ CORE.Dispatch ldx #1 skip PS0
|
||||
|
||||
.2 lda (pEvent) Empty event, select next
|
||||
beq .3
|
||||
jsr CORE.PSExec2
|
||||
|
||||
ldx #S.PS.S.DOEVENT
|
||||
jsr CORE.PSExecX
|
||||
dec IRQ.InKernel
|
||||
|
||||
bcs .3 not for this PS, try next event in list
|
||||
@ -311,6 +313,7 @@ CORE.Dispatch ldx #1 skip PS0
|
||||
|
||||
.3 dec CORE.EvtIndex
|
||||
beq .4 all EVT submitted to this PS, try other PS
|
||||
|
||||
lda pEvent try next EVT to this PS
|
||||
clc
|
||||
adc #S.EVT
|
||||
@ -412,11 +415,11 @@ CORE.PSExec lda (pPS)
|
||||
bit #S.PS.F.SLEEP
|
||||
bne CORE.PSResume
|
||||
|
||||
CORE.PSExec2 ldy #S.PS.S
|
||||
ldy #S.PS.S
|
||||
lda (pPS),y
|
||||
|
||||
tax
|
||||
lda pCode+1
|
||||
|
||||
CORE.PSExecX lda pCode+1
|
||||
pha
|
||||
lda pCode
|
||||
pha
|
||||
|
@ -73,6 +73,7 @@ K.ReadDir.ROOT ldy #S.FD.DIR.FC did we already returned something ?
|
||||
>LDYAI K.Buf256
|
||||
>STYA K.MLI.PARAMS+2
|
||||
>STYA ZPPtr2
|
||||
|
||||
>MLICALL MLIONLINE
|
||||
bcs K.ReadDir.RTS
|
||||
|
||||
|
@ -22,13 +22,13 @@ VSDRIVE.Init >LDYAI VSDRIVE.MSG0
|
||||
|
||||
jsr VSDRIVE.Check
|
||||
bcs .90
|
||||
|
||||
|
||||
.1 lda #$C1 Self Modified
|
||||
|
||||
.2 jsr SSC.Detect
|
||||
bcs .99
|
||||
|
||||
stx DRV+2 DRV.Slotn0
|
||||
stx DRV+1 DRV.Slotn0
|
||||
|
||||
sta .1+1 Slot Cn
|
||||
and #$0F
|
||||
@ -87,7 +87,7 @@ VSDRIVE.Check ldx #REGULAR.SIZE
|
||||
bne .1
|
||||
|
||||
clc
|
||||
|
||||
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
SSC.Detect stz TmpPtr1
|
||||
@ -110,7 +110,7 @@ SSC.Detect stz TmpPtr1
|
||||
clc
|
||||
adc #$8F
|
||||
tax X=SlotN0
|
||||
stz SSC.RESET-$8F,x
|
||||
stz SSC.RESET-$8F,x
|
||||
jsr VSDRIVE.Wait
|
||||
lda #SSC.CTL.CLKINT+SSC.CTL.B115200+SSC.CTL.8D+SSC.CTL.1S+SSC.CMD.NOP
|
||||
sta SSC.CTL-$8F,x
|
||||
@ -127,13 +127,13 @@ SSC.Detect stz TmpPtr1
|
||||
.3 inc TmpPtr1+1 no match, try next slot....
|
||||
lda TmpPtr1+1
|
||||
cmp #$C8
|
||||
bne .1
|
||||
bne .1
|
||||
|
||||
.9 sec
|
||||
rts
|
||||
*--------------------------------------
|
||||
VSDRIVE.Ping ldx DRV+2 DRV.Slotn0
|
||||
|
||||
VSDRIVE.Ping ldx DRV+1 DRV.Slotn0
|
||||
|
||||
stz VSDRIVE.Ping.TO
|
||||
stz VSDRIVE.Ping.TO+1
|
||||
|
||||
@ -145,7 +145,7 @@ VSDRIVE.Ping ldx DRV+2 DRV.Slotn0
|
||||
.1 lda SSC.STATUS-$8F,x
|
||||
and #SSC.STATUS.TDRE Ready for transmit?
|
||||
bne .20
|
||||
|
||||
|
||||
jsr VSDRIVE.IncTimer Wait.......
|
||||
bne .1
|
||||
|
||||
@ -224,12 +224,12 @@ VSDRIVE.Wait lda #0
|
||||
bne .1
|
||||
|
||||
rts
|
||||
*--------------------------------------
|
||||
*--------------------------------------
|
||||
VSDRIVE.CMDS .HS C6.00.00.03
|
||||
.DA #ADT.CMD.VSD
|
||||
* C6=C5 eor 03 eor 00 eor 00
|
||||
VSDRIVE.Ping.TO .BS 2
|
||||
VSDRIVE.Ping.BC .BS 2
|
||||
VSDRIVE.Ping.BC .BS 2
|
||||
*--------------------------------------
|
||||
* Find 2 free slots in DEVPTRS (D1 & D2)
|
||||
*--------------------------------------
|
||||
@ -336,9 +336,9 @@ PATCH.SIZE .EQ *-PATCH
|
||||
* OP = 4 : Write drv2
|
||||
* OP = 5 : Read drv2
|
||||
* CMD = $C5+OP+BLKLO+BLKHI+CHKSUM
|
||||
* DO NOT trash DRV.COMMAND...DRV.BLKNUM as ProDOS
|
||||
* DO NOT trash DRV.COMMAND...DRV.BLKNUM as ProDOS
|
||||
* reuses them after Block operation
|
||||
* A1,A2 are used by Disk II Driver,
|
||||
* A1,A2 are used by Disk II Driver,
|
||||
* so we use it safely as Tmp Ptr
|
||||
*--------------------------------------
|
||||
DRV.A1L .EQ $3C
|
||||
@ -347,14 +347,12 @@ DRV.A2L .EQ $3E
|
||||
DRV.A2H .EQ $3F
|
||||
DRV.COMMAND .EQ $42
|
||||
DRV.UNITNUM .EQ $43
|
||||
DRV.BUFF .EQ $44
|
||||
DRV.BUFF .EQ $44
|
||||
DRV.BLKNUM .EQ $46
|
||||
*--------------------------------------
|
||||
DRV .PH $D001 Main LC Bnk 2 $D001->$DFFF
|
||||
|
||||
DRV.START cld
|
||||
|
||||
ldx #$ff Self Modified
|
||||
DRV.START ldx #$ff Self Modified
|
||||
lda DRV.COMMAND S=0,R=1,W=2,F=3
|
||||
bne .1
|
||||
|
||||
@ -365,14 +363,17 @@ DRV.START cld
|
||||
clc
|
||||
rts
|
||||
|
||||
.9 lda #MLI.E.IO
|
||||
* sec
|
||||
rts
|
||||
|
||||
.1 cmp #3
|
||||
beq .8 Format ....
|
||||
|
||||
* bcs DRV.DO.CMD.ERR more....IO error
|
||||
|
||||
bcs .9
|
||||
|
||||
ora #2 W=2,R=3
|
||||
|
||||
ldy DRV.UNITNUM
|
||||
ldy DRV.UNITNUM
|
||||
bpl .2
|
||||
|
||||
adc #2 CC from bcs
|
||||
@ -387,7 +388,12 @@ DRV.START cld
|
||||
|
||||
lda DRV.BLKNUM+1
|
||||
sta DRV.CmdBuf.BlkH
|
||||
*--------------------------------------
|
||||
* send CMD+CS
|
||||
*--------------------------------------
|
||||
php
|
||||
sei
|
||||
|
||||
ldy #4 Send 5 bytes including Sum
|
||||
|
||||
.3 lda DRV.CmdBuf.Sum,y
|
||||
@ -451,12 +457,13 @@ DRV.DO.CMD.R ldy #3 Read Back and check 4 bytes
|
||||
jsr DRV.SSCGet
|
||||
eor DRV.CmdBuf.Sum
|
||||
bne DRV.DO.CMD.ERR
|
||||
|
||||
plp
|
||||
clc
|
||||
rts A=0,CC from bcc .4
|
||||
*--------------------------------------
|
||||
DRV.DO.CMD.ERR1 pla
|
||||
pla
|
||||
|
||||
DRV.DO.CMD.ERR lda #MLI.E.IO
|
||||
DRV.DO.CMD.ERR plp
|
||||
lda #MLI.E.IO
|
||||
sec
|
||||
rts
|
||||
*--------------------------------------
|
||||
@ -501,23 +508,22 @@ DRV.DO.CMD.W lda #$B1 lda (),y
|
||||
dey
|
||||
bpl .3
|
||||
|
||||
plp
|
||||
clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
DRV.SSCSend sta .2+1
|
||||
DRV.SSCSend pha
|
||||
|
||||
.1 lda SSC.STATUS-$8F,x
|
||||
* bit #SSC.STATUS.DCD+SSC.STATUS.DSR
|
||||
* beq DRV.DO.CMD.ERR1
|
||||
and #SSC.STATUS.TDRE Outgoing char?
|
||||
beq .1
|
||||
|
||||
.2 lda #$ff
|
||||
pla
|
||||
|
||||
sta SSC.DATA-$8F,x
|
||||
rts
|
||||
*--------------------------------------
|
||||
DRV.SSCGet lda SSC.STATUS-$8F,x
|
||||
* bit #SSC.STATUS.DCD+SSC.STATUS.DSR
|
||||
* beq DRV.DO.CMD.ERR1
|
||||
and #SSC.STATUS.RDRF incoming char?
|
||||
beq DRV.SSCGet
|
||||
|
||||
@ -527,9 +533,9 @@ DRV.SSCGet lda SSC.STATUS-$8F,x
|
||||
DRV.READWRITE bit RRAMWRAMBNK1
|
||||
sta (DRV.BUFF),y
|
||||
bit RRAMWRAMBNK2
|
||||
rts
|
||||
rts
|
||||
*--------------------------------------
|
||||
DRV.CmdBuf.Sum .BS 1 Reverse order for dey
|
||||
DRV.CmdBuf.Sum .BS 1 Reverse order for dey
|
||||
DRV.CmdBuf.BlkH .BS 1
|
||||
DRV.CmdBuf.BlkL .BS 1
|
||||
DRV.CmdBuf.Cmd .BS 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user