à ð
Display Breakpoint
Statement/Instruction . . . . . . . . . : /ððð5
Program . . . . . . . . . . . . . . . . : MIð1
Recursion level . . . . . . . . . . . . : 1
Start position . . . . . . . . . . . . : 1
Format ................:\CHAR
Length ................:\DCL
Variable ...............:RESULT
Type . . . . . . . . . . . . . . . . : PACKED
Length . . . . . . . . . . . . . . . : 15 5
' 6.ððððð'
Breakpoints also can be set with a directive statement. Given that the MI01
program is able to be debugged and a break directive was not used, the purpose
for which you use the directive may not be obvious. As mentioned in “Creating the
MI Example Program” on page 7-6, many expected users of the QPRCRTPG API
are compilers of HLLs. The break (BRK) directive allows users of the QPRCRTPG
API to associate an HLL statement identifier with a generated MI instruction. For
example, assume that MI01 was developed to be an implementation of a fictional
HLL language statement such as:
RESULT = MAX(ARG1, ARG2)
This assigns the MAX (defined as the largest argument) of ARG1 or ARG2 to
RESULT. Also assume that an HLL programmer had written a program called
HLLEXAMPLE with the following statements:
ðððð1 RESULT = MAX(ARG1, ARG2)
ðððð2 EXIT
By using break (BRK) directives, the QPRCRTPG user or compiler could associate
the HLL statements with the generated MI instructions in the following way:
/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/
/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/
/\ \/
/\ Program Name: MIð1 \/
/\ \/
/\ Programming Language: MI \/
/\ \/
/\ Description: Demonstrate how to associate HLL statement \/
/\ identifiers with MI instructions using BRK \/
/\ directives. \/
/\ \/
/\ Header Files Included: None \/
/\ \/
/\ \/
/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/
ENTRY \ (PARM_LIST) EXT;
DCL SPCPTR ARG1@ PARM;
DCL SPCPTR ARG2@ PARM;
DCL SPCPTR RESULT@ PARM;
DCL OL PARM_LIST
(ARG1@,
ARG2@,
RESULT@)
PARM EXT;
DCL DD ARG1 PKD(15,5) BAS(ARG1@);
DCL DD ARG2 PKD(15,5) BAS(ARG2@);
7-8 System API Programming V4R1