Kernel version 0.8 : RM, fixed a bug preventing removing a simple directory!

This commit is contained in:
Rémy GIBERT 2016-11-03 08:29:24 +01:00
parent c306419c7d
commit ab7fe523e8
4 changed files with 24 additions and 12 deletions

Binary file not shown.

Binary file not shown.

View File

@ -83,7 +83,7 @@ CS.INIT >SYSCALL GetArgC
bra .1
.4 >LDYA ZPPtr1
jsr InitSrcDirYA
jsr InitSrcDirPatYA
bcs .9
bra .1 scan for any other args
@ -187,15 +187,15 @@ 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
ldy #bRecurse
lda (pData),y
bpl CS.RUN.FILE
>LDYA ZPPtr1
jmp EnterSubDirYA

View File

@ -10,7 +10,11 @@ AUTO 6
* hDIRENTs .BS MAX.RECURSE+1
* hBasePath .BS 1
*--------------------------------------
InitSrcDirYA >SYSCALL GetFullPathYA
InitSrcDirPatYA ldx #$80
.HS 2C bit abs
InitSrcDirYA ldx #0
stx .11+1
>SYSCALL GetFullPathYA
bcc .10
rts
@ -21,11 +25,14 @@ InitSrcDirYA >SYSCALL GetFullPathYA
cmp #1
beq .5 we have '/'
.11 lda #$ff Self Modified
bmi .1 Force using pattern
>PUSHW L.STAT
>PUSHW ZPPtr1
>SYSCALL STAT
bcs .1 File/DIR does not exists, go extract wildcard
bcs .1 File/DIR does not exists, go extract pattern
lda STAT+S.STAT.PRODOS.TYPE
cmp #$0f
@ -76,9 +83,14 @@ InitSrcDirYA >SYSCALL GetFullPathYA
ldy #hBasePath
sta (pData),y
>PUSHW ZPPtr1 Push Src
>PUSHW ZPPtr2 Push Dst
>SYSCALL PStrCpy
lda (ZPPtr1)
sta (ZPPtr2)
tay
.6 lda (ZPPtr1),y
sta (ZPPtr2),y
dey
bne .6
>LDYA ZPPtr1
>SYSCALL OpenDirYA