You have at your disposal a series of commands that let you load and execute MIX executable files, as well as manipulate MIXAL source files:
This command loads a binary file, file.mix into the virtual machine memory, and positions the program counter at the beginning of the loaded program. This address is indicated in the MIXAL source file as the operand of the
ENDpseudoinstruction. Thus, if your sample.mixal source file contains the line:END 3000
and you compile it with
mixasmto produce the binary file sample.mix, you will load it into the virtual machine as follows:MIX > load sample Program loaded. Start address: 3000 MIX >
When executed without argument, this command initiates or resumes execution of instructions from the current program counter address. Therefore, issuing this command after a successful
load, will run the loaded program until either a
HLTinstruction or a breakpoint is found. If you provide a MIX filename as argument, the given file will be loaded (as with
loadfile) and executed. If
runis invoked again after program execution completion (i.e., after the
HLTinstruction has been found in a previous run), the program counter is repositioned and execution starts again from the beginning (as a matter of fact, a
loadcommand preserving the currently set breakpoints is issued before resuming execution).
The source file file.mixal is edited using the editor defined in the environment variable MDK_EDITOR. If this variable is not set, the following ones are tried out in order: X_EDITOR, EDITOR and VISUAL. If invoked without argument, the source file for the currently loaded MIX file is edited. The command used to edit source files can also be configured using the
seditcommand (see Configuration commands).
The source file file.mixal is compiled (with debug information enabled) using
mixasm. If invoked without argument, the source file for the currently loaded MIX file is recompiled. The compilation command can be set using the
sasmcommand (see Configuration commands).
Print the path of the currently loaded MIX program and its source file:MIX > load ../samples/primes Program loaded. Start address: 3000 MIX > pprog ../samples/primes.mix MIX > psrc /home/jao/projects/mdk/gnu/samples/primes.mixal MIx>
Finally, you can use the
quit command to exit