An RSSB VM and assembler in C
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Makefile
README.md
helloworld.rssb
rssb.c

README.md

rssb

An RSSB assembler and VM in C

This is my first successful attempt at writing an assembler. It uses Edward Dijkstra's Shunting Yard Algorithm. It targets the rssb one instruction computer.

Partial EBNF grammar:

line := [label] ["rssb" expression] [";" comment] "\n"

expression := label
            | number
            | "(" expression ")"
            | "-" expression
            | expression "+" expression
            | expression "-" expression
            | expression "*" expression
            | expression "/" expression

Specify an assembly file as the first command-line argument. Example: rssb helloworld.rssb

There are probably many fun bugs that will manifest themselves if you feed the assembler invalid source.