A set of tools for developing/testing MIMA assembler code, written in plain C.
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.
- 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
- github.com/cbdevnet/mima - mimasm and mimasim on github
- mimasm/ - The mimasm project
- mimasm/mimasm.c - main source
- mimasm/MIMA-ASSEMBLER.txt - Assembly language documentation
- mimasm/demo-sort.txt - Demonstration source sorting an array
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 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.
- 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
- github.com/cbdevnet/mima - mimasim and mimasm on github
- mimasim/ - The mimasim project
- mimasim/mimasim.c - main source
- mimasim/WORKFLOW.txt - Basic workflow information
- mimasim/SAMPLE-OUTPUT.txt - Example output of running an array sorting program
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.
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/).
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 ;)
- Sinan (claimed)
- drone| (claimed)
- Indidev (claimed)
mimasm and mimasim are distributed under the terms of the BSD 2-Clause license, see LICENSE.txt.