From 170fa09ecc6c9c147d59516888624bf54e115450 Mon Sep 17 00:00:00 2001 From: Stephen Heumann Date: Sat, 15 Sep 2018 16:20:18 -0500 Subject: [PATCH] Search for object files under both lower- and upper-case extensions. This enables the linker to work correctly with object files with either extension case (or a mix), so it can work with objects from any of the ORCA languages even on a case-sensitive filesystem. If two object files differ only in the case of their extension, the one with the lower-case extension will be used, and the one with the upper-case extension will be ignored. --- seg.asm | 36 ++++++++++++++++++++++++++++++++---- 1 file changed, 32 insertions(+), 4 deletions(-) diff --git a/seg.asm b/seg.asm index 04abdc5..c4e49b6 100644 --- a/seg.asm +++ b/seg.asm @@ -336,7 +336,18 @@ kn1 lda #'.' iny lda suffix sta [fname],Y - dec suffix --suffix + long M + phy + ph4 fname if not exists(fname) then + jsr ExistsM + ply + tax + short M + bne kn2 + lda suffix uppercase suffix + and #$DF + sta [fname],Y +kn2 dec suffix --suffix long M sec rts @@ -1091,15 +1102,32 @@ RootName private iny iny ldx #0 + phy short M -kn1 lda root,X +rn1 lda root,X sta [fname],Y iny inx cpx #l:root - bne kn1 + bne rn1 long M - rts + ph4 fname if not exists(fname) then + jsr ExistsM + ply + tax + bne ret + short M + ldx #1 + iny +rn2 lda root,X uppercase suffix + and #$DF + sta [fname],Y + iny + inx + cpx #l:root + bne rn2 + long M +ret rts root dc c'.root' end