From a0ea16a25d8df46fcf3c5f70ba9fe1cd64bf0151 Mon Sep 17 00:00:00 2001 From: Peter Ferrie Date: Fri, 25 Oct 2019 09:41:31 -0700 Subject: [PATCH] . --- src/onbeyond/z4/z4.s | 24 +++++++++++++++++++----- src/onbeyond/z5/z5.s | 24 +++++++++++++++++++----- src/onbeyond/z5u/z5u.s | 24 +++++++++++++++++++----- 3 files changed, 57 insertions(+), 15 deletions(-) diff --git a/src/onbeyond/z4/z4.s b/src/onbeyond/z4/z4.s index 70e9123..8938dc4 100644 --- a/src/onbeyond/z4/z4.s +++ b/src/onbeyond/z4/z4.s @@ -199,6 +199,9 @@ init lda DEVNUM ;find current directory name in directory + sec + php + readblock jsr MLI !byte $80 !word x80_parms @@ -220,7 +223,8 @@ inextent ldy #0 ;match failed, move to next directory in this block, if possible - pla - clc + +skiphdr clc lda bloklo adc #ENTRY_SIZE sta bloklo @@ -249,7 +253,17 @@ ifoundname dex lda (namlo), y cmp #'/' bne - - tya + pla + and #$20 ;Volume Directory Header XOR subdirectory + beq adjpath + pla + clc + php + lsr + bcc skiphdr + inx + +adjpath tya eor #$ff adc sizelo sta sizelo @@ -257,9 +271,8 @@ ifoundname dex tya adc namlo sta namlo - pla - and #$20 ;Volume Directory Header XOR subdirectory - bne ++ + dex + beq ++ ;cache block number of current directory ;as starting position for subsequent searches @@ -275,6 +288,7 @@ ifoundname dex stx x80_parms + 5 ++ lda sizelo bne readblock + pla ;unit to slot for ProDOS interface diff --git a/src/onbeyond/z5/z5.s b/src/onbeyond/z5/z5.s index 430aaf5..b6bcf89 100644 --- a/src/onbeyond/z5/z5.s +++ b/src/onbeyond/z5/z5.s @@ -199,6 +199,9 @@ init lda DEVNUM ;find current directory name in directory + sec + php + readblock jsr MLI !byte $80 !word x80_parms @@ -220,7 +223,8 @@ inextent ldy #0 ;match failed, move to next directory in this block, if possible - pla - clc + +skiphdr clc lda bloklo adc #ENTRY_SIZE sta bloklo @@ -249,7 +253,17 @@ ifoundname dex lda (namlo), y cmp #'/' bne - - tya + pla + and #$20 ;Volume Directory Header XOR subdirectory + beq adjpath + pla + clc + php + lsr + bcc skiphdr + inx + +adjpath tya eor #$ff adc sizelo sta sizelo @@ -257,9 +271,8 @@ ifoundname dex tya adc namlo sta namlo - pla - and #$20 ;Volume Directory Header XOR subdirectory - bne ++ + dex + beq ++ ;cache block number of current directory ;as starting position for subsequent searches @@ -275,6 +288,7 @@ ifoundname dex stx x80_parms + 5 ++ lda sizelo bne readblock + pla ;unit to slot for ProDOS interface diff --git a/src/onbeyond/z5u/z5u.s b/src/onbeyond/z5u/z5u.s index 1e9ddb4..fa382ea 100644 --- a/src/onbeyond/z5u/z5u.s +++ b/src/onbeyond/z5u/z5u.s @@ -199,6 +199,9 @@ init lda DEVNUM ;find current directory name in directory + sec + php + readblock jsr MLI !byte $80 !word x80_parms @@ -220,7 +223,8 @@ inextent ldy #0 ;match failed, move to next directory in this block, if possible - pla - clc + +skiphdr clc lda bloklo adc #ENTRY_SIZE sta bloklo @@ -249,7 +253,17 @@ ifoundname dex lda (namlo), y cmp #'/' bne - - tya + pla + and #$20 ;Volume Directory Header XOR subdirectory + beq adjpath + pla + clc + php + lsr + bcc skiphdr + inx + +adjpath tya eor #$ff adc sizelo sta sizelo @@ -257,9 +271,8 @@ ifoundname dex tya adc namlo sta namlo - pla - and #$20 ;Volume Directory Header XOR subdirectory - bne ++ + dex + beq ++ ;cache block number of current directory ;as starting position for subsequent searches @@ -275,6 +288,7 @@ ifoundname dex stx x80_parms + 5 ++ lda sizelo bne readblock + pla ;unit to slot for ProDOS interface