Bona Fide OS Development
http://forums.osdever.net/

boot loader
http://forums.osdever.net/viewtopic.php?f=7&t=877
Page 1 of 1

Author:  losethos [ Sat Jan 08, 2011 11:53 pm ]
Post subject:  boot loader

Here's my boot loader:

http://www.losethos.com/code/BootHD.html

I didn't know there was a standard address of 0x7C00 when I wrote it, so I made it work for any load address. It copies itself up to just under 0x80000, then loads the 2nd stage to 0x10000.

Before I made a boot loader, I launched my kernel from real mode FREEDOS. It started like an application and because free dos lets you do anything, I had access to GDT and could just switch-over to protected mode. I remember it used to load it to an unusual address because it was an application.


I wrote my own assembler and didn't bother with all the 16-bit code modes that are not used in 64-bit mode. Therefore, I hand code a far jump instruction.

Author:  brenden [ Mon Mar 07, 2011 5:11 am ]
Post subject:  Re: boot loader

Love the syntax highlighting! Thanks for sharing...


PS - is your screenname a reference to Greek for God? Hehe.

Page 1 of 1 All times are UTC - 6 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/