The MMIX Supplement The results of the MMIXmasters did appear as a book:
The MMIX Supplement
The book is available from Amazon or other bookstores.
There is a separate page devoted to this book.
The mission is, however, not yet completed! Please analyze, check, test, review, or improve the code you find there to help getting it in its final shape!
A big "Thank You!" goes to all that contributed so far.
Welcome to the MMIXmasters
MMIX, the CPU, and its associated assembly language was created by Donald Knuth to specify algorithms in the next edition of his series: The Art of Computer Programming (TAOCP). Currently volume 1, 2, 3, and 4A, as well as five fascicles have been published, with more in preparation. Knuth will use MMIX as the low-level programming language in the "ultimate" edition of his opus.
As Donald Knuth states in his "Call for Volunteers":
All of the MIX programs in Volumes 1--3 will need to be rewritten in MMIX, before I finish the ``ultimate'' edition of those volumes that I plan to write after Volume 5 is completed. The current target date for the ultimate volumes is the year 2020, so there is plenty of time to do the conversion. But I think it will be an instructive undertaking if different groups of students from around the world try to do the necessary translations first, perhaps in friendly competitions, long before I get into the act.This part of the web site is for the volunteers---the MMIXmasters---who are converting all of the programs in TAOCP, Volumes 1 - 3, from the old language MIX to the new language MMIX.
The MMIXmasters had their home at www.mmixmasters.org, which was set up in December 1998 (see History) by Vladimir G. Ivanovic who headed the MMIXmasters since then. After a good start, the contributions became fewer and fewer. In May 2002, the MMIXmasters moved to mmixmasters.sourceforge.net but the activity level remained low. Therefore in July 2011, when the prospect of moving MMIX to a new home at mmix.cs.hm.edu materialized, Vladimir proposed to move the MMIXmasters to this new site as well.
The remainder of this page is taken from the existing MMIXmasters pages by Vladimir and were adapted to fit into the new context.
MIXMIX is a hybrid binary-decimal computer. When it is programmed in binary, each byte has six bits. In decimal, each byte has two decimal digits. Bytes are arranged into words of five bytes plus a sign. The majority of programs written for MIX will work in either binary or decimal, as long as they do not attempt to store a value greater than 63 in a single byte.
Each machine instruction in memory occupies one word, and consists of four parts: the address in memory to read or write, an index specification to add to the address, a modification that specifies which parts of the register or memory location will be read or altered, and the code of operation. All operation codes have a related mnemonic.
MIX programs often use self-modifying code, in particular to return from a subroutine, as MIX lacks an automatic subroutine return pile. Self-modifying code is enabled by the modification byte, letting the program store information to, for instance, the address part of the target instruction, leaving the rest of the instruction without modification.
How to Volunteer
Note: These instructions are open to revision. I am open to comments, suggestions and discussion.
There is also a style guide that tries to give useful hints.
Tools for Testing and PublishingThe programs that are written by the MMIXmasters should not only compile but are intended ultimately for publication. For this end, program text in mms files needs to be converted to program text in tex files. To facilitate this translation, there is a simple tool, mmstotex, which is described on the mmstotex page, where you find also a link to its source code (a lex file).
All programs should be tested. Especially those that are intended for publication. To facilitate writing and executing test cases, I wrote a simple tool to produce a series of programs from a test description. The tool testgen is described on the testgen page, again with a link to its source code.
Here are the MIX programs that need to be converted to MMIX.
Programs or algorithms that are related have been grouped together, but could be separated if that makes more sense. (For example, Program #1.10 could be split into programs 1.10.1, 1.10.2 and 1.10.3.)
If there are any errors, please let us know, but make sure you are using the edition and printing indicated.
Volume 1: Fundamental Algorithms, 3/e, First Printing, May 1997
Volume 2: Seminumerical Algorithms, 3/e, First Printing, September 1997
Volume 3: Sorting and Searching,2/e, First Printing, March 1998
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