! PATCH.HLP -   created by K. D. MORSE on  0/18/78   14:47
Allows you to symbolically patch a native image file.

Format
 PATCH file-spec

*Parameters
file-spec - image file to be patched.

*Qualifiers
/COMMAND

	Requests PATCH to output an indirect PATCH command file of
	the commands successfully executed during the patch session.

/JOURNAL

	Requests PATCH to name the journal file as specified.

/OUTPUT

	Requests PATCH to name the output image file as spsecified.

/UPDATE

	Specifies the ECO update levels which PATCH is to apply.  This
	qualifier is used with indirect command files to apply only
	selected ECO's.

	Format
		/UPDATE=(n,[,m,...])

	n,m - ECO levels to be applied from indirect command files.

*ALIGN
	This command aligns the current patch area to the requested
	boundary and defines the user symbol as the aligned patch area
	address.

Format
	ALIGN /boundary user-symbol

boundary - boundary on which patch area is to be aligned:  BYTE, WORD,
	LONG, QUAD, or PAGE
user-symbol - symbolic name to be associated with aligned patch area
	address, maximum of fifteen alpha-numeric characters
*CANCEL
@_PATCHCANC
*CHECK
	Checks that an ECO level is (or is not) set in the image being
	patched.  This verifies that all required predecessor patches
	have been applied.

	Format
		CHECK ECO n [,m,x:y,...]
		CHECK NOT ECO n [,m,x:y,...]

	n,m - single ECO levels to be checked
	x:y - range of ECO levels to be checked, x and y inclusive
*CREATE
	This command requests PATCH to create an indirect command
	file starting with the next patch command entered.  A file
	specification may be entered as a parameter or nothing
	specified which will cause PATCH to use the input image
	file-name and the file-type COM.

	Format
		CREATE [file-spec]

	file-spec - file specification for the indirect command
		file to be created
*DEFINE
	This command enters a user-defined symbol into PATCH's symbol
	table.  The symbol is available for use only during the current
	patch session.

	Format
		DEFINE [/qualifiers] symbol = expression

	symbol - up to 15-character alpha-numeric symbolic name to be defined
	expression - value to be associated with symbol
*DELETE
	This command deletes the contents of the location(s) specified.
	If instruction mode is set, then the location(s) is(are) filled
	with NOP instructions; otherwise, the area is zero-filled.

	Format
		DELETE [/qualifiers] location = old-contents

	location - address to be altered
	old-contents - current values contained in the location
*DEPOSIT
	This command allows you to place new values into locations without
	verifying what the old contents were.

	Format
		DEPOSIT [/qualifiers] location = new-contents

	location - address to be altered
	new-contents - new values to be placed in the location
*EVALUATE
	This command evaluates an arithmetic expression and prints the
	equivalant numeric value.  The expression syntax is that accepted
	by the VAX MACRO ASSEMBLER.

	Format
		EVALUATE [/qualifiers] expression [,expression2,...]

	expression - combination of symbolic names and the legal operators
*EXAMINE
	This command allows you to examine any location or range of locations
	in the image being patched.

	Format
		EXAMINE [/qualifiers] n [,m,x:y,...]

	n,m - individual locations to be displayed
	x,y - bounds on a range of locations to be displayed
*EXIT
	This command allows you to go from one level of prompt to the next.
	For example, to end the "OLD>" prompting, you type "EXIT".  To
	exit from PATCH and return to DCL, you type "EXIT" to the "PATCH>"
	prompt.

	Format
		EXIT
*INSERT
	This command allows you to insert instructions AFTER a specific
	instruction.  Instruction mode must be specified.  It will allow
	you to specify the old instruction after which new instructions
	are to be placed, on the initial command line, but all new
	instructions must be entered in response to the "NEW>" prompt.

	Format
		INSERT /INSTRUCTION [/qualifiers] location=old-instruction
		NEW> new-instruction
		NEW> ...
		NEW> EXIT

	location - the address of the instruction after which new instructions
		are to be inserted
	old-instruction - the contents of the location specified
	new-instruction - the new instructions to be inserted
*REPLACE
	This command allows you to replace one or more instructions or
	values with new instructions or values.  The old-contents need
	not be the same size as the new contents.  Excess space is filled
	with NOP's for instruction replacement and zeros for data replacement.
	Prompting is similar to the INSERT command.

	Format
		REPLACE [/qualifiers] location=old-contents,old-contents,...
		NEW> new-contents
		NEW> ...
		NEW> EXIT

	location - the address to be changed
	old-contents - the current contents of the location specified
	new-contents - the new contents to be inserted
*SET
@_PATCHSET
*SHOW
@_PATCHSHOW
*UPDATE
	This command tells PATCH to write out a new version of the
	image file.  The first UPDATE command will create a version one
	greater than the input file, while successive UPDATE commands
	cause the new version to be overwritten.

	Format
		UPDATE
*VERIFY
	This command allows you to verify that a certain location contains
	the data or instructions expected.

	Format
		VERIFY [/qualifiers] location=old-contents,old-contents,...

	location - the first address to be verified
	old-contents - the contents of successive locations to be verified
*operators
	PATCH recognizes several special characters instead of virtual
	addresses.  These are:

		.		location last specified
		^		the previous location (.-current length mode)
		\		the value last displayed
		@		the contents of
		:		range separator, or symbolic label delimiter

	In addition, the following special characters are recognized
	in arithmetic expressions.

		+		addition
		-		subtraction
		*		multiplication
		/		division
		< >		priority operators
		^D		decimal radix
		^O		octal radix
		^X		hexadecimal radix
*command-qualifiers

	The legitimate qualifiers may be separated into several categories:
			1.) length modes
			2.) radix modes
			3.) context modes
			4.) symbol search modes

	Length modes indicate the size of the field to display or patch.
	These qualifiers include /LONG, /WORD, and /BYTE.

	Radix modes specify the radix for all numeric values entered
	or displayed.  The legitimate radix qualifiers are /DECIMAL,
	/OCTAL, and /HEXADECIMAL.

	Context modes further qualify PATCH's interpretation and
	display of data.  The context modes are as follows:

		/[NO]ASCII	- Data is ASCII characters
		/[NO]INSTRUCTION - Data is symbolic instructions
		/[NO]SYMBOLS	- Data is displayed as pathnames

	Search modes control the use of symbols by PATCH.  When a
	pathname is entered by an user, PATCH searches its symbol tables
	in a succession of ways.  The first qualifier is /[NO]GLOBALS.
	/GLOBALS instructs PATCH, during its first search, to treat
	all pathnames as global symbols and look for them in the symbol
	table exactly as entered by the user.  The negative of the
	qualifier causes PATCH to prefix the current scope onto the
	pathname before searching the symbol table the first time.

	The second search mode is /[NO]SCOPE.  This mode controls
	whether or not PATCH will ever prefix the current scope onto
	the pathname before searching the symbol table.  This differs
	from /NOGLOBALS in that /NOSCOPE modifies the search rules
	such that PATCH will never use scope while /NOGLOBALS restricts
	PATCH from using scope during its first table search.
