MIX(1)MIX(1)
NAME
mix –
MIX
assembler and emulator
SYNOPSIS
games/mix
[
-g
]
[
file ...
]
DESCRIPTION
Mix
is an assembler and emulator for Donald Knuth’s
fictitious
MIX
architecture. The command assembles the named
MIXAL
files into memory and then presents a command
prompt to control an emulated
MIX
machine. The
-g
option causes the emulator immediately to run a complete assembled
MIX
program and exits when the emulator halts.
The following commands are accepted:
addr[(a:b)]
Print the value at
addr.
An optional field specification is given by
(a:b).
a [< file]
Start the MIXAL assembler. The assembler will begin
assembling at the address after the last assembled
instruction. If no file is given, the assembler will
accept instructions from the console.
b addr
Set or unset a breakpoint at
addr.
c
Resets the
MIX
machine to a fresh state by clearing all memory
and registers.
d addr
Disassemble the instruction at
addr.
o addr
Print the alphanumeric
MIX
word at
addr.
o(addr, d)
Print
d
alphanumeric mix words starting at
addr.
r*[(a:b)]
Print the value in register
r*
where * is one of a, x, ax, j, or 1-6. An optional
field specification is given by
(a:b).
s
Step through one instruction of the emulated
MIX
machine.
g
Start the emulated
MIX
machine at the instruction specified by the
END
pseudo-instruction.
x
Quit the emulator/assembler.
The
addr
field of the above instructions must be an integer between 0 and 3999
inclusive. A number-sign (#) or an asterisk (*) at the beginning of
a line starts a comment which extends to the end
of the line.
SOURCE
/sys/src/games/mix
SEE ALSO
Donald Knuth, “The Art of Computer Programming”, Volume 1. Section 1.3
/sys/src/games/mix/examples
BUGS
As opposed to Knuth’s specification,
the
ALF
pseudo-instruction takes as argument five
MIX
characters surrounded by quotation marks.
Unresolved forward references are assembled
to 0 instead of to a location determined by
the
END
psuedo-instruction.
The magnetic tapes and drum units are not
implemented.
Comments are handled as described above and not
exactly as Knuth specifies.