A stack (ram) based language written in rust

Related tags

Emulators ram
Overview

The Ram programming language

A stack based programming language created to experiment my crappy lang-dev only capable of making some mathematical formulation. Written in the rust programming language.

How to run

  1. Download the release binary.
  2. Make it executable using chmod +x ./ram
  3. Make a .ram file with the following contents at the same directory as the binary:
ram 500
ram 200
add
print
  1. run ./ram and enter the file name eg. example.ram at the prompt.
  2. Die

More documentation

print - prints the last number in the stack
printc >> <characters> - prints chars
ram <number>  - pushes a number on the stack
pop - removes the last number added to the stack
popall - removes all the numbers from the stack
add - adds last two numbers pushed on the stack and pushes to stack
sub - subtracts the last number from the number added prior to it and pushes to stack
mul - subtracts the last number from the number added prior to it and pushes to stack
div - the number added prior to the last number / last number and pushes to stack
sqr - squares the last number and pushes to stack
squrt - square roots the last number and pushes to stack
rand >> <num1, num2> - generates a random float specified in the range and pushes it to stack 
round - rounds the last number pushed in the stack to decimals and pushes it to stack
avg - takes out average of all the numbers in the stack (remember to run popall before it) and pushes to stack
jmp <index> - jumps to the codeblock at the index position
cmp - pushes -1, 0, 1 to the stack if the last two numbers are smaller, equal or greater than each other. [Important before jne and je commands]
jne <index> - jumps to a block by its index position if the previous cmp statement is not 0 [equal]
je <index> - jumps to a block by its index position if the previous cmp statement is 0 [equal]
jgr <index> - jumps to a block by its index position if the prev cmp statement is 1 [greater]
jsm <index> - jumps to a block by its index position if the prev cmp statement is -1 [smaller]
You might also like...
NES emulator written in Rust

sprocketnes is an emulator for the Nintendo Entertainment System written in the Rust programming language. Its purpose is to serve as a technology dem

ZX Spectrum emulator written in Rust
ZX Spectrum emulator written in Rust

rustzx ZX Spectrum emulator which I writing in rust. I develop this project just for fun and for learning the basics of computer architecture. License

CHIP-8 emulator written in Rust
CHIP-8 emulator written in Rust

CHIP-8 emulator written in Rust. This is intended to be a project for gaining experience writing emulators and practice Rust.

A 6502 emulator written in Rust.

v6502 This package contains an emulator for the 6502 microprocessor. It doesn't support binary decimal (BCD) mode yet. To run the debug version: cargo

Spaghetti Chip8 Emulator Written In Rust

How to run? Command is simple: cargo run FILENAME. files are stored in the /c8games folder, use one of them. Example: cargo run INVADERS Keymap use 1

Non cycle-accurate emulator of the 6502 cpu, written in pure rust

CPU 6502 A non cycle-accurate emulator implementing all legal 6502 opcodes. What does non cycle-accurate mean? Every instruction on the 6502 takes a n

Experimental Nintendo Switch Emulator written in Rust

Kaminari Experimental Nintendo Switch Emulator written in Rust Usage You'll need to install Rust. rusc = 1.55.0 rustup = 1.24.3 Disclaimer Kaminari

A barely functional terminal emulator written in Rust. For nothing but fun.

Nothing much to say now. The basic architecture (kind of) so far is: ┌────────┐ ┌──────────────────┐ │ ptm │◀──────▶│ device::Shell │ └─┬

A Chip8 Emulator written in Rust

Chipper: Chipper is a Chip8 Emulator written in Rust. It currently supports a few known quirks of the Chip8 varieties. I intend on making it support t

Comments
Releases(v3.0)
Owner
Ujjwal Kumar
Computer Programmer | Reverse Engineer. Founder @hackarmour, @kekwLabs
Ujjwal Kumar
Nes-emulator - A NES emulator made to learn the Rust programming language

nes-emulator Building $ rustc --version rustc 1.32.0 (9fda7c223 2019-01-16) $ cargo --version cargo 1.32.0 (8610973aa 2019-01-02) $ cargo build --rel

Michael Burge 225 Dec 23, 2022
Site frequency spectrum estimation based on window expectation-maximisation algorithm

winsfs winsfs is a tool for inference of the site frequency spectrum ("SFS"). Quickstart Assuming SAF files have already been made, default estimation

Malthe Sebro Rasmussen 8 Nov 1, 2022
The Resurgence VM, a register virtual machine designed for simplicity and ease of use, based on the old Rendor VM

Resurgence Join the Discord server! Resurgence aims to be an embeddable virtual machine with an easy-to-use API for projects like: Game engines Langua

null 12 Dec 5, 2022
An RP2040-based ROM emulator

PicoROM PicoROM is an 8-bit ROM emulator in a DIP-32 compatible form factor. It's main use case (the reason I made it) is for rapid iteration when exp

Martin Donlon 42 Jul 12, 2023
NES emulator written in Rust to learn Rust

OxideNES A NES emulator in Rust. CPU should be accurate, PPU is mostly accurate, timing between the 2 is off for some corner cases and hardware qui

null 37 Nov 7, 2022
Chip8 emulator written in pure rust, using rust-sdl2 for graphics

Rust-8 chip8 emulator written in rust, using rust-sdl2 for graphics. Features Fully implemented all 35 original chip8 opcodes. This emulator does NOT

Chris Hinson 7 Dec 28, 2022
Commodore 64 emulator written in Rust

Rust64 - a C64 emulator written in Rust This is my attempt to study the Rust programming language and have fun at the same time. The goal is to presen

Krzysztof Kondrak 214 Dec 27, 2022
A Flash Player emulator written in Rust

website | demo | nightly builds | wiki Ruffle Ruffle is an Adobe Flash Player emulator written in the Rust programming language. Ruffle targets both t

Ruffle 11.2k Jan 8, 2023
A Game Boy research project and emulator written in Rust

Mooneye GB Mooneye GB is a Game Boy research project and emulator written in Rust. The main goals of this project are accuracy and documentation. Some

Joonas Javanainen 802 Dec 28, 2022
An NES emulator written in Rust

Pinky Pinky is an NES emulator written in Rust completely from scratch based only on publicly available documentation. You can run it in your Web brow

Koute 709 Dec 23, 2022