09.06.2013 Views

Intel XENIX 286 Programmers Guide (86) - Tenox.tc

Intel XENIX 286 Programmers Guide (86) - Tenox.tc

Intel XENIX 286 Programmers Guide (86) - Tenox.tc

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

adb: Program Debugger <strong>XENIX</strong> Programming<br />

Changing the Memory Map<br />

You can change the values of a memory map by using the ?m and /m commands. These<br />

commands assign specified values to the corresponding map entries. The commands<br />

have the form<br />

and<br />

?m segment-number file-position size<br />

/m segment-number file-position size<br />

where segment-number gives the number of the segment map you wish to change, fileposition<br />

gives the offset in the file to the beginning of the given address, and size gives<br />

the segment size in bytes. ?m assigns values to a text segment entry and /m to a data<br />

segment entry.<br />

For example, the following command changes the file position for segment 63 in the<br />

text map to Ox2000:<br />

?m 63 Ox2000<br />

The command<br />

/m 39 OxO<br />

changes the file position for segment 39 in the data map to 0.<br />

Creating New Map Entries<br />

You can create new segment maps and add them to your memory map by using the ?M<br />

and /M commands. Unlike ?m and /m, these commands create a new map instead of<br />

changing an existing one. These commands have the form<br />

and<br />

?M segment-number file-position size<br />

/M segment-number file-position size<br />

where segment-number gives the number of the segment map you wish to create, fileposition<br />

gives the offset in the file to the beginning of the given address, and size gives<br />

the segment size in bytes. ?M creates a text segment entry and /M creates a data<br />

segment entry. The segment number must be unique. You cannot create a new map<br />

entry that has the same number as an existing one.<br />

The ?M and /M commands are especially useful if you wish to access segments otherwise<br />

allocated to your program. For example, the command<br />

?M 71 0 2504<br />

creates a text segment entry for segment 71 with size 2504 bytes.<br />

6-24

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!