MMIX

MMIX [ ˌ ɛmɪks ] is a 64 -bit computer model ( engl: abstract machine) with a RISC instruction set. Donald E. Knuth uses it in his multi-volume reference work The Art of Computer Programming, to describe the presented algorithms. MMIX replaces the older MIX computer model of first editions by modern, advanced version.

Knuth justifies this choice by pointing out that programming prevents in a hypothetical assembly language that his work quickly outdated am working. We 've seen time and again in recent decades new programming languages ​​that found only a short time interest. In addition, allow a low-level language, the problems in the efficient implementation of algorithms specific to represent as a higher programming language.

The MMIX is controlled by 256 machine instructions. Most, especially the arithmetic- logical instructions, use only register operands. Like modern RISC processors, the MMIX 256 a relatively large number of general-purpose registers. In addition, there are 32 special registers for indicating errors and certain states. In addition, allows MMX, in contrast to the mentioned MIX, virtual addressing, and therefore the study of memory algorithms.

The fact that the MMIX is not implemented in hardware, rather than software simulation, is probably one of the reasons why it is mainly used in research and teaching. In particular, in the field of algorithm development and the measurement of efficiency of algorithms is the MMIX of great benefit. The simulator software provides information on the duration or the required clock cycles and the number of executed instructions of individual algorithms, enabling a direct comparison of different algorithms and undisturbed.

Architecture

MMIX is a Binärcomputer with a 64- bit large virtual address space and 32- bit instructions that use the big-endian convention.

Commands

For all commands include mnemonics, such as ADD to 32 Most commands have the form OP X, Y, Z, where OP stands for the statement, and X for the register in which the result is stored. The rest refers to the operand of the instruction. Each field is eight bits wide. ADD $ 0, $ 1.3, for example, adds the contents of register $ 1 in 3 and stores the result in register $ 0

MMIX programs usually use the MMIXAL assembly language (see the Hello World page ).

Register

There are 256 general-purpose registers in MMIX chip, which are numbered from $ 0 to $ 255 and 32 special purpose registers. If X is a number from 0 to 255, inclusive, set the register rL and rG, if $ X is a local or global registry.

Local register stack

The local register stack performs its own subroutines by their own rL local registers ($ 0 ( rL - 1 to $)). The arguments of the subroutines remain with calling in local registers of the subroutine. When the program returns from the subroutine previously placed on the stack register ( "PUSH" ) to read from ( "POP "). Since only 512 local physical register exists, a portion of the stack is stored in main memory. With the special registers rO and rS you can see which part of the local register stack is already in memory.

Special Register

The 32 special registers are:

577088
de