FAT32 Structure
Posted: Sun May 08, 2005 11:00 pm
Is it possible to define a C structure which contains all fields of
a FAT32 Structure and use it directly to read & write the first
sector of the BootSector?
When I tried it, the memory allocated to structure fields were adjusted
by the compiler. What i mean is:-
struct x
{
char a[3];
char b[8];
unsigned short c;
};
here, after 'b' 1 byte of extra memory is allocated so that
'c' starts at 12th byte offset (assuming 0 based mem index) rather than
3 + 8 = 11byte offset.
Why is this? What's the solution?
a FAT32 Structure and use it directly to read & write the first
sector of the BootSector?
When I tried it, the memory allocated to structure fields were adjusted
by the compiler. What i mean is:-
struct x
{
char a[3];
char b[8];
unsigned short c;
};
here, after 'b' 1 byte of extra memory is allocated so that
'c' starts at 12th byte offset (assuming 0 based mem index) rather than
3 + 8 = 11byte offset.
Why is this? What's the solution?