From 6c6b31c2b6c3dce709dacf4caf84a9e9ddc1a57e Mon Sep 17 00:00:00 2001 From: Peter Ferrie Date: Tue, 17 Apr 2018 15:50:28 -0700 Subject: [PATCH] support relative paths --- src/onbeyond/onbeyond.system.s | 47 ++++++++++++++++++++++++++++++---- src/onbeyond/z1/z1.s | 23 ----------------- src/onbeyond/z2/z2.s | 23 ----------------- src/onbeyond/z3/z3.s | 23 ----------------- src/zinfo/zinfo.system.s | 41 +++++++++++++++++++++++++++-- 5 files changed, 81 insertions(+), 76 deletions(-) diff --git a/src/onbeyond/onbeyond.system.s b/src/onbeyond/onbeyond.system.s index 1d1b309..8eb6d02 100644 --- a/src/onbeyond/onbeyond.system.s +++ b/src/onbeyond/onbeyond.system.s @@ -42,8 +42,45 @@ op_c7 + lda #$2f cmp $200,x beq + - inc $200 - sta $201,x + inx + stx $200 + sta $200,x + + ;form absolute path + ++ ldy $2006 +- dey + beq + + lda $2006,y + cmp #$2f + bne - + tya + pha + clc + adc $200 + sta $200 + tax +- lda $2006,y + sta $200,x + dex + dey + bne - + pla + tay + ldx #0 +- iny + lda $2006,y + sta $2007,x + inx + cpy $2006 + bne - + stx $2006 + + ;set that as prefix + + jsr $bf00 + !byte $c6 + !word c7_parms ;get attributes for passed file @@ -77,9 +114,9 @@ quit jsr $bf00 ;get volume name - inc c5_parms+3 - lda #$81 - sta c5_parms+2 + inc c5_parms+3 + lda #$81 + sta c5_parms+2 jsr $bf00 !byte $c5 !word c5_parms diff --git a/src/onbeyond/z1/z1.s b/src/onbeyond/z1/z1.s index 7023cad..bd95cb1 100644 --- a/src/onbeyond/z1/z1.s +++ b/src/onbeyond/z1/z1.s @@ -21,29 +21,6 @@ ecx = $4 last = $6 tmp = $8 -- jsr $bf00 -op_c7 - - !byte $c7 - !word c7_parms - ldx $200 - bne + - lda $bf30 - sta c5_parms+1 - jsr $bf00 - !byte $c5 - !word c5_parms - ldx $201 - inx - txa - and #$0f - sta $200 - lda #$2f - sta $201 - dec op_c7 - bne - -+ - ldy $2006 lda #'1' sta gamename,y diff --git a/src/onbeyond/z2/z2.s b/src/onbeyond/z2/z2.s index f1b1fb8..4052899 100644 --- a/src/onbeyond/z2/z2.s +++ b/src/onbeyond/z2/z2.s @@ -21,29 +21,6 @@ ecx = $4 last = $6 tmp = $8 -- jsr $bf00 -op_c7 - - !byte $c7 - !word c7_parms - ldx $200 - bne + - lda $bf30 - sta c5_parms+1 - jsr $bf00 - !byte $c5 - !word c5_parms - ldx $201 - inx - txa - and #$0f - sta $200 - lda #$2f - sta $201 - dec op_c7 - bne - -+ - ldy $2006 lda #'2' sta gamename,y diff --git a/src/onbeyond/z3/z3.s b/src/onbeyond/z3/z3.s index 74c4694..8714525 100644 --- a/src/onbeyond/z3/z3.s +++ b/src/onbeyond/z3/z3.s @@ -21,29 +21,6 @@ ecx = $4 last = $6 tmp = $8 -- jsr $bf00 -op_c7 - - !byte $c7 - !word c7_parms - ldx $200 - bne + - lda $bf30 - sta c5_parms+1 - jsr $bf00 - !byte $c5 - !word c5_parms - ldx $201 - inx - txa - and #$0f - sta $200 - lda #$2f - sta $201 - dec op_c7 - bne - -+ - ldy $2006 lda #'3' sta gamename,y diff --git a/src/zinfo/zinfo.system.s b/src/zinfo/zinfo.system.s index 7f45018..be93cde 100644 --- a/src/zinfo/zinfo.system.s +++ b/src/zinfo/zinfo.system.s @@ -42,8 +42,45 @@ op_c7 + lda #$2f cmp $200,x beq + - inc $200 - sta $201,x + inx + stx $200 + sta $200,x + + ;form absolute path + ++ ldy $2006 +- dey + beq + + lda $2006,y + cmp #$2f + bne - + tya + pha + clc + adc $200 + sta $200 + tax +- lda $2006,y + sta $200,x + dex + dey + bne - + pla + tay + ldx #0 +- iny + lda $2006,y + sta $2007,x + inx + cpy $2006 + bne - + stx $2006 + + ;set that as prefix + + jsr $bf00 + !byte $c6 + !word c7_parms ;get attributes for passed file