Confusion about media descripter byte in OEM block

If you are new to development, plan on spending some time here before visiting the other forums.

Moderator:Moderators

Post Reply
brainbarshan
Posts:9
Joined:Fri Feb 19, 2010 12:58 pm
Confusion about media descripter byte in OEM block

Post by brainbarshan » Sat Feb 20, 2010 2:58 pm

In tutorial 5 (Bootloaders 3) of operating system developement series :
The Media Descriptor Byte (bpbMedia) is a byte code that contains information about the disk. This byte is a Bit Pattern:
Bits 0: Sides/Heads = 0 if it is single sided, 1 if its double sided
Bits 1: Size = 0 if it has 9 sectors per FAT, 1 if it has 8.
Bits 2: Density = 0 if it has 80 tracks, 1 if it is 40 tracks.
Bits 3: Type = 0 if its a fixed disk (Such as hard drive), 1 if removable (Such as floppy drive)
Bits 4 to 7 are unused, and always 1.
so for floppy disk we have to set 11111000 = 0xF8, because 3rd bit to be set is 1 ( for floppy drive , as mentioned)

but the 3rd bit has been set 0 and so the byte is set 0xF0.
which one is correct?

User avatar
Mike
Site Admin
Posts:465
Joined:Sat Oct 20, 2007 7:58 pm
Contact:

Re: Confusion about media descripter byte in OEM block

Post by Mike » Thu Mar 11, 2010 7:50 pm

Hello,

I apologize for the late reply. We need to verify the information in that table is correct. For 1.44 MB (and 2.88 MB) media the media descriptor byte should be 0xf0 not 0xf8.
Lead Programmer for BrokenThorn Entertainment, Co.
Website: http://www.brokenthorn.com
Email: webmaster@brokenthorn.com

Post Reply