OSDev.org

The Place to Start for Operating System Developers
It is currently Fri Mar 29, 2024 7:00 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Starting a bootloader
PostPosted: Tue Jul 22, 2014 8:56 pm 
Offline
Member
Member
User avatar

Joined: Sun Aug 25, 2013 5:47 pm
Posts: 86
Location: Nebraska, USA
I understand that as my bootloader stands right now, I am like early humans realizing that they can sharpen stones and use them as attack weapons (in other words, in comparison to most of you I am like a dog in this regard), but I still felt like sharing it. Right now it just prints a couple of messages (and unsuccessfully attempts to clear the screen; need to take another look at RBIL). But I am happy with myself :D. Link: https://github.com/scrat101/Alo-bootloader.


EDIT: Got screen clearing to finally work :).

_________________
"Procrastination is the art of keeping up with yesterday."


Top
 Profile  
 
 Post subject: Re: Starting a bootloader
PostPosted: Wed Jul 23, 2014 4:10 pm 
Offline
Member
Member
User avatar

Joined: Sun May 08, 2011 9:03 am
Posts: 56
Just one thing I noticed, it's probably a bad idea to have the stack at 0x400. The Interrupt Vector Table (IVT) is located at address 0 and is 0x400 bytes long, so pushing stuff onto the stack will overwrite it. In practice, this may not be a problem, since you'll likely only overwrite the high vectors (which probably aren't used), but it's still not good practice. What I do is place the stack at 0x7C00, directly below the bootsector.

_________________
Programmer and security enthusiast
DarkSide OS Kernel

Those who do not understand Windows NT are doomed to criticize it, poorly.


Top
 Profile  
 
 Post subject: Re: Starting a bootloader
PostPosted: Wed Jul 23, 2014 4:33 pm 
Offline
Member
Member
User avatar

Joined: Sun Aug 25, 2013 5:47 pm
Posts: 86
Location: Nebraska, USA
I set the stack segment to be 0x7C0, so the stack is right above my 512 byte bootsector, so it should be no problem. In fact, I set all my segment registers to 0x7C0 in the start initialization of my bootsector.

_________________
"Procrastination is the art of keeping up with yesterday."


Top
 Profile  
 
 Post subject: Re: Starting a bootloader
PostPosted: Wed Jul 23, 2014 7:25 pm 
Offline
Member
Member
User avatar

Joined: Sun May 08, 2011 9:03 am
Posts: 56
Ah yes, I missed that part. In most cases I see, they're set to 0 in a bootsector, which confused me.

_________________
Programmer and security enthusiast
DarkSide OS Kernel

Those who do not understand Windows NT are doomed to criticize it, poorly.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 22 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:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group