Help with FAT12 bootloader
Help with FAT12 bootloader
I've been searching all over the Internet and found several examples of FAT12 boot loaders, but when I've written my own, nothing works. I've compared each function and BPB space and everything checks out, but alas it fails to boot. Please help
- Attachments
-
- boot.asm
- bootloader
- (3.97 KiB) Downloaded 80 times
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: Help with FAT12 bootloader
I count 10 bytes to the start of the actual BPB data, where I expect 11.
Re: Help with FAT12 bootloader
Thank you for responding. You said you counted 10 bytes to the bpb when it should have been 11. Would this actually affect the boot process if still jumps to the beginning of the boot code?
- Combuster
- Member
- Posts: 9301
- Joined: Wed Oct 18, 2006 3:45 am
- Libera.chat IRC: [com]buster
- Location: On the balcony, where I can actually keep 1½m distance
- Contact:
Re: Help with FAT12 bootloader
It means you either don't have a valid FAT filesystem and that disk image utilities can't read it, or they override your bad attempt at a filesystem which means your code looks for data in the wrong places.
In any case, it isn't a FAT12 bootloader anymore.
In any case, it isn't a FAT12 bootloader anymore.
Re: Help with FAT12 bootloader
I made sure it was valid by testing in Windows by putting files on it, taking them off, etc. and everything worked. The tool I used was called 'BOOTABLE.EXE' and it came with MiniDOS from Dex4u. It stated that everything was in order. Is my code itself fine?
Re: Help with FAT12 bootloader
You're not setting up DI or the loop counter for the root directory search routine. Therefore your bootloader is not searching the root directory, but rather a completely different location in memory, which generates an error because the file is not found.
Adding this before the searching routine should fix the problem you've been having.
Hope I helped. - U238
Code: Select all
mov CX, word[maxrootentries]
mov DI, 0x0200
Hope I helped. - U238
Re: Help with FAT12 bootloader
thanks, I'll be sure to try it