DEFM macroname|TRACE|AUTOSTART]    - Define Command, Trace or Autostart Macro

This command allows users to create command sequences (macros), which can 
be executed simply by typing the name of the macro. Up to 10 parameters 
can be passed to command macros. Within the macro, the required parameter 
is specified by the operator @N, where N is a single digit number between 
0-9 inclusive. 

The syntax and use of pass parameters is the same as found in Motorola's 
assemblers.  can be any sequence of alphanumeric characters except 
reserved command names. Macros can be nested up to 5 levels. More than one 
macro is allowed at a time and these are held in an area known as the macro 
library. Macro libraries can be saved on disk and loaded again when required.

The reserved parameter name TRACE allows the user to define a macro which is 
executed on completion of every T (trace) command. 

The reserved parameter name AUTOSTART allows the user to define a macro which 
is executed automatically on startup of PCbug11. To correctly use the AUTOSTART 
feature, the macro library containing the macro AUTOSTART must be saved using 
the SAVEM command. Then, from MS-DOS?, the macro library name must be specified 
as the last parameter on the command line. e.g. From PCbug11:

	DEFM AUTOSTART

(type in macro definitions in main window. then press Esc key) SAVEM STARTUP

	QUIT	(Quits PCbug11)

Then from PC command line:

	PCBUG11 -A STARTUP

(STARTUP library is loaded and AUTOSTART executed, if it exists)

The main window is used to type in the macro definition. Other macro names may 
be included in the definition. To terminate the definition, press the ENTER/RETURN 
key on a blank line. Once defined, the macro cannot be edited within PCbug11. It 
may be edited using a standard text editor once the file has been saved, since 
PCbug11 saves macros in a special text format (see LOADM). Macros can also be 
defined by the user using a text editor if the special format is used.

If the specified macro name already exists, then the existing macro is overwritten 
by the new definition.

Usage:
DEFM CONFIG	Create macro called CONFIG
DEFM TRACE	Create macro which is executed after T command
DEFM AUTOSTART 	Create macro which can be executed automatically on startup of PCbug11.


Related commands:CLRM,DELM,EDITM,LOADM,LSTM,SAVEM

Return to summary