Skip to content

A simple interpreter for the mathematical random-access machine

Notifications You must be signed in to change notification settings

shilangyu/ram-runner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Random-access machine runner

A simple Rust RAM program runner.

  • Lexer/Parser
  • Program executor
  • Code formatter

Web

Compiled to WASM to run in the browser. Features a simple textarea for code and UI for interacting with the program executor. Live at https://github.shilangyu.dev/ram-runner.

A RAM program reversing the string in register RX

CLI

Once compiled run against a file containing RAM code and some initial registers. Output will show the final state of all non-empty registers. Example:

$ cargo build --release
$ ./target/release/ram rev.ram RX=1011100010101
RX: 1010100011101