MIX and MMIX Architectures Explained

MIX is a hypothetical computer conceived in the 1960's. The old MIX has since been replaced by a new, yet still hypothetical computer architecture, MMIX. Software implementations for both the MIX and MMIX architectures have been developed by computer scientist Donald Knuth and made freely available. Various derivatives of Knuth's MIX/MMIX emulators also exist. GNU MDK is one of those software packages; it is free and runs on an ample variety of platforms.

MIX 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.

If you have an innovative idea or project like the MIX computer, you may want to check this site