Erik Rospo Erik Rospo

RospOS

RospOS is an ISA, VM, and an operating system I designed over the course of a semester. It is a custom instruction set architecture (ISA) that I created, along with a virtual machine (VM) that can execute programs written in that ISA. The operating system was extremely basic. I was unable to get to the point of implementing a full filesystem or shell.

Links:

Despite that, it was one of my largest and most interesting projects I’ve worked on. It was a great learning experience that allowed me to deepen my understanding of computer architecture, operating systems, and low-level programming. It was the first real project I’d written in C++. I had some exposure to C++ through hacking various open source projects, but this was the first time I had written a large project from scratch in C++. I also learned a lot about Makefiles through this project, which was a new topic for me at the time. I orchestrated the entire build process using Makefiles, which allowed me to manage the compilation of the various components of RospOS and ensure that everything was built correctly.

Running it in the browser

Here’s a demo of the RospOS running in the browser, using WebAssembly. The fact that this even works is pretty cool to me, and it was a fun challenge to get the VM running in the browser. I had to make some modifications to the VM to get it working in a WebAssembly environment, but it was worth it to be able to share RospOS with others in a more accessible way. You can try it out for yourself by clicking the “Run” button below. If you’re up for a challenge, you can also get the source code and try running it locally on your machine. The GitHub repository linked below contains all the source code for RospOS, along with instructions on how to build and run it.

Just as a heads up, not everything is fully implemented in the demo. The VM is fully functional, but the operating system is not complete. The demo is meant to showcase the capabilities of the VM and the ISA, rather than being a fully functional operating system. You can still run some simple programs in the demo, but you won’t be able to do much beyond that.

Also, keep in mind that the full VM and Qt debugger is a full VM and Qt debugger running in the browser. Performance is not as good as native execution.

I was also able to compile the full RospOS debugger that I use to WebAssembly, so you can see it working here. The display may be a bit small depending on how large your browser is, but you can resize the panes to show it larger. The debugger is a full-featured debugger that allows you to step through code, set breakpoints, and inspect memory and registers.

Where Mini-8 left off

RospOS was inspired by the Mini-8 (ISA), which is a miniature 8-bit computer that I designed for educational purposes. The ideas behind Mini-8 were transformed into RospOS, which has a vastly more capable ISA that would actually allow for the development of a filesystem or shell. Both projects were great learning experiences and allowed me to explore the fundamentals of computing and gain hands-on experience with a “real” computer architecture. I also got to learn about how to design a virtual machine, an assembler, and a C compiler, which were all new topics for me at the time.

The longer version

You can read more about RospOS in the report I wrote for the project, which goes into much more detail about the design and implementation of the ISA, VM, and operating system. The report also includes some example programs that demonstrate the capabilities of RospOS. For the initial design, see the ISA document, which outlines the instruction set architecture and the design decisions I made when creating RospOS. The instruction encoding can be found in the associated document, which provides a detailed breakdown of how instructions are encoded in RospOS.