Hi Glenn, Hi all,

On Thu, 19 Dec 2002 13:07:58 -0400, Glenn McCorkle wrote:

> Have a look at the part of the SRC code for wwwman.exe
> which then reads the info from there.

> ---- drvtypes.cpp attached ---

The problem is with INT 25h called when checking for Stacker;
Win95 set SI to 0, so the stack pointer gets corrupted (MOV SP, SI).
Then anything may happen, because CPU just jumps to a random address.

>From Ralf Brown's Interrupt List:

--------D-25----CXFFFF-----------------------
INT 25 - DOS 3.31+ - ABSOLUTE DISK READ (32M-2047M hard-disk partition)
        CX = FFFFh
        AL = drive number (0=A, 1=B, etc)
        DS:BX -> disk read packet (see #02548)
Return: CF clear if successful
        CF set on error
            AH = status (see #02547)
            AL = error code (same as passed to INT 24 in DI)
            AX = 0207h for FAT32 drive -- use INT 21/AX=7305h
        may destroy all other registers except segment registers; Win9X always
          sets SI to 0000h due to an apparent coding bug
Notes:  partition is potentially >32M (and requires this form of the call) if
          bit 1 of the device attribute word in the device driver is set
        original flags are left on stack, and must be removed by caller
        this call bypasses the DOS filesystem
        for FAT32 drives (which may be up to 2TB in size), use INT 21/AX=7305h
SeeAlso: INT 13/AH=02h,INT 25,INT 26/CX=FFFFh,INT 21/AX=7305h

Format of disk read packet:
Offset  Size    Description     (Table 02548)
 00h    DWORD   sector number
 04h    WORD    number of sectors to read
 06h    DWORD   transfer address
SeeAlso: #02552
---------------------------------------------


The simplest workaround is to remove the Stacker check at all.
Or to add some code to preserve registers while calling INT 25h.
And don't use SI to remember SP, just pop the flags after INT 25h.

Merry Christmas to all list members!

Michal

Reply via email to