PLAY filename.ext {p1}...{p9}
This command may be used to execute a list of commands contained in a text file "filename.ext". Any file extension may be specified. However, the default and recommended extension is ".NOI". If no extension is specified, the PLAY command will assume a file extension of .NOI. The PLAY and RECORD File Dialogs default to a .NOI extension, and some of the Source Level Debug Utilities produce files with a .NOI extension (the others allow any extension).
You may wish to use Windows Explorer to create an association between the .NOI extension and NoICExxx.EXE, so that you can double-click on a .NOI file in Explorer and run NoICE automatically. This will only work, of course, for one processor at a time. That is, you can link to NoICE51.EXE or NoICE11.EXE, but not to both at the same time.
In some cases, the PLAY keyword may be omitted, and just the filename given:
filename.ext {p1}...{p9}
or
filename {p1}...{p9}
These forms allow the use of command files as "macros" or custom commands, as long as the name of such a command file does not conflict with one of NoICE's built-in commands. If "filename" is specified without an extension, and no built-in NoICE command with that name exists, then NoICE will attempt to open and play "filename.NOI".
Whether or not the PLAY keyword is specified, NoICE will look for the file in the current directory, in the initial directory (as specified by the shortcut which started NoICE), and in the directory where NoICExxx.EXE resides.
The optional parameters "p1" through "p9" function similarly to parameters in DOS batch files. Within the command file, the formal parameter names %1% through %9% will be replaced by the actual parameters used when the command file is invoked. If any parameter is not specified, the corresponding formal parameter will have a null (empty string) value. For example, if the file ZOW.NOI contains the lines
ECHO Dump of %1% is DUMP %1%
Then invoking the file by the command
ZOW 1234
will execute the commands
ECHO Dump of 1234 is DUMP 1234
Only commands that may be invoked at the NoICE main prompt will be executed completely. Thus, for example, the command
EDIT 1000 55 66 77
will store the value 55 at address 1000, the value 66 at address 1001, and 77 at the address 1002. On the other hand, the command
EDIT 1000
will display the contents of address 1000, and then wait for input from the user - not the next line of the command file. Only when the user closes the EDIT dialog will additional commands be fetched from the command file.
Command files may be nested up to four deep. If the command
PLAY file2
appears in command file1, the effect is to call the commands in file2. When the last command in file2 is executed, control will return to file1.
If an error occurs in the execution of a command from a command file, all open command files will be closed and automatic execution of commands will cease.
When NoICE starts, it will look for and PLAY an optional startup command file.
If you press the Alt-key and a function key, NoICE will attempt to invoke the corresponding command file, ALTF1.NOI through ALTF10.NOI. Normally, these will be used for command files which do not require parameters. However, parameters may be used by typing the parameters on the NoICE command line before pressing the function key. If you don't mind the reverse Polish format, this can save a few keystrokes.
If you use the Windows shortcut Alt-F4 to exit programs, you can get this behavior with NoICE by means of a file called ALTF4.NOI that contains the single command "QUIT". Such a file is included in the NoICE installation.
If you use LASTFILELOADED, PLAY may be associated with the Debug Context, and may affect breakpoints and watchpoints.
RECORD file.ext {options}
Begins recording commands entered at the command prompt or via the menu system in the specified file. If the file already exists, it is deleted and a new file of the same name is created. Recording continues until the STOP command is entered. Keystrokes entered in the file viewer, or when editing commands, are not recorded.
The "options" are zero to three characters which direct NoICE to save current information into the newly opened file. Valid characters and their effects are
The use of these options allows a debugging session to be saved and resumed later.
Recorded files will most often be played back as command files, using the PLAY command.
STOP
This command closes the current recording file, if one is open. If no recording file is open, this command has no effect.
ECHO {string}
Shows the remainder of the command line in the data window. This is primarily useful within command files in order to annotate actions. If no string is specified, a blank line will be displayed.
REM {string}
Ignores the "string" and performs no other operations. This command is used to insert comments in NoICE command files.
A semi-colon (;) may be used as an alias for REM. Note that a space must follow REM or ;.
DELAY time
Specifies a time delay for use after each command from a command file. This slows down command execution so that an operator can view the results. The time delay is specified as a decimal number of milliseconds.. Specifying a time delay of zero disables the delay. Pressing the Escape key during a delay interval aborts the delay. This is useful if you accidentally set the delay to something huge.
TIME {string}
Shows the time since the last TIME command, as well as the remainder of the command line, in the data window. This is primarily useful within command files in order to time various actions.
Time is shown as seconds and thousandths.
WAIT value
Pauses for the specified number of milliseconds. This is primarily useful within command files in order to delay between various actions. Refer also to the DELAY command.
Time is specified in milliseconds.
WAITFORSTOP {value}
Wait for the target processor to stop running. The optional parameter specifies the maximum time to wait. If omitted, the command waits up to 60 seconds. If the wait time expires and the processor is still running, the user is asked whether or not she wants to continue waiting.
This is primarily useful within command files, in conjunction with the GO, STEP, and NEXT commands, to ensure that the target has stopped before the next command is executed.
"WFS" is an abbreviation of "WAITFORSTOP".