Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/woodruffw/tum
[WIP] A tiny useless machine.
https://github.com/woodruffw/tum
assembler isa machine
Last synced: 2 days ago
JSON representation
[WIP] A tiny useless machine.
- Host: GitHub
- URL: https://github.com/woodruffw/tum
- Owner: woodruffw
- Created: 2018-10-16T00:02:02.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-01-09T02:08:58.000Z (almost 5 years ago)
- Last Synced: 2024-12-19T10:17:32.361Z (3 days ago)
- Topics: assembler, isa, machine
- Language: C
- Size: 26.4 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
tum
===[![Build Status](https://img.shields.io/github/workflow/status/woodruffw/tum/CI/master)](https://github.com/woodruffw/tum/actions?query=workflow%3ACI)
A **t**iny **u**seless **m**achine.
*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](https://en.wikipedia.org/wiki/Busy_beaver)
[implementation](https://github.com/woodruffw/busybeaver) 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](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:
```sh
$ 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/](example/) directory
for some of the things you can feed it.Both communicate via `stdin` and `stdout`, so usage looks something like this:
```sh
$ tasm < program.s > program.bin
$ tmachine < program.bin
```or more briefly and without an intermediate file:
```sh
$ tasm < program.s | tmachine
```