Parse, then execute
The interpreter strips comments, finds labels, then decodes each line into one of the 3-address formats and executes it against 16 registers, two flags and memory.
There's quiet music on this site. It stays off unless you choose it, and it keeps playing as you move between pages.
A single-file C program that reads SimpleRISC assembly and runs it: registers, flags, memory, branches and calls. Below, the same C code runs in your browser.
The interpreter strips comments, finds labels, then decodes each line into one of the 3-address formats and executes it against 16 registers, two flags and memory.
A typo stops the program with the exact line that failed, not a crash. Try the “oops” program below.
Custom .print and .encode macros show register values and the binary encoding of an instruction.
I put it behind a small HTTP API on an AWS EC2 instance. It reads and writes program files in S3 through an IAM role, with no keys in the code.
It's already calculating factorial(6) below. Pick another program, or wipe it and write any SimpleRISC code you like, then hit Run.
