Rust-based implementation of a Little Man Computer with more memory, a sleek terminal user interface and an expanded instruction set. Get the latest release at https://github.com/azyritedev/littlemanplus/releases/latest
No followers yet
Once you ship this you can't edit the description of the project, but you'll be able to add more devlogs and re-ship it as you add new features!
Working on a major overhaul of the program right now. Currently, the entire program including input handling, drawing to the terminal and running the VM happens on one thread which tends to lock up the program if the VM behaves weirdly, and consumes a lot of CPU time even when nothing is happening due to the main thread constantly polling for input. These changes aren't fully complete yet but when they are there should be a significant improvement in performance when idle.
Improved error handling in the program. When the provided program fails to compile for any reason, a helpful error message is shown which replaces the generic compilation failure popup.
Expanded popup size to fit more text, so now there is a welcome popup! It just has a brief description of the program right now.
Improved inputs with validation, so panics should be avoided. Also, I have replaced the default program with a bubble sort algorithm that takes 10 user inputs and sorts them.
After much debugging, I finally got inputs working, although I couldn't make the Modal struct as general as I'd like it to be.
Now programs that have an INP instruction will show a popup asking the user to input an integer which will be checked and passed to the program.
Popups now show for errors. Currently the only error which will show a popup is a compiler error, although the message isn't very detailed at the moment; I plan to address both of these issues later on.
Also there is now an empty configuration column on the right of the screen which I plan to fill in later as well.
Added a memory display column, which shows a partial (not scrollable, yet) view of the program's memory and highlights the memory address being accessed currently when the VM is running.
Also added a blank configuration column to be filled in later, and added methods to load text into the program area potentially allowing programs to be loaded from files in the future.
Forgot to add this project! Anyways here's a quick rundown:
I've speedran building a Little Man Computer emulator in Rust - basically a really small virtual machine that takes in some basic assembly-like instructions, compiles and runs them. It is a very simplified system and has one input and one output, and only handles 64-bit integers. Coupled with a terminal user interface, it's a really good learning tool to understand how CPUs function at a basic level and can even do more complex things (e.g. bubble sort).
Currently, it is still missing a memory display and user input (all inputs default to 10).