diff options
author | H. Peter Anvin <hpa@zytor.com> | 2009-02-10 22:39:52 -0800 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2009-02-10 22:39:52 -0800 |
commit | 6174d35033800faa87c208683d26d3a2e1ae5156 (patch) | |
tree | f6ff4f663821944493780225abf04880f499e6d9 /core/ldlinux.asm | |
parent | 9485c9742fcc2c499fed98057c3ef44f67fda91b (diff) | |
download | syslinux-6174d35033800faa87c208683d26d3a2e1ae5156.tar.gz |
ldlinux: move es manipulation into ucs2_to_cp
If currently the only caller of ucs2_to_cp wants to use ES, we might
as well move the ES set/restore into ucs2_to_cp.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'core/ldlinux.asm')
-rw-r--r-- | core/ldlinux.asm | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/core/ldlinux.asm b/core/ldlinux.asm index 21a3a352..da1ddde2 100644 --- a/core/ldlinux.asm +++ b/core/ldlinux.asm @@ -1237,17 +1237,19 @@ codepage_end equ $ ; Output: Single byte character in AL, ZF = 1 ; On failure, returns ZF = 0 ; -; Assumes CS == ES == 0. -; ucs2_to_cp: + push es push di push cx + push cs + pop es mov di,cp_unicode mov cx,512 repne scasw xchg ax,cx pop cx pop di + pop es not ax ; Doesn't change the flags! ret @@ -1453,11 +1455,7 @@ readdir: inc si ; Align to the real characters .vfat_cp_chr: gs lodsw ; Unicode here!! - mov bp,ds - mov es,bp call ucs2_to_cp ; Convert to local codepage - mov bp,fs - mov es,bp jnz .vfat_abort ; Use short name if character not on codepage stosb ; CAN NOT OVERRIDE es cmp al,0 |