summaryrefslogtreecommitdiff
path: root/ldlinux.asm
diff options
context:
space:
mode:
authorhpa <hpa>2002-10-25 06:47:20 +0000
committerhpa <hpa>2002-10-25 06:47:20 +0000
commitf805675eef4b2119d252465a211b643f79d17c7e (patch)
treef9fb4f2b050fda09e4587d955fee6c57c7987930 /ldlinux.asm
parentf4d22c42e89a52644c9453e246a20749d62470af (diff)
downloadsyslinux-f805675eef4b2119d252465a211b643f79d17c7e.tar.gz
LDLINUX: Fix "kaboom" bug when booting off hard disksyslinux-2.00-pre15
Provide an API call for "perform final cleanup"
Diffstat (limited to 'ldlinux.asm')
-rw-r--r--ldlinux.asm10
1 files changed, 8 insertions, 2 deletions
diff --git a/ldlinux.asm b/ldlinux.asm
index 73803308..6de92f1e 100644
--- a/ldlinux.asm
+++ b/ldlinux.asm
@@ -294,8 +294,6 @@ start:
mov ds,ax ; Now we can initialize DS...
mov [di+bsDriveNumber-FloppyTable],dl
- and dl,dl ; If floppy disk (00-7F), assume no
- js harddisk ; partition table
;
; Now sautee the BIOS floppy info block to that it will support decent-
; size transfers; the floppy block is 11 bytes and is stored in the
@@ -308,6 +306,14 @@ start:
lfs si,[bx] ; FS:SI -> original fdctab
push fs ; Save on stack in case we need to bail
push si
+
+ ; Save the old fdctab even if hard disk so the stack layout
+ ; is the same. The instructions above do not change the flags
+ and dl,dl ; If floppy disk (00-7F), assume no
+ ; partition table
+ js harddisk
+
+floppy:
mov cl,6 ; 12 bytes (CX == 0)
; es:di -> FloppyTable already
; This should be safe to do now, interrupts are off...