Hi,
I've been following your OS series development.
On "Operating Systems Development - Bootloaders 4" page, under the sections "Step 2: Get start of root directory" and "Root Directory - Complete example",
you show assembly code to calculate the position, as number of sectors, of the FAT12 root directory .
In particular you do:
(number of FATs) * (number of sector per FAT) + (number of reserved sectors)
2 * 9 + 1 = 19
Shouldn't it be:
(number of FATs) * (number of sector per FAT) + (number of reserved sectors) + boot sector
2 * 9 + 1 + 1 = 20
?
Thanks
FAT12: calculating the root directory location
Moderator:Moderators
Re: FAT12: calculating the root directory location
Hi again,
I'm going to answer myself, should someone else run into the same misunderstanding.
As those first sectors are layout on the OS Development tutorial causes misunderstanding, because the reserved-sectors sector comes right after the boot sector, forcing to think is something separated and different from the boot sector.
According to Wikipedia*, the number of reserved sectors includes, by definition, the boot sector as well.
Anyway, a big thanks to Mike for his effort in making this tutorial.
* https://en.wikipedia.org/wiki/Design_of ... ile_system
I'm going to answer myself, should someone else run into the same misunderstanding.
As those first sectors are layout on the OS Development tutorial causes misunderstanding, because the reserved-sectors sector comes right after the boot sector, forcing to think is something separated and different from the boot sector.
According to Wikipedia*, the number of reserved sectors includes, by definition, the boot sector as well.
Anyway, a big thanks to Mike for his effort in making this tutorial.
* https://en.wikipedia.org/wiki/Design_of ... ile_system
Re: FAT12: calculating the root directory location
I was searching the answer for same question. Excellent answer by CodeVisio. Thank you.