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 />

Leaving adb<br />

You can stop adb and return to the system shell by using the $q or $Q commands. You<br />

can also stop the debugger by typing CONTROL-D.<br />

You cannot stop adb by pressing the INTERRUPT or QUIT keys. These keys are caught<br />

by adb and cause it to to wait for a new command.<br />

Displaying Instructions and Data<br />

adb provides several commands for displaying the instructions and data of a given<br />

program and the data of a given data file. The commands have the form<br />

address [, count 1 =<br />

format<br />

address [, count 1 ? format<br />

address [, count 1 I format<br />

where address is a value or expression giving the location of the instruction or data<br />

item, count is an expression giving the number of items to be displayed, and format is an<br />

expression defining how to display the items. The equal sign (=), question mark (?), and<br />

slash (/) tell adb from what source to take the item to be displayed.<br />

The following sections explain how to form addresses, how to choose formats, and how<br />

to use the display commands.<br />

Forming Addresses<br />

In adb, every address has the form<br />

[segment :1 offset<br />

where segment is an expression giving the address of a specific segment of memory, and<br />

offset is an expression giving an offset from the beginning of the specified segment to<br />

the desired item. Segments and offsets are formed by combining numbers, sym bols,<br />

variables, and operators. The following are some valid addresses:<br />

0:1<br />

Ox0bce:772<br />

segment: is optional. If not given, the most recently typed segment is used.<br />

Forming Expressions<br />

Expressions may contain decimal, octal, and hexadecimal integers, sym bols, adb<br />

variables, register names, and a variety of arithmetic and logical operators.<br />

6-4

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

Saved successfully!

Ooh no, something went wrong!