Display Breakpoint
Statement/Instruction . . . . . . . . . : /5
Program . . . . . . . . . . . . . . . . : MI1
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: MI1 ᑍ/
/ᑍ ᑍ/
/ᑍ 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