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 bra .1
.4 >LDYA ZPPtr1 .4 >LDYA ZPPtr1
jsr InitSrcDirYA jsr InitSrcDirPatYA
bcs .9 bcs .9
bra .1 scan for any other args bra .1 scan for any other args
@ -187,18 +187,18 @@ CS.RUN.DEV >PUSHW ZPPtr1
.8 clc .8 clc
.9 rts .9 rts
*-------------------------------------- *--------------------------------------
CS.RUN.DIR ldy #bRecurse CS.RUN.DIR ldy #1
lda (pData),y
bpl .8
ldy #1
lda (ZPPtr1),y lda (ZPPtr1),y
cmp #'.' cmp #'.'
beq .8 beq .8
ldy #bRecurse
lda (pData),y
bpl CS.RUN.FILE
>LDYA ZPPtr1 >LDYA ZPPtr1
jmp EnterSubDirYA jmp EnterSubDirYA
.8 clc .8 clc
.9 rts .9 rts
*-------------------------------------- *--------------------------------------

View File

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