Kernel version 0.9 : CP/MV/RM, bug fix in RM <DIR>

This commit is contained in:
Rémy GIBERT 2017-02-23 08:42:48 +01:00
parent f818be145b
commit 76d1721df4
4 changed files with 48 additions and 35 deletions

Binary file not shown.

Binary file not shown.

View File

@ -85,19 +85,17 @@ CS.INIT >SYSCALL GetArgC
lda (pData),y
*--------------------------------------
.DO X.COPY.TO.DEST=1
*--------------------------------------
bne .5 Already have a Src dir...
.ELSE
bne .99
.FIN
*--------------------------------------
>LDYA ZPPtr1
jsr InitSrcDirYA
jsr InitSrcDirPatYA
bcc .1 success, scan for any other args
rts
*--------------------------------------
.DO X.COPY.TO.DEST=1
*--------------------------------------
.5 ldy #hDstBasePath
lda (pData),y
bne .99 we already have a second arg....error!
@ -113,7 +111,6 @@ CS.INIT >SYSCALL GetArgC
beq .99 , no src ? ERROR
*--------------------------------------
.DO X.COPY.TO.DEST=1
*--------------------------------------
ldy #hDstBasePath
lda (pData),y
bne .8 we also have a Dst folder
@ -153,15 +150,13 @@ CS.RUN >SYSCALL GetC
bmi .8
*--------------------------------------
.1 .DO X.COPY.TO.DEST=1
*--------------------------------------
ldy #bCopy
lda (pData),y
bpl .2
jmp CS.RUN.Copy
.FIN
*--------------------------------------
.2 .DO X.DELETE.SOURCE
*--------------------------------------
.2 .DO X.DELETE.SOURCE=1
ldy #hToDelete
lda (pData),y
beq .3
@ -198,13 +193,8 @@ CS.RUN >SYSCALL GetC
.9 jsr LeaveSubDir
bcs .99
ldy #bRecurse
lda (pData),y
bpl .8
*--------------------------------------
.DO X.DELETE.SOURCE=1
*--------------------------------------
ldy #hSrcBasePath
jsr CS.RUN.GetBasePath
>SYSCALL RemoveYA
@ -212,6 +202,10 @@ CS.RUN >SYSCALL GetC
bcs .99
.FIN
*--------------------------------------
ldy #bRecurse
lda (pData),y
bpl .8
jsr BasePath..
.8 clc
@ -243,31 +237,41 @@ CS.RUN.DEV >PUSHW ZPPtr1
.8 clc
.9 rts
*--------------------------------------
CS.RUN.DIR ldy #bRecurse
lda (pData),y
bpl .8
ldy #1
CS.RUN.DIR ldy #1
lda (ZPPtr1),y
cmp #'.'
beq .8
jsr CS.RUN.PrintDir
bcs .9
*--------------------------------------
.DO X.COPY.TO.DEST=1
*--------------------------------------
ldy #hDstBasePath
jsr CS.RUN.GetFilePath
>LDYAI UsrBuf256
>SYSCALL MKDirYA
jsr CS.RUN.CheckErr
bcs .9
.FIN
*--------------------------------------
.1 >LDYA ZPPtr1
jmp EnterSubDirYA
ldy #bRecurse
lda (pData),y
bpl .1
>LDYA ZPPtr1
jmp EnterSubDirYA
*--------------------------------------
.1 .DO X.DELETE.SOURCE=1
ldy #hSrcBasePath
jsr CS.RUN.GetFilePath
>LDYAI UsrBuf256
>SYSCALL RemoveYA
jsr CS.RUN.CheckErr
bcs .9
.FIN
*--------------------------------------
.8 clc
.9 rts
*--------------------------------------
@ -275,27 +279,24 @@ CS.RUN.FILE jsr CS.RUN.PrintFile
bcs .9
*--------------------------------------
.DO X.COPY.TO.DEST=1
*--------------------------------------
jsr CS.RUN.CopyStart
bcs .9
rts
.FIN
*--------------------------------------
.DO X.DELETE.SOURCE=1
*--------------------------------------
ldy #hSrcBasePath
jsr CS.RUN.GetFilePath
>LDYAI UsrBuf256
>SYSCALL NewPStrYA
bcs .9
bcs .99
txa
ldy #hToDelete
sta (pData),y
.FIN
*--------------------------------------
.9 jsr CS.RUN.CheckErr
rts
.9 jsr CS.RUN.CheckErr
.99 rts
*--------------------------------------
CS.RUN.PrintDir ldy #hDstBasePath
lda (pData),y
@ -331,7 +332,6 @@ CS.RUN.PrintFile
rts
*--------------------------------------
.DO X.COPY.TO.DEST=1
*--------------------------------------
CS.RUN.CopyStart
ldy #S.STAT.P.AUXTYPE+1
>PUSHB (ZPPtr2),y
@ -449,11 +449,9 @@ CS.RUN.CopyEnd ldy #hSrcFile
beq CS.RUN.CheckErr
sec
jmp CS.RUN.CheckErr
*--------------------------------------
.FIN
*--------------------------------------
.DO X.DELETE.SOURCE=1
*--------------------------------------
CS.RUN.Delete pha
lda #0
sta (pData),y
@ -461,7 +459,6 @@ CS.RUN.Delete pha
>SYSCALL GetMemPtrA
>SYSCALL RemoveYA
jmp CS.RUN.CheckErr
*--------------------------------------
.FIN
*--------------------------------------
CS.RUN.CheckErr bcs .1
@ -508,7 +505,24 @@ CS.DOEVENT sec
CS.QUIT jsr LeaveSubDir
bcc CS.QUIT
ldy #hFilter
ldy #hToDelete
lda (pData),y
beq .1
>SYSCALL FreeMemA
.1 ldy #bCopy
lda (pData),y
bpl .2
ldy #hSrcFile
lda (pData),y
>SYSCALL FCloseA
ldy #hDstFile
lda (pData),y
>SYSCALL FCloseA
.2 ldy #hFilter
lda (pData),y
beq .8
>SYSCALL FreeMemA
@ -518,5 +532,5 @@ CS.QUIT jsr LeaveSubDir
*--------------------------------------
MAN
SAVE BIN/X.CPMVRM.S
LOAD BIN/CP.S
LOAD BIN/RM.S
ASM

View File

@ -314,8 +314,7 @@ EnterSubDirYA >STYA ZPPtr2 save SUBDIR for StrCat
ldy #hDstBasePath
jsr EnterSubDirYA.1
.FIN
.9 rts
EnterSubDirYA.1 lda (pData),y