Summary
This paper gives the realization of the floppy disk image generation tool, and uses it to make a floppy disk image by compiling the generated boot file, and writes the floppy disk to achieve a simple operating system boot.
Keywords floppy disk mirroring tool operating system boot.
In order to understand the internal principle of 80x86 computer, several small programs are written by reference to other people's programs. But the tool that generates the floppy disk image is mostly the DOS version, so I want to use VC also to realize one, and to write their own boot program to the floppy disk to verify.
1, the basic principle of the mirror tool
The mirroring tool reads the files on the disk, then installs a certain format to generate the floppy disk image file, and finally writes the floppy image to the floppy disk in 512-byte sectors.
2, mirror tool interface design and function introduction
Figure 1 Main interface
2.1 "Feature 1" generates a floppy disk image file
(1) to generate a mirrored file, you need to first select the source file, and then click "Generate ...", such as Mydiskimg.img, and click "Save" to generate the mirrored file.
Figure 2 Generating a mirrored file
(2) Then insert a floppy disk, click on the Write floppy disk, select just generated mirror files. Click "Open" and the system begins to write the selected mirrored file to the floppy disk.
Figure 3 Writing a mirrored file to a floppy disk
(3) Restart the computer and choose to boot from the floppy disk to see if the operation was successful.