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

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

09.06.2013 Views

XENIX Programming adb: Program Debugger Note that the unary * operator treats the given address as a pointer. An expression using this operator resolves to the value pointed to by that pointer. For example, the expression *Ox1234 is equal to the value at the address Ox1234, whereas Ox1 234 is just equal to Ox1234. Choosing Data Formats A format is a letter or character that defines how data is to be displayed. The following are the most commonly used formats: Letter Format o 1 word in octal d 1 word in decimal D 2 words in decimal x 1 word in hexadecimal X 2 words in hexadecimal u 1 word as an unsigned integer f 2 words in floating point F 4 words in floating point c 1 byte as a character s a null terminated character string i machine instruction b 1 byte in octal a the current symbolic address A the current absolute address n a newline r a blank space t a horizontal tab A format may be used by itself or combined with other formats to present a combination of data in different forms. The d, o, x, and u formats may be used to display int type variables and D and X to display long variables or 32-bit values. The f and F formats may be used to display single- and double-precision floating-point numbers. The c format displays char type variables and s is for arrays of char that end with a null character (null terminated strings). 6-9

adb: Program Debugger XENIX Programming The i format displays machine instructions in 8086/286 mnemonics. The b format displays individual bytes and is useful for display data associated with instructions or the high or low bytes of registers. The a, r, and n formats are usually combined with other formats to make the display more readable. For example, the format ia causes the current address to be displayed after each instruction. You may precede each format with a count of the number of times you wish it to be repeated. For example, the format 4c displays four ASCII characters. You can combine format requests to provide elaborate displays. For example, the command

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

Note that the unary * operator treats the given address as a pointer. An expression<br />

using this operator resolves to the value pointed to by that pointer. For example, the<br />

expression<br />

*Ox1234<br />

is equal to the value at the address Ox1234, whereas<br />

Ox1 234<br />

is just equal to Ox1234.<br />

Choosing Data Formats<br />

A format is a letter or character that defines how data is to be displayed. The following<br />

are the most commonly used formats:<br />

Letter Format<br />

o 1 word in octal<br />

d 1 word in decimal<br />

D 2 words in decimal<br />

x 1 word in hexadecimal<br />

X 2 words in hexadecimal<br />

u 1 word as an unsigned integer<br />

f 2 words in floating point<br />

F 4 words in floating point<br />

c 1 byte as a character<br />

s a null terminated character string<br />

i machine instruction<br />

b 1 byte in octal<br />

a the current symbolic address<br />

A the current absolute address<br />

n a newline<br />

r a blank space<br />

t a horizontal tab<br />

A format may be used by itself or combined with other formats to present a<br />

combination of data in different forms.<br />

The d, o, x, and u formats may be used to display int type variables and D and X to<br />

display long variables or 32-bit values. The f and F formats may be used to display<br />

single- and double-precision floating-point numbers. The c format displays char type<br />

variables and s is for arrays of char that end with a null character (null terminated<br />

strings).<br />

6-9

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

Saved successfully!

Ooh no, something went wrong!