Skip to content

woodruffw/tum

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors