This is my problem. I have made my bootloader to be in FAT12. I want to put the kernel in the root of a:\ (a:\kernel.bin) so if you look for exampel in windows explorer and under a:\ you would see kernel.bin. Now i want in the booloader to load the kernel (a:\kernel.bin) from there. How can this be done?
My own attemps has resulted in tripple faults when jmp to the kernel...
/Svempa
Loading kernel from a:\ (in FAT12)
Re:Loading kernel from a:\ (in FAT12)
Look at the file bootr01.zip:
http://www.mega-tokyo.com/os/os-faq-bsm ... oot_sector
http://www.mega-tokyo.com/os/os-faq-bsm ... oot_sector
Re:Loading kernel from a:\ (in FAT12)
see :
http://boost.zaphebergeur.net/indexo.php
Download these files (srcs and binaries, with a program to load the boot sector):
http://boost.zaphebergeur.net/archives/BoOSt-0.2.1Pre2-20021123-linux.tar.gz
http://boost.zaphebergeur.net/archives/BoOSt-0.1.0-20020718-DOS.zip
http://boost.zaphebergeur.net/indexo.php
Download these files (srcs and binaries, with a program to load the boot sector):
http://boost.zaphebergeur.net/archives/BoOSt-0.2.1Pre2-20021123-linux.tar.gz
http://boost.zaphebergeur.net/archives/BoOSt-0.1.0-20020718-DOS.zip
Re:Loading kernel from a:\ (in FAT12)
I'm thinking of doing something like that for FritzOS possibly...
But...
John Fine's web page has example(s) for that.
But...
John Fine's web page has example(s) for that.
Re:Loading kernel from a:\ (in FAT12)
i dont under stand what the nop command dose in that example... any knows what it dose?
Re:Loading kernel from a:\ (in FAT12)
Specification of fat12 requires that there be a 3 byte operation before the BIOS Parameter Block (The BIOS here is misleading, BIOS doesn't need/want/require this table to load the disk. It's an MS invention) the short jump counts as 2 bytes, the nop counts as 1 byte. If you're wondering why then take a look at the BPB itself. Without this odd numbered size of instructions the most commonly used word sized information would lie on an odd boundary, meaning 2 memory accesses to read the word.
The NOP instruction itself means...*Drumroll*...no operation ;D. IE it is ignored by the processor, useful for spacing things properly.
Curufir
The NOP instruction itself means...*Drumroll*...no operation ;D. IE it is ignored by the processor, useful for spacing things properly.
Curufir
Re:Loading kernel from a:\ (in FAT12)
I think you do not have to add this at top of your program but the real important thing is reading the fat. You have to do several calculations and find the name of file in root, and then find first cluster of file in fat and then read clusters from file and then load it into memory and then jump to it. Very easy!!! So I think you do not have to worry about BPB but rather you have to take care of reading the disk and then getting file place and etc...