Seventh Day, call BIOS interrupt read floppy disk

Source: Internet
Author: User

Protection mode content too much, 1:30 will digest not finish, slowly realize clearly and then continue to write it. Read the floppy disk today--of course, call the BIOS interrupt to read it directly. is the int 013h interrupt, the direct disk service. This interrupt feature is rich, today only learn No. 02 function, is "read floppy disk".

First of all, the physical structure of the floppy disk: floppy disk, as the name implies is the storage information of the soft disc (floppy)-because it is made of plastic, of course, soft. usually a floppy disk has a magnetic sheet, both sides of the magnetic sheet coated with magnetic material, this layer of magnetic material is called the magnetic layer. The magnetic layer is the medium in which information is stored, so both sides of the floppy disk can store information.

The computer reads and writes floppy disks through floppy disk drives (floppy disk drive, short drive, FDD). The structure of the floppy drive doesn't matter, this thing is out of date. As long as the floppy disk is known to Read and write floppy disks, floppy rotation, floppy drive through a needle-like magnetic parts to the magnetic layer on the floppy disk to read and write data on the line, the magnetic layer to contact the floppy disk to read and write data parts called the head (magnetic head). Each disk face must have a head corresponding to the number of heads and the number of disks is equal, so the two sides of the floppy disk, the floppy disk drive also has two heads, respectively, read and write floppy disk front of the head 0 (H0) and read and write floppy disk Head 1 (H1).

The so-called magnetic layer storage information, plainly, is that those magnetic materials in a special way magnetized into different states. the process of storing information on a floppy disk is to convert the electrical signal into magnetic information, and then to magnetization the magnetic materials on the platter into a magnetized unit in a special way. In practical operation, the disc rotates at high speed, the head remains in one position, and the magnetic layer is magnetized, and the information is recorded on the magnetic layer. The head will draw a circular trajectory with the disc concentric on the surface of the disc, which is called track. The information on the floppy disk is stored along the track, and if the track is full, the head moves to the next position and continues to form the next track. The adjacent tracks are not next to each other, because magnetic units are too close together to interact with each other, and are also difficult to read and write for the head. So there are only 80 tracks on each platter of the 3.5-inch floppy disk.

Both sides of the floppy disk have 80 tracks each, and from the outside to the inside, numbering starting from 0, that is, the outermost edge is the No. 0 track, the most of which is the 79th track. A cylindrical face (Cylinder) consisting of two tracks of the same radius circle on both sides of the disc. The cylinder is a three-dimensional concept, the track is a plane concept, the number of cylinders and the number of tracks on either disk are equal. The outermost edge of the platter is the No. 0 cylinder (C0), and the innermost is the 79th cylinder (C79).

A circle of tracks can record a lot of information, according to the whole track to read and write, the amount of data too much. Therefore, each track is divided into 18 arc segments, which is actually an arc segment of the reading and writing information, these arcs are called sectors (Sector). Each sector can hold 512 bytes of data.

To summarize, a 3.5-inch floppy disk has 2 heads, 80 cylinders (i.e. 80 tracks), each track has 18 sectors, and each sector holds 512 bytes of data. You can figure out the capacity of a floppy disk: 2 * 80 * 18 * 512 = 1474560 bytes (byte) = 1.44 million kilobytes (KB) = 1.44 megabytes (MB).

It is also found that as long as you know the CHS parameter of the disk (that is, the cylinder cylinder, head head, Sector sector), you can determine its capacity (capacity = number of cylinders * Head number * Single track sector number * Number of bytes per sector).


Seventh Day, call BIOS interrupt read floppy disk

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.