Patches, Extensions, and Tools for MMIXware


Documentation, Sources, Binaries, Links, Examples, Contributions

Table of Content

Content

Patches, Extensions, and Tools for MMIXware

Repository

If you want the latest MMIXware, you should load the sources from https://gitlab.lrz.de/mmix/mmixware. There you can get the latest version of any source file and you can also see the differences between the revisions and the corresponding log messages.

If you are interested in historic versions, here is Version 1.0 of August 31, 2011

Patches

In this section you find improvements, that did not (or not yet) made it into the official repository. Here are the change files or patches:
  • The C23 standard compiler produces errors instead of mere warnings for several modules. For example `bool', `true', and `false' are keywords in C23; the function names `fadd', `fsub', 'fmul', and 'div' are defined in ⟨math.h⟩ and `hex_read' and `main' require correct prototypes. Here is a minimal patch file: 0001-Compile-MMIX-with-C23.patch by Andreas Scherer.

    For a more thorough revamping of the code, you are referred to Andreas Scherers repository: https://github.com/ascherer/mmix/. With these changes, the C23 compiler doesn't issue any warnings apart from 'implicit-fallthrough' situations.

  • Some Compiler (e.g. GNU C Compiler with -Wall) issue warnings about
    • if-if-else constructs that could be clarified to be if-{if-else} constructs.
    • comparisons between signed and unsigned quantities
    • printf statements that do not have a literal format string.
    • size_t (e.g. the return type of strlen) is larger than int.
    • old style functions that use char and short parameters (because the arguments might be promoted to int types).
    • missing cases in switch statements.
    • unused labels.
    These complaints are fixed by the following change files.

Extensions

In this section you find larger add-ons to MMIXware.

Tools

In this section you find stand-alone utilities that can make life easier when working with MMIX.
  • MMIX mode for Emacs

    There are two implementations available:

    • The implementation by Pieter Pareit provides font locking, indentation, autocomplete, syntax checking, display of mmix object files (mmo-files), and integrated help of instructions. It is available from github.com/ppareit/mmix-mode
    • The implementation by Lê Minh Quý provides syntax highlighting for MMIX assembly code. It is available from github.com/lemquy/mmixal-mode.

  • mms.vim A syntax file to enable syntax highlighting in Vim, the ubiquitous text editor by Thomas Murschall.

  • As a solution to The Art of Computer Programming, Fascicle 1, exercise 16, Wijtze de Boer has designed and implemented the programming language PL/MMIX based on the PL/360 language. Sources and documentation can be found at www.iclassici.nl/plmmix.

    On the same site you can also find a reimplementation of mmix-arith.w using 64-bit integer arithmentic, available now on most current processors.

  • Simple JAVA-based graphical debugger by A. Böttcher

  • Visualizing the Meta-Simulator mmmix by A. Böttcher

    This plugin for Eclipse is hosted by sourceforge.

  • zMMIX by Yizhe Chen, is another tool to produce testsuits of unit tests for MMIX sources. Its hosted on github.

  • mmix.tex by Udo Wermuth contains TeX macros that, when included in an mms file, allow the typesetting of the mms file with TeX.

    This macro package is documented (using literate programming) in the following article: Udo Wermuth, Typeset MMIX programs with TeX, TUGboat, Vol, 35, No. 3, 2014.

    Examples are the MMIX versions of programs 21 and 29 in section 1.3.2 and the programs A, B, I, and J in section 1.3.3 of "The Art of Computer Programming".

  • extext.ch by Aaron CLC Black.

    This change file can be used to allow TRAP instructions with nonzero X to be used to call external extensions. The external extension is compiled into a file named "mmix-ext#.so" in the current directory, replacing # with the value of X in use here. (For example, you can add extensions for date/time, for environment variables, for whatever.) Up to 255 such extensions can be loaded, although each extension file can have multiple functions.

Tools used for The MMIX Supplement

  • mmstotex by M. Ruckert, a tool to convert mms source files to tex files. You find more information on it on its own page with a link to its source code.

  • testgen by M. Ruckert, a tool to facilitate writing and executing test cases. The tool testgen is described on the testgen page, again with a link to its source code.

  • mmstort by M. Ruckert, a tool to extract and add up instruction counts in mms source files. You find more information on it on its own page with a link to its source code.

  • ftoo by M. Ruckert, a tool to replace floating point constant in mms source files by their hexadecimal representation. You find more information on it on its own page with a link to its source code.

  • Please help to keep this site up to date! If you want to point out important material or projects that are not listed here, if you find errors or want to suggest improvements, please send email to email