mirror of
https://github.com/mi57730/a2d.git
synced 2024-11-29 07:49:20 +00:00
More case adjustment consolidation
This commit is contained in:
parent
e6a69ea587
commit
bb11e91e33
@ -1657,47 +1657,7 @@ L6110: inc L6128
|
|||||||
L6127: .byte 0
|
L6127: .byte 0
|
||||||
L6128: .byte 0
|
L6128: .byte 0
|
||||||
|
|
||||||
;;; ============================================================
|
PAD_TO $6161 ; Maintain previous addresses
|
||||||
|
|
||||||
.proc adjust_filename_case
|
|
||||||
ptr := $A
|
|
||||||
|
|
||||||
stx ptr+1
|
|
||||||
sta ptr
|
|
||||||
ldy #0
|
|
||||||
lda (ptr),y
|
|
||||||
tay
|
|
||||||
bne loop
|
|
||||||
rts
|
|
||||||
|
|
||||||
loop: dey
|
|
||||||
beq done
|
|
||||||
bpl :+
|
|
||||||
done: rts
|
|
||||||
|
|
||||||
: lda (ptr),y
|
|
||||||
and #CHAR_MASK ; convert to ASCII
|
|
||||||
cmp #'/'
|
|
||||||
beq next
|
|
||||||
cmp #'.'
|
|
||||||
bne check_alpha
|
|
||||||
next: dey
|
|
||||||
jmp loop
|
|
||||||
|
|
||||||
check_alpha:
|
|
||||||
iny
|
|
||||||
lda (ptr),y
|
|
||||||
and #CHAR_MASK
|
|
||||||
cmp #'A'
|
|
||||||
bcc :+
|
|
||||||
cmp #'Z'+1
|
|
||||||
bcs :+
|
|
||||||
clc
|
|
||||||
adc #('a' - 'A') ; convert to lower case
|
|
||||||
sta (ptr),y
|
|
||||||
: dey
|
|
||||||
jmp loop
|
|
||||||
.endproc
|
|
||||||
|
|
||||||
;;; ============================================================
|
;;; ============================================================
|
||||||
|
|
||||||
@ -1758,7 +1718,7 @@ L61E6: inx
|
|||||||
cpy L6226
|
cpy L6226
|
||||||
bne L61E6
|
bne L61E6
|
||||||
stx $0220
|
stx $0220
|
||||||
addr_call adjust_filename_case, $0220
|
addr_call desktop_main::adjust_case, $0220
|
||||||
MGTK_RELAY_CALL MGTK::MoveTo, disk_label_pos
|
MGTK_RELAY_CALL MGTK::MoveTo, disk_label_pos
|
||||||
addr_call draw_string, disk_label
|
addr_call draw_string, disk_label
|
||||||
addr_call draw_string, $0220
|
addr_call draw_string, $0220
|
||||||
@ -2049,9 +2009,7 @@ L64E8: lda #$00
|
|||||||
L64F5: lda L6515
|
L64F5: lda L6515
|
||||||
cmp $177F
|
cmp $177F
|
||||||
beq L64E7
|
beq L64E7
|
||||||
lda $06
|
addr_call_indirect desktop_main::adjust_case, $06
|
||||||
ldx $07
|
|
||||||
jsr adjust_filename_case
|
|
||||||
inc L6515
|
inc L6515
|
||||||
lda $06
|
lda $06
|
||||||
clc
|
clc
|
||||||
@ -2880,7 +2838,7 @@ L6E20: lda path_buf,x
|
|||||||
sta path_buf0,x
|
sta path_buf0,x
|
||||||
dex
|
dex
|
||||||
bpl L6E20
|
bpl L6E20
|
||||||
addr_call adjust_filename_case, path_buf0
|
addr_call desktop_main::adjust_case, path_buf0
|
||||||
rts
|
rts
|
||||||
|
|
||||||
L6E31: ldx path_buf
|
L6E31: ldx path_buf
|
||||||
@ -2888,7 +2846,7 @@ L6E31: ldx path_buf
|
|||||||
sta path_buf1,x
|
sta path_buf1,x
|
||||||
dex
|
dex
|
||||||
bpl :-
|
bpl :-
|
||||||
addr_call adjust_filename_case, path_buf1
|
addr_call desktop_main::adjust_case, path_buf1
|
||||||
rts
|
rts
|
||||||
|
|
||||||
L6E45: lda #$00
|
L6E45: lda #$00
|
||||||
@ -2971,8 +2929,8 @@ L6EC2: lda LD920
|
|||||||
tax
|
tax
|
||||||
tya
|
tya
|
||||||
jsr L5F0D
|
jsr L5F0D
|
||||||
L6EFB: addr_call adjust_filename_case, LD3C1
|
L6EFB: addr_call desktop_main::adjust_case, LD3C1
|
||||||
addr_call adjust_filename_case, path_buf
|
addr_call desktop_main::adjust_case, path_buf
|
||||||
lda LD3C1
|
lda LD3C1
|
||||||
cmp path_buf
|
cmp path_buf
|
||||||
bne L6F26
|
bne L6F26
|
||||||
|
@ -121,9 +121,9 @@ L7137: lda common_overlay::path_buf,x
|
|||||||
sta path_buf1,x
|
sta path_buf1,x
|
||||||
dex
|
dex
|
||||||
bpl L7137
|
bpl L7137
|
||||||
addr_call common_overlay::adjust_filename_case, path_buf1 ; path_buf1
|
addr_call desktop_main::adjust_case, path_buf1
|
||||||
lda #$01
|
lda #$01
|
||||||
sta path_buf2 ; path_buf2
|
sta path_buf2
|
||||||
lda #$06
|
lda #$06
|
||||||
sta path_buf2+1
|
sta path_buf2+1
|
||||||
ldx path_buf0
|
ldx path_buf0
|
||||||
|
@ -13,7 +13,7 @@ L7000: stx L73A9
|
|||||||
jsr common_overlay::device_on_line
|
jsr common_overlay::device_on_line
|
||||||
lda path_buf0
|
lda path_buf0
|
||||||
beq L7056
|
beq L7056
|
||||||
addr_call common_overlay::adjust_filename_case, path_buf0
|
addr_call desktop_main::adjust_case, path_buf0
|
||||||
ldy path_buf0
|
ldy path_buf0
|
||||||
L7021: lda path_buf0,y
|
L7021: lda path_buf0,y
|
||||||
sta common_overlay::path_buf,y
|
sta common_overlay::path_buf,y
|
||||||
|
Loading…
Reference in New Issue
Block a user