WanneBE,
A No-Nonsense, Experimental, Better Experience


This page is about your computer!  Do you like to know how it works, then read ahead!

We will develop a 64-bit Operating System, only for testing purposes and to learn how computers work and to get an understanding in why it is so difficult to create stable working systems :).  I expect you to know assembler.  We will be using YASM (an on-NASM-based-assembler).  The source code is not 100% compatible with TASM or MASM.


Step 1 - Set up

* Setting up the test environment
* Setting up the build environment
* Testing the build and test environment

Step 2 - Creating a loader

 * Starting WanneBE from DOS
 * Starting WanneBE from a bootable floppy disk (without DOS)


We will be using bochs for testing purposes, click here to see how we will install bochs.

I'm also using CVS for this site and for the whole project!

Step 1: The BIOS gives control to the OS by booting it.

These days a BIOS can boot an OS from a floppy, a hard disc, an Iomega ZIP disc, a LS120-drive and CD-ROMS. In the old days an OS could only be booted from a floppy or from an hard disc. We will first investigate the old methods an then explore some of the newer ones.

The BIOS will load the first sector of the hard disc and/or floppy disc. The BIOS will only give control to the code on this disc if this first sector contains a special signature.  A sector is 512 bytes and the signature is 2 bytes long and is stored at bytes 510 and 511 (starting from 0).  So in order to know this we do this :

char mysector[512];
sector[510] = 0x55;
sector[511] = 0xAA;

We only need to have 512 bytes to do the initial work. This is not enough to load a modern Operating System :) So we will need to load extra start-up code but that's for later.

Reference : http://www.phoenix.com/NR/rdonlyres/56E38DE2-3E6F-4743-835F-B4A53726ABED/0/specsbbs101.pdf

Step 2: We will load our more advanced startup code.

This code will detect the kind of system we are running on and wether or not it is compatible with our OS.  We will create a 64-bit OS so we must detect that our system is 64-bit capable.