Programming Guid


Author     : Adham Helal
Doc by     : Adham Helal
Revision  : 1.1
Prog lang : ASM
Pref-Com : NASM
last update: 07-07-02

    This is The Primary Stage Boot loader. It's job is to load other loaders. The ploader is loaded by the bios, The ploader can load up to 3 OS max. This restriction will be broken as soon as i cut the size of code. (as you know we are stuck with 446 bytes only and not 512). Another restriction this loader will not work unless loaded from hard drive. I will also try to add floppy support.
Currently The ploader will only load an OS if it is installed on a primary partion i will give it more time then add the logical partion support.

The file ploader.s has all the configuration you need. If you want to add new OS to your ploader list you would change the fowllowing

    %define OS1_PART    FIRST_PART
    %define OS3_PART    FIRST_PART+(PART_DES_SIZE*2)

As you can see OS1 points to the First Partion and OS2 points to the second partion and  OS3 points to the Third. if you want OS4 to point to the fourth partion you would write.


    %define OS3_PART    FIRST_PART+(PART_DES_SIZE*3)
REMMBER You can only load the four primary partion.

So by typing the partion where your OS stands. And chaning the label  (don't remove  "$")
 msg_os1        db "1: Linux$"

Code outlook:
1- Setup a stack
2- Prints info on screen
3- Relocate itself into another segment
4- initliaze Disk
5- Takes input from user
6- Loads sloader
7- Checks to see if valid boot signture
8- jumps to new loader
    The reson why ploader relocates itself to another segment becuase ploader wants to load the sloader in the same place where the bios loaded ploader.

Depands on:
 1- ploader.s

This file is Used By: