MIninmal MAchine Assembler and Simulator
C HTML Makefile
Latest commit de85a7f Nov 28, 2016 @cbdevnet Fix DMC compilation

README.md

MIMA Toolchain

A set of tools for developing/testing MIMA assembler code, written in plain C.

mimasm

mimasm transforms assembly instructions into an intermediate representation (memory map). This memory map can then be viewed and experimented with, or it can be fed to mimasim for execution.

Features

  • Cross-platform, builds on Windows, Linux and BSD
  • Supports complete instruction set
  • Keeps labels in memory map for runtime resolving
  • Outputs intermediate format accepted by multiple interpreters

Download & Resources

CAVEAT: Label declarations must be followed by a colon (:), which is frequently omitted from worksheets but mentioned and used in advanced material as well as the non-authoritative MIMA-ASSEMBLER.txt supplied with mimasim.

mimasim

mimasim allows you to execute a memory map generated by mimasm (or written by yourself), either in a single run or interactively. It supports the full MIMA instruction set, as well as adding support for breakpoints, runtime label resolution and interactive memory inspection.

Features

  • Cross-platform, builds on Windows, Linux and BSD
  • Supports complete instruction set
  • Easy-to-understand and useful input file format (memory map)
  • Useful (optional) output file format
  • Interactive execution, including memory inspection
  • Breakpoint functionality for debugging complex programs
  • Run-time label resolution
  • Arbitrary program entry point
  • Arbitrary run-time step limit

Download & Resources

Building

The toolchain was successfully compiled on the following systems

  • Linux (Debian, Arch Linux, Ubuntu)
  • BSD (FreeBSD, OpenBSD)
  • Windows (XP, 7)

using the following compilers

  • tcc (Linux, Windows)
  • gcc (Linux, BSD)
  • clang (BSD)
  • dmc (Windows)

Running make in the respective subfolders on a system with at least one of these compilers (and some form of make) installed should result in a successful build.

About the MIMA

The MIMA is a greatly simplified example of a microcomputer (hence the name, MInimal MAchine), used for demonstration and educational purposes in lectures at the KIT. The original work in developing the MIMA and its instruction set has been done by Prof. T. Asfour (http://ti.ira.uka.de/).

Badges, etc

Coverity Scan Build Status

Bug Bounty

The first 10 people to report a critical (as in, crashes on execution or missing/erroneous/broken functionality), not yet submitted/known bug or fix a listed known bug in the latest releases of either mimasim or mimasm are eligible, upon disclosure of said bug/fix to cb@cbcdn.com, to receive a bottle of Club Mate (in Person, in Karlsruhe, at the KIT, in the FSMI) from me ;)

People yet eligible:

  • Sinan (claimed)
  • drone| (claimed)
  • Indidev (claimed)

License & Copying

mimasm and mimasim are distributed under the terms of the BSD 2-Clause license, see LICENSE.txt.