From c6b829c3545f2e594804b4ccce4db3398d5dff08 Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Wed, 25 Jun 2008 13:50:50 -0700 Subject: ldlinux: handle "first byte E5 change to 05" rule in FAT MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit FAT has a somewhat obnoxious rule: byte E5 in the first position is encoded as 05. If it was *always* that case we could simply fold it into the codepage tables, but that rule applies only to the first character. Note that in the common codepages (incl. 437), E5 is lower-case sigma (σ), which we currently upper case to upper case sigma (Σ, E4) preventing a match -- which DOS *doesn't* do (it thinks of the Greek characters as symbols, not subject to case distinctions.) Putting that special case in the codepage-generation scripts seems too ugly, though. --- core/ldlinux.asm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/ldlinux.asm b/core/ldlinux.asm index 5a205c07..9cf1c03d 100644 --- a/core/ldlinux.asm +++ b/core/ldlinux.asm @@ -1394,7 +1394,11 @@ mangle_dos_name: cmp al,'.' ; Period -> space-fill je .is_period xlatb ; Convert to upper case - stosb + mov ah,cl ; If the first byte (only!)... + cmp ax,0BE5h ; ... equals E5 hex ... + jne .charok + mov al,05h ; ... change it to 05 hex +.charok: stosb loop .loop ; Don't continue if too long ; Find the end for the benefit of longname search .find_end: -- cgit v1.2.1