RAM Language
A complete ecosystem for the Random Access Machine (RAM) model of computation, providing both a formally defined language and a robust emulator.
Key Features
Formal Language
A clear, consistent, and unambiguous specification for the RAM programming language.
Accurate Emulation
An emulator that faithfully executes RAM programs according to the defined semantics.
Performance
Optimized for reasonable performance to handle non-trivial programs efficiently.
Documentation
Comprehensive guides and references to help you learn and use the RAM language effectively.
RAM Language Example
Simple Addition Program
This example demonstrates a basic RAM program that adds two numbers stored in memory locations 1 and 2, then stores the result in location 3.
Learn more about syntax# Simple RAM program that adds two numbers
LOAD 1 # Load value from address 1
ADD 2 # Add value from address 2
STORE 3 # Store result in address 3
HALT # Stop executionGetting Started
Follow these steps to install and start using RAM on your system.
Installation
RAM is available as an npm package. You can install it globally using npm, yarn, or pnpm:
Using npm
npm install -g @ramlang/cliUsing yarn
yarn global add @ramlang/cliUsing pnpm
pnpm add -g @ramlang/cliUsage
After installation, you can use the ram command to run RAM programs:
Running a RAM program
ram run path/to/your/program.ramReady to get started?
Dive into the documentation to learn more about RAM language and start building your own programs.
Explore the docs