User guide

12.4.1 Accessing Memory
Commands are available for gaining access to memory.
Note
Because the console itself and other critical data structures reside in
memory, be careful not to alter them.
Use the alloc command to find an unused 1000-byte block of memory, as shown
in the following example:
>>> alloc 1000
03FFF000
The address of the allocated block is, in this case, 0x03FFF000. Use your
allocated block to test the procedures in this section.
Use the deposit command to add a value of 1 to physical memory:
>>> deposit pmem:3fff000 1
To check the contents of the address, use the examine command:
>>> examine pmem:3fff000
pmem: 3FFF000 00000001
You can abbreviate commands and you do not need to specify the device if you
are referring to the default device. The following example shows the deposit and
examine in an abbreviated form. The current device is still physical memory.
>>> d 3fff000 abcdef12 # Deposit new data there.
>>> e 3fff000 # Check it out.
pmem: 3FFF000 ABCDEF12
The console commands can be qualified, using the UNIX like options. You must
leave a space between the command and each option. The following example
shows how to use the -n option to specify a repeat count. The command is
executed over n+1 successive addresses.
>>> d 3fff000 aaaa5555 -n 3 # Write to 4 locations, yes 4!
>>> e 3fff000 -n 3 # Notice that -n 3 yields n+1 or 4!
pmem: 3FFF000 AAAA5555
pmem: 3FFF004 AAAA5555
pmem: 3FFF008 AAAA5555
pmem: 3FFF00C AAAA5555
Console Primer 12–9