The Loader

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.
Post Reply
Ben

The Loader

Post by Ben »

Hello,
I've found this site through luck. Anyway
wonderful explaination about C-asm connection.
But is any way to learn how the loader works?

Second thing is that the loader seems to be
larger than 512 bytes, is it legal though? Or
is the loader just have to manually load the
parts after 512 bytes?
Chase

RE:The Loader

Post by Chase »

>On 2001-02-07 18:34:05, Ben wrote:
>Hello,
> I've found this site through luck. Anyway
>wonderful explaination about C-asm connection.
>But is any way to learn how the loader works?

Did you notice the last sentence contains a link to
the source code? Hopefully within the next month or 2
I'll make a tutorial on second stage bootloaders.

The loader basically has DOS read a 64k chuck of the
kernel and then starts PMode and copies that chuck
upto the first meg of memory. Then repeats until the
entire kernel is read and then calls the fully loaded
kernel.

> Second thing is that the loader seems to be
>larger than 512 bytes, is it legal though? Or
>is the loader just have to manually load the
>parts after 512 bytes?

Yes it's legal because it's nothing more than a
standard DOS app (well maybe not that standard),
so DOS handles loading the entire file. The 512
limit really only comes into play when creating
boot sectors and second stage loaders. I'm working
on the Boot Sector tutorial as we speak, so it
should be up in the next two weeks.
Post Reply