1. Profile Mix is a fictional computer designed by Donald E.knuth for his book "The Art of Computer Programming" (Computer Programming arts, TAOCP). The programming language designed for this calculation is called the Mix assembly language (Mixal). Since this computer does not exist, the algorithm in the book cannot be executed directly. The GNU MDK (GNU Mix develoment Kit) implements a MIX and Mixal simulator with the ability to write, execute, and debug mixal programs to facilitate TAOCP learning. 2. The download and installation requires a *nux environment with a glib flex GTK libglade readline libguile kit installed. wget Ftp://ftp.gnu.org/pub/gnu/mdk/v1.2.8/mdk-1.2.8.tar.gztar zxvf mdk-1.2.8.tar.gz CD Mdk-1.2.8./configure & & Make && make Installmake install 3. Write the Hello World new Hello.mixal file and enter the following:
* * hello.mixal:sys ' Hello World ' in mixal** label ins operand commentterm EQU the MIX console Device number ORIG start addressstart out MSG (term) output data at address msg HLT MSG Alf "Mixal" Alf "HELL" Alf "O WOR" Alf "LD" END START End of the program
Compile:
# Mixasm Hello.mixal 4. Run the compiled mix program in a variety of ways. 1) command line mode (MIXVM):
[Email protected] mix]# MIXVM hello.mix
Program loaded. Start address:1000
Mix> Run
Running ...
Mixal HELLO World
... done
Elapsed time:11/total Program time:11 (Total uptime:11)
Mix> quit
2) GUI mode (GMIXVM)
GNU Mix MDK Installation and use