diff options
author | hpa <hpa> | 2002-06-01 07:50:30 +0000 |
---|---|---|
committer | hpa <hpa> | 2002-06-01 07:50:30 +0000 |
commit | 3c05323825dc8d503f2c4cd3f8b68392114a8498 (patch) | |
tree | 58a4b941f27cf31c8c8a76bf16157e2a85b65bf4 | |
parent | 8df193569eae949a35d6acee2942f4ff6c7e5b5a (diff) | |
download | syslinux-3c05323825dc8d503f2c4cd3f8b68392114a8498.tar.gz |
Fix egg-on-face bug (accessing several word variables as dword)
-rw-r--r-- | NEWS | 4 | ||||
-rw-r--r-- | ldlinux.asm | 17 | ||||
-rw-r--r-- | version | 2 |
3 files changed, 14 insertions, 9 deletions
@@ -1,6 +1,10 @@ Starting with 1.47, changes marked with SYSLINUX/PXELINUX/ISOLINUX apply to that specific program only; other changes apply to both. +Changes in 1.74: + * SYSLINUX: fix bug that would cause valid kernel images to be + labelled "invalid". + Changes in 1.73: * Work on removing gratuitous differences between modules. * Break up the source in common and module-specific files. diff --git a/ldlinux.asm b/ldlinux.asm index 2a93985a..ad82045b 100644 --- a/ldlinux.asm +++ b/ldlinux.asm @@ -126,6 +126,8 @@ HighMemSize resd 1 ; End of memory pointer (bytes) RamdiskMax resd 1 ; Highest address for a ramdisk KernelSize resd 1 ; Size of kernel (bytes) SavedSSSP resd 1 ; Our SS:SP while running a COMBOOT image +ClustPerMoby resd 1 ; Clusters per 64K +ClustSize resd 1 ; Bytes/cluster KernelName resb 12 ; Mangled name for kernel ; (note the spare byte after!) RootDir equ $ ; Location of root directory @@ -142,7 +144,6 @@ DirScanCtr resw 1 ; Used while searching directory DirBlocksLeft resw 1 ; Ditto EndofDirSec resw 1 ; = trackbuf+bsBytesPerSec-31 RunLinClust resw 1 ; Cluster # for LDLINUX.SYS -ClustSize resw 1 ; Bytes/cluster SecPerClust resw 1 ; Same as bsSecPerClust, but a word NextCluster resw 1 ; Pointer to "nextcluster" routine BufSafe resw 1 ; Clusters we can load into trackbuf @@ -150,7 +151,6 @@ BufSafeSec resw 1 ; = how many sectors? BufSafeBytes resw 1 ; = how many bytes? EndOfGetCBuf resw 1 ; = getcbuf+BufSafeBytes KernelClust resw 1 ; Kernel size in clusters -ClustPerMoby resw 1 ; Clusters per 64K FClust resw 1 ; Number of clusters in open/getc file FNextClust resw 1 ; Pointer to next cluster in d:o FPtr resw 1 ; Pointer to next char in buffer @@ -680,12 +680,12 @@ fat_load_done: ; mov di,[bsBytesPerSec] ; Used a lot below - mov al,[bsSecPerClust] ; We do this in the boot - xor ah,ah ; sector, too, but there + movzx eax,byte [bsSecPerClust] ; We do this in the boot + ; sector, too, but there mov [SecPerClust],ax ; wasn't space to save it mov si,ax ; Also used a lot... mul di - mov [ClustSize],ax ; Bytes/cluster + mov [ClustSize],eax ; Bytes/cluster mov bx,ax mov ax,trackbufsize xor dx,dx @@ -957,10 +957,11 @@ all_read: ; ; Compute some parameters that depend on cluster size ; - mov dx,1 - xor ax,ax + xor eax,eax + cwd ; DX <- 0 + inc dx ; DX:AX <- 64K div word [ClustSize] - mov [ClustPerMoby],ax ; Clusters/64K + mov [ClustPerMoby],eax ; Clusters/64K ; ; Now we're all set to start with our *real* business. First load the @@ -1 +1 @@ -1.73 +1.74 |