/sys$common/syshlp/helplib.hlb DEPOSIT, Examples *Conan The Librarian (sorry for the slow response - running on an old VAX) |
1.$ RUN MYPROG . . . <Ctrl/Y> $ EXAMINE %D2145876444 7FE779DC: 0000000000 $ DEPOSIT .=17 7FE779DC: 0000000017 $ CONTINUE 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 location 2145876444. 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. 2.$ 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. 3.$ EXAMINE 9C0 ! Look at Hex location 9C0 000009C0: 8C037DB3 $ DEPOSIT .=0 ! Deposit longword of 0 000009C0: 00000000 $ DEPOSIT/BYTE .=1 ! Put 1 byte at next location 000009C4: 01 $ DEPOSIT .+2=55 ! Deposit 55 next 000009C7: 55 $ 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 default. 4.$ 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.
|