User Tools

Site Tools


start

This is an old revision of the document!


In the beginning...

So, I got the idea to write a kernel. You know… Just to see if I could do it. Like me, you may have started reading stuff on the Internet to see what to do and what to learn and so on and so forth. I found lots of stuff to learn and to set up. Sifting through the myriad of ways to do it, this is how I progress through it. You may find many answers to your own roadblocks here.

What I knew from the start

I do know how real mode works (and why).
I've done a lot of C++ programming on Windows.
I've done exstensive C programming for microcontrollers.
I've done a lot of assembler for other architectures than x86.

Where to start

Decide upon your work environment. This will be the basis for your toolchain. I have Windows 10 running the Linux bash environment. This gives me good tools from both these environments. Also, you don't have to kill your Windows gaming computer if you do this.

When can you start

You need assembler basics and an understanding of what the x86 does to it. Also, an understanding of x86 memory aliasing will help in debugging.
The big issue is that you need build tools that does not consider user space. We're writing kernel, after all. User space is based on the kernel - which you will write.

First code

The assembler NASM will take you far in the beginning. It will create raw binary x86 code regardless of user space.
You can think of kernel as the code that talks to the hardware, and “user space” as the code that talks to the kernel.
At this point in the process, user space hasn't been created yet. We're in “real mode”, and no user space exists.

start.1488486533.txt.gz · Last modified: 2017/03/02 20:28 by admin