PATCH INSERT — MicroVMS 4.5B
Use INSERT to insert VAX/VMS MACRO instructions into specific
locations within an image file. To use this command, you must
specify the /INSTRUCTION qualifier or you must set the
INSTRUCTION mode. To insert additional data into a patch area,
use the DEPOSIT/PATCH_AREA command.
Before inserting the new instruction, the INSERT command confirms
the contents of the location preceding the insertion (that is,
that current instruction).
When the INSERT command is executed, it replaces the current
instruction with a branch instruction and places the current
instruction and the new instructions in the current patch area.
The last new instruction is always followed by a branch
instruction that redirects the flow of execution back to the
inline code. The INSERT command automatically generates branch
instructions.
After the insertion of new instructions, the patch area string
descriptor is updated to reflect the modifications.
If the branch instruction to the patch area is longer than the
current instruction, additional instructions following the
current instruction are also moved to the patch area, and the
branch instruction is deposited in the vacated memory locations.
Unused memory locations are filled with NOP instructions. If the
current instruction is longer than the branch instruction, the
unused memory locations are filled with NOP instructions.
PATCH calculates the relative displacements for the branch
instructions it generates and recalculates the relative
displacements for all branch-type instructions moved to the patch
area. Instructions and data moved to patch area may, however, be
referenced by instructions not affected by the move. Note that
PATCH does not recalculate any relative displacements in the
unaffected instructions.
Note also that if PATCH moves an instruction with a current
address defined by a symbolic instruction label, you must check
and correct any references made to that label.
Format:
INSERT location = current-instruction
new-instruction
.
.
.
Mode Qualifiers Defaults
____ __________ ________
/OCTAL
/DECIMAL /HEXADECIMAL
/HEXADECIMAL
/[NO]INSTRUCTION /NOINSTRUCTION
/[NO]SYMBOLS /SYMBOLS
/[NO]GLOBALS /NOGLOBALS
/[NO]SCOPE /SCOPE
Prompts:
LOC> location
OLD> current-instruction
NEW> new-instruction
Additional information available:
Parameters
location
Specifies the address after which one or more new instructions
are to be added.
current-instruction
Specifies the instruction currently occupying the specified
location.
new-instruction
Specifies one or more new instructions to be inserted into the
image file following the current instruction.