diff --git a/A2OSX.BOOT.po b/A2OSX.BOOT.po index b91a1419..d02ececa 100644 Binary files a/A2OSX.BOOT.po and b/A2OSX.BOOT.po differ diff --git a/A2OSX.SRC.po b/A2OSX.SRC.po index 1d91c5ec..bee46bd2 100644 Binary files a/A2OSX.SRC.po and b/A2OSX.SRC.po differ diff --git a/BIN/CP.S.txt b/BIN/CP.S.txt index 30b3de5c..5a0df5fc 100644 --- a/BIN/CP.S.txt +++ b/BIN/CP.S.txt @@ -11,6 +11,8 @@ AUTO 6 .INB /A2OSX.DEV/INC/MACROS.I .INB /A2OSX.DEV/INC/A2OSX.I *-------------------------------------- +X.MAX.RECURSE .EQ 8 +X.DST.BASE.PATH .EQ 1 X.DELETE.SOURCE .EQ 0 *-------------------------------------- .INB BIN/X.CPMV.S @@ -35,10 +37,11 @@ ArgCount .BS 1 .OR 0 DS.START Index .BS 1 -hDIRs .BS MAX.RECURSE -hDIRENTs .BS MAX.RECURSE -oDIRENTs .BS MAX.RECURSE*2 -hBasePath .BS 1 +hDIRs .BS X.MAX.RECURSE +hDIRENTs .BS X.MAX.RECURSE +oDIRENTs .BS X.MAX.RECURSE*2 +hSrcBasePath .BS 1 +hDstBasePath .BS 1 hFilter .BS 1 bCANCEL .BS 1 bSTOP .BS 1 diff --git a/BIN/LS.S.txt b/BIN/LS.S.txt index 8fc25a11..82bc36ad 100644 --- a/BIN/LS.S.txt +++ b/BIN/LS.S.txt @@ -11,8 +11,11 @@ AUTO 6 .INB /A2OSX.DEV/INC/MACROS.I .INB /A2OSX.DEV/INC/A2OSX.I *-------------------------------------- +X.MAX.RECURSE .EQ 8 +X.DST.BASE.PATH .EQ 0 +X.DELETE.SOURCE .EQ 0 +*-------------------------------------- MAX.COL .EQ 4 -MAX.RECURSE .EQ 8 *-------------------------------------- ZPPtr1 .EQ ZPBIN ZPPtr2 .EQ ZPBIN+2 @@ -365,7 +368,7 @@ CS.RUN.NewLine.8 rts *-------------------------------------- CS.RUN.ENTER.MSG - ldy #hBasePath + ldy #hSrcBasePath lda (pData),y >SYSCALL GetMemPtrA >PUSHYA @@ -489,10 +492,10 @@ ArgCount .BS 1 .OR 0 DS.START Index .BS 1 -hDIRs .BS MAX.RECURSE -hDIRENTs .BS MAX.RECURSE -oDIRENTs .BS MAX.RECURSE*2 -hBasePath .BS 1 +hDIRs .BS X.MAX.RECURSE +hDIRENTs .BS X.MAX.RECURSE +oDIRENTs .BS X.MAX.RECURSE*2 +hSrcBasePath .BS 1 hFilter .BS 1 bSTOP .BS 1 bCANCEL .BS 1 diff --git a/BIN/MV.S.txt b/BIN/MV.S.txt index 6ace6e21..5d42a0d2 100644 --- a/BIN/MV.S.txt +++ b/BIN/MV.S.txt @@ -11,6 +11,8 @@ AUTO 6 .INB /A2OSX.DEV/INC/MACROS.I .INB /A2OSX.DEV/INC/A2OSX.I *-------------------------------------- +X.MAX.RECURSE .EQ 8 +X.DST.BASE.PATH .EQ 1 X.DELETE.SOURCE .EQ 1 *-------------------------------------- .INB BIN/X.CPMV.S @@ -35,10 +37,11 @@ ArgCount .BS 1 .OR 0 DS.START Index .BS 1 -hDIRs .BS MAX.RECURSE -hDIRENTs .BS MAX.RECURSE -oDIRENTs .BS MAX.RECURSE*2 -hBasePath .BS 1 +hDIRs .BS X.MAX.RECURSE +hDIRENTs .BS X.MAX.RECURSE +oDIRENTs .BS X.MAX.RECURSE*2 +hSrcBasePath .BS 1 +hDstBasePath .BS 1 hFilter .BS 1 bCANCEL .BS 1 bSTOP .BS 1 diff --git a/BIN/RM.S.txt b/BIN/RM.S.txt index 196055ca..8d98286d 100644 --- a/BIN/RM.S.txt +++ b/BIN/RM.S.txt @@ -11,7 +11,9 @@ AUTO 6 .INB /A2OSX.DEV/INC/MACROS.I .INB /A2OSX.DEV/INC/A2OSX.I *-------------------------------------- -MAX.RECURSE .EQ 8 +X.MAX.RECURSE .EQ 8 +X.DST.BASE.PATH .EQ 0 +X.DELETE.SOURCE .EQ 0 *-------------------------------------- ZPPtr1 .EQ ZPBIN ZPPtr2 .EQ ZPBIN+2 @@ -146,7 +148,7 @@ CS.RUN ldy #bCANCEL lda (pData),y bpl .8 - ldy #hBasePath + ldy #hSrcBasePath lda (pData),y >SYSCALL GetMemPtrA >PUSHYA @@ -210,7 +212,7 @@ CS.RUN.FILE jsr CS.RUN.PRINT.FILE *-------------------------------------- CS.RUN.PRINT.FILE >PUSHW ZPPtr1 - ldy #hBasePath + ldy #hSrcBasePath lda (pData),y >SYSCALL GetMemPtrA >PUSHYA @@ -234,7 +236,7 @@ CS.RUN.DELETE >LDYAI UsrBuf256 rts *-------------------------------------- CS.RUN.GET.BASE.PATH - ldy #hBasePath + ldy #hSrcBasePath lda (pData),y >SYSCALL GetMemPtrA >PUSHYA @@ -334,10 +336,10 @@ ArgCount .BS 1 .OR 0 DS.START Index .BS 1 -hDIRs .BS MAX.RECURSE -hDIRENTs .BS MAX.RECURSE -oDIRENTs .BS MAX.RECURSE*2 -hBasePath .BS 1 +hDIRs .BS X.MAX.RECURSE +hDIRENTs .BS X.MAX.RECURSE +oDIRENTs .BS X.MAX.RECURSE*2 +hSrcBasePath .BS 1 hFilter .BS 1 bCANCEL .BS 1 bSTOP .BS 1 diff --git a/BIN/X.CPMV.S.txt b/BIN/X.CPMV.S.txt index 7a1f7528..58d5ae77 100644 --- a/BIN/X.CPMV.S.txt +++ b/BIN/X.CPMV.S.txt @@ -5,8 +5,6 @@ INC 1 AUTO 6 .LIST OFF *-------------------------------------- -MAX.RECURSE .EQ 8 -*-------------------------------------- ZPPtr1 .EQ ZPBIN ZPPtr2 .EQ ZPBIN+2 *-------------------------------------- @@ -42,7 +40,7 @@ CS.INIT >SYSCALL GetArgC beq .99 .1 dec ArgCount - beq .5 + beq .7 lda ArgCount >SYSCALL GetArgA @@ -76,15 +74,37 @@ CS.INIT >SYSCALL GetArgC sta (pData),y bra .1 -.4 >LDYA ZPPtr1 - jsr InitSrcDirYA - bcs .9 - - bra .1 scan for any other args - -.5 ldy #index +.4 ldy #index lda (pData),y - beq .99 + bne .5 Already have a Src dir... + + >LDYA ZPPtr1 + jsr InitSrcDirYA + bcc .1 success, scan for any other args + rts + +.5 ldy #hDstBasePath + lda (pData),y + bne .99 we already have a second arg....error! + + >LDYA ZPPtr1 + jsr InitDstDirYA + bcc .1 success, scan for any other args + rts + +.7 ldy #index processed all args + lda (pData),y + beq .99 , no src ? ERROR + + ldy #hDstBasePath + lda (pData),y + bne .8 we also have a Dst folder + + ldy #S.PS.hPREFIX no dst folder, use actual prefix + lda (pPs),y + >SYSCALL GetMemPtrA + jsr InitDstDirYA + bcs .99 .8 lda (pPs) ora #S.PS.F.EVENT Now accept events @@ -140,8 +160,7 @@ CS.RUN ldy #bCANCEL lda (pData),y bpl .8 - - ldy #hBasePath + ldy #hSrcBasePath lda (pData),y >SYSCALL GetMemPtrA >PUSHYA @@ -204,8 +223,14 @@ CS.RUN.FILE jsr CS.RUN.PRINT.FILE .9 rts *-------------------------------------- CS.RUN.PRINT.FILE + ldy #hDstBasePath + lda (pData),y + >SYSCALL GetMemPtrA + >PUSHYA + >PUSHW ZPPtr1 - ldy #hBasePath + + ldy #hSrcBasePath lda (pData),y >SYSCALL GetMemPtrA >PUSHYA @@ -225,11 +250,12 @@ CS.RUN.DELETE.FILE >SYSCALL PStrCat CS.RUN.DELETE >LDYAI UsrBuf256 - >SYSCALL RemoveYA +* >SYSCALL RemoveYA + clc rts *-------------------------------------- CS.RUN.GET.BASE.PATH - ldy #hBasePath + ldy #hSrcBasePath lda (pData),y >SYSCALL GetMemPtrA >PUSHYA @@ -311,3 +337,5 @@ CS.QUIT jsr LeaveSubDir *-------------------------------------- MAN SAVE BIN/X.CPMV.S +LOAD BIN/CP.S +ASM diff --git a/BIN/X.FILEENUM.S.txt b/BIN/X.FILEENUM.S.txt index 9d21ae85..90bf4b2b 100644 --- a/BIN/X.FILEENUM.S.txt +++ b/BIN/X.FILEENUM.S.txt @@ -6,9 +6,50 @@ AUTO 6 .LIST OFF *-------------------------------------- * Uses: (pData) -* hDIRs .BS MAX.RECURSE+1 -* hDIRENTs .BS MAX.RECURSE+1 -* hBasePath .BS 1 +* hDIRs .BS X.MAX.RECURSE+1 +* hDIRENTs .BS X.MAX.RECURSE+1 +* hSrcBasePath .BS 1 +* hDstBasePath .BS 1 (optional) +*-------------------------------------- + .DO X.DST.BASE.PATH=1 +InitDstDirYA >SYSCALL GetFullPathYA + bcs .99 + + stx .90+1 + >STYA ZPPtr1 + +.5 >PUSHWI 256 + >PUSHBI 0 + >SYSCALL GetMem Get a 256 buffer to store DstBasePath + bcs .9 + + >STYA ZPPtr2 + txa + ldy #hDstBasePath + sta (pData),y + + lda (ZPPtr1) + sta (ZPPtr2) + tay + +.6 lda (ZPPtr1),y + sta (ZPPtr2),y + dey + bne .6 + + jsr .9 Cleanup + + clc +.99 rts + +.9 pha +.90 lda #$ff self modified + >SYSCALL FreeMemA + pla + sec + rts + + .FIN *-------------------------------------- InitSrcDirPatYA ldx #$80 .HS 2C bit abs @@ -80,7 +121,7 @@ InitSrcDirYA ldx #0 >STYA ZPPtr2 txa - ldy #hBasePath + ldy #hSrcBasePath sta (pData),y lda (ZPPtr1) @@ -229,10 +270,10 @@ EnterSubDirYA >STYA ZPPtr2 save SUBDIR for StrCat ldy #index lda (pData),y - cmp #MAX.RECURSE + cmp #X.MAX.RECURSE beq .9 - ldy #hBasePath + ldy #hSrcBasePath lda (pData),y >SYSCALL GetMemPtrA @@ -293,7 +334,7 @@ LeaveSubDir ldy #index sta (pData),y bne .8 - ldy #hBasePath + ldy #hSrcBasePath lda (pData),y >SYSCALL FreeMemA .9 sec @@ -302,7 +343,7 @@ LeaveSubDir ldy #index .8 clc rts *-------------------------------------- -BasePath.. ldy #hBasePath +BasePath.. ldy #hSrcBasePath lda (pData),y >SYSCALL GetMemPtrA diff --git a/SBIN/SHELL.S.CMD.txt b/SBIN/SHELL.S.CMD.txt index b183da07..d57f7d69 100644 --- a/SBIN/SHELL.S.CMD.txt +++ b/SBIN/SHELL.S.CMD.txt @@ -69,7 +69,12 @@ Cmd.ExecYA.1 >SYSCALL ExpandPStrYA dey bne .2 - jmp (J.INTCMDS,x) Found an internal Cmd... + jsr .5 Found an internal Cmd... + bcs .31 + lda #0 +.31 ldy #S.PS.RC + sta (pPS),y + rts .4 inx inx @@ -81,6 +86,9 @@ Cmd.ExecYA.1 >SYSCALL ExpandPStrYA bcc .1 inc ZPPtr2+1 bra .1 + +.5 jmp (J.INTCMDS,x) + *-------------------------------------- Cmd.Exec.EXT ldy #1 lda CMD,y diff --git a/SBIN/SHELL.S.txt b/SBIN/SHELL.S.txt index e734a427..582826c0 100644 --- a/SBIN/SHELL.S.txt +++ b/SBIN/SHELL.S.txt @@ -110,7 +110,13 @@ CS.RUN lda #0 clc rts -.10 ldy #hInputFile batch mode ? +.10 ldy #S.PS.RC + lda (pPs),y + beq .12 + + jsr ERR.Print + +.12 ldy #hInputFile batch mode ? lda (pData),y bne .2