read boot sector of floppy

C 16Bit (MS-DOS) Add comments

This program is no longer used cause no body uses a floppy… i have to update it to a 32bit program from 16bit… and manipulating a USB will be nice instead of a floppy.

This program displays the boot sector of a floppy drive. The biosdisk function can be used to manipulate a FAT32 hard drive even now. Manipulating a FAT16 and FAT12 are straight forward using absolute disk read and absolute disk write functions provided in Borland’s Turbo C IDE.

I am trying to write a program which will help me play with FAT32 in windows… using WIN32 API…

anyway here is one silly program for the strong hearts…

		char jump[3];
		char si[8];//system id
		int bps;// no of bytes per sector
		char spc;// no of sectors per cluster
		int res;// no of reserved area
		char cof;// no of copies of fat
		int rde;//no of root directory entries
		int tos;// total no of sectors
		char md;// media discriptor
		int spf;// no of sectors per fat
		int spt;// no of sectors per track
		int sides;// no of sides
		int hs;// no of hidden sectors
		char rest[482];
	void display_bootsector();
void main()
void display_bootsector()
	printf("\nJump Instruction\t\t%s",zero.jump);[8]=0;
	printf("\nSystem Id\t\t%s",;
	printf("\nBytes per sector\t%d",zero.bps);
	printf("\nSectors per cluster\t%d",zero.spc);
	printf("\nCopies of fat\t\t%d",zero.cof);
	printf("\nRoot directory entries\t%d",zero.rde);
	printf("\nTotal no of sectors\t%d",zero.tos);
	printf("\nMedia discriptor\t%0x",;
	printf("\nSectors per fat\t\t%d",zero.spf);
	printf("\nSectors per track\t%d",zero.spt);
	printf("\nNo of sides\t\t%d",zero.sides);
	printf("\nNo of hidden sectors\t%d",zero.hs);

Leave a Reply

Entries RSS