MPE/iX System Utilities Reference Manual (32650-90908)

Chapter 18
PAT CH
Operation
154
When the file name is accepted, PATCH displays the ? prompt, where you enter one of the following four
subcommands:
D Displays code segment contents.
M Modifies code segment contents.
DG Displays global area of initial stack.
MG Modifies global area of initial stack.
After each command, PATCH prompts you for another. To terminate PATCH press
Return without entering a
command. (An incorrectly entered command also terminates PATCH.)
On the following pages, each of the four PATCH subcommands is explained in detail.
D
The D command displays code segment contents. To invoke this command enter:
?D, segnum, address [,numlocations]
Parameters
For a list of segment names and their addresses within a program file, use the PMAP option of the PREP
command.
For information regarding the offsets of instructions and global variables in program files, refer to compiler
options for the programming language in which the code was written.
M
The M command modifies code segment contents. To invoke this command enter:
?M, segnum, address, [,numlocations]
Parameters
segnum The logical segment number to be displayed, found at the top of the
PMAP output.
address The code segment relative address you wish to display is as follows: add
the offset of the instruction within the procedure (an octal value found
in your compiler listing) to the procedure start address found in the
CODE column of your PMAP output.
numlocations The number of words, in octal, to be displayed.
segnum The logical segment number to be modified, found at the top of the PMAP
output.
address The address of the code segment you wish to modify, calculated by adding the
offset of the instruction within the procedure (an octal value found in your
compiler listing) to the procedure start address found in the CODE column of
your PMAP output.
numlocations The number of words, in octal, to be modified.