à

ð

 

 

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

program

is

able

to be debugged

and

a

break

directive

was

not used,

for

which you use the directive may not be

obvious. As

mentioned

in

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

API

to associate an HLL statement identifier with a generated MI

inst

example,

assume

that

MI01

was developed

to

be

an implementation

of

a

HLL

language

statement

such

as:

 

 

 

 

 

 

 

 

 

RESULT = MAX(ARG1, ARG2)

This assigns the MAX (defined as the largest argument) of ARG1 or ARG 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 as the HLL statements with the generated MI instructions in the following w

/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/

/\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/

/\

 

\/

/\

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

 

 

 

Page 148
Image 148
IBM Version 4 manual Are Compilers HLLs. Break, Brk, Directive allows users, Language Statement Such