develop an operating system
How to develop an operating system using C++

I found a topic on the cplusplus website where they talk about loader.o in the compile but where do I get it from?

the bootloader
a bootloader is a bunch of code that is written in assembly language and must be 512 byets(1 sector)
it load's your operating system's kernel
we skip this section and use grub as are bootloader
you can download grub source code from
Last edited on
If you're interested in OS development, have a look at minux and xinu. Both come with complete source code:
Files that end with .o are object files. They are like tiny, incomplete libraries that are meant to be combined to build a much larger program.

Looking at the tutorial that you mentioned, it looks like they forgot to add a description of "loader.h" and its definition "loader.cpp" (Edit: actually Kigar points out above where they say they use grub instead, so they might have forgotten to remove it from the compile line: You might have success just by removing loader.o from the compile command.)
It is unfortunate that doesn't accept new articles and probably has blocked changes to old ones. As it stands, with all the typos and missing information, it is not a tutorial that I would suggest following.

I'd suggest getting started by going to and find the "bare bones" tutorial link. That is the "Hello World" of OS Dev.
Be ready to open a hundred tabs as you go further down the rabbit hole of OS development.

The problem that you will eventually run into is that there are no rails, no solid road-map to follow. did an amazing job in the number of resources that are available on that site and they do a lot of hand-holding in the early tutorials, but eventually you are just left to your own devices. All the information is made available, but developing an OS is like being a cartographer with a blank piece of paper. There are a thousand different forks in the road pulling at your attention, and you need to travel each one since you are the person building the map.

The worst experience I had was that following one of the necessary steps for jumping to 64 bit mode: it would break the screen output of the kernel. Stuff had to be done without the ability to write to the screen in order to test the mid-way results. Only after everything in that section was completed correctly would the kernel be able to communicate again. That was a horrifying feeling. (It would not have been a problem if I had developed backup debugging methods such as error logs and/or serial IO beforehand)

Also - be aware of infinite loops while developing, they spin up your CPU to 100% and could overheat your system if it does not have adequate ventilation. (Don't leave it on overnight by accident). The halt (Assembly: hlt) command inside of an infinite loop is a better option when you hit a stopping point in the kernel and just need to pause.
Last edited on
From the osdev site above, for OS I can recommend the books by Tanenbaum (not to be confused with Tenenbaum - Data Structures). Tanenbaum was the original author of the Minix OS which is described in his book 'Operating Systems - Design and Implementation'.

Also note that the book "Design Patterns: Elements of Reusable Object-Oriented Software" is often referred to as the 'GoF' book (Gang of Four) as it has 4 authors!

I remember the euphoria I felt when I get my first OS to self-boot from a hard-disk for the first time (way back in the late 1970s)!
Last edited on
Registered users can post here. Sign in or register to post.