Building a Mythological Programming Language Compiler For an x86 CPU (NASM) — Part I — Hades

An Educational Passion Project to Understand The Complexities of Building a Compiler to NASM For a Custom Language

Adrian Nenu 😺
4 min readNov 9

--

To kick off this series, we will discuss what a compiler is and what the general structure of a compiler looks like. We will implement throughout the series a fairly basic compiler for a new programming language, following the classic skeleton of a compiler. The immediate goal is to create a compilable language in which one can solve a couple of basic LeetCode problems and even allow for some scripting-level programs.

To make it more exotic and interesting, I will be blending technology with mythology by naming everything in the language with a Hades theme (God of the Underworld).

This follows a current trend I’ve been on with articles such as The Code Purgatorio: Ascension to Clean Code and Plato’s Republic Of Software Engineering: A Philosophical Perspective.

Hades Compiler — As interpreted by Midjourney

If you like this content, please consider clapping, following and subscribing to my newsletter.

Compilers

They are marvels of software engineering. People have done amazing things with technology even before compilers allowed for much more high-level programming and lowered the barrier of entry.

If you are as old as me, you have perhaps played the good old RollerCoaster Tycoon game, the creator of which wrote it entirely in assembly by hand! You can find a super cool open-sourced version here, called OpenRCT2.

They

Why Yet Another Compiler

Primarily for my learning, and to hopefully leave a path others can follow for a fun approach to understanding compilers more in-depth and not taking high-level programming languages for granted.

Why Hades?

--

--

Adrian Nenu 😺

Software Engineer @ Google. Photographer and writer on engineering, personal reflection, and creativity - nenuadrian.com.