Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
mrkaktus wrote:It contains 32bit processor detection, 3 methods of RAM detection (E820, E801, 88), part that loads the Kernel and PM initialisation . I just put GDT section as a block of mem that is loaded like a kernel from floppy to specified memory adress ). Now I will work with that A20 gate.
It might be a dumb question, by why limit yourself to 512 bytes?
For example, the boot sector code could start by loading another 3 sectors at 0x7E00, and then you could have a 2 KB boot loader written as a single binary.
Cheers,
Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
- Because I want to show that it is possible.
- Because I don't like RM mode and working with Seg:Off
- I want to be in PM as quick as possible
- I want to have as simple and small code as I can write
(better, smaller code = more of code on disk )
you don't need to worry about Seg:off much in RMode usually i say -- be compatable, my boot is fully FAT12 complient (unlike GRUB and lilo which only pretend to be)
My earlier bootl also supports FAT12 but code that was loaded works in some case weard and I have never discover what was wrong ;/. So I write the new one .
The principle here is simple, if the OS doesn't even write anything on the screen, then you're not using a 386...If something appears on the screen (Usually saying "Booting AdamOS...") then you have a 386! I figure that 386 compatable processors are so commonplace nowadays that it isn't worth writing heaps of code to test whether the processor is really a 386.
Two things are infinite: The universe and human stupidity. But I'm not quite sure about the universe.
--- Albert Einstein
doesn't require "heaps" of code its really quite small, but even MS 1.44MB boot sector simply assumes a 386 (and very few earlier CPUs will have a 1.44FDD anyway)
but then your code crashes without explaination on earlier CPUs
if your going to "test" like this then you don't need to test at all -- just use it and the "test" will crash the CPU on the first 32bit override