[Coco] Re: Disk Basic and 512 byte block floppies.

Amardeep S Chana vxlzneo02 at sneakemail.com
Thu Jan 22 14:22:19 EST 2004


"John E. Malmberg" <wb8tyw at qsl.net> wrote in message
news:bunjsf$tfi$1 at sea.gmane.org...
> >
> > It would be great if you could look in the Symantec docs and post some
> > details about the call.  If there is such a function I'll gladly eat my
> > words!  But I'll remain skeptical until I can identify an int/fcn around
> > which code can be written to validate the capability.
>
> _bios_disk(_DISK_READ, &diskinfo), as used below.
>

Hi, John.  I can now see how we differ on our positions about the disk API
issue.  I will concede that there is a way of making MS-DOS (or more
precisely the PC BIOS) read and write sector sizes other than 512 bytes.  I
cannot concede that there is an official API method for doing it because
_bios_disk() does not have any parameters that specify sector size.

In the code you posted, the Disk Base Table (which is distinct from the BIOS
Parameter Block and the Drive Parameter Block I referred to in another post)
is directly modified in memory by the user program.  The Disk Base Table is
a data structure of the BIOS disk driver implementation and is opaque;  i.e.
not accessible via a published system call.

The implication of modifying an opaque data structure is that future
versions of an implementation don't have to honor that method of accessing
those parameters.  If there had been a BIOS or MS-DOS call that set sector
size, it would still be available in any modern version of Windows because
they support BIOS and MS-DOS system call compatibility.  _bios_disk() is
still a valid call under NT, 2000, and XP but it doesn't actually use the
BIOS to do the I/O (it uses the kernel mode diskette driver) so changing the
table pointed to by vector 0x1E has no effect.

Regards,
Amardeep






More information about the Coco mailing list