MMIX CPU Specification

The MMIX CPU is 64 Bit RISC CPU defined and implemented by Donald E. Knuth. Your find an abundance of information online at Donald Knuths MMIX web site or at the MMIX Repository.


The vmb implementation is generated using a change file from the original MMIX sources especially mmix-sim.w - by Donald E. Knuth. There are a few things, however that are different:

Address Space, Address Translation, and Cache

The original mmix simulator simulates only user adresses and no negative adresses. To implement operating systems, the implementation was extended to match the specification. Now any 64 bit value is a valid virtual address. It is translated, using page tables according to the MMIX specification into physical addresses, that are then send to the virtual bus. To make execution mor efficient, the new implementation of the MMIX has an instruction and a data cache, but currently no secondary cache. Instructions that deal with the caches, address translation have been implemented according to specification.


After Power On or Reset, the CPU sets all registers to zero ( except rN) and starts executing instructions at address 0x8000 0000 0000 0000.

Asynchronous Interrupts

Interrupts comming from the virtual bus are reflected in rQ and cause dynamic Traps as specified.

Command Line Parameters

The VMB mmix has the following additional Command line parameters:
-B [host:]port connect to the virtual motherboard using the given host (optional) and port
-O enable tracing inside the operating system (disabled by default)
-o disable trace inside the operating system

The original mmix requires an mmo file on the command line. This parameter is now optional, since the code might be in ROM. If present, the given mmo file is loaded into RAM (over the virtual bus).

Changes to individual Instructions

TRAP Implemented according to specification. The old shortcuts to implement basic IO haven been removed.
LDVTS Implementation
SYNC 4 Power Save, Instruction sleeps for 0.75 seconds unless an interrupt occurs earlier.
SWYM XYZ if $X,YZ is non zero, this instruction behaves like a software breakpoint, if $X points to a string that starts with "DEBUG ", the string is displayed.


Currently profiling and display of source lines is not supported. While profiling might come back again, the display of source lines is considered no longer necessary. If debugging on the source level is desired, you should use gdb (see next section).


To be written