support relative paths

This commit is contained in:
Peter Ferrie 2018-04-17 15:50:28 -07:00
parent b810df9fd9
commit 6c6b31c2b6
5 changed files with 81 additions and 76 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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