x86 protected mode and more

This is really old stuff. I wanted to share only the pieces of code which I wrote as a practical protected mode switch howto for x86 processors but I decided to find also my attempts to write “kernel”.

It sure was fun and I shouldn't be embarrassed but somehow I am. I was young and inexperienced, but not stupid :) The first one was from 2003 too and contains a lot of crud, a lot of foreign pieces of code. Bootloader is the hardest part I really worked on, it's based on FreeDOS code. It has also suffered from partitioning accident and was mostly recovered but that was about it. I think I didn't touch the code much after recovery. Last thing I remember is that I tried to instruct CD drive to play audio CD and it worked but it might have been before recovery too.

In early 2006 I revisited the idea to make toy kernel. I worked on it for one or two weeks (after school and on weekends) and have never touched it again :) Most of the code is mine and the parts which are not are attempts to recreate libc functions and also grub's multiboot (this one does not include any custom bootloader). It's really a toy again but the shift of mindset is obvious. I have gathered a lot of relevant documentation which is not included (its over 50 MiB). Last thing I remember is playing with memory mapping and preemptive multitasking.

I used to test both on real hardware (less) and in Bochs emulator (much more).

Download:

stuff/protected_mode.txt · Last modified: 2010/08/03 06:21 by 127.0.0.1