Everyone should write an operating system once

phlash909 profile image Phil Ashby ・1 min read

The saying goes: Try everything once except incest and folk dancing, which for me at the tender age of 25 included attempting to write my own x86 kernel, bootloader and a few hardware drivers. Yeah I was and still am slightly mad.

This self-education / masochism ate up many evenings and weekends from 1992-95 then languished on a backup tape for 25 years, until today. Be nice to me :)


For anyone interested in following a similar path, I now recommend the OSDev Wiki, which would have really helped back in the day of almost no Internet!


markdown guide

If I took on the project of building an OS I'd get a lot less fresh air and exercise, which is already lacking.

It's an appealing proposition in a bad way for me 😋


You have already created a system called "DEV". And, now you are operating it. Operating System. 😎


Yeah, I was young and had no idea how much time I was committing to this. At the time I also had a Netware server under my bed for storage and two young children, with another four yet to arrive... at least having the server under the bed meant I couldn't work late, my wife insisted it was turned off at her bedtime (and rightly so!)


I find it's often the case these days that I want to do something with a given tool, so I look up how to do that thing. I get the answer, and I can move on. Often I don't really understand why the specific syntax is the way it is, but if it works, that's all I need most of the time. I think in those days, that presented a huge difficulty, because you had to actually parse the documentation to figure out how to do the thing! I imagine a lot of the time, if someone could have told you, "oh, here's the format/syntax/structure you need," it would have been a lot less painful! I'm guessing a bit less fun if you're already the type inclined to that sort of thing though! :D


I'm definitely the sort of person that cannot use 'magic solutions', I need to know how stuff works, which is a curse in some ways as it can tarpit my progress on things, but I have coping mechanisms (like pomodoro) that can limit this effect, the upside is I'm a mine of useless technical trivia :D


I think these days we have to limit ourselves to define an interface between our work and some external system - I mean that in a very general way, e.g. the system could be a piece of math or science, not necessarily a computer API. I generally try to understand the principles behind things to the extent that I can, but there is just too much stuff out there, so I believe it's simply necessary nowadays to make a decision about how important it is know a given tool or concept in more depth...


I have already done this. I think about 15 years ago.
A time without youtube and only a few resources in the internet.
I also would recommend it. You can learn so much.



Nice - all in assembly too by the look of it!


Yes most parts. I started with assembler and later I tried a bit c code. :-)


What an incredible project. I do kinda dream of doing this someday. But I think if I were going to undertake something like this I might prefer to try making a programming language :D Not sure which is harder, but both sound monumental and fun.


When I designed my first computer in 8-9th grade (8085 based system with a huge 32 MB ram! Okay, I’m showing my age), I wrote the OS for it based on a TIL core. It worked okay until a voltage spike burned out the wire-wrapping in collage (I then learned about voltage regulators and why they are needful). Learning is about the “hard knocks”! An OS has lot’s of them!


Yeah, we should develop an operating system once in our career. A software is a collection of codes but an OS is a collection of softwares.


And then work on a language! Either interpreter or complier. Both teach a lot of software practices that are very useful.


In this case, it's only a kernel & bootloader, but there were intentions to go wider - I have enormous respect for people who get to a shippable, useful system (such as Beos, Plan9, Oberon).


I would like to mention
An OS built entirely in C++, by now focused on cloud computing and bootable in virtual machines. A very nice and promising project.


Ah, nice! A unikernel (aka library OS), which is pretty much what I was creating, inspired by things like VxWorks and FreeRTOS. There are mixed opinions on such things, I found this article well balanced:



Ahh... The power of youth with enough energy and to dare start from zero...

A modern version of your code, to mad guys, is Bare metal 64.
Pure X64 assembly, bootable in hardware, sized in kbs, and yet understandable.


This is what I call "Mad Science".


I've never quite gone that far, but I've written display drivers in the past for languages I was using that lacked support for some graphics modes


It's a slippery slope - I started with writing games.. a gateway drug to bare metal coding :D


I'm not sure what my parents knew what to think when I asked Santa for this for Christmas...

EGA/VGA A Programmers Refernce Guide


What do you think of the series made by Philip Oppermann?



I had a quick look last year, probably time to have another read, it's looking good at a glance!


I am going to try this very soon, thanks (I think I just heard my old raspi scream)


Saw the fork - have fun!