summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorShao Miller <shao.miller@yrdsb.edu.on.ca>2009-11-19 20:20:33 -0500
committerH. Peter Anvin <hpa@zytor.com>2009-11-19 17:54:56 -0800
commita59acfdc096be06d1319ee4010eea8abc7b9824e (patch)
treebb4647b3ae1ccbfd8ea2f5d6ea073df4ee88798a
parentd16e510b31b54969d384b70f2ec83a24dae0b448 (diff)
downloadsyslinux-3.84-pre4.tar.gz
memdisk: Restore DL for INT 13h, AH=15h, DL=floppysyslinux-3.84-pre4
At least PC-DOS requires this to avoid an infinite loop; the DL we restore is not the same DL that we call the underlying BIOS with, but rather the original one (before the decrement.) PC-DOS loops over all the floppies and relies on the call preserving DL in order to advance the loop. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r--memdisk/memdisk.inc4
1 files changed, 3 insertions, 1 deletions
diff --git a/memdisk/memdisk.inc b/memdisk/memdisk.inc
index 98ad52b7..a37218b5 100644
--- a/memdisk/memdisk.inc
+++ b/memdisk/memdisk.inc
@@ -174,7 +174,9 @@ Int13Start:
cmp byte [cs:SavedAX+1],08h ; Get drive params function?
je .norestoredl ; DL = number of drives
cmp byte [cs:SavedAX+1],15h ; Get disk type function?
- je .norestoredl ; CX:DX = size of device
+ jne .restoredl
+ test byte [bp+4],80h ; Hard disk?
+ jnz .norestoredl ; CX:DX = size of device
.restoredl:
mov dl,[bp+4]
.norestoredl: