Library /sys$common/syshlp/patchhelp.hlb REPLACE *Conan The Librarian (sorry for the slow response - running on an old VAX) |
Use REPLACE to replace the contents of one or more locations with new instructions or data in terms of the current mode settings. Before performing the replacement, the REPLACE command confirms the contents of the specified locations. Replacing Instructions: _________ _____________ When you replace instructions and the new instructions occupy more bytes in memory than the current instructions, the new instructions are moved to the patch area and PATCH generates branch instructions to maintain the program's logical flow of execution. PATCH generates branch instructions for the REPLACE command the same way that it does for the INSERT command. All unused bytes are filled with NOP instructions. If the patch area is used to accommodate the new contents, the patch area string descriptor is updated to reflect the modifications. Replacing Data: _________ _____ When you replace ASCII or numeric data, the number of replacement entries cannot exceed the number of existing entries. This means, for example, that if you confirm the contents of six consecutive locations, you can replace the contents of only those six locations. If the number of replacement entries is less than the number of existing entries, the remaining locations are filled with zeros. In addition, PATCH truncates replacement entries if they exceed the limit imposed on them by the current length mode. For ASCII characters, the right-most characters are discarded. For numeric data, the left-most digits are discarded. Calculating Relative Displacements for Branch 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 the patch area may be referenced by instructions not affected by the move. Note that PATCH does not recalculate the relative displacement values in the unaffected instructions. Note also that if PATCH moves an instruction with a current address defined as a symbolic label, you must check and correct any references made to that label. PATCH confirms that one or more consecutive locations contain the contents supplied; then replaces the contents with new contents. Format: REPLACE location = current-contents [,...] new-contents . . . Mode Qualifiers Default ____ __________ _______ /BYTE /WORD /LONG /LONG /OCTAL /DECIMAL /HEXADECIMAL /HEXADECIMAL /[NO]ASCII /NOASCII /[NO]INSTRUCTION /NOINSTRUCTION /[NO]SYMBOLS /SYMBOLS /[NO]GLOBALS /NOGLOBALS /[NO]SCOPE /SCOPE Prompts: LOC> location OLD> current-contents NEW> new-contents
Additional Information (explode) :
|