mirror of
https://github.com/A2osX/A2osX.git
synced 2025-04-12 13:37:03 +00:00
A2osX-1.00 PREVIEW
bugfix - EDIT buffer resizing - SH (for/next) - PAK suite - ATTR, CHxxx.... - ProDOS.FX extend Directory Added A2OSX.TEST wth ASM/CC dev tools
This commit is contained in:
parent
4e30f3e5cc
commit
5e025faeec
.Docs
.Floppies
BIN
ARC.S.txtATTR.S.txtSH.S.CL.txtSH.S.CMD.txtSH.S.CORE.txtSH.S.EXP.txtSH.S.HIS.txtSH.S.IO.txtSH.S.STK.txtSHUTDOWN.S.txtUNPAK.S.txt
INC
ProDOS.FX
ProDOS.S.DCLK.txtProDOS.S.ILDR.txtProDOS.S.IRQ.txtProDOS.S.LDR.txtProDOS.S.NCLK.txtProDOS.S.SEL1.txtProDOS.S.TCLK.txtProDOS.S.XDOS.A.txtProDOS.S.XDOS.B.txtProDOS.S.XRW.txt
SHARED
SYS
@ -1,21 +0,0 @@
|
||||
*** Auto generated by docgen.cmd ***
|
||||
|
||||
## Copyright
|
||||
Copyright 2015 - 2020, Remy Gibert and the A2osX contributors.
|
||||
|
||||
## License
|
||||
A2osX is licensed under the GNU General Public License.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
The full A2osX license can be found **[Here](../LICENSE)**.
|
||||
|
||||
*** End of Auto generated file ***
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
333
BIN/ARC.S.txt
333
BIN/ARC.S.txt
@ -7,7 +7,6 @@ NEW
|
||||
*--------------------------------------
|
||||
.INB inc/macros.i
|
||||
.INB inc/a2osx.i
|
||||
.INB inc/kernel.i
|
||||
.INB inc/arc.i
|
||||
.INB inc/mli.e.i
|
||||
*--------------------------------------
|
||||
@ -29,12 +28,11 @@ ZPFileStat .BS 2
|
||||
ZPFullPath .BS 2
|
||||
ZPRelPath .BS 2
|
||||
|
||||
ArgIndex .BS 1
|
||||
bAppend .BS 1
|
||||
bRecurse .BS 1
|
||||
bPause .BS 1
|
||||
|
||||
ZPAlg .BS 1
|
||||
|
||||
ZPInBufPtr .BS 2
|
||||
ZPOutBufPtr .BS 2
|
||||
ZPBackPtr .BS 2
|
||||
@ -53,7 +51,7 @@ CS.START cld
|
||||
.DA CS.END
|
||||
.DA ID.END
|
||||
.DA DS.END
|
||||
.DA #64 Stack Size
|
||||
.DA #128 Stack Size
|
||||
.DA #ZS.END-ZS.START Zero Page Size
|
||||
*--------------------------------------
|
||||
* Relocation Table
|
||||
@ -69,7 +67,7 @@ L.MSG.OK .DA MSG.OK
|
||||
L.MSG.ERR .DA MSG.ERR
|
||||
L.MSG.E.IARC .DA MSG.E.IARC
|
||||
L.ARC.Header .DA ARC.Header
|
||||
.DO DBG
|
||||
.DO DBG=1
|
||||
L.MSG.DBG1 .DA MSG.DBG1
|
||||
L.MSG.DBG2 .DA MSG.DBG2
|
||||
L.MSG.DBG3 .DA MSG.DBG3
|
||||
@ -79,7 +77,8 @@ L.MSG.DBG3 .DA MSG.DBG3
|
||||
CS.INIT clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.RUN >INC.G ArgIndex
|
||||
CS.RUN inc ArgIndex
|
||||
lda ArgIndex
|
||||
>LIBC ArgV
|
||||
bcs .8
|
||||
|
||||
@ -90,58 +89,49 @@ CS.RUN >INC.G ArgIndex
|
||||
bne .4
|
||||
|
||||
jsr CS.RUN.CheckOpt
|
||||
bcs .9
|
||||
|
||||
bne CS.RUN
|
||||
|
||||
>INC.G ArgIndex -X
|
||||
>LIBC ArgV
|
||||
bcs .9
|
||||
|
||||
>LIBC StrDup
|
||||
bcs .9
|
||||
|
||||
txa
|
||||
>STA.G hIgnore
|
||||
bra CS.RUN
|
||||
bcc CS.RUN
|
||||
|
||||
.9 >LDYA L.MSG.USAGE
|
||||
>LIBC PutS
|
||||
lda #E.SYN
|
||||
sec
|
||||
.99 rts
|
||||
rts
|
||||
*--------------------------------------
|
||||
.4 >LDA.G ArcName
|
||||
.4 >LDA.G pArcName+1
|
||||
bne .5
|
||||
|
||||
>LDA.G ArgIndex
|
||||
>STA.G ArcName
|
||||
>SS
|
||||
>PUSHW ZPPtr1
|
||||
>PUSHWI 0
|
||||
>LIBC RealPath
|
||||
>SR
|
||||
bcs .99
|
||||
|
||||
>STYA.G pArcName
|
||||
bra CS.RUN
|
||||
|
||||
.5 >LDA.G hSrcBasePath
|
||||
*--------------------------------------
|
||||
.5 >LDA.G pSrcBasePath+1
|
||||
bne .9
|
||||
|
||||
>LDYA ZPPtr1
|
||||
jsr X.InitSrcDirYA
|
||||
bcc CS.RUN
|
||||
rts
|
||||
|
||||
.8 >LDA.G ArcName
|
||||
.99 rts
|
||||
*--------------------------------------
|
||||
.8 >LDA.G pArcName+1
|
||||
beq .9
|
||||
|
||||
>LDA.G hSrcBasePath
|
||||
>LDA.G pSrcBasePath+1
|
||||
beq .9
|
||||
*--------------------------------------
|
||||
>LDYAI 256
|
||||
>LIBC GetMem
|
||||
>LIBC Malloc
|
||||
bcs .99
|
||||
|
||||
>STYA ZPFullPath
|
||||
txa
|
||||
>STA.G hSrcFullPath
|
||||
|
||||
>LDA.G hSrcBasePath
|
||||
>LIBC GetMemPtr
|
||||
>LDYA.G pSrcBasePath
|
||||
>STYA ZPPtr1
|
||||
|
||||
ldy #$ff
|
||||
@ -159,49 +149,27 @@ CS.RUN >INC.G ArgIndex
|
||||
sta ZPRelPath+1
|
||||
|
||||
jsr CS.RUN.OpenArc
|
||||
.98 bcs .99
|
||||
|
||||
>LDYAI CHNK.SIZE
|
||||
>LIBC GetMem
|
||||
bcs .98
|
||||
|
||||
>STYA ZPInBufPtr
|
||||
txa
|
||||
>STA.G hSrcBuf
|
||||
|
||||
>LDYAI CHNK.SIZE
|
||||
>LIBC GetMem
|
||||
bcs .98
|
||||
|
||||
>STYA ZPOutBufPtr
|
||||
txa
|
||||
>STA.G hDstBuf
|
||||
*--------------------------------------
|
||||
CS.RUN.LOOP ldy #S.PS.hStdIn
|
||||
lda (pPS),y
|
||||
>LIBC FEOF
|
||||
bcs .99
|
||||
|
||||
tay
|
||||
bne .1
|
||||
|
||||
>LIBC GetChar
|
||||
>LDYAI CHNK.SIZE
|
||||
>LIBC Malloc
|
||||
bcs .99
|
||||
|
||||
cmp #$03 Ctrl-C
|
||||
beq .99 Abort....
|
||||
>STYA X.Arc.SrcPtr
|
||||
|
||||
cmp #$13 Ctrl-S
|
||||
bne .1
|
||||
>LDYAI CHNK.SIZE
|
||||
>LIBC Malloc
|
||||
bcs .99
|
||||
|
||||
lda bPause
|
||||
eor #$ff
|
||||
sta bPause
|
||||
bne CS.RUN.LOOP
|
||||
|
||||
.1 lda bPause
|
||||
bne CS.RUN.LOOP Pause...
|
||||
>STYA X.Arc.DstPtr
|
||||
*--------------------------------------
|
||||
CS.RUN.LOOP >SLEEP
|
||||
|
||||
jsr X.CheckCtrl
|
||||
bcs .99
|
||||
|
||||
bvs CS.RUN.LOOP Pause...
|
||||
|
||||
jsr X.GetEntry
|
||||
bcs .9
|
||||
|
||||
@ -241,10 +209,6 @@ CS.RUN.LOOP ldy #S.PS.hStdIn
|
||||
sec
|
||||
.99 rts
|
||||
*--------------------------------------
|
||||
CS.RUN.DEV lda #E.BADPATH
|
||||
sec
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.RUN.DIR lda bRecurse
|
||||
bpl .8
|
||||
|
||||
@ -265,11 +229,12 @@ CS.RUN.DIR lda bRecurse
|
||||
|
||||
.1 jsr CS.RUN.BuildFilePath
|
||||
|
||||
>SS
|
||||
>PUSHW L.MSG.DIR
|
||||
>PUSHW ZPRelPath
|
||||
|
||||
>PUSHBI 2
|
||||
>LIBC PrintF
|
||||
>SR
|
||||
bcs .9
|
||||
|
||||
jsr CS.RUN.WriteArcHdrDir
|
||||
@ -285,20 +250,19 @@ CS.RUN.DIR lda bRecurse
|
||||
*--------------------------------------
|
||||
CS.RUN.FILE jsr CS.RUN.BuildFilePath
|
||||
|
||||
>SS
|
||||
>PUSHW ZPFullPath
|
||||
>LDA.G hArcFile
|
||||
tay
|
||||
lda FILEs.hName-1,y
|
||||
>LIBC GetMemPtr
|
||||
>PUSHYA
|
||||
>PUSHW.G pArcName
|
||||
>LIBC StrCmp
|
||||
>SR
|
||||
bcc .8
|
||||
|
||||
>SS
|
||||
>PUSHW L.MSG.FILE
|
||||
>PUSHW ZPRelPath
|
||||
|
||||
>PUSHBI 2
|
||||
>LIBC PrintF
|
||||
>SR
|
||||
bcs .9
|
||||
|
||||
jsr CS.RUN.WriteArcHdrFile
|
||||
@ -320,9 +284,12 @@ CS.RUN.FILE jsr CS.RUN.BuildFilePath
|
||||
|
||||
bra .9
|
||||
|
||||
.2 jsr CS.RUN.Arc
|
||||
.2 >LDYA.G Shunk.SrcSize
|
||||
jsr X.Arc
|
||||
bcs .3
|
||||
|
||||
>STYA.G Shunk.DstSize
|
||||
|
||||
jsr CS.RUN.WriteArcData
|
||||
bcc .1
|
||||
|
||||
@ -342,27 +309,30 @@ CS.RUN.FILE jsr CS.RUN.BuildFilePath
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.RUN.CheckErr bcs .1
|
||||
|
||||
>LDYA L.MSG.OK
|
||||
>LIBC PutS
|
||||
rts
|
||||
|
||||
.1 pha
|
||||
|
||||
tay
|
||||
>SS
|
||||
>PUSHW L.MSG.ERR
|
||||
pla
|
||||
pha
|
||||
tya
|
||||
>PUSHA
|
||||
>PUSHBI 1
|
||||
|
||||
>LIBC PrintF
|
||||
>SR
|
||||
|
||||
pla
|
||||
sec
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.RUN.BuildFilePath
|
||||
>SS
|
||||
>PUSHW ZPFullPath
|
||||
>LDA.G hSrcBasePath
|
||||
>LIBC GetMemPtr
|
||||
>LDYA.G pSrcBasePath
|
||||
>PUSHYA
|
||||
>LIBC StrCpy
|
||||
|
||||
@ -371,21 +341,25 @@ CS.RUN.BuildFilePath
|
||||
>LIBC StrCat
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.RUN.OpenFile >PUSHW ZPFullPath
|
||||
CS.RUN.OpenFile >SS
|
||||
>PUSHW ZPFullPath
|
||||
>PUSHBI O.RDONLY
|
||||
>PUSHBI 0 Type
|
||||
>PUSHWZ Aux type
|
||||
>LIBC FOpen
|
||||
>SR
|
||||
bcs .9
|
||||
|
||||
>STA.G hFile
|
||||
>STYA.G pFile
|
||||
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
CS.RUN.ReadFile >PUSHB.G hFile
|
||||
>PUSHW ZPInBufPtr
|
||||
CS.RUN.ReadFile >SS
|
||||
>PUSHW.G pFile
|
||||
>PUSHW X.Arc.SrcPtr
|
||||
>PUSHWI CHNK.SIZE
|
||||
>LIBC FRead
|
||||
>SR
|
||||
bcs .9
|
||||
|
||||
>STYA.G Shunk.SrcSize
|
||||
@ -393,65 +367,64 @@ CS.RUN.ReadFile >PUSHB.G hFile
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
CS.RUN.CloseFile
|
||||
>LDA.G hFile
|
||||
>LDYA.G pFile
|
||||
>LIBC FClose
|
||||
bcs .9
|
||||
|
||||
>STZ.G hFile
|
||||
>STZ.G pFile+1
|
||||
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
CS.RUN.Arc >LDYA.G Shunk.SrcSize
|
||||
jsr X.Arc
|
||||
bcs .9
|
||||
|
||||
stx ZPAlg
|
||||
>STYA.G Shunk.DstSize
|
||||
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
CS.RUN.OpenArc >LDA.G ArcName
|
||||
>LIBC ArgV
|
||||
>PUSHYA
|
||||
|
||||
bit bAppend
|
||||
CS.RUN.OpenArc bit bAppend
|
||||
bmi CS.RUN.AppendArc
|
||||
|
||||
>SS
|
||||
>PUSHW.G pArcName
|
||||
>PUSHBI O.CREATE+O.WRONLY
|
||||
>PUSHBI $CF PAK
|
||||
>PUSHBI $CF Arc
|
||||
>PUSHWZ Aux type
|
||||
|
||||
>LIBC FOpen
|
||||
bcs .9
|
||||
|
||||
>STA.G hArcFile
|
||||
>STYA.G pArcFile
|
||||
|
||||
>PUSHB.G hArcFile
|
||||
>SS
|
||||
>PUSHW L.ARC.Header
|
||||
>PUSHW.G pArcFile
|
||||
>LIBC FPutS
|
||||
>SR
|
||||
.9
|
||||
CS.RUN.OpenArc.RTS
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.RUN.AppendArc
|
||||
>SS
|
||||
>PUSHW.G pArcName
|
||||
>PUSHBI O.RDWR+O.APPEND
|
||||
>PUSHBI $CF PAK
|
||||
>PUSHBI $CF Arc
|
||||
>PUSHWZ Aux type
|
||||
|
||||
>LIBC FOpen
|
||||
>SR
|
||||
bcs CS.RUN.OpenArc.RTS
|
||||
>STA.G hArcFile
|
||||
|
||||
>PUSHB.G hArcFile
|
||||
>STYA.G pArcFile
|
||||
|
||||
>SS
|
||||
>PUSHW.G pArcFile
|
||||
>PUSHLZ
|
||||
>PUSHBI SEEK.SET
|
||||
>PUSHWI SEEK.SET
|
||||
>LIBC FSeek
|
||||
>SR
|
||||
bcs CS.RUN.OpenArc.RTS
|
||||
|
||||
>PUSHB.G hArcFile
|
||||
>PUSHW ZPInBufPtr
|
||||
>SS
|
||||
>PUSHW.G pArcFile
|
||||
>LEA.G HeaderBuf
|
||||
>STYA ZPPtr1
|
||||
>PUSHYA
|
||||
>PUSHWI 3
|
||||
>LIBC FRead
|
||||
>SR
|
||||
bcs .9
|
||||
|
||||
cpy #3
|
||||
@ -460,16 +433,19 @@ CS.RUN.AppendArc
|
||||
dey
|
||||
|
||||
.2 lda ARC.Header,y
|
||||
cmp (ZPInBufPtr),y
|
||||
cmp (ZPPtr1),y
|
||||
bne .99
|
||||
|
||||
dey
|
||||
bpl .2
|
||||
|
||||
>PUSHB.G hArcFile
|
||||
>SS
|
||||
>PUSHW.G pArcFile
|
||||
>PUSHLZ
|
||||
>PUSHBI SEEK.END
|
||||
>PUSHWI SEEK.END
|
||||
>LIBC FSeek
|
||||
>SR
|
||||
|
||||
.9 rts
|
||||
|
||||
.99 >LDYA L.MSG.E.IARC
|
||||
@ -483,7 +459,7 @@ CS.RUN.WriteArcHdrDir
|
||||
jsr CS.RUN.WriteArcByteA
|
||||
bcc CS.RUN.WriteArcHdr
|
||||
rts
|
||||
|
||||
*--------------------------------------
|
||||
CS.RUN.WriteArcHdrFile
|
||||
lda #CHNK.T.FILE
|
||||
jsr CS.RUN.WriteArcByteA
|
||||
@ -512,9 +488,11 @@ CS.RUN.WriteArcHdr
|
||||
jsr CS.RUN.WriteArcByteA
|
||||
bcs CS.RUN.WriteArcHdr.9
|
||||
|
||||
>PUSHB.G hArcFile
|
||||
>SS
|
||||
>PUSHW ZPRelPath
|
||||
>PUSHW.G pArcFile
|
||||
>LIBC FPutS
|
||||
>SR
|
||||
|
||||
CS.RUN.WriteArcHdr.9
|
||||
rts
|
||||
@ -552,10 +530,13 @@ CS.RUN.WriteSrcData
|
||||
jsr CS.RUN.WriteArcByteA
|
||||
bcs .9
|
||||
|
||||
>PUSHB.G hArcFile
|
||||
>PUSHW ZPInBufPtr
|
||||
>SS
|
||||
>PUSHW.G pArcFile
|
||||
>PUSHW X.Arc.SrcPtr
|
||||
>PUSHW.G Shunk.SrcSize
|
||||
>LIBC FWrite
|
||||
>SR
|
||||
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
CS.RUN.WriteArcData
|
||||
@ -571,58 +552,64 @@ CS.RUN.WriteArcData
|
||||
jsr CS.RUN.WriteArcByteA
|
||||
bcs .9
|
||||
|
||||
>PUSHB.G hArcFile
|
||||
>PUSHW ZPOutBufPtr
|
||||
>SS
|
||||
>PUSHW.G pArcFile
|
||||
>PUSHW X.Arc.DstPtr
|
||||
>PUSHW.G Shunk.DstSize
|
||||
>LIBC FWrite
|
||||
>SR
|
||||
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
CS.RUN.WriteArcByteY
|
||||
lda (ZPFileStat),y
|
||||
|
||||
CS.RUN.WriteArcByteA
|
||||
pha
|
||||
>PUSHB.G hArcFile
|
||||
pla
|
||||
>SS
|
||||
tay
|
||||
>PUSHB 0
|
||||
tya
|
||||
>PUSHA
|
||||
>PUSHW.G pArcFile
|
||||
>LIBC FPutC
|
||||
>SR
|
||||
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.SIG sec
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.QUIT jsr X.LeaveSubDir
|
||||
bcc CS.QUIT
|
||||
CS.QUIT jsr X.Quit
|
||||
|
||||
ldy #hIgnore
|
||||
jsr .7
|
||||
|
||||
ldy #hInclude
|
||||
jsr .7
|
||||
|
||||
ldy #hSrcFullPath
|
||||
jsr .7
|
||||
|
||||
ldy #hDstBuf
|
||||
jsr .7
|
||||
|
||||
ldy #hSrcBuf
|
||||
jsr .7
|
||||
|
||||
>LDA.G hArcFile
|
||||
>LDYA ZPFullPath
|
||||
beq .1
|
||||
|
||||
>LIBC Free
|
||||
|
||||
.1 >LDYA.G pArcFile
|
||||
cmp #0
|
||||
beq .2
|
||||
|
||||
>LIBC FClose
|
||||
.2 ldy #pArcName+1
|
||||
jsr .7
|
||||
|
||||
.1 clc
|
||||
clc
|
||||
rts
|
||||
|
||||
.7 lda (pData),y
|
||||
beq .8
|
||||
beq .9
|
||||
|
||||
>LIBC FreeMem
|
||||
pha
|
||||
dey
|
||||
lda (pData),y
|
||||
tay
|
||||
pla
|
||||
|
||||
.8 rts
|
||||
>LIBC Free
|
||||
|
||||
.9 clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.RUN.CheckOpt ldy #1
|
||||
lda (ZPPtr1),y
|
||||
@ -639,14 +626,28 @@ CS.RUN.CheckOpt ldy #1
|
||||
rts
|
||||
|
||||
.2 ldy OptionVars,x
|
||||
beq .8
|
||||
beq .3 -X
|
||||
|
||||
lda #$ff
|
||||
sta 0,y
|
||||
|
||||
.8 clc
|
||||
clc
|
||||
rts
|
||||
|
||||
.3 inc ArgIndex
|
||||
lda ArgIndex
|
||||
>LIBC ArgV
|
||||
bcs .99
|
||||
|
||||
>LIBC StrDup
|
||||
bcs .99
|
||||
|
||||
>STYA.G pIgnore
|
||||
|
||||
clc
|
||||
|
||||
.99 rts
|
||||
*--------------------------------------
|
||||
.INB usr/src/shared/x.checkctrl.s
|
||||
.INB usr/src/shared/x.fileenum.s
|
||||
.INB usr/src/shared/x.arc.s
|
||||
*--------------------------------------
|
||||
@ -663,30 +664,16 @@ MSG.E.IARC .CZ "Invalid/corrupt archive"
|
||||
MSG.DIR .CZ "Reading Dir:%s..."
|
||||
MSG.FILE .CZ "Adding File:%s..."
|
||||
ARC.Header .CZ "ARC"
|
||||
.DO DBG
|
||||
MSG.DBG1 .CS "\r\n\r\n ULEN:%6u Bits, T:%6u Bits, BL:%6u Bits, TBL:%6u Bits\r\n"
|
||||
.CS " TopT :%5d, TopTBL :%5d\r\n"
|
||||
.CZ " STR.Max :%5d, BLL.Max :%5d, BLO.Max :%5D\r\n"
|
||||
MSG.DBG2 .CS " S.TB.Cnt :%5D, STR.TB.Cnt:%5D, BL.TB.Cnt :%5D\r\n"
|
||||
.CS " STR.SL.Cnt:%5D, STR.LL.Cnt:%5D, Bits: %d/%d\r\n"
|
||||
.CS " BLL.SL.Cnt:%5D, BLL.LL.Cnt:%5D, Bits: %d/%d,%d\r\n"
|
||||
.CZ " %5D %5D %5D %5D %5D %5D %5D %5D %5D %5D %5D %5D\r\n"
|
||||
MSG.DBG3 .CZ " Output : %6u Bits, %5D Bytes, Alg=%d\r\n"
|
||||
.FIN
|
||||
*--------------------------------------
|
||||
ID.END .EQ *
|
||||
*--------------------------------------
|
||||
.DUMMY
|
||||
.OR 0
|
||||
ArgIndex .BS 1
|
||||
ArcName .BS 1
|
||||
hSrcFullPath .BS 1
|
||||
pArcName .BS 2
|
||||
pArcFile .BS 2
|
||||
pFile .BS 2
|
||||
|
||||
hFile .BS 1
|
||||
hArcFile .BS 1
|
||||
|
||||
hSrcBuf .BS 1
|
||||
hDstBuf .BS 1
|
||||
HeaderBuf .BS 3
|
||||
|
||||
Shunk.SrcSize .BS 2
|
||||
Shunk.DstSize .BS 2
|
||||
|
@ -67,7 +67,8 @@ L.MSG.ERR .DA MSG.ERR
|
||||
CS.INIT clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.RUN dec AttrAND set mask = $ff
|
||||
CS.RUN lda #S.FI.A.FULL+S.FI.A.B+S.FI.A.I
|
||||
sta AttrAND
|
||||
|
||||
inc ArgIndex
|
||||
lda ArgIndex
|
||||
|
@ -6,7 +6,7 @@ CL.Init >LDYAI 256
|
||||
bcs .9
|
||||
|
||||
>STYA ZPCLBuf
|
||||
|
||||
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
CL.PrintPrompt >SS
|
||||
@ -18,7 +18,7 @@ CL.PrintPrompt >SS
|
||||
|
||||
>LDYA ZPCLBuf
|
||||
jsr IO.EscOutYA
|
||||
|
||||
|
||||
lda #0
|
||||
sta (ZPCLBuf)
|
||||
|
||||
@ -106,10 +106,10 @@ CL.CHARIN tax
|
||||
bmi .6
|
||||
|
||||
jsr CL.BS.OUT
|
||||
|
||||
|
||||
lda #C.SPACE
|
||||
>LIBC PutChar
|
||||
|
||||
|
||||
jsr CL.BS.OUT
|
||||
|
||||
.6 >DEC.G CL.Ptr
|
||||
@ -180,7 +180,7 @@ CL.CHARIN.CTRL cpx #C.CR
|
||||
|
||||
cpx #3 Ctrl-C
|
||||
bne .8
|
||||
|
||||
|
||||
jmp CL.CLR
|
||||
|
||||
.18 jsr CheckLFAfterCR Check for any extra LF
|
||||
@ -262,7 +262,7 @@ CL.BS >LDA.G CL.Ptr
|
||||
|
||||
>LDA.G CL.bSilent
|
||||
bpl CL.BS.OUT
|
||||
|
||||
|
||||
CL.BS.8 clc
|
||||
rts
|
||||
|
||||
@ -337,7 +337,7 @@ CL.ReadReset lda #$ff
|
||||
|
||||
iny CL.bSilent
|
||||
sta (pData),y
|
||||
|
||||
|
||||
rts
|
||||
*--------------------------------------
|
||||
MAN
|
||||
|
@ -48,11 +48,11 @@ CMD.ALIAS lda (ZPArgVBufPtr)
|
||||
|
||||
>LDYA R1
|
||||
jmp .1
|
||||
|
||||
|
||||
.9 rts
|
||||
|
||||
CMD.ALIAS.CSYN lda #E.CSYN
|
||||
sec
|
||||
sec
|
||||
rts
|
||||
*--------------------------------------
|
||||
CMD.ALIAS.ADD >LDYA ZPArgVBufPtr
|
||||
@ -94,7 +94,7 @@ CMD.ALIAS.ADD >LDYA ZPArgVBufPtr
|
||||
>PUSHWZ String Mode
|
||||
>KAPI SListAddData
|
||||
>SR
|
||||
|
||||
|
||||
.99 rts
|
||||
*--------------------------------------
|
||||
CMD.. lda (ZPArgVBufPtr)
|
||||
@ -103,7 +103,7 @@ CMD.. lda (ZPArgVBufPtr)
|
||||
>LDYA ZPArgVBufPtr
|
||||
>LIBC LoadTxtFile
|
||||
bcs CMD.SHIFTA.RTS
|
||||
|
||||
|
||||
>STYA.G CORE.pNewCode
|
||||
|
||||
>LDYA ZPArgVBufPtr Exec . file
|
||||
@ -144,7 +144,7 @@ CMD.PUSHD >LDA.G PUSHD.STACK
|
||||
>LIBC GetCWD
|
||||
>LIBC StrDup
|
||||
bcs CMD.POPD.CSYN
|
||||
|
||||
|
||||
phy
|
||||
pha
|
||||
|
||||
@ -157,7 +157,7 @@ CMD.PUSHD >LDA.G PUSHD.STACK
|
||||
sta (pData),y
|
||||
tya
|
||||
>STA.G PUSHD.STACK
|
||||
|
||||
|
||||
lda (ZPArgVBufPtr)
|
||||
bne CMD.CD.0
|
||||
|
||||
@ -208,7 +208,7 @@ CMD.CD.YA >SS
|
||||
>LIBC RealPath
|
||||
>SR
|
||||
bcc .10
|
||||
|
||||
|
||||
lda #MLI.E.INVPATH RealPath() returns NULL/ERRNO
|
||||
* sec
|
||||
rts
|
||||
@ -384,7 +384,7 @@ CMD.SET.EXEC jsr CORE.ArgV.NextChar skip "`"
|
||||
*--------------------------------------
|
||||
CMD.DATE >LEA.G TimeBuf
|
||||
>LIBC Time
|
||||
|
||||
|
||||
>SS
|
||||
>PUSHW ZPCLBuf
|
||||
|
||||
@ -682,12 +682,12 @@ CMD.REN lda (ZPArgVBufPtr)
|
||||
|
||||
>LDYA R1
|
||||
beq .91
|
||||
|
||||
|
||||
>LIBC Free
|
||||
|
||||
.91 >LDYA R2
|
||||
beq .92
|
||||
|
||||
|
||||
>LIBC Free
|
||||
|
||||
.92 pla
|
||||
@ -804,7 +804,7 @@ CMD.CALL jsr CMD.CALL.GETFUNC
|
||||
ldy #pFunctions
|
||||
jsr CORE.SListGetData
|
||||
bcs CMD.CALL.RTS
|
||||
|
||||
|
||||
>STYA.G CORE.pNewCode
|
||||
|
||||
>LDYA ZPArgVBufPtr FUNC PARAM1 PARAM2...
|
||||
@ -856,7 +856,7 @@ CMD.EXIT lda (ZPArgVBufPtr)
|
||||
bcc .2
|
||||
|
||||
.9 rts
|
||||
|
||||
|
||||
.7 lda #bState.ExitOnEOF
|
||||
tsb bState
|
||||
|
||||
@ -1050,7 +1050,7 @@ CMD.FOR.LIST >LDYA ZPArgVBufPtr
|
||||
|
||||
>LDYA ZPTmpW
|
||||
jsr STK.PushYA Push pListPtr
|
||||
|
||||
|
||||
>LDYA ZPTmpW
|
||||
jsr STK.PushYA Push pList for free
|
||||
|
||||
@ -1058,7 +1058,7 @@ CMD.FOR.LIST >LDYA ZPArgVBufPtr
|
||||
|
||||
lda #C.FOR.LIST
|
||||
jsr STK.PushA
|
||||
|
||||
|
||||
lda #C.FOR
|
||||
jsr STK.PushA
|
||||
|
||||
@ -1158,18 +1158,18 @@ CMD.NEXT.LIST lda (pStk),y Y = StkPtr
|
||||
lda #8
|
||||
jsr STK.GetWAtA
|
||||
>STYA ZPInputBufPtr
|
||||
|
||||
|
||||
clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
.1 lda #2 pVARNAME
|
||||
jsr STK.GetWAtA
|
||||
>LIBC Free
|
||||
|
||||
|
||||
lda #4 pLIST
|
||||
jsr STK.GetWAtA
|
||||
>LIBC Free
|
||||
|
||||
|
||||
lda StkPtr
|
||||
clc
|
||||
adc #10
|
||||
@ -1242,12 +1242,12 @@ CMD.NEXT.LIST.TOKEN
|
||||
*--------------------------------------
|
||||
CMD.NEXT.FILEEXEC
|
||||
lda (pStk),y Y = StkPtr
|
||||
bpl CMD.NEXT.FILEEXEC.POP
|
||||
bpl .8
|
||||
|
||||
jsr CMD.NEXT.LINE
|
||||
bcs .9
|
||||
|
||||
bpl CMD.NEXT.FILEEXEC.POP end of file/pipe
|
||||
bpl .8 end of file/pipe
|
||||
|
||||
lda #6
|
||||
jsr STK.GetWAtA
|
||||
@ -1257,16 +1257,18 @@ CMD.NEXT.FILEEXEC
|
||||
|
||||
.9 rts
|
||||
|
||||
CMD.NEXT.FILEEXEC.POP
|
||||
lda #2 pVARNAME
|
||||
.8 lda #2 pVARNAME
|
||||
jsr STK.GetWAtA
|
||||
>LIBC Free
|
||||
bcs .9
|
||||
|
||||
lda #4 pFILE/pPIPE
|
||||
jsr STK.GetWAtA
|
||||
>LIBC FClose
|
||||
bcs .9
|
||||
|
||||
rts
|
||||
ldx #8
|
||||
jmp STK.PopX
|
||||
*--------------------------------------
|
||||
CMD.NEXT.LINE lda #2 pVARNAME
|
||||
jsr STK.GetWAtA
|
||||
@ -1340,7 +1342,7 @@ CMD.LOOP jsr STK.Get
|
||||
|
||||
jsr STK.PopYA
|
||||
bcs .99
|
||||
|
||||
|
||||
>STYA ZPInputBufPtr
|
||||
* clc
|
||||
rts
|
||||
|
@ -4,7 +4,7 @@ NEW
|
||||
CORE.Init >LDYAI 256
|
||||
>LIBC Malloc
|
||||
bcs .9
|
||||
|
||||
|
||||
>STYA pStk
|
||||
|
||||
lda #PUSHD.STACK
|
||||
@ -31,60 +31,60 @@ CORE.ArgVDup >STYA R1
|
||||
|
||||
ldy #0
|
||||
ldx #0
|
||||
|
||||
|
||||
.1 lda (R2),y
|
||||
beq .2
|
||||
|
||||
|
||||
.11 iny
|
||||
bne .1
|
||||
|
||||
|
||||
inx
|
||||
inc R2+1
|
||||
bra .1
|
||||
|
||||
|
||||
.2 iny
|
||||
bne .3
|
||||
|
||||
inx
|
||||
inc R2+1
|
||||
|
||||
|
||||
.3 lda (R2),y
|
||||
bne .11
|
||||
|
||||
|
||||
txa
|
||||
|
||||
|
||||
>LIBC Malloc
|
||||
bcs .9
|
||||
|
||||
|
||||
>STYA R2
|
||||
>STYA ZPTmpW new pARGV
|
||||
|
||||
ldx #0
|
||||
ldy #0
|
||||
|
||||
|
||||
.4 lda (R1),y
|
||||
sta (R2),y
|
||||
beq .6
|
||||
|
||||
.5 iny
|
||||
bne .4
|
||||
|
||||
|
||||
inc R1+1
|
||||
inc R2+1
|
||||
bra .4
|
||||
|
||||
|
||||
.6 inx
|
||||
|
||||
iny
|
||||
bne .7
|
||||
|
||||
|
||||
inc R1+1
|
||||
inc R2+1
|
||||
|
||||
|
||||
.7 lda (R1),y
|
||||
sta (R2),y Ending \0 ?
|
||||
bne .5
|
||||
|
||||
|
||||
clc X = Arg Count
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
@ -144,7 +144,7 @@ CORE.Run >LDYAI 256
|
||||
bcs CORE.Run.RTS
|
||||
|
||||
>STYA ZPArgVBuf
|
||||
|
||||
|
||||
lda #bState.PipeIn+bState.PipeOut
|
||||
trb bState
|
||||
*--------------------------------------
|
||||
@ -315,7 +315,7 @@ CORE.Run.6 lda bState
|
||||
|
||||
jsr IO.Pipe.Out
|
||||
bcs CORE.Run.Exit
|
||||
|
||||
|
||||
lda #S.PS.F.HOLD Run in the background...
|
||||
trb CORE.PSFlags
|
||||
|
||||
@ -331,7 +331,7 @@ CORE.Run.6 lda bState
|
||||
beq .2
|
||||
|
||||
jsr IO.Pop.In restore Input piping app must close it
|
||||
|
||||
|
||||
lda #bState.PipeIn
|
||||
trb bState
|
||||
|
||||
@ -348,15 +348,15 @@ CORE.Run.6 lda bState
|
||||
|
||||
bit CORE.IntCmd
|
||||
bmi .3
|
||||
|
||||
|
||||
jsr IO.Reset.Out Internal : CLOSE output
|
||||
bra .4
|
||||
|
||||
|
||||
.3 jsr IO.Pop.Out External : DONT Close Output, child process will close it
|
||||
|
||||
.4 lda #bState.PipeOut
|
||||
trb bState
|
||||
|
||||
|
||||
.7 jmp CORE.Run.1 Loop with Pipe IN
|
||||
|
||||
CORE.Run.Exit0 lda #0
|
||||
@ -370,7 +370,7 @@ CORE.Run.Exit php
|
||||
>LIBC Free
|
||||
|
||||
stz ZPArgVBuf+1
|
||||
|
||||
|
||||
.1 jsr IO.Reset
|
||||
|
||||
pla
|
||||
@ -571,7 +571,7 @@ CORE.ArgV.Add lda #C.SPACE
|
||||
bcs .9
|
||||
|
||||
ldy #$ff
|
||||
|
||||
|
||||
.70 iny
|
||||
lda (ZPArgVBufPtr),y
|
||||
bne .70
|
||||
@ -760,14 +760,14 @@ CORE.PushBufYA >STYA ZPTmpW new code
|
||||
bcc .1
|
||||
|
||||
iny
|
||||
|
||||
|
||||
lda ZPTmpW
|
||||
sta (pData),y
|
||||
sta ZPInputBuf
|
||||
sta ZPInputBufPtr
|
||||
|
||||
iny
|
||||
|
||||
|
||||
lda ZPTmpW+1
|
||||
sta (pData),y
|
||||
sta ZPInputBuf+1
|
||||
@ -794,7 +794,7 @@ CORE.PopBuf >LDA.G CODE.STACK
|
||||
lda (pData),y
|
||||
tay
|
||||
pla
|
||||
|
||||
|
||||
>LIBC Free
|
||||
|
||||
>LDA.G CODE.STACK
|
||||
|
@ -33,7 +33,7 @@ EXP.GET jsr CORE.ArgV.Next
|
||||
>SS
|
||||
>PUSHEA.G M32.BUF
|
||||
>PUSHW L.FMT.Long
|
||||
|
||||
|
||||
>PUSHL R3
|
||||
>PUSHBI 4
|
||||
>LIBC SPrintF
|
||||
@ -333,7 +333,7 @@ EXP.GetInt32YA >SL
|
||||
|
||||
* lda (R1)
|
||||
* beq EXP.GetInt32YA.RTS
|
||||
|
||||
|
||||
* lda pStack Discard long on stack
|
||||
** clc
|
||||
* adc #4
|
||||
|
@ -123,7 +123,7 @@ HIS.GetNext >LDA.G HIS.Count
|
||||
|
||||
>CMP.G HIS.Count
|
||||
bcc .1
|
||||
|
||||
|
||||
lda #0
|
||||
|
||||
.1 inc
|
||||
@ -167,9 +167,9 @@ HIS.GetA tax
|
||||
|
||||
inc R1
|
||||
bne .7
|
||||
|
||||
|
||||
inc R1+1
|
||||
|
||||
|
||||
.7 ldy #0
|
||||
|
||||
.8 lda (R1),y
|
||||
@ -177,10 +177,10 @@ HIS.GetA tax
|
||||
iny
|
||||
dex
|
||||
bne .8
|
||||
|
||||
|
||||
txa
|
||||
sta (ZPCLBuf),y
|
||||
|
||||
|
||||
clc Y = StrLen
|
||||
rts
|
||||
|
||||
@ -222,13 +222,13 @@ HIS.AddNew >LDYA.G HIS.pBuf
|
||||
.4 lda ZPTmpW
|
||||
clc
|
||||
jsr HIS.AddACPtr1
|
||||
|
||||
|
||||
tya
|
||||
sta (R1)
|
||||
|
||||
|
||||
inc R1
|
||||
bne .5
|
||||
|
||||
|
||||
inc R1+1
|
||||
|
||||
.5 ldy #$ff
|
||||
@ -253,7 +253,7 @@ HIS.DelOldest >LDYA.G HIS.pBuf
|
||||
jsr HIS.AddACPtr1
|
||||
|
||||
ldy #$ff
|
||||
|
||||
|
||||
.2 iny
|
||||
lda (R1),y
|
||||
sta (R2),y
|
||||
|
@ -23,7 +23,7 @@ IO.Pipe.In ldx #O.RDONLY+O.TEXT
|
||||
pla
|
||||
ldy #S.PS.pStdIn
|
||||
jsr A2osX.SetPSy
|
||||
|
||||
|
||||
pla
|
||||
iny
|
||||
jsr A2osX.SetPSy
|
||||
@ -32,13 +32,13 @@ IO.Pipe.In ldx #O.RDONLY+O.TEXT
|
||||
*--------------------------------------
|
||||
IO.Set.In pha
|
||||
phy
|
||||
|
||||
|
||||
jsr IO.Reset.In
|
||||
|
||||
|
||||
ldy #S.PS.pStdIn
|
||||
jsr A2osX.GetPSy
|
||||
>STA.G IO.pStdIn
|
||||
|
||||
|
||||
ldy #S.PS.pStdIn+1
|
||||
jsr A2osX.GetPSy
|
||||
>STA.G IO.pStdIn+1
|
||||
@ -46,7 +46,7 @@ IO.Set.In pha
|
||||
pla
|
||||
ldy #S.PS.pStdIn
|
||||
jsr A2osX.SetPSy
|
||||
|
||||
|
||||
pla
|
||||
iny
|
||||
jsr A2osX.SetPSy
|
||||
@ -68,7 +68,7 @@ IO.Reset.In sec
|
||||
.1 >LDA.G IO.pStdIn
|
||||
ldy #S.PS.pStdIn
|
||||
jsr A2osX.SetPSy
|
||||
|
||||
|
||||
>LDA.G IO.pStdIn+1
|
||||
ldy #S.PS.pStdIn+1
|
||||
jsr A2osX.SetPSy
|
||||
@ -93,15 +93,15 @@ IO.Pipe.Out >STZ.G IO.FIFONAME kernel will create a new name
|
||||
|
||||
pha
|
||||
phy
|
||||
|
||||
|
||||
ldy #S.PS.pStdOut
|
||||
jsr A2osX.GetPSy
|
||||
>STA.G IO.pStdOut
|
||||
|
||||
|
||||
ldy #S.PS.pStdOut+1
|
||||
jsr A2osX.GetPSy
|
||||
>STA.G IO.pStdOut+1
|
||||
|
||||
|
||||
pla
|
||||
ldy #S.PS.pStdOut
|
||||
jsr A2osX.SetPSy
|
||||
@ -114,25 +114,25 @@ IO.Pipe.Out >STZ.G IO.FIFONAME kernel will create a new name
|
||||
*--------------------------------------
|
||||
IO.Set.Out pha
|
||||
phy
|
||||
|
||||
|
||||
jsr IO.Reset.Out
|
||||
|
||||
ldy #S.PS.pStdOut
|
||||
jsr A2osX.GetPSy
|
||||
>STA.G IO.pStdOut
|
||||
|
||||
|
||||
ldy #S.PS.pStdOut+1
|
||||
jsr A2osX.GetPSy
|
||||
>STA.G IO.pStdOut+1
|
||||
|
||||
|
||||
pla
|
||||
ldy #S.PS.pStdOut
|
||||
jsr A2osX.SetPSy
|
||||
|
||||
|
||||
pla
|
||||
iny
|
||||
jsr A2osX.SetPSy
|
||||
|
||||
|
||||
clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
@ -151,11 +151,11 @@ IO.Reset.Out sec
|
||||
.1 >LDA.G IO.pStdOut
|
||||
ldy #S.PS.pStdOut
|
||||
jsr A2osX.SetPSy
|
||||
|
||||
|
||||
>LDA.G IO.pStdOut+1
|
||||
ldy #S.PS.pStdOut+1
|
||||
jsr A2osX.SetPSy
|
||||
|
||||
|
||||
>STZ.G IO.pStdOut+1
|
||||
|
||||
.8 clc
|
||||
@ -163,13 +163,13 @@ IO.Reset.Out sec
|
||||
*--------------------------------------
|
||||
IO.Set.Err pha
|
||||
phy
|
||||
|
||||
|
||||
jsr IO.Reset.Err
|
||||
|
||||
ldy #S.PS.pStdErr
|
||||
jsr A2osX.GetPSy
|
||||
>STA.G IO.pStdErr
|
||||
|
||||
|
||||
ldy #S.PS.pStdErr+1
|
||||
jsr A2osX.GetPSy
|
||||
>STA.G IO.pStdErr+1
|
||||
@ -177,11 +177,11 @@ IO.Set.Err pha
|
||||
pla
|
||||
ldy #S.PS.pStdErr
|
||||
jsr A2osX.SetPSy
|
||||
|
||||
|
||||
pla
|
||||
iny
|
||||
jsr A2osX.SetPSy
|
||||
|
||||
|
||||
rts
|
||||
*--------------------------------------
|
||||
IO.Reset.Err >LDA.G IO.pStdErr+1
|
||||
@ -193,7 +193,7 @@ IO.Reset.Err >LDA.G IO.pStdErr+1
|
||||
>LDA.G IO.pStdErr
|
||||
ldy #S.PS.pStdErr
|
||||
jsr A2osX.SetPSy
|
||||
|
||||
|
||||
>LDA.G IO.pStdErr+1
|
||||
ldy #S.PS.pStdErr+1
|
||||
jsr A2osX.SetPSy
|
||||
@ -329,7 +329,7 @@ IO.PrintBatchErrMsg
|
||||
>PUSHBI 2
|
||||
>LIBC FPrintF
|
||||
>SR
|
||||
|
||||
|
||||
ldy #$ff
|
||||
ldx #'-'
|
||||
|
||||
@ -380,12 +380,12 @@ IO.PrintErrMsg >SS
|
||||
*--------------------------------------
|
||||
IO.EscOutYA >STYA R1 In
|
||||
>STYA R2 Out
|
||||
|
||||
|
||||
ldy #0
|
||||
|
||||
|
||||
.1 jsr GetPtr1NextChar
|
||||
beq .8
|
||||
|
||||
|
||||
cmp #'\'
|
||||
bne .6
|
||||
|
||||
@ -393,21 +393,21 @@ IO.EscOutYA >STYA R1 In
|
||||
beq .7
|
||||
|
||||
ldx #OUT.EscCharsCnt-1
|
||||
|
||||
|
||||
.2 cmp OUT.EscChars,x
|
||||
beq .5
|
||||
|
||||
|
||||
dex
|
||||
bpl .2
|
||||
|
||||
|
||||
stz ZPTmpW
|
||||
|
||||
|
||||
jsr ToUpperCase
|
||||
cmp #'X'
|
||||
bne .3
|
||||
|
||||
|
||||
.20 jsr IncPtr1
|
||||
|
||||
|
||||
lda (R1)
|
||||
beq .40
|
||||
|
||||
@ -439,26 +439,26 @@ IO.EscOutYA >STYA R1 In
|
||||
bra .6
|
||||
|
||||
.4 tax
|
||||
|
||||
|
||||
lda #'\'
|
||||
sta (R2),y
|
||||
iny
|
||||
|
||||
|
||||
txa
|
||||
bra .6
|
||||
|
||||
.5 lda OUT.EscCodes,x
|
||||
.5 lda OUT.EscCodes,x
|
||||
jsr IncPtr1
|
||||
|
||||
|
||||
.6 sta (R2),y
|
||||
iny
|
||||
bra .1
|
||||
|
||||
|
||||
.7 lda #'\'
|
||||
sta (R2),y
|
||||
iny
|
||||
lda #0
|
||||
|
||||
|
||||
.8 sta (R2),y
|
||||
|
||||
>LDYA R2
|
||||
@ -496,48 +496,48 @@ IO.GetStdErr ldy #S.PS.pStdErr
|
||||
*--------------------------------------
|
||||
IO.IsOctDigit cmp #'0'
|
||||
bcc .9
|
||||
|
||||
|
||||
cmp #'7'+1
|
||||
bcs .9
|
||||
|
||||
|
||||
and #%00000111
|
||||
|
||||
|
||||
clc
|
||||
rts
|
||||
|
||||
|
||||
.9 sec
|
||||
rts
|
||||
*--------------------------------------
|
||||
IO.IsHexDigit cmp #'0'
|
||||
bcc .9
|
||||
|
||||
|
||||
cmp #'9'+1
|
||||
bcc .8
|
||||
|
||||
|
||||
cmp #'A'
|
||||
bcc .9
|
||||
|
||||
|
||||
cmp #'Z'+1
|
||||
bcc .7
|
||||
|
||||
cmp #'a'
|
||||
bcc .9
|
||||
|
||||
|
||||
cmp #'z'+1
|
||||
bcc .9
|
||||
|
||||
* sec
|
||||
|
||||
sbc #$20
|
||||
|
||||
|
||||
.7 sec
|
||||
sbc #'A'-10
|
||||
|
||||
.8 and #$0F
|
||||
|
||||
|
||||
clc
|
||||
rts
|
||||
|
||||
|
||||
.9 sec
|
||||
rts
|
||||
*--------------------------------------
|
||||
|
@ -10,7 +10,7 @@ NEW
|
||||
*--------------------------------------
|
||||
STK.PushCode jsr CORE.ArgVDup Y,A = ArgV
|
||||
bcs .9
|
||||
|
||||
|
||||
lda #10 ZPTmpW = new ArgV, X = Arg Count
|
||||
jsr STK.CheckA
|
||||
bcs .9
|
||||
@ -55,7 +55,7 @@ STK.PushCode jsr CORE.ArgVDup Y,A = ArgV
|
||||
STK.PopCode jsr STK.PopFree Code buffer
|
||||
|
||||
jsr GetArgV
|
||||
>LIBC Free ArgV buffer
|
||||
>LIBC Free ArgV buffer
|
||||
|
||||
jsr STK.PopA
|
||||
ldy #S.PS.pARGV+1
|
||||
@ -134,6 +134,7 @@ STK.PopCtxA and #$3F
|
||||
rts
|
||||
*--------------------------------------
|
||||
STK.PopX txa
|
||||
|
||||
clc
|
||||
adc StkPtr
|
||||
sta StkPtr
|
||||
@ -238,7 +239,7 @@ STK.PopYA ldy StkPtr
|
||||
|
||||
iny
|
||||
sty StkPtr
|
||||
|
||||
|
||||
ply
|
||||
|
||||
clc
|
||||
|
@ -7,7 +7,6 @@ NEW
|
||||
*--------------------------------------
|
||||
.INB inc/macros.i
|
||||
.INB inc/a2osx.i
|
||||
.INB inc/kernel.i
|
||||
*--------------------------------------
|
||||
DEFAULT.TIMEOUT .EQ 60
|
||||
*--------------------------------------
|
||||
@ -15,15 +14,17 @@ DEFAULT.TIMEOUT .EQ 60
|
||||
.OR ZPBIN
|
||||
ZS.START
|
||||
ZPPtr1 .BS 2
|
||||
ZPPtr2 .BS 2
|
||||
CmdPtr .BS 2
|
||||
ArgPtr .BS 2
|
||||
|
||||
Count .BS 1
|
||||
Index .BS 1
|
||||
Count .BS 1
|
||||
|
||||
Timeout .BS 2
|
||||
|
||||
Timeout .BS 4
|
||||
bSec .BS 1
|
||||
bTimeout .BS 1
|
||||
|
||||
bRestart .BS 1
|
||||
ZS.END .ED
|
||||
*--------------------------------------
|
||||
@ -32,20 +33,20 @@ ZS.END .ED
|
||||
CS.START cld
|
||||
jmp (.1,x)
|
||||
.DA #$61 6502,Level 1 (65c02)
|
||||
.DA #1 BIN Layout Version 1
|
||||
.DA #S.PS.F.EVENT
|
||||
.DA #2 BIN Layout Version 2
|
||||
.DA #S.PS.SIG.T1SEC
|
||||
.DA #0
|
||||
.DA CS.END-CS.START Code Size (without Constants)
|
||||
.DA DS.END-DS.START Data SegmentSize
|
||||
.DA CS.END
|
||||
.DA ID.END
|
||||
.DA DS.END
|
||||
.DA #32 Stack Size
|
||||
.DA #ZS.END-ZS.START Zero Page Size
|
||||
.DA 0
|
||||
*--------------------------------------
|
||||
* Relocation Table
|
||||
*--------------------------------------
|
||||
.1 .DA CS.INIT
|
||||
.DA CS.RUN
|
||||
.DA CS.DOEVENT
|
||||
.DA CS.SIG
|
||||
.DA CS.QUIT
|
||||
L.MSG.USAGE .DA MSG.USAGE
|
||||
L.MSG.CRLF .DA MSG.CRLF
|
||||
@ -94,11 +95,10 @@ CS.RUN lda #DEFAULT.TIMEOUT
|
||||
>LIBC ArgV
|
||||
bcs .9
|
||||
|
||||
>LIBC AToL
|
||||
>LIBC AToI
|
||||
bcs .9
|
||||
|
||||
>PULLL Timeout
|
||||
|
||||
>STYA Timeout
|
||||
bra .1
|
||||
|
||||
.4 cmp #'R'
|
||||
@ -113,8 +113,6 @@ CS.RUN lda #DEFAULT.TIMEOUT
|
||||
bne .6
|
||||
|
||||
>STYA CmdPtr
|
||||
lda #3
|
||||
sta Timeout
|
||||
bra .1
|
||||
|
||||
.6 ldx ArgPtr+1
|
||||
@ -130,9 +128,11 @@ CS.RUN lda #DEFAULT.TIMEOUT
|
||||
jsr CS.RUN.DEV
|
||||
jsr CS.RUN.SYS
|
||||
|
||||
>PUSHBI 1 INITD
|
||||
>PUSHA SIGNAL
|
||||
>SS
|
||||
>PUSHWI 1 INITD
|
||||
>PUSHWI 1 SIGNAL
|
||||
>LIBC Kill
|
||||
>SR
|
||||
|
||||
lda #0
|
||||
sec
|
||||
@ -145,15 +145,21 @@ CS.RUN lda #DEFAULT.TIMEOUT
|
||||
sec
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.RUN.WAIT >PUSHW L.MSG.SHUTDOWN
|
||||
>PUSHL Timeout
|
||||
>PUSHBI 4
|
||||
CS.RUN.WAIT >SS
|
||||
>PUSHW L.MSG.SHUTDOWN
|
||||
>PUSHW Timeout
|
||||
>PUSHBI 2
|
||||
>LIBC PrintF
|
||||
|
||||
>SR
|
||||
|
||||
.1 >SLEEP
|
||||
|
||||
ldy #S.PS.hStdIn
|
||||
lda (pPS),y
|
||||
ldy #S.PS.pStdIn
|
||||
jsr A2osX.GetPSy
|
||||
pha
|
||||
iny
|
||||
jsr A2osX.GetPSy
|
||||
ply
|
||||
>LIBC FEOF
|
||||
bcs .2
|
||||
|
||||
@ -171,124 +177,147 @@ CS.RUN.WAIT >PUSHW L.MSG.SHUTDOWN
|
||||
|
||||
stz bSec
|
||||
|
||||
lda bTimeout
|
||||
bpl CS.RUN.WAIT
|
||||
lda Timeout
|
||||
ora Timeout+1
|
||||
bne CS.RUN.WAIT
|
||||
|
||||
>SS
|
||||
>PUSHW L.MSG.CRLF
|
||||
>PUSHBI 0
|
||||
>LIBC PrintF
|
||||
>SR
|
||||
|
||||
clc
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
CS.RUN.PS stz Count
|
||||
|
||||
ldx #0
|
||||
stx Index
|
||||
lda #2
|
||||
|
||||
.1 lda PSs.hPS,x
|
||||
beq .7
|
||||
.1 sta Index
|
||||
>KAPI GetPSByID
|
||||
bcs .8
|
||||
|
||||
>LIBC GetMemPtr
|
||||
>STYA ZPPtr1
|
||||
|
||||
.2 lda (ZPPtr1)
|
||||
bpl .4 HOLD ?
|
||||
|
||||
ldy #S.PS.CPID
|
||||
.2 ldy #S.PS.CPID
|
||||
lda (ZPPtr1),y
|
||||
iny
|
||||
ora (ZPPtr1),y
|
||||
bne .6
|
||||
|
||||
.3 jsr CS.GetPSByID
|
||||
bra .2
|
||||
|
||||
.4 ldy #S.PS.S
|
||||
ldy #S.PS.S
|
||||
lda (ZPPtr1),y
|
||||
cmp #S.PS.S.QUIT
|
||||
beq .6
|
||||
beq .6 Dying...
|
||||
|
||||
ldy #S.PS.PID
|
||||
ldy #S.PS.PID+1
|
||||
lda (ZPPtr1),y
|
||||
bne .3
|
||||
|
||||
dey
|
||||
lda (ZPPtr1),y
|
||||
beq .7 don't kill PS0
|
||||
|
||||
cmp #1
|
||||
beq .7 don't kill INITD
|
||||
|
||||
cmp (pPS),y don't kill myself
|
||||
jsr A2osX.GetPSy don't kill myself
|
||||
cmp (ZPPtr1),y
|
||||
bne .3
|
||||
|
||||
dey
|
||||
jsr A2osX.GetPSy
|
||||
cmp (ZPPtr1),y
|
||||
beq .7
|
||||
|
||||
jsr CS.RUN.KILL
|
||||
|
||||
.5 ldy #S.PS.PPID
|
||||
lda (ZPPtr1),y
|
||||
bne .3 go kill parent if not 0
|
||||
.3 jsr CS.RUN.KILL
|
||||
|
||||
.6 inc Count
|
||||
|
||||
.7 >SLEEP
|
||||
.7 >LDYA ZPPtr1
|
||||
>LIBC Free
|
||||
|
||||
.8 >SLEEP
|
||||
|
||||
inc Index
|
||||
ldx Index
|
||||
cpx #K.PS.MAX
|
||||
bne .1
|
||||
inc Index
|
||||
|
||||
lda Index
|
||||
cmp #K.PS.MAX+2
|
||||
bcc .1
|
||||
|
||||
lda Count
|
||||
bne CS.RUN.PS
|
||||
|
||||
sec
|
||||
* sec
|
||||
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.RUN.KILL >PUSHW L.MSG.PS
|
||||
ldy #S.PS.PID
|
||||
CS.RUN.KILL >SS
|
||||
>PUSHW L.MSG.PS
|
||||
ldy #S.PS.PID+1
|
||||
lda (ZPPtr1),y
|
||||
>PUSHA
|
||||
|
||||
ldy #S.PS.hARGV
|
||||
lda (ZPPtr1),y
|
||||
>LIBC GetMemPtr
|
||||
>PUSHYA
|
||||
|
||||
>PUSHBI 3
|
||||
>LIBC PrintF
|
||||
|
||||
ldy #S.PS.PID
|
||||
dey
|
||||
lda (ZPPtr1),y
|
||||
>PUSHA
|
||||
>PUSHBI 1 SIG
|
||||
>LIBC Kill
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.RUN.DEV ldx #K.FILE.MAX
|
||||
|
||||
.1 dex
|
||||
stx Index
|
||||
lda FILEs.hFD,x
|
||||
ldy #S.PS.pCmdLine+1
|
||||
lda (ZPPtr1),y
|
||||
>PUSHA
|
||||
dey
|
||||
lda (ZPPtr1),y
|
||||
>PUSHA
|
||||
|
||||
>PUSHBI 4
|
||||
>LIBC PrintF
|
||||
>SR
|
||||
|
||||
>SS
|
||||
ldy #S.PS.PID+1
|
||||
lda (ZPPtr1),y
|
||||
>PUSHA
|
||||
dey
|
||||
lda (ZPPtr1),y
|
||||
>PUSHA
|
||||
>PUSHWI 1 SIG
|
||||
>LIBC Kill
|
||||
>SR
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.RUN.DEV lda #0
|
||||
|
||||
.1 sta Index
|
||||
>KAPI GetpFDByID
|
||||
beq .7
|
||||
|
||||
>LIBC GetMemPtr
|
||||
>STYA ZPPtr1
|
||||
|
||||
lda Index
|
||||
>KAPI GetNameByID
|
||||
>STYA ZPPtr2
|
||||
|
||||
>SS
|
||||
>PUSHW L.MSG.DEV
|
||||
>PUSHB Index
|
||||
|
||||
lda ZPPtr1
|
||||
clc
|
||||
adc #S.FD.DEV
|
||||
tay
|
||||
lda ZPPtr1+1
|
||||
adc /S.FD.DEV
|
||||
>PUSHYA
|
||||
|
||||
>PUSHW ZPPtr2
|
||||
>PUSHBI 3
|
||||
>LIBC PrintF
|
||||
>SR
|
||||
|
||||
ldx Index
|
||||
>PUSHB FILEs.hFD,x
|
||||
>PUSHBI IOCTL.CLOSE
|
||||
>PUSHWZ
|
||||
>LIBC IOCTL
|
||||
>LDYA ZPPtr2
|
||||
>LIBC Free
|
||||
|
||||
>LDYA ZPPtr1
|
||||
>LIBC Close
|
||||
|
||||
.7 ldx Index
|
||||
bne .1
|
||||
.7 inc Index
|
||||
inc Index
|
||||
|
||||
lda Index
|
||||
cmp #K.FD.MAX+2
|
||||
bcc .1
|
||||
|
||||
rts
|
||||
*--------------------------------------
|
||||
@ -297,9 +326,11 @@ CS.RUN.SYS stz $280
|
||||
>LDYA CmdPtr
|
||||
beq .8
|
||||
|
||||
>SS
|
||||
>PUSHYA
|
||||
>PUSHWI $281
|
||||
>LIBC RealPath
|
||||
>SR
|
||||
bcs .8
|
||||
|
||||
ldx #$ff
|
||||
@ -313,6 +344,7 @@ CS.RUN.SYS stz $280
|
||||
>LDYA ArgPtr
|
||||
beq .8
|
||||
|
||||
>SS
|
||||
>PUSHYA
|
||||
>PUSHBI 2
|
||||
txa Arg0 len
|
||||
@ -322,6 +354,7 @@ CS.RUN.SYS stz $280
|
||||
inc skip arg1 len byte
|
||||
>PUSHA
|
||||
>LIBC RealPath
|
||||
>SR
|
||||
|
||||
ply
|
||||
ldy $280
|
||||
@ -339,58 +372,18 @@ CS.RUN.SYS stz $280
|
||||
|
||||
.8 rts
|
||||
*--------------------------------------
|
||||
CS.GetPSByID ldx #0
|
||||
|
||||
.1 ldy PSs.hPS,x
|
||||
beq .7
|
||||
|
||||
pha
|
||||
tya
|
||||
|
||||
phx
|
||||
>LIBC GetMemPtr
|
||||
>STYA ZPPtr1
|
||||
plx
|
||||
|
||||
pla
|
||||
|
||||
ldy #S.PS.PID
|
||||
cmp (ZPPtr1),y
|
||||
beq .8
|
||||
|
||||
.7 inx
|
||||
cpx #K.PS.MAX
|
||||
bne .1
|
||||
|
||||
* sec
|
||||
|
||||
rts
|
||||
|
||||
.8 clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.DOEVENT lda (pEvent)
|
||||
bpl .9
|
||||
asl
|
||||
bpl .9
|
||||
|
||||
sta bSec
|
||||
|
||||
ldx #4
|
||||
ldy #0
|
||||
CS.SIG dec bSec
|
||||
|
||||
clc
|
||||
|
||||
.1 lda Timeout,y
|
||||
.1 lda Timeout
|
||||
sbc #0
|
||||
sta Timeout,y
|
||||
iny
|
||||
dex
|
||||
bne .1
|
||||
|
||||
ror
|
||||
eor #$80
|
||||
sta bTimeout
|
||||
tay
|
||||
lda Timeout+1
|
||||
sbc #0
|
||||
bcc .9
|
||||
|
||||
>STYA Timeout
|
||||
|
||||
.9 sec
|
||||
rts
|
||||
@ -398,18 +391,20 @@ CS.DOEVENT lda (pEvent)
|
||||
CS.QUIT clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.END
|
||||
CS.END .EQ *
|
||||
*--------------------------------------
|
||||
MSG.USAGE .CS "Usage : SHUTDOWN <NEXT.SYSTEM>\r\n"
|
||||
.CS " -R : Restart System\r\n"
|
||||
.CS " -T <seconds> : default to 60"
|
||||
MSG.CRLF .CZ "\r\n"
|
||||
MSG.SHUTDOWN .CZ "\r\e[KSHUTDOWN:System will stop in %u seconds..."
|
||||
MSG.PS .CZ "SHUTDOWN:Killing process %3d, %s\r\n"
|
||||
MSG.DEV .CZ "SHUTDOWN:Closing device %3d, %s\r\n"
|
||||
MSG.SHUTDOWN .CZ "\r\e[KSHUTDOWN:System will stop in %D seconds..."
|
||||
MSG.PS .CZ "SHUTDOWN:Killing process %5D, %s\r\n"
|
||||
MSG.DEV .CZ "SHUTDOWN:Closing device %5D, %s\r\n"
|
||||
*--------------------------------------
|
||||
ID.END .EQ *
|
||||
*--------------------------------------
|
||||
.DUMMY
|
||||
.OR 0
|
||||
DS.START
|
||||
DS.END .ED
|
||||
*--------------------------------------
|
||||
MAN
|
||||
|
134
BIN/UNPAK.S.txt
134
BIN/UNPAK.S.txt
@ -31,7 +31,10 @@ ZPOutBufLen .BS 2
|
||||
ZPFullPathPtr .BS 2
|
||||
ZPRelPathPtr .BS 2
|
||||
|
||||
ZPProgress .BS 1
|
||||
index .BS 1
|
||||
bList .BS 1
|
||||
bSpinner .BS 1
|
||||
|
||||
ZPSpinState .BS 1
|
||||
|
||||
ZS.END .ED
|
||||
@ -66,48 +69,43 @@ L.MSG.E.IARC .DA MSG.E.IARC
|
||||
CS.INIT clc
|
||||
CS.INIT.RTS rts
|
||||
*--------------------------------------
|
||||
CS.RUN lda #1
|
||||
CS.RUN inc Index
|
||||
lda Index
|
||||
>LIBC ArgV
|
||||
bcs .99
|
||||
bcs .3
|
||||
|
||||
>STYA ZPPtr1
|
||||
|
||||
>STYA ZPPtr1 See if first arg is -p
|
||||
pha
|
||||
lda (ZPPtr1)
|
||||
cmp #'-'
|
||||
bne .1 No dash-arguments
|
||||
bne .1
|
||||
|
||||
pla
|
||||
ldy #1
|
||||
lda (ZPPtr1),y
|
||||
cmp #'p'
|
||||
bne .99 -p is only valid argument
|
||||
jsr CS.RUN.CheckOpt
|
||||
bcc CS.RUN
|
||||
|
||||
sty ZPProgress
|
||||
|
||||
lda #2
|
||||
>LIBC ArgV
|
||||
bcs .99
|
||||
|
||||
bra .11
|
||||
.1 >LDA.G pArcFile+1
|
||||
bne .2
|
||||
|
||||
.1 pla
|
||||
jsr CS.RUN.OpenArc
|
||||
bcc CS.RUN
|
||||
|
||||
.11 jsr CS.RUN.OpenArc
|
||||
bcs .9
|
||||
|
||||
lda ZPProgress See if -p was provided
|
||||
beq .2
|
||||
.2 lda ZPFullPathPtr+1
|
||||
bne .99
|
||||
|
||||
lda #' ' Space for spinner to eat
|
||||
>LIBC PutChar
|
||||
jsr CS.RUN.SetupPath1
|
||||
bcc CS.RUN
|
||||
|
||||
lda #3 Have dash-args, check arg #3
|
||||
bra .3
|
||||
bcs .9
|
||||
*--------------------------------------
|
||||
.3 >LDA.G pArcFile+1
|
||||
beq .99
|
||||
|
||||
.2 lda #2 No dash-args, check arg #2
|
||||
|
||||
.3 >LIBC ArgV
|
||||
bcc .4
|
||||
lda ZPFullPathPtr+1
|
||||
bne .5
|
||||
|
||||
ldy #S.PS.pCWD
|
||||
jsr A2osX.GetPSy
|
||||
@ -116,13 +114,19 @@ CS.RUN lda #1
|
||||
jsr A2osX.GetPSy
|
||||
ply
|
||||
|
||||
.4 jsr CS.RUN.SetupPath
|
||||
jsr CS.RUN.SetupPath
|
||||
bcs .9
|
||||
|
||||
jsr CS.RUN.SetupBufs
|
||||
.5 jsr CS.RUN.SetupBufs
|
||||
bcs .9
|
||||
|
||||
jsr CS.RUN.LOOP
|
||||
lda bSpinner
|
||||
beq .6
|
||||
|
||||
lda #' ' Space for spinner to eat
|
||||
>LIBC PutChar
|
||||
|
||||
.6 jsr CS.RUN.LOOP
|
||||
bcs .9
|
||||
|
||||
jsr CS.RUN.TidyUp
|
||||
@ -137,9 +141,29 @@ CS.RUN lda #1
|
||||
sec
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.RUN.CheckOpt ldy #1
|
||||
lda (ZPPtr1),y
|
||||
|
||||
ldx #OptionVars-OptionList-1
|
||||
|
||||
.2 cmp OptionList,x
|
||||
beq .3
|
||||
|
||||
dex
|
||||
bpl .2
|
||||
|
||||
sec
|
||||
rts
|
||||
|
||||
.3 ldy OptionVars,x
|
||||
ldx #$ff
|
||||
stx 0,y
|
||||
clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.RUN.SetupPath
|
||||
>STYA ZPPtr1
|
||||
|
||||
CS.RUN.SetupPath1
|
||||
>LDYAI 256
|
||||
>LIBC Malloc
|
||||
bcs .9
|
||||
@ -205,7 +229,7 @@ CS.RUN.LOOP jsr CS.RUN.GetByte
|
||||
jsr CS.RUN.CheckDir
|
||||
bcs .99
|
||||
|
||||
lda ZPProgress
|
||||
lda bSpinner
|
||||
bne CS.RUN.LOOP
|
||||
|
||||
>LDYA L.MSG.OK
|
||||
@ -236,7 +260,7 @@ CS.RUN.LOOP jsr CS.RUN.GetByte
|
||||
.2 cmp #CHNK.T.DATA
|
||||
bne .3 Could be a 0 byte file
|
||||
|
||||
.20 lda ZPProgress
|
||||
.20 lda bSpinner
|
||||
beq .21
|
||||
|
||||
jsr CS.RUN.Spinner
|
||||
@ -287,12 +311,16 @@ CS.RUN.LOOP jsr CS.RUN.GetByte
|
||||
|
||||
jmp .10
|
||||
*--------------------------------------
|
||||
CS.RUN.Exit >LDYA.G pFile
|
||||
CS.RUN.Exit bit bList
|
||||
clc
|
||||
bmi .8
|
||||
|
||||
>LDYA.G pFile
|
||||
>LIBC FClose
|
||||
|
||||
>STZ.G pFile+1
|
||||
|
||||
lda ZPProgress
|
||||
.8 lda bSpinner
|
||||
bne .9
|
||||
|
||||
>LDYA L.MSG.OK
|
||||
@ -300,7 +328,7 @@ CS.RUN.Exit >LDYA.G pFile
|
||||
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
CS.RUN.PrintFN lda ZPProgress
|
||||
CS.RUN.PrintFN lda bSpinner
|
||||
bne .9
|
||||
|
||||
>SS
|
||||
@ -321,6 +349,7 @@ CS.RUN.Spinner lda #C.BS
|
||||
inc
|
||||
and #3
|
||||
sta ZPSpinState
|
||||
tax
|
||||
|
||||
lda MSG.SPINNER,x
|
||||
|
||||
@ -334,7 +363,7 @@ CS.RUN.NewLine lda #C.CR
|
||||
>LIBC PutChar
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.RUN.TidyUp lda ZPProgress
|
||||
CS.RUN.TidyUp lda bSpinner
|
||||
beq .9
|
||||
|
||||
lda #8
|
||||
@ -348,7 +377,7 @@ CS.RUN.TidyUp lda ZPProgress
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
CS.RUN.OpenArc >SS
|
||||
>PUSHYA
|
||||
>PUSHW ZPPtr1
|
||||
>PUSHBI O.RDONLY
|
||||
>PUSHBI $CF PAK
|
||||
>PUSHWZ Aux type
|
||||
@ -432,7 +461,11 @@ CS.RUN.GetByte >LDYA.G pArcFile
|
||||
>LIBC GetC
|
||||
rts
|
||||
*--------------------------------------
|
||||
CS.RUN.CheckDir >SS
|
||||
CS.RUN.CheckDir bit bList
|
||||
clc
|
||||
bmi .9
|
||||
|
||||
>SS
|
||||
>PUSHW ZPFullPathPtr
|
||||
>PUSHEA.G STATBUF
|
||||
>LIBC Stat
|
||||
@ -460,7 +493,11 @@ CS.RUN.CheckDir >SS
|
||||
sec
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
CS.RUN.OpenFile >SS
|
||||
CS.RUN.OpenFile bit bList
|
||||
clc
|
||||
bmi .9
|
||||
|
||||
>SS
|
||||
>PUSHW ZPFullPathPtr
|
||||
>PUSHBI O.CREATE+O.WRONLY+O.TRUNC
|
||||
>PUSHB.G FileType
|
||||
@ -474,13 +511,18 @@ CS.RUN.OpenFile >SS
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
CS.RUN.WriteFile
|
||||
bit bList
|
||||
clc
|
||||
bmi .9
|
||||
|
||||
>SS
|
||||
>PUSHW.G pFile
|
||||
>PUSHW.G pOutBuf
|
||||
>PUSHW ZPOutBufLen
|
||||
>LIBC FWrite
|
||||
>SR
|
||||
rts
|
||||
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
CS.SIG sec
|
||||
rts
|
||||
@ -521,8 +563,12 @@ CS.QUIT >LDYA.G pFile
|
||||
*--------------------------------------
|
||||
CS.END .EQ *
|
||||
*--------------------------------------
|
||||
MSG.USAGE .CS "Usage : UNPAK [-p] Archive [DstDir]\r\n"
|
||||
.CZ " -p : Show progress spinner\r\n"
|
||||
OptionList .AS "LlPp"
|
||||
OptionVars .DA #bList,#bList,#bSpinner,#bSpinner
|
||||
*--------------------------------------
|
||||
MSG.USAGE .CS "Usage : UNPAK Archive [DstDir]\r\n"
|
||||
.CS " -L : List content only\r\n"
|
||||
.CZ " -P : Show progress spinner\r\n"
|
||||
MSG.DIR .CZ "Creating Dir:%s..."
|
||||
MSG.FILE .CZ "Extracting File:%s..."
|
||||
MSG.OK .CZ "[OK]"
|
||||
|
@ -376,8 +376,8 @@ GetFDByID_ .EQ $04
|
||||
GetNameByID_ .EQ $06
|
||||
GetPSByID_ .EQ $08
|
||||
GetPSCmdLine_ .EQ $0A
|
||||
* .EQ $0C
|
||||
* .EQ $0E
|
||||
GetpFILEByID_ .EQ $0C
|
||||
GetpFDByID_ .EQ $0E
|
||||
|
||||
SListGetData_ .EQ $10
|
||||
SListAddData_ .EQ $12
|
||||
|
@ -13,7 +13,7 @@ DCLK.START1 php
|
||||
sei
|
||||
|
||||
lda $C400
|
||||
|
||||
|
||||
stz $C0C0
|
||||
stz $C0C1
|
||||
|
||||
@ -26,10 +26,10 @@ DCLK.START1 php
|
||||
.1 lda DS1215.SIG-1,y
|
||||
|
||||
ldx #8
|
||||
|
||||
|
||||
.2 sta $C0C3
|
||||
stz $C0C0
|
||||
|
||||
|
||||
lsr
|
||||
dex
|
||||
bne .2
|
||||
@ -84,7 +84,7 @@ DCLK.START1 php
|
||||
sta MLI.DATE
|
||||
|
||||
* lda DS1215.DATA Get YY
|
||||
|
||||
|
||||
pla
|
||||
rol
|
||||
sta MLI.DATE+1
|
||||
|
@ -51,7 +51,7 @@ ILDR.ENUMPM .DO READCAT=1
|
||||
.DA #MLI.READBLOCK
|
||||
.DA ILDR.MLIRB.P
|
||||
bcc .23
|
||||
|
||||
|
||||
jmp ILDR.MLIERR
|
||||
|
||||
.23 ldy #$03 get next block# from link
|
||||
@ -86,7 +86,7 @@ ILDR.ENUMPM .DO READCAT=1
|
||||
bcs ILDR.MLIERR
|
||||
|
||||
ldx #3
|
||||
|
||||
|
||||
.2 lda idxl,x
|
||||
pha
|
||||
dex
|
||||
@ -95,9 +95,9 @@ ILDR.ENUMPM .DO READCAT=1
|
||||
jsr $2000
|
||||
|
||||
bit IO.RROMBNK2 enable ROM
|
||||
|
||||
|
||||
ldx #0
|
||||
|
||||
|
||||
.3 pla
|
||||
sta idxl,x
|
||||
inx
|
||||
@ -105,13 +105,13 @@ ILDR.ENUMPM .DO READCAT=1
|
||||
bne .3
|
||||
|
||||
>DEBUGOA
|
||||
|
||||
|
||||
bra .1
|
||||
|
||||
.8 .FIN
|
||||
*--------------------------------------
|
||||
jsr ILDR.EnumInit
|
||||
|
||||
|
||||
ldx #S.FI.T.SYS
|
||||
ldy #ILDR.SYSTEMSFX
|
||||
lda /ILDR.SYSTEMSFX
|
||||
@ -206,7 +206,7 @@ ILDR.EnumInit.RTS
|
||||
ILDR.EnumNext stx ILDR.FT
|
||||
sty src
|
||||
sta src+1
|
||||
|
||||
|
||||
ror ILDR.bPFXSFX
|
||||
|
||||
.1 inc ILDR.nFC
|
||||
@ -232,7 +232,7 @@ ILDR.EnumNext stx ILDR.FT
|
||||
lda idxl+1
|
||||
cmp #$14 last block read at $0C00-$13FF
|
||||
bcs ILDR.EnumInit.RTS
|
||||
|
||||
|
||||
lda #4
|
||||
sta idxl
|
||||
|
||||
@ -279,7 +279,7 @@ ILDR.EnumNext stx ILDR.FT
|
||||
dey
|
||||
bne .11
|
||||
bra .15
|
||||
|
||||
|
||||
.12 lda (src) expected prefix/suffix len
|
||||
tay
|
||||
|
||||
@ -290,11 +290,11 @@ ILDR.EnumNext stx ILDR.FT
|
||||
|
||||
dey
|
||||
bne .13
|
||||
|
||||
|
||||
.15 ldy #$1D MIN_VERSION
|
||||
lda (idxl),y
|
||||
bpl .10 no lowercase information
|
||||
|
||||
|
||||
ldx LDR.PBuf
|
||||
|
||||
.6 cpx #8 CS if MIN_VERSION to use
|
||||
@ -304,22 +304,22 @@ ILDR.EnumNext stx ILDR.FT
|
||||
lda (idxl),y
|
||||
and ILDR.LCBits,x
|
||||
bne .8
|
||||
|
||||
|
||||
bra .9
|
||||
|
||||
|
||||
.7 ldy #$1C VERSION
|
||||
lda (idxl),y
|
||||
|
||||
|
||||
and ILDR.LCBits-8,x
|
||||
beq .9
|
||||
|
||||
.8 lda LDR.PBuf,x
|
||||
eor #$20 to lowercase
|
||||
sta LDR.PBuf,x
|
||||
|
||||
|
||||
.9 dex
|
||||
bne .6
|
||||
|
||||
|
||||
.10 clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
@ -352,7 +352,7 @@ ILDR.LoadFile sty ILDR.OPEN+1 Filename
|
||||
lda ILDR.GETEOF+2
|
||||
bne .99 more than $9F00
|
||||
|
||||
.1
|
||||
.1
|
||||
jsr MLI
|
||||
.DA #MLI.READ
|
||||
.DA ILDR.READ
|
||||
|
@ -60,11 +60,11 @@ IRQ.Done ldx #$FA
|
||||
bne .1
|
||||
|
||||
* lda IO.CLRC8ROM
|
||||
|
||||
*IRQ.DoneCn lda $C100 SELF MODIFIED
|
||||
|
||||
*IRQ.DoneCn lda $C100 SELF MODIFIED
|
||||
* lda IRQ.DoneCn+2
|
||||
* sta mslot
|
||||
|
||||
|
||||
rti
|
||||
*--------------------------------------
|
||||
IRQ.GoX jmp (MLI.IRQVs,x) interrupt routine x
|
||||
|
@ -47,7 +47,7 @@ LDR.START8 lda ZP.UNITNUM
|
||||
|
||||
cld
|
||||
bit IO.RROMBNK2
|
||||
|
||||
|
||||
sta IO.CLR80DISP
|
||||
sta IO.CLR80STORE
|
||||
|
||||
@ -259,7 +259,7 @@ LDR.IIGS sta XDOS.CortFlag
|
||||
|
||||
ldx #PAKME.SEL2.ID
|
||||
jsr LDR.SetupSEL
|
||||
|
||||
|
||||
.FIN
|
||||
*--------------------------------------
|
||||
lda LDR.BootFlag
|
||||
@ -276,7 +276,7 @@ LDR.II .DO M.SEL
|
||||
|
||||
ldx #PAKME.SEL1.ID
|
||||
jsr LDR.SetupSEL
|
||||
|
||||
|
||||
.FIN
|
||||
|
||||
jsr LDR.ClkDevScan
|
||||
@ -347,7 +347,7 @@ LDR.SetPrefix jsr MLI
|
||||
ldy #ILDR
|
||||
lda /ILDR
|
||||
jsr X.Unpak.XatYA
|
||||
|
||||
|
||||
jmp ILDR
|
||||
|
||||
.9 ldx #LDR.MSG.PFXERR
|
||||
@ -603,12 +603,12 @@ LDR.ClkDevXCLK bit IO.RROMBNK2
|
||||
LDR.SetupCLK sta LDR.MSG.CLK
|
||||
|
||||
phx
|
||||
|
||||
|
||||
ldx #LDR.MSG.CLK
|
||||
jsr LDR.PrintX
|
||||
|
||||
jsr LDR.LCBNK1
|
||||
|
||||
|
||||
plx
|
||||
|
||||
ldy #CLK
|
||||
@ -646,27 +646,27 @@ LDR.SetupRAM lda MLI.DEVCNT
|
||||
lda /RAMX
|
||||
jsr X.Unpak.XatYA
|
||||
bra .7
|
||||
|
||||
|
||||
.1 ldx #PAKME.RAMX.ID
|
||||
ldy #$0800
|
||||
lda /$0800
|
||||
jsr X.Unpak.XatYA
|
||||
|
||||
|
||||
sta IO.SETWRITEAUX
|
||||
|
||||
ldx #$FE
|
||||
|
||||
|
||||
.2 lda $900,x
|
||||
sta RAMX+$100,x
|
||||
dex
|
||||
txa
|
||||
bne .2
|
||||
|
||||
|
||||
.3 lda $800,x
|
||||
sta RAMX,x
|
||||
inx
|
||||
bne .3
|
||||
|
||||
|
||||
.7 sta IO.CLRWRITEAUX
|
||||
|
||||
lda #RAM put driver address into
|
||||
@ -769,7 +769,7 @@ LDR.BlkDevScan bit IO.RROMBNK2 write protect lc ram.
|
||||
|
||||
bit LDR.SlotDevType-1,x
|
||||
bpl .6 type = smartport
|
||||
|
||||
|
||||
jsr LDR.AddExtraBLKDevs
|
||||
bra .8
|
||||
|
||||
@ -899,20 +899,20 @@ LDR.AddExtraBLKDevs
|
||||
dec
|
||||
dec
|
||||
sta LDR.DevCnt
|
||||
|
||||
|
||||
jsr LDR.SetDevID set up device attributes
|
||||
|
||||
jsr LDR.FindFreeDevPtr
|
||||
|
||||
jsr LDR.FindFreeDevPtr
|
||||
bcs .9
|
||||
|
||||
|
||||
.1 cpy #$10
|
||||
bcc .2 must be Drive 1
|
||||
|
||||
|
||||
.10 jsr LDR.FindFreeDevPtrNext
|
||||
bcc .1
|
||||
|
||||
|
||||
rts
|
||||
|
||||
|
||||
.2 lda LDR.DevCnt
|
||||
dec
|
||||
beq .4 only one to add
|
||||
@ -928,30 +928,30 @@ LDR.AddExtraBLKDevs
|
||||
lda MLI.DEVPTRS+1,y
|
||||
cmp /XDOS.NoDevice
|
||||
bne .10 Drive 1 & 2 free
|
||||
|
||||
|
||||
jsr LDR.AddY2DEVLST Y = index in MLI.DEVPTRS
|
||||
jsr .8
|
||||
|
||||
|
||||
tya
|
||||
and #$F
|
||||
tay
|
||||
|
||||
.4 jsr LDR.AddY2DEVLST Y = index in MLI.DEVPTRS
|
||||
|
||||
|
||||
.8 phy
|
||||
|
||||
|
||||
ldy #$ff
|
||||
|
||||
|
||||
lda (idxl),y BLK entry point
|
||||
|
||||
|
||||
ply
|
||||
sta MLI.DEVPTRS,y
|
||||
lda idxl+1
|
||||
sta MLI.DEVPTRS+1,y
|
||||
|
||||
* clc
|
||||
|
||||
.9 rts
|
||||
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
LDR.AddExtraSPDevs
|
||||
jsr LDR.SetDevID set up device attributes
|
||||
@ -987,7 +987,7 @@ LDR.AddExtraSPDevs
|
||||
lda LDR.SPStatusBuf is this a block device?
|
||||
bpl .2
|
||||
|
||||
jsr LDR.FindFreeDevPtr
|
||||
jsr LDR.FindFreeDevPtr
|
||||
bcs .8
|
||||
|
||||
jsr LDR.LCBNK1
|
||||
@ -1110,7 +1110,7 @@ LDR.AddY2DEVLST inc MLI.DEVCNT
|
||||
|
||||
ora devid include device attributes
|
||||
sta MLI.DEVLST,x in the active device list.
|
||||
|
||||
|
||||
rts
|
||||
*--------------------------------------
|
||||
LDR.Scr80Init phx Save LDR.MSG
|
||||
|
@ -14,29 +14,29 @@ NCLK.START1 php
|
||||
|
||||
lda IO.RDCXROM
|
||||
php
|
||||
|
||||
|
||||
sta IO.SETCXROM
|
||||
|
||||
sta NSC.IOBASE
|
||||
* lda $C00B Workaround for Ultrawarp bug
|
||||
|
||||
|
||||
lda NSC.IOBASE+4 Reset DS1216E comparison register with READ A2=1
|
||||
|
||||
ldy #8 Read 8 bytes...
|
||||
|
||||
.1 lda DS1216E.SIG-1,y
|
||||
phy
|
||||
|
||||
|
||||
ldy #8 ....of 8 bits
|
||||
|
||||
|
||||
.2 ldx #0
|
||||
lsr
|
||||
bcc .3
|
||||
|
||||
|
||||
inx
|
||||
|
||||
|
||||
.3 bit NSC.IOBASE,x Write Pattern bit in A0, with A2=0
|
||||
|
||||
|
||||
dey
|
||||
bne .2
|
||||
|
||||
@ -91,7 +91,7 @@ NCLK.START1 php
|
||||
sta MLI.DATE
|
||||
|
||||
* lda DS1216E.DATA Get YY
|
||||
|
||||
|
||||
pla
|
||||
rol
|
||||
sta MLI.DATE+1
|
||||
|
@ -88,7 +88,7 @@ SEL1.OpenDir stx SEL1.PathBuf save the name length
|
||||
jmp SEL1.KeyLoop
|
||||
*--------------------------------------
|
||||
SEL1.EnumDir stz filecount zero file count.
|
||||
|
||||
|
||||
jsr SEL1.SetFNPtr
|
||||
|
||||
stz SEL1.ReadP+2
|
||||
@ -108,7 +108,7 @@ SEL1.EnumBlk jsr MLI
|
||||
ldx #TBX.EnumBlk
|
||||
jsr MLI.TOOLBOX
|
||||
bcs SEL1.CloseDir
|
||||
|
||||
|
||||
SEL1.EnumDirNext
|
||||
jsr SEL1.SetFNPtr Y,A = FilenamePtr
|
||||
ldx #TBX.EnumNext
|
||||
@ -121,10 +121,10 @@ SEL1.EnumDirNext
|
||||
lda (FilenamePtr)
|
||||
eor #SEL1.BS.L
|
||||
bne .8
|
||||
|
||||
|
||||
tay Y = 0
|
||||
ldx SEL1.PathBuf
|
||||
|
||||
|
||||
.1 iny
|
||||
lda SEL1.BS-1,y
|
||||
cmp (FilenamePtr),y
|
||||
@ -132,14 +132,14 @@ SEL1.EnumDirNext
|
||||
|
||||
inx
|
||||
sta SEL1.BSPathBuf,x
|
||||
|
||||
|
||||
cpy #SEL1.BS.L
|
||||
bne .1
|
||||
|
||||
|
||||
stx SEL1.BSPathBuf
|
||||
|
||||
|
||||
ldx SEL1.PathBuf
|
||||
|
||||
|
||||
.2 lda SEL1.PathBuf,x
|
||||
sta SEL1.BSPathBuf,x
|
||||
dex
|
||||
@ -315,7 +315,7 @@ SEL1.CR ldy SelectedIndex
|
||||
bvc .8
|
||||
|
||||
ldx SEL1.PathBuf
|
||||
|
||||
|
||||
.7 lda SEL1.PathBuf,x
|
||||
sta $2006,x
|
||||
dex
|
||||
@ -375,7 +375,7 @@ SEL1.PrintFNInv lda #$0F
|
||||
* iny
|
||||
* cpy #16
|
||||
* bne .3
|
||||
|
||||
|
||||
jsr SEL1.SPOut
|
||||
jmp ROM.SETNORM set normal text mode.
|
||||
*--------------------------------------
|
||||
@ -424,7 +424,7 @@ SEL1.FullPath.. ldx SEL1.PathBuf
|
||||
rts
|
||||
*--------------------------------------
|
||||
SEL1.SetFNPtr ldx filecount
|
||||
|
||||
|
||||
SEL1.SetFNPtrX lda /SEL1.Filenames/16
|
||||
sta FilenamePtr+1
|
||||
txa
|
||||
@ -439,7 +439,7 @@ SEL1.SetFNPtrX lda /SEL1.Filenames/16
|
||||
sta FilenamePtr
|
||||
tay
|
||||
lda FilenamePtr+1
|
||||
|
||||
|
||||
rts
|
||||
*--------------------------------------
|
||||
SEL1.CheckType ldy #SEL1.ValidTypes.L-1
|
||||
|
@ -30,7 +30,7 @@ TCLK.Cx2 jsr rdtcp read month, day of week, day of month
|
||||
asl multiply by 10
|
||||
asl
|
||||
adc ZP.PCL
|
||||
asl
|
||||
asl
|
||||
adc ROM.INBUF+1,y add to ascii 'ones' place
|
||||
sec and subtract out the ascii
|
||||
sbc #$B0
|
||||
@ -66,7 +66,7 @@ TCLK.Cx2 jsr rdtcp read month, day of week, day of month
|
||||
|
||||
adc #$07 else make it positive again.
|
||||
|
||||
.4 tay
|
||||
.4 tay
|
||||
lda yradj,y look up year
|
||||
plp and combine it with hi bit of month
|
||||
rol
|
||||
|
@ -77,11 +77,11 @@ XDOS.MAIN cld no decimal.
|
||||
sta MLI.MLIRTN+1
|
||||
|
||||
phy pull processor status
|
||||
|
||||
|
||||
.ELSE
|
||||
|
||||
|
||||
XDOS.AUX cld
|
||||
|
||||
|
||||
bit IO.RRAMWRAMBNK1
|
||||
sty MLI.BNKBYT2
|
||||
|
||||
@ -106,7 +106,7 @@ XDOS.AUX cld
|
||||
sta ZP.A3L+1
|
||||
adc #$00
|
||||
sta MLI.MLIEXIT.PCH+1
|
||||
|
||||
|
||||
.FIN
|
||||
*--------------------------------------
|
||||
plp to re-enable interrupts.
|
||||
@ -185,7 +185,7 @@ XDOS.Exit stz MLI.BUBIT clear backup bit
|
||||
|
||||
* Y = Status register
|
||||
* A = MLI Error code
|
||||
|
||||
|
||||
.DO AUXLC=0
|
||||
|
||||
ldx MLI.MLIRTN+1 place last MLI call return address
|
||||
@ -201,15 +201,15 @@ XDOS.Exit stz MLI.BUBIT clear backup bit
|
||||
ldy MLI.MLIY MLI Y register savearea
|
||||
lda MLI.BNKBYT1 restore language card status
|
||||
jmp MLI.MLIEXIT and return.
|
||||
|
||||
|
||||
.ELSE
|
||||
|
||||
|
||||
tsx
|
||||
stx $101
|
||||
ldx $100
|
||||
txs
|
||||
jmp MLI.MLIEXITX
|
||||
|
||||
|
||||
.FIN
|
||||
*--------------------------------------
|
||||
XDOS.NoDevice lda #MLI.E.NODEV no device connected.
|
||||
@ -245,13 +245,13 @@ XDOS.DevMgr ldy #$05 the call spec for devices must
|
||||
.DO IOBANK=1
|
||||
|
||||
jsr XDOS.DevCallX
|
||||
|
||||
|
||||
.ELSE
|
||||
|
||||
|
||||
jsr XDOS.DevCall call internal entry for device dispatch
|
||||
|
||||
|
||||
.FIN
|
||||
|
||||
|
||||
bcc XDOS.DevCall.RTS
|
||||
|
||||
XDOS.GoSysErr jsr MLI.SYSERR
|
||||
@ -286,7 +286,7 @@ XDOS.DevCall php
|
||||
sta .5+1
|
||||
lda MLI.DEVPTRS+1,x
|
||||
sta .5+2
|
||||
|
||||
|
||||
.DO IOBANK=1
|
||||
|
||||
bvc .5
|
||||
@ -515,7 +515,7 @@ XDOS.GetPath ldy #$01 index to pathname pointer
|
||||
|
||||
cmp #'z'+1
|
||||
bcs .3
|
||||
|
||||
|
||||
eor #$20 to uppercase
|
||||
.3 .FIN
|
||||
|
||||
@ -631,7 +631,7 @@ XDOS.GetPrefix ldy #$01 get index to users pathname buffer
|
||||
sta ZP.UserBuf+1
|
||||
|
||||
* clc calc how big a buffer is needed.
|
||||
|
||||
|
||||
stz XDOS.TmpCnt+1 set buffer length at 64 char max
|
||||
lda #$40
|
||||
sta XDOS.TmpCnt
|
||||
@ -863,7 +863,7 @@ online1.OK lda XDOS.VCBs,x get volume name count
|
||||
*--------------------------------------
|
||||
svdevn ldy namptr index to 1st byte of this entry.
|
||||
lda MLI.DEVNUM upper nibble = device# and
|
||||
ora (ZP.UserBuf),y lower nibble = name length.
|
||||
ora (ZP.UserBuf),y lower nibble = name length.
|
||||
sta (ZP.UserBuf),y
|
||||
|
||||
clc no errors
|
||||
@ -887,21 +887,21 @@ XDOS.Create jsr XDOS.CheckPath check for duplicate, get free entry
|
||||
jsr XDOS.TestWPA is not write protected.
|
||||
bcs H351D
|
||||
|
||||
lda nofree is there space in directory to
|
||||
lda nofree is there space in directory to add this file?
|
||||
|
||||
.DO DIREXTENDROOT=1
|
||||
|
||||
beq XDOS.DirExtend
|
||||
bne XDOS.Create1
|
||||
|
||||
|
||||
.ELSE
|
||||
|
||||
beq .2 add this file? branch if not
|
||||
|
||||
beq .2 branch if not
|
||||
|
||||
jmp XDOS.Create1 otherwise, go create file.
|
||||
|
||||
.2 lda XDOS.OH.Blk before extending directory,
|
||||
ora XDOS.OH.Blk+1 make sure it's a subdirectory.
|
||||
.2 lda XDOS.OH.Blk before extending directory,
|
||||
ora XDOS.OH.Blk+1 make sure it's a subdirectory.
|
||||
bne XDOS.DirExtend
|
||||
|
||||
lda #MLI.E.DIRFULL otherwise, directory full error
|
||||
@ -920,15 +920,17 @@ XDOS.DirExtend lda ZP.BLKNUM preserve disk address of current (last)
|
||||
pha directory link, before allocating an
|
||||
lda ZP.BLKNUM+1 extended block.
|
||||
pha
|
||||
|
||||
jsr XDOS.GetFreeBlk allocate a block for extending directory
|
||||
plx
|
||||
stx ZP.BLKNUM+1 restore block addr of dir info in XDOS.GBuf
|
||||
plx
|
||||
stx ZP.BLKNUM
|
||||
bcs H351D unable to allocate.
|
||||
|
||||
|
||||
sta XDOS.GBuf+2 save block address in y,a to
|
||||
sty XDOS.GBuf+3 current directory.
|
||||
|
||||
.DO LOWERCASE=1
|
||||
jsr XDOS.WriteGBufDir
|
||||
.ELSE
|
||||
@ -945,7 +947,8 @@ XDOS.DirExtend lda ZP.BLKNUM preserve disk address of current (last)
|
||||
dex
|
||||
bpl .1
|
||||
|
||||
jsr XDOS.ZeroGBuf
|
||||
ldx #2 don't erase prev BlkPtr
|
||||
jsr XDOS.ZeroGBufX
|
||||
|
||||
jsr XDOS.WriteGBuf write prepared directory extension.
|
||||
bcs H351D if error
|
||||
@ -966,7 +969,7 @@ XDOS.DirExtend lda ZP.BLKNUM preserve disk address of current (last)
|
||||
.3 dex has entry address been calculated?
|
||||
beq .4 if yes.
|
||||
|
||||
lda XDOS.OH.EL next entry address
|
||||
lda XDOS.OH.EL next entry address
|
||||
jsr XDOS.ZPT.NextA
|
||||
bra .3
|
||||
|
||||
@ -986,13 +989,13 @@ XDOS.DirExtend lda ZP.BLKNUM preserve disk address of current (last)
|
||||
.ELSE
|
||||
jsr XDOS.WriteGBuf go update parent.
|
||||
.FIN
|
||||
bcs crerr2
|
||||
bcs .9
|
||||
|
||||
jmp XDOS.Create
|
||||
|
||||
crerr2 rts return and report errors
|
||||
.9 rts return and report errors
|
||||
*--------------------------------------
|
||||
XDOS.Create1 jsr XDOS.ZeroGBuf zero out XDOS.GBuf
|
||||
XDOS.Create1 jsr XDOS.ZeroGBuf
|
||||
|
||||
ldy #$0B move user specified date/time
|
||||
|
||||
@ -1108,7 +1111,7 @@ XDOS.Create2 ldx #$1E move header to data block
|
||||
sta XDOS.GBuf+20
|
||||
|
||||
ldx #7
|
||||
|
||||
|
||||
.3 stz XDOS.GBuf+20,x
|
||||
dex
|
||||
bne .3
|
||||
@ -1152,11 +1155,14 @@ XDOS.CreateDBLK jsr XDOS.GetFreeBlk get address of file's data block
|
||||
*--------------------------------------
|
||||
XDOS.ZeroGBuf ldx #0
|
||||
|
||||
.1 stz XDOS.GBuf,x
|
||||
stz XDOS.GBuf+$100,x
|
||||
XDOS.ZeroGBufX stz XDOS.GBuf,x
|
||||
inx
|
||||
bne XDOS.ZeroGBufX
|
||||
|
||||
.1 stz XDOS.GBuf+$100,x
|
||||
inx
|
||||
bne .1
|
||||
|
||||
|
||||
rts
|
||||
*--------------------------------------
|
||||
MAN
|
||||
|
@ -24,7 +24,7 @@ XDOS.DE.Update lda MLI.DATE
|
||||
sta XDOS.DE.MTime,x to entry being updated.
|
||||
dex
|
||||
bpl .1
|
||||
|
||||
|
||||
sec propagate MTIME
|
||||
|
||||
.HS 90 BCC
|
||||
@ -32,7 +32,7 @@ XDOS.DE.Update lda MLI.DATE
|
||||
XDOS.DE.UpdateNoMTime
|
||||
clc DO NOT propagate MTIME
|
||||
ror scrtch save this...
|
||||
|
||||
|
||||
lda bkbitflg (bit 5 = backup needed)
|
||||
tsb XDOS.DE.Access mark entry as backupable
|
||||
|
||||
@ -103,7 +103,7 @@ XDOS.DE.UpdateNoMTime
|
||||
*--------------------------------------
|
||||
.5 bit scrtch nothing to do ...
|
||||
bpl .8 ... if no MTIME update
|
||||
|
||||
|
||||
lda XDOS.GBuf+4 test for 'root' directory because
|
||||
and #$F0 if it is, then directory revision
|
||||
eor #$F0 is complete (leaves carry clear).
|
||||
@ -169,9 +169,9 @@ XDOS.DE.UpdateNoMTime
|
||||
XDOS.FindDirOrVol
|
||||
jsr XDOS.FindFileOrVol
|
||||
bcs .99
|
||||
|
||||
|
||||
lda XDOS.DE.Filename
|
||||
|
||||
|
||||
and #$F0
|
||||
cmp #$D0
|
||||
beq XDOS.ZPT.GetDE.CLCRTS
|
||||
@ -188,7 +188,7 @@ XDOS.FindFileOrVol
|
||||
bne fnderr
|
||||
clc
|
||||
rts
|
||||
*--------------------------------------
|
||||
*--------------------------------------
|
||||
XDOS.ZPT.GetDE ldy XDOS.DH.EL Get FileInfo From Directory Block Buffer
|
||||
|
||||
.1 dey
|
||||
@ -248,7 +248,7 @@ fnderr.RTS rts
|
||||
XDOS.CheckPath1 stz nofree reset free entry indicator.
|
||||
|
||||
sec dir to be searched has header in this block.
|
||||
|
||||
|
||||
L37C9 stz totent reset entry counter.
|
||||
|
||||
jsr XDOS.LookupNameInDirBlk look for name pointed to by pnptr.
|
||||
@ -323,7 +323,7 @@ namfound jsr nxtpname adj index to next name in path.
|
||||
lda (zpt),y
|
||||
sta XDOS.DE.DirHBlk+1 save as file's header block too
|
||||
tax
|
||||
|
||||
|
||||
dey
|
||||
lda (zpt),y
|
||||
sta XDOS.DE.DirHBlk
|
||||
@ -382,12 +382,12 @@ XDOS.GetDH ldx #10 move this directory info
|
||||
|
||||
lda XDOS.GBuf+21
|
||||
bne .20
|
||||
|
||||
|
||||
.2 lda XDOS.GBuf+20,x
|
||||
sta XDOS.DH.ACL,x
|
||||
dex
|
||||
bpl .2
|
||||
|
||||
|
||||
bra .21
|
||||
|
||||
.20 stz XDOS.DH.ACL,x
|
||||
@ -456,7 +456,7 @@ XDOS.LookupNameInDirBlk
|
||||
.3 inx (first) next letter index
|
||||
iny
|
||||
|
||||
lda (zpt),y compare names letter by letter
|
||||
lda (zpt),y compare names letter by letter
|
||||
cmp XDOS.PathBuf,x
|
||||
bne .4
|
||||
|
||||
@ -481,7 +481,7 @@ XDOS.FindVol jsr XDOS.FindVolInVCBOrDev
|
||||
.ELSE
|
||||
ldx #$42 zero out directory temps
|
||||
.FIN
|
||||
|
||||
|
||||
.1 stz XDOS.OH.Blk,x and owner info
|
||||
dex
|
||||
bpl .1
|
||||
@ -509,7 +509,7 @@ XDOS.FindVol jsr XDOS.FindVolInVCBOrDev
|
||||
dex
|
||||
dey
|
||||
bpl .2
|
||||
*--------------------------------------
|
||||
*--------------------------------------
|
||||
nxtpname jsr nxtpnam1 get new namptr in y and namlen in acc.
|
||||
sty namptr save new pathname pointer.
|
||||
rts (status reg according to accumulator)
|
||||
@ -570,12 +570,12 @@ L398A cmp XDOS.PathBuf,y is it the same as requested vol name?
|
||||
stx XDOS.VCBPtr save it for future reference.
|
||||
lda XDOS.VCBs+VCB.DEV,x get it's device #
|
||||
sta MLI.DEVNUM and save it.
|
||||
|
||||
|
||||
lda #$02 assume prefix is not used and
|
||||
ldx #$00 that root directory is to be used.
|
||||
|
||||
pha
|
||||
|
||||
|
||||
lda L39D4+1 = 0 if no prefix.
|
||||
|
||||
L39AC tay if prefix then find ptr to prefixed
|
||||
@ -695,7 +695,7 @@ XDOS.FindVCBForDevNum
|
||||
bne .3 already found a free one
|
||||
|
||||
stx XDOS.VCBPtr save first free VCB
|
||||
|
||||
|
||||
.3 txa
|
||||
clc inc index to next vcb
|
||||
adc #VCB
|
||||
@ -716,16 +716,16 @@ XDOS.FindVCBForDevNum
|
||||
clc
|
||||
adc #VCB
|
||||
bcc .4
|
||||
|
||||
|
||||
lda #MLI.E.VCBFULL all vcb entries have open files
|
||||
* sec
|
||||
rts
|
||||
|
||||
|
||||
.5 stz XDOS.VCBs,x free this entry
|
||||
stz XDOS.VCBs+VCB.DEV,x
|
||||
|
||||
.7 stx XDOS.VCBPtr save entry index.
|
||||
|
||||
|
||||
.8 clc no error.
|
||||
rts
|
||||
*--------------------------------------
|
||||
@ -745,7 +745,7 @@ XDOS.CheckVolName
|
||||
rts
|
||||
|
||||
.2 lda XDOS.GBuf+4,x next char
|
||||
|
||||
|
||||
.3 cmp XDOS.PathBuf,y
|
||||
bne .1 if not the same.
|
||||
|
||||
@ -772,7 +772,7 @@ XDOS.VCBMountAtX
|
||||
inx
|
||||
dey
|
||||
bne .1
|
||||
|
||||
|
||||
lda XDOS.GBuf pointer to previous dir block
|
||||
ora XDOS.GBuf+1 must be null
|
||||
bne .9
|
||||
@ -806,7 +806,7 @@ XDOS.VCBMountAtX
|
||||
sta XDOS.VCBs+VCB.DEV,x save device # and
|
||||
|
||||
ldy #0
|
||||
|
||||
|
||||
.3 lda XDOS.GBuf+39,y
|
||||
sta XDOS.VCBs+VCB.BMAP,x copy BMAP+TBLK
|
||||
iny
|
||||
@ -816,10 +816,10 @@ XDOS.VCBMountAtX
|
||||
|
||||
.8 clc indicate logged if possible
|
||||
rts
|
||||
|
||||
|
||||
.9 lda #MLI.E.NOTPRODOS not tree or dir, unrecognized type
|
||||
sec
|
||||
rts
|
||||
rts
|
||||
*--------------------------------------
|
||||
XDOS.VCBCmpGBUF lda XDOS.GBuf+4 with name in directory.
|
||||
and #$0F
|
||||
@ -921,7 +921,7 @@ XDOS.GetFreeCntVCBX
|
||||
sta XDOS.VCBs+VCB.FBLK+1,x update volume control byte.
|
||||
lda scrtch
|
||||
sta XDOS.VCBs+VCB.FBLK,x
|
||||
*--------------------------------------
|
||||
*--------------------------------------
|
||||
XDOS.CheckFree1 lda XDOS.VCBs+VCB.FBLK,x compare total available free blocks
|
||||
sec on this volume.
|
||||
sbc reql
|
||||
@ -948,7 +948,7 @@ XDOS.CntFreeGBuf
|
||||
beq .3
|
||||
|
||||
jsr XDOS.CntFreeA
|
||||
|
||||
|
||||
.3 iny
|
||||
bne .1 loop until all 512 bytes counted.
|
||||
|
||||
|
@ -773,19 +773,19 @@ XRW.SeekYA sta XRW.D2Trk-1,x will be current track at the end
|
||||
beq .2 we are on 0/4 or 2/4 track
|
||||
|
||||
pha
|
||||
|
||||
|
||||
cmp XRW.TargetQTrack we are on 1/4 or 3/4 track
|
||||
bcc .1 if CC, C < T, must move in
|
||||
|
||||
|
||||
inc move out: X = Ph(N+1)
|
||||
|
||||
|
||||
.1 jsr XRW.SeekPhOnY move in : X = Ph(N)
|
||||
|
||||
tya
|
||||
tax
|
||||
|
||||
tax
|
||||
|
||||
pla
|
||||
|
||||
|
||||
bcs .2 if CS, C > T, must move out
|
||||
|
||||
inc move in : Y = Ph(N+1)
|
||||
@ -836,7 +836,7 @@ XRW.AllPhOff ldy ZP.A2L
|
||||
lda IO.D2.Ph0Off+2,y
|
||||
lda IO.D2.Ph0Off+4,y
|
||||
lda IO.D2.Ph0Off+6,y
|
||||
|
||||
|
||||
|
||||
* lda IO.D2.Ph0Off,y
|
||||
|
||||
@ -845,7 +845,7 @@ XRW.AllPhOff ldy ZP.A2L
|
||||
* lda IO.D2.Ph0Off,x
|
||||
clc Exit wit CC (recalibrate)
|
||||
* lda IO.D2.Ph0Off,y
|
||||
|
||||
|
||||
.10 rts
|
||||
*--------------------------------------
|
||||
XRW.SeekPhOnY and #6
|
||||
|
@ -1,8 +1,8 @@
|
||||
NEW
|
||||
AUTO 3,1
|
||||
*--------------------------------------
|
||||
* ZPInBufPtr = Ptr to Uncompressed Data
|
||||
* ZPOutBufPtr = Ptr to Shunk Data
|
||||
* X.Arc.InBufPtr = Ptr to Uncompressed Data
|
||||
* X.Arc.OutBufPtr = Ptr to Shunk Data
|
||||
* Y,A = ULEN
|
||||
*--------------------------------------
|
||||
* ZPInBufPtr
|
||||
@ -23,10 +23,8 @@ X.Arc >STYA X.Arc.ShnkOut+S.ARCSHNK.ULEN
|
||||
stz X.Arc.ShnkOut+S.ARCSHNK.TBLBITS
|
||||
stz X.Arc.ShnkOut+S.ARCSHNK.TBLBITS+1
|
||||
|
||||
>LDYA ZPInBufPtr
|
||||
>STYA X.Arc.InBufPtr
|
||||
>LDYA ZPOutBufPtr
|
||||
>STYA X.Arc.OutBufPtr
|
||||
>LDYA X.Arc.InBufPtr
|
||||
>STYA ZPInBufPtr
|
||||
|
||||
jsr X.Arc.Reset Reset counters
|
||||
* PASS #1
|
||||
@ -60,6 +58,9 @@ X.Arc >STYA X.Arc.ShnkOut+S.ARCSHNK.ULEN
|
||||
>LDYA X.Arc.InBufPtr
|
||||
>STYA ZPInBufPtr
|
||||
|
||||
>LDYA ZPOutBufPtr
|
||||
>STYA X.Arc.OutBufPtr
|
||||
|
||||
>LDYA X.Arc.nCntOut
|
||||
>STYA X.Arc.nCnt
|
||||
|
||||
@ -1338,7 +1339,8 @@ X.Arc.Close lda X.Arc.OutMask
|
||||
rts
|
||||
*--------------------------------------
|
||||
.DO DBG
|
||||
X.Arc.PrintDBG1 >PUSHW L.MSG.DBG1
|
||||
X.Arc.PrintDBG1 >SS
|
||||
>PUSHW L.MSG.DBG1
|
||||
|
||||
>PUSHL X.Arc.Bits
|
||||
>PUSHL X.Arc.TBits
|
||||
@ -1352,10 +1354,12 @@ X.Arc.PrintDBG1 >PUSHW L.MSG.DBG1
|
||||
>PUSHW X.Arc.BLO.Max
|
||||
|
||||
>PUSHBI 22
|
||||
>SYSCALL2 PrintF
|
||||
>LIBC PrintF
|
||||
>SR
|
||||
rts
|
||||
|
||||
X.Arc.PrintDBG2 >PUSHW L.MSG.DBG2
|
||||
X.Arc.PrintDBG2 >SS
|
||||
>PUSHW L.MSG.DBG2
|
||||
|
||||
>PUSHW X.Arc.S.TB.Cnt
|
||||
>PUSHW X.Arc.STR.TB.Cnt
|
||||
@ -1384,7 +1388,8 @@ X.Arc.PrintDBG2 >PUSHW L.MSG.DBG2
|
||||
bne .1
|
||||
|
||||
>PUSHBI 43
|
||||
>SYSCALL2 PrintF
|
||||
>LIBC PrintF
|
||||
>SR
|
||||
rts
|
||||
|
||||
X.Arc.ComputeDBG3
|
||||
@ -1427,12 +1432,14 @@ X.Arc.ComputeDBG3
|
||||
|
||||
.3 rts
|
||||
|
||||
X.Arc.PrintDBG3 >PUSHW L.MSG.DBG3
|
||||
X.Arc.PrintDBG3 >SS
|
||||
>PUSHW L.MSG.DBG3
|
||||
>PUSHL X.Arc.Bits
|
||||
>PUSHW X.Arc.CLen
|
||||
>PUSHB X.Arc.Alg
|
||||
>PUSHBI 7
|
||||
>SYSCALL2 PrintF
|
||||
>LIBC PrintF
|
||||
>SR
|
||||
rts
|
||||
.FIN
|
||||
*--------------------------------------
|
||||
@ -1487,6 +1494,20 @@ X.Arc.TOP.Bits .DA #ARC.B.TOP0.B,#ARC.B.TOP0.B,#ARC.B.TOP0.B,#ARC.B.TOP0.B
|
||||
.DA #ARC.B.TOP16.B,#ARC.B.TOP16.B,#ARC.B.TOP16.B,#ARC.B.TOP16.B
|
||||
.DA #ARC.B.TOP16.B,#ARC.B.TOP16.B,#ARC.B.TOP16.B,#ARC.B.TOP16.B
|
||||
*--------------------------------------
|
||||
.DO DBG=1
|
||||
MSG.DBG1 .CS "\r\n\r\n ULEN:%6u Bits, T:%6u Bits, BL:%6u Bits, TBL:%6u Bits\r\n"
|
||||
.CS " TopT :%5d, TopTBL :%5d\r\n"
|
||||
.CZ " STR.Max :%5d, BLL.Max :%5d, BLO.Max :%5D\r\n"
|
||||
MSG.DBG2 .CS " S.TB.Cnt :%5D, STR.TB.Cnt:%5D, BL.TB.Cnt :%5D\r\n"
|
||||
.CS " STR.SL.Cnt:%5D, STR.LL.Cnt:%5D, Bits: %d/%d\r\n"
|
||||
.CS " BLL.SL.Cnt:%5D, BLL.LL.Cnt:%5D, Bits: %d/%d,%d\r\n"
|
||||
.CZ " %5D %5D %5D %5D %5D %5D %5D %5D %5D %5D %5D %5D\r\n"
|
||||
MSG.DBG3 .CZ " Output : %6u Bits, %5D Bytes, Alg=%d\r\n"
|
||||
.FIN
|
||||
*--------------------------------------
|
||||
X.Arc.SrcPtr .BS 2
|
||||
X.Arc.DstPtr .BS 2
|
||||
|
||||
X.Arc.nCnt .BS 2
|
||||
X.Arc.nCntOut .BS 2
|
||||
X.Arc.InBufPtr .BS 2
|
||||
|
@ -431,8 +431,8 @@ JMP.KAPI .DA K.GetMemStat
|
||||
.DA K.GetNameByID
|
||||
.DA K.GetPSByID
|
||||
.DA K.GetPSCmdLine
|
||||
.DA 0
|
||||
.DA 0
|
||||
.DA K.GetpFILEByID
|
||||
.DA K.GetpFDByID
|
||||
|
||||
.DA K.SListGetData
|
||||
.DA K.SListAddData
|
||||
|
@ -132,29 +132,29 @@ STAT.Total .BS 4
|
||||
*--------------------------------------
|
||||
K.GetFileByID cmp #K.FILE.MAX*2
|
||||
bcs .9
|
||||
|
||||
|
||||
tax
|
||||
lsr
|
||||
bcs .9
|
||||
|
||||
|
||||
lda pFILEs+1,x
|
||||
beq .9
|
||||
|
||||
|
||||
ldy pFILEs,x
|
||||
|
||||
|
||||
>STYA ZPPtr1
|
||||
|
||||
|
||||
>LDYAI S.FILE
|
||||
jsr K.Malloc
|
||||
bcs .99
|
||||
|
||||
|
||||
>STYA ZPPtr2
|
||||
|
||||
|
||||
sta IO.SETWRITEAUX
|
||||
|
||||
ldy #S.FILE-1
|
||||
|
||||
.1 lda (ZPPtr1),y
|
||||
|
||||
.1 lda (ZPPtr1),y
|
||||
sta (ZPPtr2),y
|
||||
dey
|
||||
bpl .1
|
||||
@ -162,70 +162,70 @@ K.GetFileByID cmp #K.FILE.MAX*2
|
||||
>LDYA ZPPtr2
|
||||
|
||||
* sta IO.CLRWRITEAUX
|
||||
|
||||
|
||||
* clc
|
||||
|
||||
rts
|
||||
|
||||
|
||||
.9 lda #E.INVH
|
||||
sec
|
||||
.99 rts
|
||||
*--------------------------------------
|
||||
K.GetFDByID cmp #K.FD.MAX*2
|
||||
bcs .9
|
||||
|
||||
|
||||
tax
|
||||
lsr
|
||||
bcs .9
|
||||
|
||||
|
||||
lda pFDs+1,x
|
||||
beq .9
|
||||
|
||||
ldy pFDs,x
|
||||
|
||||
|
||||
>STYA ZPPtr1
|
||||
|
||||
|
||||
>LDYAI S.FD
|
||||
jsr K.Malloc
|
||||
bcs .99
|
||||
|
||||
|
||||
>STYA ZPPtr2
|
||||
|
||||
|
||||
sta IO.SETWRITEAUX
|
||||
|
||||
ldy #S.FD-1
|
||||
|
||||
.1 lda (ZPPtr1),y
|
||||
|
||||
.1 lda (ZPPtr1),y
|
||||
sta (ZPPtr2),y
|
||||
dey
|
||||
bpl .1
|
||||
|
||||
>LDYA ZPPtr2
|
||||
|
||||
|
||||
* sta IO.CLRWRITEAUX
|
||||
|
||||
|
||||
* clc
|
||||
|
||||
rts
|
||||
|
||||
|
||||
.9 lda #E.INVH
|
||||
sec
|
||||
.99 rts
|
||||
*--------------------------------------
|
||||
K.GetNameByID cmp #K.FD.MAX*2
|
||||
bcs .9
|
||||
|
||||
|
||||
tax
|
||||
lsr
|
||||
bcs .9
|
||||
|
||||
|
||||
lda pNames+1,x
|
||||
beq .9
|
||||
|
||||
ldy pNames,x
|
||||
|
||||
|
||||
>STYA ZPPtr1
|
||||
|
||||
|
||||
ldy #$ff
|
||||
|
||||
.10 iny
|
||||
@ -236,44 +236,44 @@ K.GetNameByID cmp #K.FD.MAX*2
|
||||
|
||||
jsr K.Malloc
|
||||
bcs .99
|
||||
|
||||
|
||||
>STYA ZPPtr2
|
||||
|
||||
|
||||
sta IO.SETWRITEAUX
|
||||
|
||||
ldy #$FF
|
||||
|
||||
|
||||
.1 iny
|
||||
lda (ZPPtr1),y
|
||||
lda (ZPPtr1),y
|
||||
sta (ZPPtr2),y
|
||||
bne .1
|
||||
|
||||
>LDYA ZPPtr2
|
||||
|
||||
|
||||
* sta IO.CLRWRITEAUX
|
||||
|
||||
|
||||
* clc
|
||||
|
||||
rts
|
||||
|
||||
|
||||
.9 lda #E.INVH
|
||||
sec
|
||||
.99 rts
|
||||
*--------------------------------------
|
||||
K.GetPSByID cmp #K.PS.MAX*2
|
||||
bcs .9
|
||||
|
||||
|
||||
tax
|
||||
lsr
|
||||
bcs .9
|
||||
|
||||
|
||||
lda pPSs+1,x
|
||||
beq .9
|
||||
|
||||
ldy pPSs,x
|
||||
|
||||
|
||||
jmp PS.GetYAX
|
||||
|
||||
|
||||
.9 lda #E.INVH
|
||||
sec
|
||||
rts
|
||||
@ -282,24 +282,64 @@ K.GetPSCmdLine jsr PS.FindYA
|
||||
bcs .9
|
||||
|
||||
>STYA ZPPtr1
|
||||
|
||||
|
||||
ldy #S.PS.Bnk
|
||||
lda (ZPPtr1),y
|
||||
sta A3L
|
||||
|
||||
|
||||
lda A2osX.ActBnk
|
||||
sta A3H
|
||||
|
||||
|
||||
ldy #S.PS.pCmdLine
|
||||
lda (ZPPtr1),y
|
||||
pha
|
||||
iny
|
||||
lda (ZPPtr1),y
|
||||
ply
|
||||
|
||||
|
||||
jmp MEM.MBDupYA
|
||||
|
||||
.9 rts
|
||||
|
||||
.9 rts
|
||||
*--------------------------------------
|
||||
K.GetpFILEByID cmp #K.FILE.MAX*2
|
||||
bcs .9
|
||||
|
||||
tax
|
||||
lsr
|
||||
bcs .9
|
||||
|
||||
lda pFILEs+1,x
|
||||
beq .9
|
||||
|
||||
ldy pFILEs,x
|
||||
|
||||
* clc
|
||||
|
||||
rts
|
||||
|
||||
.9 lda #E.INVH
|
||||
sec
|
||||
rts
|
||||
*--------------------------------------
|
||||
K.GetpFDByID cmp #K.FD.MAX*2
|
||||
bcs .9
|
||||
|
||||
tax
|
||||
lsr
|
||||
bcs .9
|
||||
|
||||
lda pFDs+1,x
|
||||
beq .9
|
||||
|
||||
ldy pFDs,x
|
||||
|
||||
* clc
|
||||
|
||||
rts
|
||||
|
||||
.9 lda #E.INVH
|
||||
sec
|
||||
rts
|
||||
*--------------------------------------
|
||||
MAN
|
||||
SAVE usr/src/sys/kernel.s.kapi
|
||||
|
@ -55,13 +55,21 @@ K.Online ldy #2
|
||||
* ## RETURN VALUE
|
||||
*\--------------------------------------
|
||||
K.ChTyp jsr PFT.GetPath1
|
||||
bcs .9
|
||||
bcs .99
|
||||
|
||||
jsr PFT.CheckExtFS
|
||||
bcs .9
|
||||
bcs .99
|
||||
|
||||
jsr PFT.Translate
|
||||
bcs .99
|
||||
|
||||
bvs .98
|
||||
|
||||
cpx #4
|
||||
bne .98
|
||||
|
||||
>MLICALL MLI.GFINFO
|
||||
bcs .9
|
||||
bcs .99
|
||||
|
||||
ldy #0
|
||||
jsr RAMSW.GetStkY
|
||||
@ -70,7 +78,11 @@ K.ChTyp jsr PFT.GetPath1
|
||||
|
||||
>MLICALL MLI.SFINFO
|
||||
|
||||
.9 rts
|
||||
rts
|
||||
|
||||
.98 lda #MLI.E.INVPATH
|
||||
sec
|
||||
.99 rts
|
||||
*/--------------------------------------
|
||||
* # ChAux
|
||||
* Change AuxType of a ProDOS File
|
||||
@ -83,13 +95,21 @@ K.ChTyp jsr PFT.GetPath1
|
||||
* ## RETURN VALUE
|
||||
*\--------------------------------------
|
||||
K.ChAux jsr PFT.GetPath2
|
||||
bcs .9
|
||||
bcs .99
|
||||
|
||||
jsr PFT.CheckExtFS
|
||||
bcs .9
|
||||
bcs .99
|
||||
|
||||
jsr PFT.Translate
|
||||
bcs .99
|
||||
|
||||
bvs .98
|
||||
|
||||
cpx #4
|
||||
bne .98
|
||||
|
||||
>MLICALL MLI.GFINFO
|
||||
bcs .9
|
||||
bcs .99
|
||||
|
||||
ldy #0
|
||||
jsr RAMSW.GetStkYW
|
||||
@ -98,7 +118,11 @@ K.ChAux jsr PFT.GetPath2
|
||||
|
||||
>MLICALL MLI.SFINFO
|
||||
|
||||
.9 rts
|
||||
rts
|
||||
|
||||
.98 lda #MLI.E.INVPATH
|
||||
sec
|
||||
.99 rts
|
||||
*/--------------------------------------
|
||||
* # SetAttr
|
||||
* Change Attributes of a ProDOS File
|
||||
@ -111,13 +135,21 @@ K.ChAux jsr PFT.GetPath2
|
||||
* ## RETURN VALUE
|
||||
*\--------------------------------------
|
||||
K.SetAttr jsr PFT.GetPath1
|
||||
bcs .9
|
||||
bcs .99
|
||||
|
||||
jsr PFT.CheckExtFS
|
||||
bcs .9
|
||||
bcs .99
|
||||
|
||||
jsr PFT.Translate
|
||||
bcs .99
|
||||
|
||||
bvs .98
|
||||
|
||||
cpx #4
|
||||
bne .98
|
||||
|
||||
>MLICALL MLI.GFINFO
|
||||
bcs .9
|
||||
bcs .99
|
||||
|
||||
ldy #0
|
||||
jsr RAMSW.GetStkY
|
||||
@ -125,7 +157,11 @@ K.SetAttr jsr PFT.GetPath1
|
||||
|
||||
>MLICALL MLI.SFINFO
|
||||
|
||||
.9 rts
|
||||
rts
|
||||
|
||||
.98 lda #MLI.E.INVPATH
|
||||
sec
|
||||
.99 rts
|
||||
*--------------------------------------
|
||||
PRODOS.OpenReg >MLICALL MLI.GFINFO
|
||||
bcs .10
|
||||
|
@ -601,7 +601,7 @@ PS.LoadGetHeader
|
||||
* `>SS`
|
||||
* `>PUSHW pid`
|
||||
* `>PUSHW sig`
|
||||
* `>LIBC kill`
|
||||
* `>LIBC Kill`
|
||||
* `>SR`
|
||||
* ## RETURN VALUE
|
||||
*\--------------------------------------
|
||||
|
@ -12,10 +12,18 @@ NEW
|
||||
* ## RETURN VALUE
|
||||
*\--------------------------------------
|
||||
K.ChMod jsr PFT.GetPath2
|
||||
bcs .9
|
||||
bcs .99
|
||||
|
||||
jsr PFT.CheckExtFS
|
||||
bcs .9
|
||||
bcs .99
|
||||
|
||||
jsr PFT.Translate
|
||||
bcs .99
|
||||
|
||||
bvs .98
|
||||
|
||||
cpx #4
|
||||
bne .98
|
||||
|
||||
ldy #0
|
||||
jsr RAMSW.GetStkYW
|
||||
@ -24,7 +32,7 @@ K.ChMod jsr PFT.GetPath2
|
||||
stz K.MLI.PARAMS+3+S.FIEX.ACL read mode
|
||||
|
||||
>MLICALL MLI.ACL
|
||||
bcs .9
|
||||
bcs .99
|
||||
|
||||
>LDYA K.S.STAT+S.STAT.MODE
|
||||
>STYA K.MLI.PARAMS+3+S.FIEX.ACL.MOD
|
||||
@ -33,7 +41,11 @@ K.ChMod jsr PFT.GetPath2
|
||||
sta K.MLI.PARAMS+3+S.FIEX.ACL
|
||||
|
||||
>MLICALL MLI.ACL
|
||||
.9 rts
|
||||
rts
|
||||
|
||||
.98 lda #MLI.E.INVPATH
|
||||
sec
|
||||
.99 rts
|
||||
*/--------------------------------------
|
||||
* # FStat
|
||||
* Return information about a FD
|
||||
@ -192,9 +204,7 @@ K.MKDir jsr PFT.GetPath2
|
||||
jmp FS.MLICREATE
|
||||
|
||||
.98 lda #MLI.E.INVPATH
|
||||
|
||||
sec
|
||||
|
||||
.99 rts
|
||||
*/--------------------------------------
|
||||
* # MKFIFO
|
||||
|
@ -225,15 +225,23 @@ UNISTD.Stat lda (pFD) #S.FD.T
|
||||
* ## RETURN VALUE
|
||||
*\--------------------------------------
|
||||
K.ChOwn jsr PFT.GetPath4
|
||||
bcs .9
|
||||
bcs .99
|
||||
|
||||
jsr PFT.CheckExtFS
|
||||
bcs .9
|
||||
bcs .99
|
||||
|
||||
jsr PFT.Translate
|
||||
bcs .99
|
||||
|
||||
bvs .98
|
||||
|
||||
cpx #4
|
||||
bne .98
|
||||
|
||||
stz K.MLI.PARAMS+3+S.FIEX.ACL read mode
|
||||
|
||||
>MLICALL MLI.ACL
|
||||
bcs .9
|
||||
bcs .99
|
||||
|
||||
ldy #1
|
||||
jsr RAMSW.GetStkY
|
||||
@ -257,7 +265,11 @@ K.ChOwn jsr PFT.GetPath4
|
||||
|
||||
>MLICALL MLI.ACL
|
||||
|
||||
.9 rts
|
||||
rts
|
||||
|
||||
.98 lda #MLI.E.INVPATH
|
||||
sec
|
||||
.99 rts
|
||||
*/--------------------------------------
|
||||
* # GetCWD
|
||||
* ## C
|
||||
|
Loading…
x
Reference in New Issue
Block a user