(This page might be a bit more readable if you enable 1st-party CSS.)
Quinix is an attempt to learn more about operating systems,
and revisit some old favorite topics like compilers and virtual machines,
via a somewhat circuitous route:
Design an instruction set for a simple 32-bit register-based RISC machine
Implement a virtual machine for this instruction set, with support for various peripherals
Write an assembler for the machine’s assembly language
Implement a compiler for a simple, higher-level language, that compiles to the assembly language
Build a simple multi-tasking operating system in this higher-level language
While Quinix is very much a work in progress, nevertheless progress has been made. So far there’s
a virtual machine (with interactive debugger), an assembler, a compiler, and a minimal runtime
including a simple list-based memory allocator.
The Quinix virtual machine and interactive debugger.
There’s also a minimal VS Code extension
implementing syntax highlighting for both the assembly language and the higher-level language.
Syntax highlighting in VS Code for QASM – the Quinix assembly language.
QLL – the Quinix low-level higher-level language.
In the interest of actually publishing something I’ve decided to continue development
of Quinix “in public”, so to speak. So follow along!
With output taken care of, one naturally turns to input.
But first, let’s take a closer look at our output peripheral, and our approach to
peripherals generally, to understand how well it will support asynchronous behaviour
like input.
We can finally get more than a single number out of our machine –
we can print (short) strings, too. But getting
strings into our machine is a pain. Let’s improve our assembler!
With an assembler in hand we can write reasonable programs
for our virtual machine. Fun! But sadly, our programs are stuck inside of our machine,
unable to do much in the way of output (and even less in the way of input). Let’s fix that!