Date: Sun, 1 Mar 1998 13:38:58 +0200 (IST) From: Eli Zaretskii To: "Nicos P. Skouras" cc: djgpp AT delorie DOT com Subject: Re: bios_disk and Win32 In-Reply-To: <34F87665.7503@bugsy.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Sat, 28 Feb 1998, Nicos P. Skouras wrote: > Under DOS & Win16 the function bios_disk can be used to directly > access individual sectors on a floppy disk. > Is there a Win32 equivalent mechanism? Are you talking about a program compiled with DJGPP which you run from Windows 95 DOS box? If so, you need to know that Windows requires the volume to be locked before it will allow direct disk access to it. I'm not aware about any problems accessing floppies for reading, but if your problems are with writing, maybe you need to lock the drive. There is a DOS function (see an excerpt from the Interrupt List below) to do that. --------D-21440DCX084A----------------------- INT 21 - MS-DOS 7.0 - GENERIC IOCTL - LOCK LOGICAL VOLUME AX = 440Dh CX = 084Ah (category code 08h, minor code 4Ah) BL = drive number (00h=default,01h=A:,etc) BH = lock level (00h-04h) DX = drive permissions (see #1262) for Level 1 lock or second Level 0 lock when formatting Return: CF set on error AX = error code (01h,02h,etc.) (see #1366 at AH=59h/BX=0000h) CF clear if successful Notes: the logical volume must be locked before direct disk accesses are permitted by Windows95 the commandline LOCK issues a level 4 lock SeeAlso: AX=440Dh"DOS 3.2+",AX=440Dh/CX=084Bh,AX=440Dh/CX=086Ah SeeAlso: AX=440Dh/CX=086Ch Bitfields for drive permissions: Bit(s) Description (Table 1262) 0 allow writes 1 disallow new file mappings 2 volume locked for formatting --------D-21440DCX084B-----------------------