Bona Fide OS Developer
View unanswered posts | View active topics It is currently Tue Mar 19, 2024 3:43 am



Post new topic Reply to topic  [ 2 posts ] 
 boot loader 
Author Message

Joined: Fri Aug 20, 2010 10:04 pm
Posts: 41
Post 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.


Sat Jan 08, 2011 11:53 pm
Profile
Site Admin

Joined: Fri Jul 24, 2009 10:02 pm
Posts: 247
Location: Las Vegas, NV, US
Post Re: boot loader
Love the syntax highlighting! Thanks for sharing...


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


Mon Mar 07, 2011 5:11 am
Profile
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by Vjacheslav Trushkin and tweaked by the BF Team.