Dynamic Output Processors

A dynamic output processor can be used to display the data produced by a monitor command. A dynamic output processor may be attached to any file number from 1-10. The file number must be larger than the number of operands supplied to the command that invokes the simulator. The attach command is used to invoke a dynamic output processor, as illustrated below.

attach <file-number>,<command-name>

In Windows the attach command is used to open files, or to attach a DLL function. The format for opening files is as follows. The second operand determines whether the file is opened for input or output. If the second argument is omitted, "i" is assumed.

attach @<file-name>,"i"

attach @<file-name>,"o"

To attach a DLL file in windows, the following format is used. The first character is the vertical mark, the shift of the backslash. The format of the command is as follows. The first argument is the name of the DLL file containing the desired function. The second argument is the name of the exported function within the DLL. It is not possible to use two different functions out of the same DLL. The third argument determines whether the function will be used for input or output of data. If the third argument is omitted, "i" is assumed.

attach |<file-name>,<function-name>,"i"

attach |<file-name>,<function-name>,"o"

The second argument of this command must be the name of a UNIX command for processing the output. The output of the simulator will appear on the standard input of the command (for example, the UNIX commands "cat" and "pr" can be used as output processors.) When output is directed to a dynamic output processor, the output buffer is flushed at the end of every line, to guarantee that the output processor is synchronized with the simulator.

The detach command can be used to reverse the effect of an attach command. This command sends an end-of-file indicator to the output processor, but does not force the termination of the command. However, the output processor (which runs as a separate process) must terminate before this command will complete its execution. The following is an example of the detach command.

detach <file-number>

Windows format:

detach @<file-name>

detach |<DLL Name>