Page 1 of 1

Disk I/O question!

Posted: Sun Jul 21, 2002 10:14 am
by cometkeeper
I can't find specific for int 13h.

I thought that if I create my filesystem all will be more easy: read/write/format etc...

But I can't find clear explanations of int 13h... And also... How many tacks in a floppy? How many heads and cylinders: are they fixed values or depend about filesystem is programmed? Things like these...

Thank you
Comet - Italy

Re:Disk I/O question!

Posted: Tue Jul 23, 2002 3:19 pm
by Peter_Vigren
cometkeeper wrote: I can't find specific for int 13h.

I thought that if I create my filesystem all will be more easy: read/write/format etc...

But I can't find clear explanations of int 13h... And also... How many tacks in a floppy? How many heads and cylinders: are they fixed values or depend about filesystem is programmed? Things like these...

Thank you
Comet - Italy
The physical format of the disk doesn't depend on the file system if that was what you asked. There are a few formats for floppies which are fixed (hard disks instead can vary alot).

The most common format of a floppy I believe is the 1.44 Mb-format which is:
18 sectors per side/head,
2 sides/heads per track/cylinder
and a total of 80 tracks/cylinders.

To read a sector you go somewhat like this:

Ah must contain 2 since that is the function number for reading.
Al is the numbers of sectors to read.
Ch contains the low bits (0:7) of the track number.
Cl contains the sector number and the high bits (8:)
Dh is the head number.
Dl contains the drive number: 0=First floppy (A:), 1=Second floppy, 80h=Drive 0, 81h=Drive 1 and so on...
Es and Bx have to point to a buffer.
And then you call interrupt 13h...

For more information I really suggest you to search for and download the program/database HelpPC.