Go up to Top
Go forward to Debugging Facilities

Running a WC340xx Program

To run a program using either simulator, you must first prepare an executable image of the machine's memory using either the "wc34asm" assembler of the "c--" compiler. Details on using these programs can be found in the documents "C--: A Compiler for a Subset of C" and "The 34000 Assembler".

Whichever translator is used, the result of running it on a syntactically valid program will be to produce an executable image file name "tmem". Simply typing the command

wc34000
or
wc34020
will cause the system to run the appropriate interpreter using "tmem" as a memory image file. If you rename the "tmem" file for any purpose, you can still use it as a memory image by including its name in the command as an argument. For example,
wc34000 test.mem
will execute the WC34000 interpreter using "test.mem" as its memory image.

While either interpreter is executing, its standard input and standard output files (typically the screen and keyboard) are used for diagnostic messages and debugging purposes. The input for and the output from the program being interpreted are kept in separate text files.

The machine simulated by "wc34000" communicates with a single simulated terminal. The input for this terminals is read from a file name "tinput" in the current working directory. If the program you are running under "wc34000" expects input from the terminal, you should create a `tinput' file using an editor before running "wc34000'. When execution of "wc34000' is complete, you can examine the output produced by the program run by examining the file `toutput'.

The machine simulated by "wc34020' communicates with a up to five simulated terminals. The input for these terminals is read from files name "tinput0', "tinput1', "tinput2', "tinput3', and "tinput4' in the current working directory. If the program you are running under `wc34000' expects input from terminal number i, you should create a "tinputi' file using an editor before running "wc34000'. Similarly, the output produced by the program run under the simulator is written to files "toutput0', "toutput1', ...



Up Next