HP OpenVMS DCL Dictionary
Replaces the contents of the specified locations in virtual memory and
displays the new contents.
The DEPOSIT command, together with the EXAMINE command, aids in
debugging programs interactively. The DCL command DEPOSIT is similar to
the DEPOSIT command of the OpenVMS Debugger.
Requires user-mode read (R) and write (W) access to the virtual
memory location whose contents you wish to change.
Specifies the starting virtual address or range of virtual addresses
(where the second address is larger than the first) whose contents are
to be changed. A location can be any valid integer expression
containing an integer value, a symbol name, a lexical function, or a
combination of these entities. Radix qualifiers determine the radix in
which the address is interpreted; hexadecimal is the initial default
radix. Symbol names are always interpreted in the radix in which they
were defined. The radix operators %X, %D, or %O can precede the
location. A hexadecimal value must begin with a number (or be preceded
The specified location must be within the virtual address space of the
image currently running in the process.
The DEPOSIT and EXAMINE commands maintain a pointer to a current memory
location. The DEPOSIT command sets this pointer to the byte following
the last byte modified; you can refer to this pointer by using a period
(.) in subsequent EXAMINE and DEPOSIT commands. If the DEPOSIT command
cannot deposit the specified data, the pointer does not change. The
EXAMINE command does not change the value of the pointer.
Specifies the data to be deposited into the specified locations. By
default, the data is assumed to be in hexadecimal format; it is then
converted to binary format and is written into the specified location.
If you specify more than one item, separate the items with commas (,).
The DEPOSIT command writes the data in consecutive locations, beginning
with the address specified.
When non-ASCII data is deposited, you can specify each item of data
using any valid integer expression.
When ASCII data is deposited, only one item of data is allowed. All
characters to the right of the equal sign are considered to be part of
a single string. The characters are converted to uppercase, and all
spaces are compressed.
When the DEPOSIT command completes, it displays both the virtual memory
address into which data is deposited and the new contents of the
location, as follows:
If the specified address can be read from but not written to by the
current access mode, the DEPOSIT command displays the original contents
of the location. If the specified address can be neither read from nor
written to, the DEPOSIT command displays asterisks (*) in the data
field. The DEPOSIT command maintains a pointer at that location (at the
byte following the last byte modified).
If you specify a list of numeric values, some but not all of the values
may be successfully deposited before an access violation occurs. If an
access violation occurs while ASCII data is being deposited, nothing is
Radix Qualifiers: The radix default for a DEPOSIT or
EXAMINE command determines how the command interpreter interprets
numeric literals. The initial default radix is hexadecimal; all numeric
literals in the command line are assumed to be hexadecimal values. If a
radix qualifier modifies the command, that radix becomes the default
for subsequent EXAMINE and DEPOSIT commands, until another qualifier
overrides it. For example:
$ DEPOSIT/DECIMAL 900=256
The DEPOSIT command interprets both the location 900 and the value 256
as decimal. All subsequent DEPOSIT and EXAMINE commands assume that
numbers you enter for addresses and data are decimal. Note that the
DEPOSIT command always displays the address location in hexadecimal.
Symbol values defined by = (assignment statement) commands are always
interpreted in the radix in which they were defined.
Note that hexadecimal values entered as deposit locations or as data to
be deposited must begin with a numeric character (0 to 9); otherwise,
the command interpreter assumes that you have entered a symbol name and
attempts symbol substitution.
You can use the radix operators %X, %D, or %O to override the current
default when you enter the DEPOSIT command. For example:
$ DEPOSIT/DECIMAL %X900=10
This command deposits the decimal value 10 in the location specified as
Length Qualifiers: The initial default length unit for
the DEPOSIT command is a longword. If a list of data values is
specified, the data is deposited into consecutive longwords beginning
at the specified location. If a length qualifier modifies the command,
that length becomes the default for subsequent EXAMINE and DEPOSIT
commands, until another qualifier overrides it. If you specify data
values that are longer than the specified length, an error occurs.
Length qualifiers are ignored when ASCII values are deposited.
Restriction on Placement of Qualifiers: The DEPOSIT
command analyzes expressions arithmetically. Therefore, qualifiers,
which must be preceded by a slash (/), must appear immediately after
the command name to be interpreted correctly.
Indicates that the specified data is ASCII.
Only one data item is allowed; all characters to the right of the equal
sign (=) are considered to be part of a single string. Unless they are
enclosed within quotation marks (" "), characters are
converted to uppercase and multiple spaces are compressed to a single
space before the data is written in memory.
The DEPOSIT command converts the data to its binary equivalent before
placing it in virtual memory. When you specify /ASCII, or when ASCII
mode is the default, the location you specify is assumed to be
Requests that data be deposited 1 byte at a time.
Indicates that the data is decimal. The DEPOSIT command converts the
data to its binary equivalent before placing it in virtual memory.
Indicates that the data is hexadecimal. The DEPOSIT command converts
the data to its binary equivalent before placing it in virtual memory.
Requests that data be deposited a longword at a time.
Indicates that the data is octal. The DEPOSIT command converts the data
to its binary equivalent before placing it in virtual memory.
Requests that the data be deposited one word at a time.
$ RUN MYPROG
$ EXAMINE %D2145876444
$ DEPOSIT .=17
The RUN command executes the image MYPROG.EXE; subsequently, Ctrl/Y
interrupts the program. Assuming that the initial defaults of the
/HEXADECIMAL and /LONGWORD qualifiers are in effect, the DEPOSIT
command places a longword value 17 (23 decimal) in virtual memory
Because the EXAMINE command sets up a pointer to the current memory
location, which in this case is virtual address 2145876444, you can
refer to this location with a period (.) in the DEPOSIT command.
The CONTINUE command resumes execution of the image.
$ DEPOSIT/ASCII 2C00=FILE: NAME: TYPE:
00002C00: FILE: NAME: TYPE:...
In this example, the DEPOSIT command deposits character data at
hexadecimal location 2C00 and displays the contents of the location
after modifying it. Because the current default length is a longword,
the response from the DEPOSIT command displays full longwords. The
ellipsis (...) indicates that the remainder of the last longword of
data contains information that was not modified by the DEPOSIT command.
$ EXAMINE 9C0 ! Look at Hex location 9C0
$ DEPOSIT .=0 ! Deposit longword of 0
$ DEPOSIT/BYTE .=1 ! Put 1 byte at next location
$ DEPOSIT .+2=55 ! Deposit 55 next
$ DEPOSIT/LONG .=0C,0D,0E ! Deposit longwords
000009C8: 0000000C 0000000D 0000000E
The sequence of DEPOSIT commands in the above example illustrates how
the DEPOSIT command changes the current position pointer. Note that
after you specify the /BYTE qualifier, all data is deposited and
displayed in bytes, until the /LONGWORD qualifier restores the system
$ BASE=%X200 ! Define a base address
$ LIST=BASE+%X40 ! Define offset from base
$ DEPOSIT/DECIMAL LIST=1,22,333,4444
00000240: 00000001 00000022 00000333 00004444
$ EXAMINE/HEX LIST:LIST+0C ! Display results in hex
00000240: 00000001 00000016 0000014D 0000115C
The assignment statements define a base address in hexadecimal and a
label at a hexadecimal offset from the base address. The DEPOSIT
command reads the list of values and deposits each value into a
longword, beginning at the specified location. The EXAMINE command
requests a hexadecimal display of these values.