woodruffw / tum

[WIP] A tiny useless machine.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tum

Build Status

A tiny useless machine.

In progress.

Background

I deal with assembly on a daily basis, but I've never tried to develop my own ISA before (the closest I've come was a busy beaver implementation as a college freshman).

This repo is just a place for me to learn by doing. My implementations will inevitably be full of inefficiencies and design flaws, but hopefully they'll get better over time.

Design

See DESIGN.md for architecture details.

Building

tum is written in C99-compatible C and runs on POSIX systems.

To build it, just run the Makefile:

$ make

Usage

tum has two components: an assembler (tasm) and the machine itself (tmachine).

Warning: The assembler is extremely primitive -- it does just enough lifting to translate basic operations into the binary format used by tmachine. See the example/ directory for some of the things you can feed it.

Both communicate via stdin and stdout, so usage looks something like this:

$ tasm < program.s > program.bin
$ tmachine < program.bin

or more briefly and without an intermediate file:

$ tasm < program.s | tmachine

About

[WIP] A tiny useless machine.


Languages

Language:C 73.6%Language:C++ 19.2%Language:Assembly 5.3%Language:Makefile 1.9%