1.! ***** Debugger Command Procedure EXAM_GO.COM *****
DECLARE L:ADDRESS, M:COMMAND
EXAMINE L; M
DBG> @EXAM_GO X "@DUMP"
In this example, the command procedure EXAM_GO.COM accepts two
parameters, an address expression (L) and a command string
(M). The address expression is then examined and the command
is executed.
At the debugger prompt, the @EXAM_GO X "@DUMP" command executes
EXAM_GO.COM, passing the address expression X and the command
string @DUMP.
2.! ***** Debugger Command Procedure VAR.DBG *****
SET OUTPUT VERIFY
FOR I = 1 TO %PARCNT DO (DECLARE X:VALUE; EVALUATE X)
DBG> @VAR.DBG 12,37,45
%DEBUG-I-VERIFYIC, entering command procedure VAR.DBG
FOR I = 1 TO %PARCNT DO (DECLARE X:VALUE; EVALUATE X)
12
37
45
%DEBUG-I-VERIFYIC, exiting command procedure VAR.DBG
DBG>
In this example, the command procedure VAR.DBG accepts a
variable number of parameters. That number is stored in the
built-in symbol %PARCNT.
At the debugger prompt, the @VAR.DBG command executes VAR.DBG,
passing the actual parameters 12, 37, and 45. Therefore,
%PARCNT has the value 3, and the FOR loop is repeated 3
times. The FOR loop causes the DECLARE command to bind each
of the three actual parameters (starting with 12) to a new
declaration of X. Each actual parameter is interpreted as a
value expression in the current language, and the EVALUATE X
command displays that value.