srevas.net | github | @ksrenev | soundcloud | contact
home | updates | recent talks | projects | notes | elsewhere | search
sitemap | bookmarks | music

Writing a multiboot PE kernel: part 2

Update [1/29/2012]: Source code now available here.

Part I is here.

While my earlier post explained the "how?", this will explain the "why?".

1
2
push ebp      ;; 55
mov  ebp, esp ;; 8B EC

which is the prolog. Because of this the multiboot header would be pushed to offset 4099 and Grub would refuse to load the kernel because the multiboot header isn't 4K longword aligned. [Updated: 10/6/2005, 12:23 PM].

Compiler switches:

Linker switches: