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.

as: A sse m bier <strong>XENIX</strong> Programming<br />

Based Indexed Operands<br />

Based indexed operands are bytes or words in memory whose addresses are computed by<br />

adding a constant, a base register, and an index register. The operands have the forms<br />

expression ] (bx) (di)<br />

expression ] (bx) (si)<br />

expression ] (bp) (di)<br />

expression ] (bp) (si)<br />

where expression is an absolute expression or a symbol that resolves to an absolute.<br />

Based indexed operands provide a very flexible method of accessing items that require<br />

two address components. For example, elements of multidimensional arrays can be<br />

accessed by setting expression to the start address of the array and assigning the<br />

appropriately scaled index values to the base and index registers.<br />

The following examples illustrate based indexed operands:<br />

movb Darray (bx) (di), * 1<br />

mov ax, (bx) (si)<br />

neg -2 (bp) (si)<br />

Indirect Address Operands<br />

Indirect address operands are instruction addresses stored in memory at given indirect<br />

addresses. Indirect address operands have the form<br />

@expression<br />

where expression is an absolute expression or a symbol that resolves to an absolute.<br />

Indirect address operands may be used only with the calli, call, jmpi, and jmp<br />

instructions. When used with the intersegment call or jump instruction, expression<br />

must point to a 4-byte segment/offset instruction address. When used with the call or<br />

jump instruction, expression must point to a 2-byte offset to an instruction.<br />

The following examples illustrate indirect address operands:<br />

7-22<br />

moncall:<br />

.word<br />

.word<br />

subtest':<br />

.word<br />

.text<br />

examp:<br />

calli<br />

jmp<br />

OFFSET<br />

SEG SELECT<br />

OFFSET<br />

@moncall<br />

@subtest

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

Saved successfully!

Ooh no, something went wrong!