Another Floppy disk problem
Another Floppy disk problem
So, for the exo-kernel, there will be absolutely no FS ( at kernel level). So how can I read data on disk? I need to read sector 2 to parse data, then load next n sectors. Assume that we are working on a floppy disk, all of the data are written continuously at disk create/format time and apps don't have access rights to overwrite it.
EDIT: Oh, I forgot that we also assume that we're working in Realmode.
EDIT: Oh, I forgot that we also assume that we're working in Realmode.
"Programmers are tools for converting caffeine into code."
- mathematician
- Member
- Posts: 437
- Joined: Fri Dec 15, 2006 5:26 pm
- Location: Church Stretton Uk
Re: Another Floppy disk problem
Where's the problem? In real mode the BIOS can read absolute disk sectors. (int 13h, ah=2)
The continuous image of a connected set is connected.
Re: Another Floppy disk problem
Make the bootloader load the data by using the BIOS.
Re: Another Floppy disk problem
Yeah I know. But do I need BPB?
"Programmers are tools for converting caffeine into code."
Re: Another Floppy disk problem
If there is no FS, then why do you need bpb?So, for the exo-kernel, there will be absolutely no FS ( at kernel level).
Re: Another Floppy disk problem
Ok. Thank you. Mod, lock this please.
"Programmers are tools for converting caffeine into code."
- Troy Martin
- Member
- Posts: 1686
- Joined: Fri Apr 18, 2008 4:40 pm
- Location: Langley, Vancouver, BC, Canada
- Contact:
Re: Another Floppy disk problem
I don't think you entirely understand what a BPB is. It's part of the floppy's first sector and exclusive to FAT volumes. It's not something you drop into a kernel or its drivers. Sure, you can write a struct that lets you access the BPB's values, but you don't hardcode the BPB's values into the kernel.
Re: Another Floppy disk problem
I know. But BPB is not just exclusive to FAT volumes, but also FAT32, NTFS and maybe others. Anyway, I don't need it.
"Programmers are tools for converting caffeine into code."
- Troy Martin
- Member
- Posts: 1686
- Joined: Fri Apr 18, 2008 4:40 pm
- Location: Langley, Vancouver, BC, Canada
- Contact:
Re: Another Floppy disk problem
FAT32 is FAT....
NTFS uses a way different BPB than FAT does, take a peek here: http://www.geocities.com/thestarman3/asm/mbr/NTFSBR.htm. It's also based on the FAT BPB but it adds more and fills up a bunch of bytes with nulls or seemingly random numbers.
Apparently HPFS also uses the BPB (probably in a similar manner as NTFS does), but I'll have to research it.
NTFS uses a way different BPB than FAT does, take a peek here: http://www.geocities.com/thestarman3/asm/mbr/NTFSBR.htm. It's also based on the FAT BPB but it adds more and fills up a bunch of bytes with nulls or seemingly random numbers.
Apparently HPFS also uses the BPB (probably in a similar manner as NTFS does), but I'll have to research it.
-
- Member
- Posts: 2566
- Joined: Sun Jan 14, 2007 9:15 pm
- Libera.chat IRC: miselin
- Location: Sydney, Australia (I come from a land down under!)
- Contact:
Re: Another Floppy disk problem
No, FAT is often used to refer to FAT16/FAT12 (depending on the medium), while FAT32 is used to refer to... FAT32.Troy Martin wrote:FAT32 is FAT....
I imagine that this concept is what quanganht was using in his post.
Re: Another Floppy disk problem
Troy is still technically correct... I personally refer to FAT as a generalization for all FAT filesystems, which technically includes FAT32.pcmattman wrote:No, FAT is often used to refer to FAT16/FAT12 (depending on the medium), while FAT32 is used to refer to... FAT32.Troy Martin wrote:FAT32 is FAT....
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
-
- Member
- Posts: 2566
- Joined: Sun Jan 14, 2007 9:15 pm
- Libera.chat IRC: miselin
- Location: Sydney, Australia (I come from a land down under!)
- Contact:
Re: Another Floppy disk problem
Sorry, I meant that they're still FAT, but FAT without the numerics is often used when talking about FAT12/FAT16, while FAT32 is always used for FAT32 volumes. The easiest way to see this different naming is when formatting disks in Windows
EDIT: The only reason I brought this up was because of the ambiguity in "FAT and FAT32" in the post in question.
EDIT: The only reason I brought this up was because of the ambiguity in "FAT and FAT32" in the post in question.
Re: Another Floppy disk problem
Right, good point there. Troy is still technically correct but I cannot answer why they do that in Windows (and alot of other sources.)pcmattman wrote:The easiest way to see this different naming is when formatting disks in Windows
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
- Troy Martin
- Member
- Posts: 1686
- Joined: Fri Apr 18, 2008 4:40 pm
- Location: Langley, Vancouver, BC, Canada
- Contact:
Re: Another Floppy disk problem
The last time I used FAT16 was when I had a copy of Windows 95 OEM. No OSRs.