% Librarian I01-42'ѭ)ѭ*+5CANCELCREATEDEFINE DELETE :DEPOSITEVALUATE8EXAMINEEXIT expressionsHELPmodeREPLACE"SET$JSHOW%UPDATE&VERIFY)ѭ1 CANCELIThe CANCEL commands allows the user to reinstate initial defaults for the8various display and addressing characteristics of PATCH.2 MODEF Use the CANCEL MODE to control the syntax of commands you enterF and the values PATCH displays. CANCEL MODE cancels the currentF mode settings and reinstates the initial default mode settings.7 The initial default mode settings are: NOASCII, HEXADECIMAL, and LONG.Format: CANCEL MODEww)ѭ1 CREATEAUse CREATE to create a command procedure that contains all PATCH8commands successfully executed after the CREATE command.AWhen you use CREATE to create a command procedure, PATCHAautomatically inserts, as the first entry in the commandAprocedure, the name of the image file that will incorporate theApatches. All symbolic names are converted to absolute values,Aand all command names and qualifiers are truncated to theirshorthand notation.AYou can issue only one CREATE command per PATCH session. ToAcreate another command procedure, close the input image file andthen reopen it.ATo process the patches contained in the command procedure, issuethe following DCL command: $ PATCH @file-specAIn the above command line, the file-spec represents the>specification of the command procedure containing the patches.Format: CREATE [file-spec] 2 Parameters file-specF Represents the file specification of the command procedure. The syntax is as follows:5 device:[directory]filename.filetype;versionF You can omit all or some of the fields in the command procedureF file specification. PATCH uses the default values listed below for omitted fields.8 Field Default ValueC device:[directory] The process's current default device and$ directory7 filename The name of input image file filetype .COM; version V04-000 greater than the highest= command procedure of the same nameww)ѭ1 DEFINEAUse DEFINE to equate a symbolic name to a value. Once theAassignment has been performed, you can specify the symbolic nameAin place of the value it denotes for the duration of the PATCHsession.AWhen you use the DEFINE command to create symbolic names, PATCHAalways searches the symbol table for these symbolic names firstAwhen it translates a symbol into a value. More than one symbolic'name can be assigned to a single value.? You can redefine a symbolic name to represent a new value.= Two restrictions apply to the use of the DEFINE command:< o You cannot equate a symbolic name to a pathname@ o You cannot specify the /ASCII mode qualifier,: nor can yo u set the ASCII mode, when equating a symbol name to a valueFormat:: DEFINE symbol-name = value [,symbol-name = value,...]Prompts: NAM> symbol-name VAL> valueFIf you enter the symbol name on the initial command line, you must"also enter the value on that line. 2 Parameters symbol-nameF Specifies a 1- to 31-character user-defined symbol to beF associated with the specified value. The symbol name must startF with an alphabetic ch aracter, and can consist of alphanumericI characters, dollar signs ($), underscores (_), and/or periods (.). E (PATCH does not distinguish between uppercase and lowercase E letters; that is, the value ABC is equivalent to the value abc.)* The symbol name cannot be a pathname.valueF Specifies a numeric address or symbolic expression that is to be* assigned the specified symbolic name.ww)ѭ1 DELETE=Use DELETE to delete data fr om one location or from several<consecutive locations in terms of the current mode settings.AWhen you use the DELETE command to delete ASCII and numeric data,!the data is replaced with zeros.Format:. DELETE location = current-contents [,...]- Mode Qualifiers Defaults- ____ __________ ________ /BYTE* /WORD /LONG /LONG /OCTAL1 /DECIMAL /HEXADECIMAL / HEXADECIMAL- /[NO]ASCII /NOASCIIPrompts: LOC> location OLD> current-contents 2 ParameterslocationF Specifies either (1) a single location whose contents are to beF deleted or (2) the starting address of a sequence of locations& whose contents are to be deleted.current-contents6 Specifies one or more data entries to be deleted.6 The data you specify must be the actual contents.F Do not specify conflicting data types  within a single DELETE command.ww)ѭ 1 DEPOSITGUse DEPOSIT to deposit new data into one or more consecutive locations.Depositing Data :__________ ____ > The DEPOSIT command lets you replace the contents of aA location or of several consecutive locations in terms of the? current mode settings. The DEPOSIT command does notC request verification of the current contents before replacing8 the contents with new data (that is, this commandG assumes that you know what you are doing). In cases when you wantG to confirm that data will be overwritten, use the REPLACE command.Format:+ DEPOSIT location = new-contents [,...]2 Mode Qualifiers Defaults2 ____ __________ ________ /BYTE/ /WORD /LONG /LONG /OCTAL6 /DECIMAL /HEXADECIMAL  /HEXADECIMAL2 /[NO]ASCII /NOASCIIPrompts: LOC> location NEW> new-contents 2 ParameterslocationF Specifies either (1) a single location whose contents are to beF overwritten or (2) the starting address of a sequence of4 locations whose contents are to be overwritten. new-contentsH Specifies one or more data entries to be inserted. Do notB enter conflicting data types with a single DEPOSIT command.ww)ѭ 1 EVALUATE.Use EVALUATE to evaluate one of the following:# o Arithmetic expressions o Values' o Variable-length bit fields"Evaluating Arithmetic Expressions:"__________ __________ ____________D Use the EVALUATE command to perform binary and unary arithmetic operations.F The EVALUATE command interprets expressions and displays results+ in the current length and radix modes.Evaluating Values:__ ________ _______E Use the EVALUATE command to determine the value associated with D a symbol or pathname. The values are displayed in terms of the+ current length and radix mode setting.&Evaluating Variable-Length Bit Fields:&__________ _______________ ___ _______B Use the EVALUATE command to display the current contents of aD specific bit field in a value. The syntax for this command is:+ EVALUATE value F The bit position delimite rs (high-bit and low-bit) are specified as decimal integers.F Bit positions range from 0 (least significant bit) to 31 (mostF significant bit). PATCH extracts the contents of the bitF positions and reports the contents in longword representation andF in terms of the current radix setting. The current length modeC is ignored. Note that ASCII mode mode cannot be set when you% evaluate selected bit positions.Format: EVALUATE expression [,...]1 Mode Qualifiers Default /BYTE/ /WORD /LONG /LONG /OCTAL6 /DECIMAL /HEXADECIMAL /HEXADECIMAL2 /[NO]ASCII /NOASCIIPrompts: EXP> expression 2 Parameters expressionF Indicates an arithmetic expression, a value and corresponding bitF field, or a literal value that is to be evaluated in terms of the current mode settings.ww)ѭ 1 EXAMINEAUse EXAMINE to display the contents of the specified locations in#terms of the current mode settings.@You can also use the EXAMINE command to examine the contents of Aan address displayed in response to the previous EXAMINE command..To do so, you use the backslash operator (\).Format:( EXAMINE location [:location] [,...]2 Mode Qualifiers Defaults2 ____ __________ ________ /BYTE/ /WORD /LONG /LONG /OCTAL6 /DECIMAL /HEXADECIMAL /HEXADECIMAL2 /[NO]ASCII /NOASCII 2 ParameterslocationF Specifies one or more locations whose contents are to beF displayed. Multiple locations can be specified in aF comma-separated list or colon-separated range. BothF comma-separated lists and colon-separated ranges can be specified on a single command line.F The location parameter can also be represented by the backslashF operator (\). This operator is used to observe the contents of< the location displayed in the previous EXAMINE command.F If you do not supply a location, the contents of the next+ sequential location will be displayed.ww)ѭ1 EXITAUse EXIT to terminate a repetitive prompt such as NEW>, OLD>, orAECO>, or to terminate a PATCH session and pass control back toAthe command interpreter. You can also specify CTRL/Z toAterminate a PATCH session. Issue CTRL/Z in response to the PATCHprompt (PATCH>).ADo not type EXIT in response to the value prompt (VAL>) for theADEFINE command. For this command, only the name prompt (NAM>)recognizes the EXIT command.Format: EXITww)ѭ 1 expressionsFSpecial operators may be used to reduce expressions in PATCH commands.FThe special operators are presented in two tables. One for Arithmetic*expressions and the second for Addressing.@Note: PATCH normally evaluates expressions from right to left. ) No arithmetic prececedence is performed.-Special operators for ARITHMETIC expressions:Operator Name Function/ + Addition Addition operator in arithmetic# expressions or unary plus sign5 - Subtraction Subtraction operator in arithmetic% expressions or unary minus sign.; * Multiplication Multiplication operator in arithmetic expressions./ / Division Division operator in arithmetic expressions.* @ Shift Shift operator in arithmetic expressions.4 < > Precedence Precedence operator in arithmetic( expressions or Bit field delimeters for the EVALUATE command.. ^ Radix Radix operator for, Hexadecimal,( Decimal, Octal, or Binary notation.!Special operators for ADDRESSING:Operator Name Function7 . Current location Address of the current location.9 ^ Previous location Address of the previous location.7 : Range operator Range operator for the CHECK ECO,! CHECK NOT ECO, EVALUATE, and EXAMINE commands.> \ Indirection operator Displays either the contents of the) value stored in an address specified% in the previous EXAMINE command.ww)ѭ1 HELPGThe VAX/VM S Image File Patch Utility (PATCH) allows you to make changesJto an image file in the form of patches. You can then run the new versionLof the image without having to compile, assemble, or link the program sourcefiles.CUse the HELP command to get additional information on the followingPATCH commands:? ALIGN CANCEL CHECK CREATE DEFINE DELETE9 DEPOSIT EVALUATE EXAMINE EXIT expressions= HELP INSERT mode REPLACE SET SHOW UPDATE VERIFYFormat: HELP topic [subtopic...]@where topic specifies the name of the command for which you need@help, and subtopic identifies a particular qualifier, parameter,<or command keyword about which you want further information.ww)ѭ1 mode qualifiers7 Category Mode Default Description7 ________ ____ _______ ___________E Context /ASCII Controls whether data is acceptedD  /NOASCII [D] and displayed as ASCII charactersE /OCTAL Determines the base in whichE Radix /DECIMAL numeric addresses and data are< /HEXADECIMAL [D] interpreted and displayedE /BYTE Determines the length in whichE Length /WORD numeric data is accepted and, /LONG [D] displayedww)ѭ 1 REPLACE AUse REPLACE to replace the contents of one or more locations with0new data in terms of the current mode settings.ABefore performing the replacement, the REPLACE command confirms(the contents of the specified locations.Replacing Data:_________ _____F When you replace ASCII or numeric data, the number of replacementG entries cannot exceed the number of existing entries. This means,E for example, that if you confirm the contents of six consecutiveI locations, you can replace the contents of only those six locations.E If the number of replacement entries is less than the number of E existing entries, the remaining locations are filled with zeros.F In addition, PATCH truncates replacement entries if they exceedF the limit imposed on them by the current length mode. For ASCIIF characters, the right-most characters are discarded. For numeric. data, the left-most digits are discarded.Format:/ REPLACE location = cu!rrent-contents [,...] new-contents . . .1 Mode Qualifiers Default1 ____ __________ _______ /BYTE/ /WORD /LONG /LONG /OCTAL6 /DECIMAL /HEXADECIMAL /HEXADECIMAL2 /[NO]ASCII /NOASCIIPrompts: LOC> location OLD> current-contents NEW> new-co"ntents 2 ParameterslocationF Specifies either (1) a single location whose contents are to beF replaced or (2) the starting address of a sequence of locations' whose contents are to be replaced.current-contentsB Specifies one or more data entries or to be replaced.: The data you specify must be the actual contents.F Do not specify conflicting data types within a single REPLACE command. new-contentsJ Specifies one or more dat#a entries or that are to replace the current contents.F Do not specify conflicting data types within a single REPLACE command.ww)ѭ1 SET?The SET commands allow the user to modify the PATCH evironment.2 MODEF Use SET MODE to specify default settings for the entry and display modes.Format: SET MODE mode [,...]Prompts: NEW> mode 3 ParametersmodeF Specifies one or more modes from the context, r $adix, length, andF symbol search mode categories to be established as the currentF modes. These modes determine how PATCH interprets entries and displays output.F The commands that are affected by the entry and display modes are= DELETE, DEPOSIT, EVALUATE, EXAMINE, REPLACE, and VERIFY.B See HELP MODE QUALIFIERS. Strip off the leading "/" from the7 qualifier name for use with the SET MODE command. G You can override a mode setting by specifyin%g a mode qualifier with other PATCH commands.ww)ѭ1 SHOWIThe SHOW commands allow the user to examine the current environment which%PATCH is using for entry and display.2 MODE> Use SHOW MODE to report the modes that are currently set.F This command is used primarily with the SET MODE and/or CANCELF MODE commands. It indicates the condition of the current modes,= enabling you to change one or more of them if necessary.F & When you issue the SHOW MODE command, the mode values are always$ displayed in lowercase letters.Format: SHOW MODEww)ѭ1 UPDATE.Use UPDATE to apply a patch to the image file.AThe UPDATE command is a patch terminator. This command appliesAthe previous patch to the image file and creates an output imageAfile. If you fail to issue the UPDATE command, no output imagefile is created.ADuring a single execution of PATCH, you can specify th'e UPDATEAcommand more than once. The first UPDATE command specifiedAcreates a new output image file. Subsequent UPDATE commandsA(specified during that PATCH session) overwrite the output imageAfile. That is, a new version of the output image file is notcreated.AIf a SET ECO command is issued, a subsequent UPDATE command+automatically sets the ECO level specified.Format: UPDATEww)ѭ1 VERIFYAUse VERIFY to confirm that (a location or several consecutive)locations contain the specified contents.AGenerally, you should use the VERIFY command with the DEPOSITAcommand. The DEPOSIT command does not confirm the entries beforeAoverwriting them. Therefore, to make certain you know theAcontents of the locations that will be modified, issue the VERIFYcommand first.AThe VERIFY command is also useful when you are patching an imageAfile by means of a command procedure. Using the VERIFY comma)nd,Ayou can check particular locations before attempting to modifyAthem. If the VERIFY command fails, that patch is not applied,Aand PATCH skips to the next SET ECO command. If no other SET ECO4command exists, the command procedure is terminated.Format:. VERIFY location = current-contents [,...]1 Mode Qualifiers Default1 ____ __________ _______ /BYTE/ /WORD /LONG * /LONG /OCTAL6 /DECIMAL /HEXADECIMAL /HEXADECIMAL2 /[NO]ASCII /NOASCIIPrompts: LOC> location OLD> current-contents 2 ParameterslocationF Specifies either (1) a single location whose contents are to beF checked or (2) the starting address of a sequence of locations& whose contents are to be checked.current-contentsH Specifies one or more data entries to be verified. The data, you verify must be the actual contents.F Do not specify conflicting data types within a single VERIFY command.ww