Kernel 0.9.1 : CP,MV,RM.....commands

This commit is contained in:
Rémy GIBERT 2017-10-04 17:12:03 +02:00
parent c29cc70671
commit bad4a3fc8e
19 changed files with 234 additions and 222 deletions

View File

@ -136,17 +136,6 @@ Make current process suspend until next RUN
## Out: ## Out:
# GetFullPath.YA
## In :
+ Y,A = Filename (C-String)
## Out :
+ CC : success
+ Y,A = FullPath (C-String)
+ X = hMem of FullPath
+ CS : A = Error Code
# LoadFile # LoadFile
## In: ## In:

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -19,6 +19,7 @@ ZPPtr1 .EQ ZPBIN
ZPPtr2 .EQ ZPBIN+2 ZPPtr2 .EQ ZPBIN+2
ZPFileName .EQ ZPBIN+4 ZPFileName .EQ ZPBIN+4
ZPFileStat .EQ ZPBIN+6 ZPFileStat .EQ ZPBIN+6
ZPFullPath .EQ ZPBIN+8
*-------------------------------------- *--------------------------------------
* File Header (16 Bytes) * File Header (16 Bytes)
*-------------------------------------- *--------------------------------------
@ -27,9 +28,10 @@ CS.START cld
.DA #$61 6502,Level 1 (65c02) .DA #$61 6502,Level 1 (65c02)
.DA #1 BIN Layout Version 1 .DA #1 BIN Layout Version 1
.DA 0 .DA 0
.DA CS.END-CS.START Code Length To Relocate .DA CS.END-CS.START CS
.DA DS.END-DS.START Data Segment to Allocate .DA DS.END-DS.START DS
.DA 0 .DA #16 SS
.DA #10 ZP
.DA 0 .DA 0
*-------------------------------------- *--------------------------------------
* Relocation Table * Relocation Table
@ -42,35 +44,20 @@ L.MSG.USAGE .DA MSG.USAGE
L.MSG.FILE .DA MSG.FILE L.MSG.FILE .DA MSG.FILE
L.MSG.OK .DA MSG.OK L.MSG.OK .DA MSG.OK
L.MSG.ERR .DA MSG.ERR L.MSG.ERR .DA MSG.ERR
L.STAT .DA STAT L.PRODOS.FT.TXT .DA PRODOS.FT.TXT
L.PRODOS.FT.TXT .DA PRODOS.FT.TXT-1
.DA 0 .DA 0
*-------------------------------------- *--------------------------------------
CS.INIT >SYSCALL GetArgC CS.INIT
sta ArgCount .1 >INC.G ArgCount
cmp #1
beq .99
stz ArgIndex
.1 dec ArgCount
beq .7
inc ArgIndex
lda ArgIndex
>SYSCALL GetArg.A >SYSCALL GetArg.A
bcs .7
>STYA ZPPtr1 >STYA ZPPtr1
lda (ZPPtr1) lda (ZPPtr1)
cmp #2
bne .4
ldy #1
lda (ZPPtr1),y
cmp #'-' cmp #'-'
bne .4 bne .4
iny ldy #1
lda (ZPPtr1),y lda (ZPPtr1),y
ldx OptionList ldx OptionList
@ -116,10 +103,17 @@ CS.INIT >SYSCALL GetArgC
lda (pData),y lda (pData),y
beq .99 we also have a TYPE beq .99 we also have a TYPE
>LDYAI 256
>SYSCALL GetMem.YA
bcs .99
>STYA ZPFullPath
txa
>STA.G hSrcFullPath
clc clc
rts rts
*-------------------------------------- *--------------------------------------
CS.RUN >SYSCALL GetC CS.RUN >SYSCALL GetChar
bcs .10 no char bcs .10 no char
cmp #$03 Ctrl-C cmp #$03 Ctrl-C
@ -128,27 +122,24 @@ CS.RUN >SYSCALL GetC
cmp #$13 Ctrl-S cmp #$13 Ctrl-S
bne .10 bne .10
ldy #bPause >LDA.G bPause
lda (pData),y
eor #$ff eor #$ff
sta (pData),y sta (pData),y
bne .80 bne .80
.10 ldy #bPause .10 >LDA.G bPause
lda (pData),y
bne .80 Pause... bne .80 Pause...
jsr GetEntry jsr GetEntry
bcs .9 bcs .9
ldy #hFilter >LDA.G hFilter
lda (pData),y
beq .4 No filter.... beq .4 No filter....
>SYSCALL GetMemPtr.A >SYSCALL GetMemPtr.A
>PUSHYA >PUSHYA
>PUSHW ZPFileName >PUSHW ZPFileName
>SYSCALL PStrMatch >SYSCALL StrMatch
bcs .8 no match, skip.... bcs .8 no match, skip....
.4 ldy #S.STAT.P.DRIVE .4 ldy #S.STAT.P.DRIVE
@ -189,7 +180,7 @@ CS.RUN.DEV
*-------------------------------------- *--------------------------------------
CS.RUN.FILE jsr CS.RUN.GetFilePath CS.RUN.FILE jsr CS.RUN.GetFilePath
>PUSHWI UsrBuf256 >PUSHW ZPFullPath
>LDYA L.MSG.FILE >LDYA L.MSG.FILE
>SYSCALL PrintF.YA >SYSCALL PrintF.YA
@ -198,16 +189,14 @@ CS.RUN.FILE jsr CS.RUN.GetFilePath
ldy #HexFileType ldy #HexFileType
>PUSHB (pData),y >PUSHB (pData),y
>PUSHWI UsrBuf256 >PUSHW ZPFullPath
>SYSCALL ChTyp >SYSCALL ChTyp
jsr CS.RUN.CheckErr jsr CS.RUN.CheckErr
ldy #bRecurse >LDA.G bRecurse
lda (pData),y
bpl .8 bpl .8
ldy #1 lda (ZPFileName)
lda (ZPFileName),y
cmp #'.' cmp #'.'
beq .8 beq .8
@ -226,8 +215,7 @@ CS.RUN.CheckErr bcs .1
.1 pha .1 pha
ldy #bContinue >LDA.G bContinue
lda (pData),y
bpl .2 bpl .2
pla pla
@ -247,16 +235,17 @@ CS.RUN.CheckErr bcs .1
.9 rts .9 rts
*-------------------------------------- *--------------------------------------
CS.RUN.GetFilePath CS.RUN.GetFilePath
ldy #hSrcBasePath >LDA.G hSrcBasePath
lda (pData),y
>SYSCALL GetMemPtr.A >SYSCALL GetMemPtr.A
>PUSHYA >PUSHYA
>PUSHWI UsrBuf256
>SYSCALL PStrCpy >PUSHW ZPFullPath
>SYSCALL StrCpy
>PUSHW ZPFileName >PUSHW ZPFileName
>PUSHWI UsrBuf256 >PUSHW ZPFullPath
>SYSCALL PStrCat >SYSCALL StrCat
rts rts
*-------------------------------------- *--------------------------------------
CS.DOEVENT sec CS.DOEVENT sec
@ -265,20 +254,27 @@ CS.DOEVENT sec
CS.QUIT jsr LeaveSubDir CS.QUIT jsr LeaveSubDir
bcc CS.QUIT bcc CS.QUIT
ldy #hFilter >LDA.G hFilter
lda (pData),y beq .1
beq .3
>SYSCALL FreeMem.A >SYSCALL FreeMem.A
.3 clc .1 >LDA.G hSrcFullPath
beq .8
>SYSCALL FreeMem.A
.8 clc
rts rts
*-------------------------------------- *--------------------------------------
GetHexFileType lda (ZPPtr1) GetHexFileType ldy #$ff
cmp #3
.10 iny
lda (ZPPtr1),y
bne .10
cpy #3
bne .9 bne .9
ldy #1 lda (ZPPtr1)
lda (ZPPtr1),y
cmp #'0' cmp #'0'
bne .1 bne .1
@ -292,16 +288,16 @@ GetHexFileType lda (ZPPtr1)
asl asl
asl asl
asl asl
sta Tmp >STA.G HexFileType
iny iny
lda (ZPPtr1),y lda (ZPPtr1),y
cmp #'0' cmp #'0'
bcc .9 bcc .9
cmp #'9'+1 cmp #'9'+1
bcs .9 bcs .9
and #$F
ora Tmp and #$0F
ldy #HexFileType >ORA.G HexFileType
sta (pData),y sta (pData),y
clc clc
rts rts
@ -310,26 +306,26 @@ GetHexFileType lda (ZPPtr1)
>LDYA L.PRODOS.FT.TXT >LDYA L.PRODOS.FT.TXT
>STYA ZPPtr2 >STYA ZPPtr2
.2 ldy #3 .2 ldy #2
.21 lda (ZPPtr1),y .21 lda (ZPPtr1),y
cmp #'a' cmp #'a'
bcc .3 bcc .4
cmp #'z'+1 cmp #'z'+1
bcs .3 bcs .4
eor #$20 eor #$20
.3 cmp (ZPPtr2),y .4 cmp (ZPPtr2),y
bne .4 bne .5
dey dey
bne .21 bpl .21
lda PRODOS.FT.ID,x lda PRODOS.FT.ID,x
ldy #HexFileType >STA.G HexFileType
sta (pData),y
clc clc
rts rts
.4 clc .5 clc
lda ZPPtr2 lda ZPPtr2
adc #3 adc #3
sta ZPPtr2 sta ZPPtr2
@ -350,13 +346,11 @@ CS.END
OptionList >PSTR "CRcr" OptionList >PSTR "CRcr"
OptionVars .DA #bContinue,#bRecurse,#bContinue,#bRecurse OptionVars .DA #bContinue,#bRecurse,#bContinue,#bRecurse
*-------------------------------------- *--------------------------------------
MSG.USAGE >CSTR "Usage : CHTYP [File *,? wildcards allowed] [File type : 0HH, SYS,TXT....]\r\n -C : Continue on error\r\n -R : Recurse subdirectories\r\n" MSG.USAGE >CSTR "Usage : CHTYP [File *,? wildcards allowed] [File type : 0xx (Hexadecimal byte),SYS,TXT....]\r\n -C : Continue on error\r\n -R : Recurse subdirectories\r\n"
MSG.OK >CSTR "[Ok]\r\n" MSG.OK >CSTR "[Ok]\r\n"
MSG.ERR >CSTR "[%h]\r\n" MSG.ERR >CSTR "[%h]\r\n"
MSG.FILE >CSTR "CHTYP File:%S..." MSG.FILE >CSTR "CHTYP File:%S..."
STAT .BS S.STAT
ArgCount .BS 1
ArgIndex .BS 1
Tmp .BS 1 Tmp .BS 1
*-------------------------------------- *--------------------------------------
PRODOS.FT.COUNT .EQ 7 PRODOS.FT.COUNT .EQ 7
@ -372,6 +366,11 @@ PRODOS.FT.TXT .AS "TXT"
.DUMMY .DUMMY
.OR 0 .OR 0
DS.START DS.START
ArgCount .BS 1
hFullPath .BS 1
hSrcFullPath .BS 1
STAT .BS S.STAT
Index .BS 1 Index .BS 1
hDIRs .BS X.MAX.RECURSE hDIRs .BS X.MAX.RECURSE
hDIRENTs .BS X.MAX.RECURSE hDIRENTs .BS X.MAX.RECURSE

View File

@ -34,36 +34,12 @@ MSG.DONE >CSTR "%D File(s) Copied.\r\n"
.DUMMY .DUMMY
.OR 0 .OR 0
DS.START DS.START
ArgCount .BS 1
Index .BS 1
STAT .BS S.STAT
hFullPath .BS 1
hDIRs .BS X.MAX.RECURSE
hDIRENTs .BS X.MAX.RECURSE
oDIRENTs .BS X.MAX.RECURSE*2
hSrcBasePath .BS 1
hFilter .BS 1
hSrcFullPath .BS 1
hSrcFile .BS 1
hDstBasePath .BS 1
hDstFileName .BS 1
hDstFullPath .BS 1
hDstFile .BS 1
bPause .BS 1
bCopy .BS 1
hToDelete .BS 1
CopyRC .BS 1
RC .BS 1
bWildcard .BS 1
bContinue .BS 1 bContinue .BS 1
bRecurse .BS 1 bRecurse .BS 1
bNoConfirm .BS 1 bNoConfirm .BS 1
bQuiet .BS 1 bQuiet .BS 1
Count .BS 2 .INB /A2OSX.SRC/BIN/X.CPMVRM.G
.INB /A2OSX.SRC/BIN/X.FILEENUM.G
DS.END DS.END
.ED .ED
*-------------------------------------- *--------------------------------------

View File

@ -58,6 +58,7 @@ CS.INIT ldy #S.PS.ARGC
ldy #1 ldy #1
lda (ZPPtr1),y lda (ZPPtr1),y
beq .99
ldx OptionList ldx OptionList
@ -90,14 +91,16 @@ CS.INIT ldy #S.PS.ARGC
.5 ldy #$ff .5 ldy #$ff
.6 iny .6 iny
lda (ZPPtr1),y
beq .61
cpy #16 cpy #15
beq .99 VolName too long beq .99 VolName too long
lda (ZPPtr1),y .61 >PUSHW ZPPtr1
sta (pData),y >PUSHEA.G VolName
bne .6 >SYSCALL StrCpy
bra .1 success, scan for any other args jmp .1 success, scan for any other args
.7 >LDA.G VolName .7 >LDA.G VolName
bne .8 Volume name ok bne .8 Volume name ok
@ -159,7 +162,7 @@ CS.INIT ldy #S.PS.ARGC
*-------------------------------------- *--------------------------------------
CS.RUN jsr CS.RUN.BuildCat CS.RUN jsr CS.RUN.BuildCat
bcs .9 bcs .9
jsr CS.RUN.WriteCat jsr CS.RUN.WriteCat
bcs .9 bcs .9
@ -190,7 +193,6 @@ CS.RUN.BuildCat >LDA.G hDev
>STA.G SizeInBlocks+1 >STA.G SizeInBlocks+1
>LDA.G hDev >LDA.G hDev
lda (pData),y
>SYSCALL GetDevByID.A >SYSCALL GetDevByID.A
bcs .99 bcs .99
@ -209,46 +211,57 @@ CS.RUN.BuildCat >LDA.G hDev
>LDYA L.MSG.INIT >LDYA L.MSG.INIT
>SYSCALL PrintF.YA >SYSCALL PrintF.YA
.99 bcs .9 .99 bcs .9
>PUSHW.G SizeInBlocks >PUSHW.G SizeInBlocks
>LIBCALL hLIBBLKDEV,LIBBLKDEV.GetProDOSCatSize >LIBCALL hLIBBLKDEV,LIBBLKDEV.GetProDOSCatSize
bcs .9 bcs .9
phy phy
pha pha
txa
>STA.G BlkCnt >STA.G BlkCnt
pla pla
ply ply
>SYSCALL GetMem0.YA BufferSize >SYSCALL GetMem0.YA BufferSize
bcs .9 bcs .9
>STYA BlkParams.Ptr
txa phx
>STYA.G BlkParams.Ptr
pla
>STA.G hBuf >STA.G hBuf
>PUSHW.G SizeInBlocks >PUSHW.G SizeInBlocks
>PUSHEA.G VolName >PUSHEA.G VolName
>PUSHW BlkParams.Ptr >PUSHW.G BlkParams.Ptr
>LIBCALL hLIBBLKDEV,LIBBLKDEV.BuildProDOSCat >LIBCALL hLIBBLKDEV,LIBBLKDEV.BuildProDOSCat
.9 rts .9 rts
*-------------------------------------- *--------------------------------------
CS.RUN.WriteCat >LDA.G hDev CS.RUN.WriteCat >LDA.G hDev
>SYSCALL GetDevByID.A >SYSCALL GetDevByID.A
bcs .9 bcs .9
>STYA pDev >STYA pDev
.1 >LEA.G BlkParams.Ptr >LEA.G BlkParams.Ptr
ldx #DEVMGR.WRITEBLOCK ldx #DEVMGR.WRITEBLOCK
jsr pDevJmp jsr pDevJmp
bcs .9 bcs .9
lda #'.'
>SYSCALL PutChar.A
>LDA.G BlkParams.Ptr+1 >LDA.G BlkParams.Ptr+1
* clc * clc
adc #2 adc #2
sta (pData),y sta (pData),y
>INC.G BlkParams.Num
* >SLEEP
>DEC.G BlkCnt >DEC.G BlkCnt
bne .1 bne CS.RUN.WriteCat
.9 rts .9 rts
*-------------------------------------- *--------------------------------------
CS.DOEVENT sec CS.DOEVENT sec

View File

@ -488,22 +488,19 @@ HEXDIGIT .AS '0123456789ABCDEF'
.OR 0 .OR 0
DS.START DS.START
ArgCount .BS 1 ArgCount .BS 1
Index .BS 1
STAT .BS S.STAT
TIME.Create .BS 20 TIME.Create .BS 20
TIME.Mod .BS 20 TIME.Mod .BS 20
hFullPath .BS 1
hDIRs .BS X.MAX.RECURSE
hDIRENTs .BS X.MAX.RECURSE
oDIRENTs .BS X.MAX.RECURSE*2
hSrcBasePath .BS 1
hFilter .BS 1 hFilter .BS 1
bPause .BS 1 bPause .BS 1
bAllmostAll .BS 1 bAllmostAll .BS 1
bLong .BS 1 bLong .BS 1
bRecurse .BS 1 bRecurse .BS 1
ColCount .BS 1 ColCount .BS 1
.INB /A2OSX.SRC/BIN/X.FILEENUM.G
DS.END DS.END
.ED .ED
*-------------------------------------- *--------------------------------------

View File

@ -30,40 +30,17 @@ MSG.OVERWRITE >CSTR "Overwrite %S [Yes,No,All]?"
MSG.OK >CSTR "[OK]\r\n" MSG.OK >CSTR "[OK]\r\n"
MSG.ERR >CSTR "[%h]\r\n" MSG.ERR >CSTR "[%h]\r\n"
MSG.DONE >CSTR "%D File(s) Moved.\r\n" MSG.DONE >CSTR "%D File(s) Moved.\r\n"
*--------------------------------------
STAT .BS S.STAT
ArgCount .BS 1
ArgIndex .BS 1
*-------------------------------------- *--------------------------------------
.DUMMY .DUMMY
.OR 0 .OR 0
DS.START DS.START
Index .BS 1
hDIRs .BS X.MAX.RECURSE
hDIRENTs .BS X.MAX.RECURSE
oDIRENTs .BS X.MAX.RECURSE*2
hSrcBasePath .BS 1
hFilter .BS 1
hSrcFullPath .BS 1
hSrcFile .BS 1
hDstBasePath .BS 1
hDstFileName .BS 1
hDstFullPath .BS 1
hDstFile .BS 1
bPause .BS 1
bCopy .BS 1
hToDelete .BS 1
bWildcard .BS 1
RC .BS 1
CopyRC .BS 1
bContinue .BS 1 bContinue .BS 1
bRecurse .BS 1 bRecurse .BS 1
bNoConfirm .BS 1 bNoConfirm .BS 1
bQuiet .BS 1 bQuiet .BS 1
Count .BS 2 .INB /A2OSX.SRC/BIN/X.CPMVRM.G
.INB /A2OSX.SRC/BIN/X.FILEENUM.G
DS.END DS.END
.ED .ED
*-------------------------------------- *--------------------------------------

View File

@ -29,35 +29,16 @@ MSG.FILE >CSTR "RM File:%S..."
MSG.OK >CSTR "[OK]\r\n" MSG.OK >CSTR "[OK]\r\n"
MSG.ERR >CSTR "[%h]\r\n" MSG.ERR >CSTR "[%h]\r\n"
MSG.DONE >CSTR "%D File(s) Removed.\r\n" MSG.DONE >CSTR "%D File(s) Removed.\r\n"
*--------------------------------------
STAT .BS S.STAT
ArgCount .BS 1
ArgIndex .BS 1
*-------------------------------------- *--------------------------------------
.DUMMY .DUMMY
.OR 0 .OR 0
DS.START DS.START
Index .BS 1
hDIRs .BS X.MAX.RECURSE
hDIRENTs .BS X.MAX.RECURSE
oDIRENTs .BS X.MAX.RECURSE*2
hSrcBasePath .BS 1
hFilter .BS 1
hSrcFullPath .BS 1
hSrcFile .BS 1
bPause .BS 1
bCopy .BS 1
hToDelete .BS 1
RC .BS 1
bWildcard .BS 1
bContinue .BS 1 bContinue .BS 1
bRecurse .BS 1 bRecurse .BS 1
bNoConfirm .BS 1 bNoConfirm .BS 1
bQuiet .BS 1 bQuiet .BS 1
Count .BS 2 .INB /A2OSX.SRC/BIN/X.CPMVRM.G
.INB /A2OSX.SRC/BIN/X.FILEENUM.G
DS.END DS.END
.ED .ED
*-------------------------------------- *--------------------------------------

36
BIN/X.CPMVRM.G.txt Normal file
View File

@ -0,0 +1,36 @@
PR#3
PREFIX /A2OSX.BUILD
NEW
INC 1
AUTO 6
.LIST OFF
*--------------------------------------
ArgCount .BS 1
bPause .BS 1
hFilter .BS 1
hSrcFile .BS 1
hSrcFullPath .BS 1
Count .BS 2
RC .BS 1
.DO X.COPY.TO.DEST=1
hDstFileName .BS 1
hDstFullPath .BS 1
hDstFile .BS 1
bCopy .BS 1
CopyRC .BS 1
.FIN
.DO X.DELETE.SOURCE=1
hToDelete .BS 1
.FIN
*--------------------------------------
MAN
SAVE /A2OSX.SRC/BIN/X.CPMVRM.G
LOAD /A2OSX.SRC/BIN/CP.S
ASM

View File

@ -34,9 +34,13 @@ CS.START cld
L.MSG.USAGE .DA MSG.USAGE L.MSG.USAGE .DA MSG.USAGE
L.MSG.DIR .DA MSG.DIR L.MSG.DIR .DA MSG.DIR
L.MSG.FILE .DA MSG.FILE L.MSG.FILE .DA MSG.FILE
.DO X.COPY.TO.DEST=1 .DO X.COPY.TO.DEST=1
L.MSG.OVERWRITE .DA MSG.OVERWRITE L.MSG.OVERWRITE .DA MSG.OVERWRITE
.FIN .FIN
L.MSG.OK .DA MSG.OK L.MSG.OK .DA MSG.OK
L.MSG.ERR .DA MSG.ERR L.MSG.ERR .DA MSG.ERR
L.MSG.DONE .DA MSG.DONE L.MSG.DONE .DA MSG.DONE
@ -81,8 +85,7 @@ CS.INIT
.4 tax Save len .4 tax Save len
ldy #index >LDA.G index
lda (pData),y
.DO X.COPY.TO.DEST=1 .DO X.COPY.TO.DEST=1
bne .5 Already have a Src dir... bne .5 Already have a Src dir...
@ -96,23 +99,22 @@ CS.INIT
.9 rts .9 rts
.DO X.COPY.TO.DEST=1 .DO X.COPY.TO.DEST=1
.5 ldy #hDstBasePath
lda (pData),y .5 >LDA.G hDstBasePath
bne .99 we already have a second arg....error! bne .99 we already have a second arg....error!
>LDYA ZPPtr1 >LDYA ZPPtr1
jsr InitDstDirYA jsr InitDstDirYA
bcc .1 success, scan for any other args bcc .1 success, scan for any other args
rts rts
.FIN .FIN
.7 ldy #index processed all args .7 >LDA.G index processed all args
lda (pData),y
beq .99 , no src ? ERROR beq .99 , no src ? ERROR
.DO X.COPY.TO.DEST=1 .DO X.COPY.TO.DEST=1
ldy #hDstBasePath >LDA.G hDstBasePath
lda (pData),y
bne .8 we also have a Dst folder bne .8 we also have a Dst folder
ldy #S.PS.hPREFIX no dst folder, use actual prefix ldy #S.PS.hPREFIX no dst folder, use actual prefix
@ -126,7 +128,7 @@ CS.INIT
>SYSCALL GetMem.YA >SYSCALL GetMem.YA
bcs .9 bcs .9
txa txa
ldy #hSrcFullPath >STA.G hSrcFullPath
sta (pData),y sta (pData),y
.DO X.COPY.TO.DEST=1 .DO X.COPY.TO.DEST=1
@ -134,8 +136,8 @@ CS.INIT
>SYSCALL GetMem.YA >SYSCALL GetMem.YA
bcs .9 bcs .9
txa txa
ldy #hDstFullPath >STA.G hDstFullPath
sta (pData),y
.FIN .FIN
* lda (pPs) * lda (pPs)
@ -250,8 +252,7 @@ CS.RUN >SYSCALL GetChar
cmp #$0F Directory ? cmp #$0F Directory ?
bne .5 bne .5
ldy #bRecurse >LDA.G bRecurse
lda (pData),y
bpl CS.RUN.NEXT bpl CS.RUN.NEXT
ldy #1 ldy #1
@ -486,6 +487,7 @@ CS.RUN.FILE.MSG clc
jsr CS.RUN.GetPathY jsr CS.RUN.GetPathY
>PUSHYA >PUSHYA
.FIN .FIN
ldy #hSrcFullPath ldy #hSrcFullPath
@ -505,6 +507,7 @@ CS.RUN.FILE.MSG clc
rts rts
*-------------------------------------- *--------------------------------------
.DO X.COPY.TO.DEST=1 .DO X.COPY.TO.DEST=1
CS.RUN.OVERWRITE.MSG CS.RUN.OVERWRITE.MSG
ldy #bQuiet ldy #bQuiet
lda (pData),y lda (pData),y
@ -522,6 +525,7 @@ CS.RUN.OVERWRITE.MSG
CS.RUN.OVERWRITE.KEY CS.RUN.OVERWRITE.KEY
rts rts
.FIN .FIN
*-------------------------------------- *--------------------------------------
CS.RUN.CR lda #13 CS.RUN.CR lda #13
@ -532,7 +536,9 @@ CS.RUN.CR lda #13
.9 rts .9 rts
*-------------------------------------- *--------------------------------------
.DO X.COPY.TO.DEST=1 .DO X.COPY.TO.DEST=1
.DO X.DELETE.SOURCE=1 .DO X.DELETE.SOURCE=1
CS.RUN.Rename ldy #hDstFullPath CS.RUN.Rename ldy #hDstFullPath
jsr CS.RUN.GetPathY jsr CS.RUN.GetPathY
@ -545,10 +551,13 @@ CS.RUN.Rename ldy #hDstFullPath
>SYSCALL Rename >SYSCALL Rename
rts rts
.FIN .FIN
.FIN
.FIN
*-------------------------------------- *--------------------------------------
.DO X.COPY.TO.DEST=1 .DO X.COPY.TO.DEST=1
CS.RUN.CopyStart CS.RUN.CopyStart
ldy #hSrcFullPath ldy #hSrcFullPath
lda #SYS.FOpen.R lda #SYS.FOpen.R
@ -670,8 +679,10 @@ CS.RUN.CopyEnd ldy #hSrcFile
lda #$0 lda #$0
sta (pData),y sta (pData),y
clc clc
rts rts
.FIN .FIN
*-------------------------------------- *--------------------------------------
CS.RUN.CheckErr bcs .1 CS.RUN.CheckErr bcs .1
@ -724,6 +735,7 @@ CS.RUN.BuildFilePath
>SYSCALL StrCat >SYSCALL StrCat
.DO X.COPY.TO.DEST=1 .DO X.COPY.TO.DEST=1
ldy #hDstBasePath ldy #hDstBasePath
jsr CS.RUN.GetPathY jsr CS.RUN.GetPathY
>PUSHYA >PUSHYA
@ -747,7 +759,9 @@ CS.RUN.BuildFilePath
.2 >PUSHW ZPPtr1 .2 >PUSHW ZPPtr1
>SYSCALL StrCat >SYSCALL StrCat
.FIN .FIN
rts rts
*-------------------------------------- *--------------------------------------
CS.RUN.GetPathY lda (pData),y CS.RUN.GetPathY lda (pData),y
@ -772,6 +786,7 @@ CS.QUIT jsr LeaveSubDir
bcc CS.QUIT bcc CS.QUIT
.DO X.COPY.TO.DEST=1 .DO X.COPY.TO.DEST=1
ldy #bCopy ldy #bCopy
lda (pData),y lda (pData),y
bpl .1 bpl .1

25
BIN/X.FILEENUM.G.txt Normal file
View File

@ -0,0 +1,25 @@
PR#3
PREFIX /A2OSX.BUILD
NEW
INC 1
AUTO 6
.LIST OFF
*--------------------------------------
Index .BS 1
hDIRs .BS X.MAX.RECURSE+1
hDIRENTs .BS X.MAX.RECURSE+1
oDIRENTs .BS X.MAX.RECURSE*2
STAT .BS S.STAT
hFullPath .BS 1
hSrcBasePath .BS 1
.DO X.COPY.TO.DEST=1
hDstBasePath .BS 1
.FIN
*--------------------------------------
MAN
SAVE /A2OSX.SRC/BIN/X.FILEENUM.G
LOAD /A2OSX.SRC/BIN/LS.S
ASM

View File

@ -140,6 +140,7 @@ InitSrcDirYA.RTS
rts rts
*-------------------------------------- *--------------------------------------
.DO X.COPY.TO.DEST=1 .DO X.COPY.TO.DEST=1
InitDstDirYA >SYSCALL RealPath.YA InitDstDirYA >SYSCALL RealPath.YA
bcs InitSrcDirYA.RTS bcs InitSrcDirYA.RTS
@ -532,8 +533,10 @@ LeaveSubDir ldy #index
rts rts
*-------------------------------------- *--------------------------------------
BasePath.. .DO X.COPY.TO.DEST=1 BasePath.. .DO X.COPY.TO.DEST=1
ldy #hDstBasePath ldy #hDstBasePath
jsr BasePath..1 jsr BasePath..1
.FIN .FIN
ldy #hSrcBasePath ldy #hSrcBasePath
@ -549,7 +552,7 @@ BasePath..1 lda (pData),y
lda (ZPPtr1),y get len lda (ZPPtr1),y get len
bne .1 bne .1
dey discard ending / dey discard ending /
.2 dey .2 dey
lda (ZPPtr1),y lda (ZPPtr1),y
@ -563,14 +566,6 @@ BasePath..1 lda (pData),y
rts rts
*-------------------------------------- *--------------------------------------
DEBUG.YA >SYSCALL PrintF.YA
lda #'|'
>SYSCALL PutChar.A
lda #13
>SYSCALL PutChar.A
lda #10
>SYSCALL PutChar.A
rts
MAN MAN
SAVE /A2OSX.SRC/BIN/X.FILEENUM.S SAVE /A2OSX.SRC/BIN/X.FILEENUM.S
LOAD /A2OSX.SRC/BIN/LS.S LOAD /A2OSX.SRC/BIN/LS.S

View File

@ -143,6 +143,11 @@ AUTO 6
ldy #]1 ldy #]1
sta (pData),y sta (pData),y
.EM .EM
*--------------------------------------
.MA ORA.G
ldy #]1
ora (pData),y
.EM
*-------------------------------------- *--------------------------------------
.MA CMP.G .MA CMP.G
ldy #]1 ldy #]1

View File

@ -22,7 +22,7 @@ GAP3 .EQ 27
*-------------------------------------- *--------------------------------------
Status.PrvDrvOff .EQ $80 Waiting old drive stop spining Status.PrvDrvOff .EQ $80 Waiting old drive stop spining
Status.DrvOn .EQ $81 Waiting target drive spin Status.DrvOn .EQ $81 Waiting target drive spin
Status.seek .EQ $82 targetdrive seeking Status.seek .EQ $82 target drive seeking
*-------------------------------------- *--------------------------------------
D2Ph0Off .EQ $C080 D2Ph0Off .EQ $C080
D2Ph0On .EQ $C081 D2Ph0On .EQ $C081
@ -74,6 +74,10 @@ CS.START cld
L.TrkWriter .DA TrkWriter L.TrkWriter .DA TrkWriter
L.ProDOS.Boot .DA ProDOS.Boot L.ProDOS.Boot .DA ProDOS.Boot
.DA 0 .DA 0
*--------------------------------------
LIB.LOAD
LIB.UNLOAD clc
rts
*/-------------------------------------- */--------------------------------------
* # GetProDOSCatSize * # GetProDOSCatSize
* Compute space needed for ProDOS Catalog * Compute space needed for ProDOS Catalog
@ -133,10 +137,10 @@ BuildProDOSCat >PULLW ZPPtr1 DstBuf
ldx #3 ldx #3
.10 lda DATELO,x .1 lda DATELO,x
sta VolDirHdr.CT,x sta VolDirHdr.CT,x
dex dex
bpl .10 bpl .1
* Boot Code * Boot Code
>LDYA L.ProDOS.Boot >LDYA L.ProDOS.Boot
@ -145,29 +149,32 @@ BuildProDOSCat >PULLW ZPPtr1 DstBuf
ldy #0 ldy #0
ldx #2 2 pages ldx #2 2 pages
.1 lda (ZPPtr3),y .2 lda (ZPPtr3),y
sta (ZPPtr1),y sta (ZPPtr1),y
iny iny
bne .1 bne .2
inc ZPPtr3+1 inc ZPPtr3+1
inc ZPPtr1+1 inc ZPPtr1+1
dex dex
bne .1 bne .2
inc ZPPtr1+1 Skip Blk 2 (SOS boot code) inc ZPPtr1+1 Skip Blk 2 (SOS boot code)
inc ZPPtr1+1 inc ZPPtr1+1
* Directory Blocks * Directory Blocks
* ldy #0
.3 lda (ZPPtr2),y .3 lda (ZPPtr2),y
beq .31
iny iny
sta VolDirHdr.Name,y sta VolDirHdr.Name,y
cpy #15
bne .3 bne .3
tya .31 tya
and #$0f make sure 15 bytes max * and #$0f make sure 15 bytes max
ora #$F0 Volume Directory Header ora #$F0 Volume Directory Header
sta VolDirHdr.Name sta VolDirHdr.Name
@ -343,10 +350,6 @@ SetStatusAndExit
clc clc
rts rts
*-------------------------------------- *--------------------------------------
LIB.LOAD
LIB.UNLOAD clc
rts
*--------------------------------------
* A=DSSS0000 * A=DSSS0000
* Y=target Track Number * 4 * Y=target Track Number * 4
*-------------------------------------- *--------------------------------------

View File

@ -6,12 +6,12 @@
**Disk images :** **Disk images :**
+ **A2OSX.BOOT.po** : **(0.9)** 140k BOOT disk image with all binaries + **A2OSX.BOOT.po** : **(0.9.1)** 140k BOOT disk image with all binaries
+ **A2OSX.DEV.po** : **(0.9)** 140k disk image with ASM binaries, Debug Tools & INClude files + **A2OSX.DEV.po** : **(0.9.1)** 140k disk image with ASM binaries, Debug Tools & INClude files
+ **A2OSX.BUILD.po** : **(0.9.1)** 800k BOOT disk image with S-C MASM 2.0 and all binaries (BOOT+DEV) + **A2OSX.BUILD.po** : **(0.9.1)** 800k BOOT disk image with S-C MASM 2.0 and all binaries (BOOT+DEV)
+ **A2OSX.SRC.po** : **(0.9.1)** 800k disk image with all sources + **A2OSX.SRC.po** : **(0.9.1)** 800k disk image with all sources
(once Kernel 0.9.1 stable enough, BOOT & DEV will be updated) (once Kernel 0.9.1 stable enough, BOOT & DEV will be updated) __(done!)__
**0.9 has been archived, next Kernel Version is 0.9.1** **0.9 has been archived, next Kernel Version is 0.9.1**
@ -185,21 +185,21 @@ note : '$VAR' does NOT expand Variable
| LS | Working | -A : Do Not Print . & .. | 0.9.1 | | LS | Working | -A : Do Not Print . & .. | 0.9.1 |
| | | -L : long listing with size/date... | | | | | -L : long listing with size/date... | |
| | | -R : Recurse subdirectories | | | | | -R : Recurse subdirectories | |
| RM | Working | -C : Continue On Error | 0.9 | | RM | Working | -C : Continue On Error | 0.9.1 |
| | | -Q : Quiet | | | | | -Q : Quiet | |
| | | -R : Recurse subdirectories | | | | | -R : Recurse subdirectories | |
| CP | Working | -C : Continue On Error | 0.9.1 | | CP | Working | -C : Continue On Error | 0.9.1 |
| | | -Q : Quiet | | | | | -Q : Quiet | |
| | | -R : Recurse subdirectories | | | | | -R : Recurse subdirectories | |
| | | -Y : Dont't Prompt For Override | | | | | -Y : Dont't Prompt For Override | |
| MV | Working | -C : Continue On Error | 0.9 | | MV | Working | -C : Continue On Error | 0.9.1 |
| | | -Q : Quiet | | | | | -Q : Quiet | |
| | | -R : Recurse subdirectories | | | | | -R : Recurse subdirectories | |
| | | -Y : Dont't Prompt For Override | | | | | -Y : Dont't Prompt For Override | |
| CAT | Working | -A : Show All non printable caracters | 0.9.1 | | CAT | Working | -A : Show All non printable caracters | 0.9.1 |
| | | -N : Number all output lines | | | | | -N : Number all output lines | |
| | | -S : Suppress repeated empty output lines | | | | | -S : Suppress repeated empty output lines | |
| CHTYP | In Progress | -C : Continue On Error | 0.9 | | CHTYP | Working | -C : Continue On Error | 0.9.1 |
| | | -R : Recurse subdirectories | | | | | -R : Recurse subdirectories | |
| CHMOD | In Progress | -C : Continue On Error | 0.9 | | CHMOD | In Progress | -C : Continue On Error | 0.9 |
| | | -R : Recurse subdirectories | | | | | -R : Recurse subdirectories | |
@ -222,6 +222,7 @@ note : '$VAR' does NOT expand Variable
| ---- | ------ | ------- | ----- | | ---- | ------ | ------- | ----- |
| ASM | In Progress | S-C MASM based multi CPU assembler | 0.9 | | ASM | In Progress | S-C MASM based multi CPU assembler | 0.9 |
| MEMDUMP | Working | | 0.9.1 | | MEMDUMP | Working | | 0.9.1 |
| ---- | ------ | ------- | ----- |
| RPCDUMP | Working | tool based on UDP socket API, renamed from RPCINFO | 0.9 | | RPCDUMP | Working | tool based on UDP socket API, renamed from RPCINFO | 0.9 |
## Misc ## Misc

View File

@ -120,7 +120,7 @@ K.SaveFile jsr K.FOpen
* PUSHW = PATH * PUSHW = PATH
*\-------------------------------------- *\--------------------------------------
K.ChTyp jsr PFT.CheckPathSTK K.ChTyp jsr PFT.CheckPathSTK
>PULLW K.MLI.PARAMS+1 jsr STDIO.PullMLIPath
>PULLB .1+1 >PULLB .1+1
>MLICALL MLIGETFILEINFO >MLICALL MLIGETFILEINFO
bcs .9 bcs .9