A tiny useless machine.
In progress.
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.
See DESIGN.md for architecture details.
tum is written in C99-compatible C and runs on POSIX systems.
To build it, just run the Makefile:
$ make
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