README
1 README FILE FOR THE MIXAL DISTRIBUTION
2
3This is an assembler and interpreter for Donald Knuth's mythical MIX computer,
4defined in:
5
6Donald Knuth, _The Art of Computer Programming, Vol. 1: Fundamental
7 Algorithms_. Addison-Wesley, 1973 (2nd ed.)
8
9This is *not* the GNU MIX Development Kit. You can find that at:
10
11 http://gnu.essentkabel.com/software/mdk/mdk.html
12
13This implementation was designed and written by Darius Bacon
14<djello@well.sf.ca.us>, then ported to UNIX and debugged by Eric S. Raymond
15<esr@snark.thyrsus.com>. Corrections to multiplication and division by
16Larry Gately <lgately@rohan.btg.com>; see Notes.
17
18 AUTHOR'S IMPLEMENTATION NOTES
19
20There is one significant difference in the assembler format: Knuth puts
21fields at fixed offsets on a line, while I separate them by whitespace.
22(Purists may wish to fix this obvious bug.)
23
24The tape devices are currently unimplemented. (Use the 'card punch'
25and 'printer' devices if you don't need mass storage. They're
26automatically connected to standard input and output.
27
28Floating-point instructions aren't implemented either. They weren't
29covered in Volume I, which is all I've got so far.
30
31This MIX is a binary machine. I think that was a mistake -- decimal
32would make debugging enough nicer to compensate for the decreased
33efficiency. When dumping internal values, it prints them in octal, so
34you can get the field values by inspection.
35
36Things to do are marked by a comment starting with **.
37The program still needs more testing.
38
39 PORTING AND TESTING
40
41The code is written in pure ANSI C. It is known to work in the
42following environments:
43
44 OS Compiler
45 ----------- ------------
46 BSD/386 gcc
47 AIX-3.2.5 gcc
48 DOS Watcom C
49 DOS Borland C
50
51You can regression-test the interpreter with mixtest (under UNIX) or
52test.bat (under DOS).
53
54 FILES
55
56asm.[ch] A Silly Module
57cell.[ch] Operations on MIX words (Cells)
58charset.[ch] The character set
59driver.[ch] Assemble a single source line
60elevator.mix Sample code from Knuth vol. 1
61io.[ch] Simulate MIX I/O devices
62main.c Main program
63Makefile Makefile for Unix
64makefile.dos Makefile for Borland C++ under MS-DOS
65MIX.DOC Excerpt from The Art Of Computer Programming describing MIX.
66mix.h Header for things needed all over the program
67mixtest Regression-testing shell script
68mystery.mix Sample program
69mystery.out Its output
70NOTES Notes on the MIX assembly language
71op2c.awk Converts the table of instructions into a C array
72opcodes The table of instructions
73ops.inc The same, as a C array, for the awkless
74parse.[ch] Parse an operand field
75prime.mix Sample program, with notes on MIX assembly language
76prime.out Its output
77README General info
78run.[ch] Simulate the MIX machine
79symbol.[ch] The symbol table
80test.bat Regression-testing DOS batch file
81