Little Man Plus

Little Man Plus

5 devlogs
18h 44m
Created by Azyrite

Rust-based implementation of a Little Man Computer with more memory, a sleek terminal user interface and an expanded instruction set.

Timeline

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.

Update attachment

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.

Update attachment

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.

Update attachment

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.

Update attachment
Azyrite
Azyrite
14h 33m 5 days ago

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).

Update attachment