aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-02-10 22:37:16 -0800
committerH. Peter Anvin <hpa@zytor.com>2009-02-10 22:37:16 -0800
commit9485c9742fcc2c499fed98057c3ef44f67fda91b (patch)
treea0a4261bdf878888e000950583b98fa808947dfb /core
parent8814df6683dca8e6a54da61d8afd88372d99047d (diff)
downloadsyslinux-elf-9485c9742fcc2c499fed98057c3ef44f67fda91b.tar.gz
syslinux-elf-9485c9742fcc2c499fed98057c3ef44f67fda91b.tar.xz
syslinux-elf-9485c9742fcc2c499fed98057c3ef44f67fda91b.zip
ldlinux: readdir: trivial optimization
Trivially optimize the readdir code Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'core')
-rw-r--r--core/ldlinux.asm7
1 files changed, 3 insertions, 4 deletions
diff --git a/core/ldlinux.asm b/core/ldlinux.asm
index a06e727c..21a3a352 100644
--- a/core/ldlinux.asm
+++ b/core/ldlinux.asm
@@ -1446,12 +1446,11 @@ readdir:
.vfat_cp_ln: ; Copy VFAT line
dec al ; Store the next line we need
mov dx,ax ; Use DX to store the progress
- mov bx,13
- mov ah,0
- mul bl ; Offset for DI
+ mov cx,13 ; 13 characters per VFAT DIRENT
+ cbw ; AH <- 0
+ mul cl ; Offset for DI
add di,ax ; Increment DI
inc si ; Align to the real characters
- mov cx,13 ; 13 characters per VFAT DIRENT
.vfat_cp_chr:
gs lodsw ; Unicode here!!
mov bp,ds