Starting a bootloader

This forums is for OS project announcements including project openings, new releases, update notices, test requests, and job openings (both paying and volunteer).
Post Reply
User avatar
ScropTheOSAdventurer
Member
Member
Posts: 86
Joined: Sun Aug 25, 2013 5:47 pm
Location: Nebraska, USA

Starting a bootloader

Post by ScropTheOSAdventurer »

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."
User avatar
Marionumber1
Member
Member
Posts: 56
Joined: Sun May 08, 2011 9:03 am

Re: Starting a bootloader

Post by Marionumber1 »

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.
User avatar
ScropTheOSAdventurer
Member
Member
Posts: 86
Joined: Sun Aug 25, 2013 5:47 pm
Location: Nebraska, USA

Re: Starting a bootloader

Post by ScropTheOSAdventurer »

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."
User avatar
Marionumber1
Member
Member
Posts: 56
Joined: Sun May 08, 2011 9:03 am

Re: Starting a bootloader

Post by Marionumber1 »

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