VM (View Memory)

Syntax

VM[[window]] [[type]] [[address]] [[options]]

Parameters

window

Specifies the memory window to display or change (1 or 2). If a value for window is omitted, the command defaults to the active Memory window or Memory window 1 if no Memory windows are open.

type

Specifies the data-type format of the window's display.

Value Format

A ASCII characters
B Byte (hexadecimal)
I Integer (2-byte decimal)
IU Integer unsigned (2-byte decimal)
IX Integer hex (2-byte hexadecimal)
L Long (4-byte decimal)
LU Long unsigned (4-byte decimal)
LX Long hex (4-byte hexadecimal)
R Real (4-byte float)
RL Real long (8-byte float)
RT Real ten-byte (10-byte float)

If format is omitted, the command defaults to the last type used by a View Memory (VM) command or to byte-display format if the VM command was never used.

address

Starting address of memory to display or any expression that evaluates to an address. If address is omitted, the command defaults to the current address in the active Memory window or DS:00 if no Memory windows are open.

options

Specifies how to display and update the Memory window's contents.

/R[[+|]]

Raw data display

Option Description

+ CodeView displays formatted data along with the corresponding bytes in hexadecimal format.
(default) CodeView displays only formatted data.

/L[[+|]]

Live expression

Option Description

+ Dynamic: CodeView evaluates address at each step and adjusts the Memory window accordingly.
(default) Static: CodeView evaluates address only when the command is entered.

/F[[*| length]]

Fixed-width data display

Option Description

* (default) CodeView displays as many items as will fit in the window.
length CodeView displays a fixed number of items on each line. Must be in the range 1–125.

Description

The View Memory (VM) command displays the contents of memory in a Memory window using the type and format you specify. The Memory window is updated whenever you execute a command. You can modify memory in the window directly by typing over the displayed memory.

If you enter the VM command with no arguments and no Memory windows are open, CodeView opens Memory window 1 in the default display format (variable-width byte display at a static address). If you enter the VM command with no arguments and at least one Memory window is open, CodeView displays the current settings for the Memory windows in the Command window.

You can directly modify memory using the Memory window. Type over the values displayed in the active Memory window.

To display the contents of memory in the Command window, use the Memory Dump (MD) command.

Mouse and Keyboard

In addition to typing the VM command, you can open and manipulate Memory windows with the following shortcuts:

To open a Memory window from the Windows menu, choose Memory 1 or Memory 2.

To set display format and enter expressions for a Memory window, choose Memory Window from the Options menu.

You can cycle through the display formats with the following shortcuts:

Click the <SH+F3=Mem1 Fmt> or <SH+F3=Mem2 Fmt> buttons in the status bar.

Press SHIFT+F3 to cycle forwards.

Press CTRL+SHIFT+F3 to cycle backwards.

When the cursor is in the Memory window, press CTRL+O to display the Memory Window Options dialog box.

Examples

The following example opens Memory window 2 and displays memory in integer format plus the raw bytes that make up the integers, beginning at the address of the variable myint.

>VM2I /R myint

The following example specifies ASCII format for the current Memory window. The memory displayed begins at the string referred to by element i of the array argv. The expression is live, so the display is updated as i changes.

>VMA /L *argv[i]