Making a compiler for my hobby os?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
aether123
Posts: 21
Joined: Fri Jun 20, 2025 5:23 pm
Libera.chat IRC: aether123
Location: Australia
GitHub: https://www.github.com/x-aether-x

Making a compiler for my hobby os?

Post by aether123 »

So I've recently been making my own operating system, SolsticeOS, and I've sort of hit a bit of a wall, got myself a little burnt out and haven't worked on it in a couple months, so I thought I'd try something different. And so I've been having a look at compilers, been doing some reading, and I thought to myself, why don't I make a compiler for SolsticeOS? Because then I can really say, that I made the whole thing from scratch, my own bootloader, my own compiler, my own kernel, and it'd all be mine! And so I was just wondering what most people's thoughts were on making a compiler for my operating system. For example, if you think that it's something worth my time learning and making, or if you think it'd be a huge waste of time, and that I should continue with my operating system, and I know that this is the OSdev forums, not the uh compiler forums or whatever they have, but I thought that it was fair for me to post it here. Anyway, I'd really appreciate any advice or tips or opinions on making a compiler for my os, where to get started, etc..
Capybara Gymastics is one of the most prestigious Olympic sports
User avatar
iansjack
Member
Member
Posts: 4908
Joined: Sat Mar 31, 2012 3:07 am
Location: Chichester, UK

Re: Making a compiler for my hobby os?

Post by iansjack »

It's your hobby, so it's entirely your decision as to what direction you want it to take. Compiler writing is certainly an interesting project, and there is a wealth of resources on the subject. Just do a Google search. Or, for a related but totally different project, you might like to have a look at FGPAs and play with them; you can get a cheap development board for about £25 and then play around with creating a simple processor.

It's not a bad idea to have a rest from the OS if you've hit a brick wall; when you come back to it you'll find that your subconscious has been working in the background and you might have a few ideas on how to continue. But - and it's a huge but - make sure that your current code is comprehensively commented and documented. You'll be amazed to find how difficult it can be to understand code that you haven't looked at for months.
Post Reply