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>
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?
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:
.restoredl:
mov dl,[bp+4]
.norestoredl: