First, analyze the number of bytes occupied by the following 1.44 MB Floppy disk image. The data I found is 1474560. However, I still don't understand how this is calculated? If anyone knows, please advise. In fact, a floppy image is a 1.44 MB file. As long as you have a way to generate a 1.44 MB file. Then a floppy disk image is complete. Understand the principles. Next, let's implement it.
Method 1: C Language
# Include <stdio. h>
Int main ()
{
Long I;
For (I = 0; I <1474560; I ++)
Printf ("0 ");
Return 0;
}
Save the above program as disk. C. (Note: take the file name as needed .)
Compile it. This should not be a problem... A compilation method is provided.
If you have a GCC compiler, You can compile it like this: GCC disk. C-o disk.exe
Run the command line cmd to perform the following operations:
Disk.exe> fkix. img
The preparation of the floppy disk is complete. The following is a demonstration of my actual operations on my machine.
:/Documents ents and settings/Administrator> GCC disk. C-o disk. e
:/Documents ents and settings/Administrator> dir disk.exe
Volume in drive C is WINXP
Volume serial number is 0c65-8236
Directory of C:/Documents ents and settings/Administrator
010-04-30 15,663 disk.exe
1 file (s) 15,663 bytes
0 Dir (s) 3,743,170,560 bytes free
:/Documents and Settings/Administrator> disk.exe> fkix. img
:/Documents and Settings/Administrator> dir fkix. img
Volume in drive C is WINXP
Volume serial number is 0c65-8236
Directory of C:/Documents ents and settings/Administrator
010-04-30 1,474,560 fkix. img
1 file (s) 1,474,560 bytes
0 Dir (s) 3,741,696,000 bytes free
:/Documents and Settings/Administrator>