summaryrefslogtreecommitdiff
path: root/ldlinux.asm
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2007-11-14 20:51:23 -0800
committerH. Peter Anvin <hpa@zytor.com>2007-11-14 20:51:23 -0800
commit2c2fed8305e2cf52c27d8a5c1fd5b5982f541711 (patch)
treeed39fedc95bdb7f26b748ed1d1d7943465de4665 /ldlinux.asm
parentd2520f1b46d08fe2879a93c81973df67834fea17 (diff)
downloadsyslinux-2c2fed8305e2cf52c27d8a5c1fd5b5982f541711.tar.gz
Preserve ES:DI instead of probing for $PnPsyslinux-3.53-pre5
The $PnP probe has been found to lock up at least one machine for reasons unknown. Drop it; instead, burn the extra few bytes in the bootsector to save away ES:DI for later restore.
Diffstat (limited to 'ldlinux.asm')
-rw-r--r--ldlinux.asm7
1 files changed, 5 insertions, 2 deletions
diff --git a/ldlinux.asm b/ldlinux.asm
index 48c9cd0b..ff900435 100644
--- a/ldlinux.asm
+++ b/ldlinux.asm
@@ -154,7 +154,8 @@ xbs_vgatmpbuf equ 2*trackbufsize
StackBuf equ $-44-32 ; Start the stack here (grow down - 4K)
PartInfo equ StackBuf ; Saved partition table entry
FloppyTable equ PartInfo+16 ; Floppy info table (must follow PartInfo)
-OrigFDCTabPtr equ StackBuf-4 ; The high dword on the stack
+OrigFDCTabPtr equ StackBuf-8 ; The 2nd high dword on the stack
+OrigESDI equ StackBuf-4 ; The high dword on the stack
;
; Primary entry point. Tempting as though it may be, we can't put the
@@ -224,12 +225,14 @@ start:
xor ax,ax
mov ss,ax
mov sp,StackBuf ; Just below BSS
+ push es ; Save initial ES:DI -> $PnP pointer
+ push di
mov es,ax
;
; DS:SI may contain a partition table entry. Preserve it for us.
;
mov cx,8 ; Save partition info
- mov di,sp
+ mov di,PartInfo
rep movsw
mov ds,ax ; Now we can initialize DS...