Implementation 0 – Languages and tools

Here begin the code thing : writing large amounts of code, in order to have actual software based on the preceding work to toy with. Before we start, let’s explain which tools we’ll use, and which material we’ll start with.


The main programming language in use will be C++. It is chosen because

  • It is fast and does not include unnecessary and unpredictable bloat in the code like garbage collection mechanisms
  • It works on all common hardware and has got a myriad of tools to work with
  • There’s a lot of freely available C++ code to check on the internet. Moreover, it is compatible with C, and C is the language used for most system programming today
  • It is object-oriented, and hence allows for easy code re-usability and improvement. It also favors a clean design
  • One can easily put assembly code in it for hardware-dependent features.


Main programming tools will be gcc/gas/g++, GNU ld, and maybe GNU make, in the beginning at least. I have no special interest in them, but most code on the internet uses them for UNIX legacy and power reasons, so it’s a wiser choice in terms of usability and developer compatibility ;) Moreover, I work on linux, where only g++ is easily available and not linked to a specific architecture.

For testing purposes, we’ll begin with Bochs x86_64 emulation, as it offers an internal debugger of lifesaving quality and prefers high-quality emulation over performance tweaks. Then, as the system gets more mature, testing in QEMU (less debug features but more powerful virtual hardware and performance closer to the actual hardware), then usual virtual machines like VirtualBox/VMware, may be envisioned, in order to look for potential hardware issues not emulated by Bochs and port the code base to more hardware. Once we’ve reached a goal of zero warnings from the virtual machine and are able to run a complete test suite without a single glitch, we may start to make it run on actual hardware and begin work on higher-level parts of the OS.

2 thoughts on “Implementation 0 – Languages and tools

  1. Amenel May 31, 2010 / 1:35 pm

    You wrote “then usual virtual machines like VirtualBox/VMware, may be envisioned, in order to look for potential hardware issues not emulated by Bochs”.
    Don’t virtual machines (I only know and use VirtualBox) abstract the physical hardware by presenting a “lowest common denominator”?

  2. Hadrien May 31, 2010 / 4:03 pm

    Yeah, but each one emulates a different lowest common denominator ^^ If you look at VirtualBox’s VM settings, it may emulate various sound cards and network cards. Those will be probably different from the ones emulated by QEMU, Bochs, and VMware, because there’s no standard hardware in that area, just some hardware that was fairly common at a given time. Contrast with, as an example, video cards, which all provide a common software interface through the VESA standard. In that case, all VMs will emulate the standard behavior, and the emulated hardware will hence work the same way.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s