Fat12/16 problems
Re:Fat12/16 problems
what do u mean by garbage? Do u read in sector 0 index sector ok? try debugging it by printing ascii every step. That helps too
regards,
mr. xsism
regards,
mr. xsism
Re:Fat12/16 problems
With garbage I mean chars, which cannot be in the root-sir. Yes, I read in the first sector(bootsector) and calc the start of the root dir and the size. I think the start of the root dior is the problem. I get a number is this a logical sector or a normal sector just in the first track/head on the disk?
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:Fat12/16 problems
afaik. whatever sector nr you'll receive reading the FAT filesystem is a CLUSTER number. Which means you have to do
Check http://www.nondot.org/sabre/os/files/FileSystems/FatFormat.pdf in Operating System Resources Center for more infos.
Code: Select all
chs = logical2chs(reserved_sectors + cluster_nr * cluster_size)