Intel XENIX 286 Programmers Guide (86) - Tenox.tc
Intel XENIX 286 Programmers Guide (86) - Tenox.tc Intel XENIX 286 Programmers Guide (86) - Tenox.tc
XENIX Programming as: Assembler Based Operands Based operands are bytes or words in memory with addresses computed by adding a constant and one of the base registers bp or bx. The operands have the forms expression ] (bp) expression ] (bx) where expression is an absolute expression or symbol that resolves to an absolute. Based operands are typically used to access structures. The base register points to the start of the structure, and items in the structure are addressed by an appropriate expression. The following examples illustrate based operands: mov 2(bp), #1000 movb ax, TOP (bx) neg -4 (bp) mov ax, (bx) (bp) Indexed Operands Indexed operands are bytes or words in memory with addresses computed by adding a constant and one of the index registers di or si. The operands have the forms expression (di) expression (si) where expression is an absolute expression or symbol that resolves to an absolute. Indexed operands are often used to access elements in an array. expression points to the start of the array. The index register is given the index value of the elem ent to be accessed. Since all array elements are the same length, simple arithmetic on the index register will select any element. The following examples illustrate indexed operands: movb ax,Darray(di) addb 4096(si), * 1 7-2 1
as: A sse m bier XENIX Programming Based Indexed Operands Based indexed operands are bytes or words in memory whose addresses are computed by adding a constant, a base register, and an index register. The operands have the forms expression ] (bx) (di) expression ] (bx) (si) expression ] (bp) (di) expression ] (bp) (si) where expression is an absolute expression or a symbol that resolves to an absolute. Based indexed operands provide a very flexible method of accessing items that require two address components. For example, elements of multidimensional arrays can be accessed by setting expression to the start address of the array and assigning the appropriately scaled index values to the base and index registers. The following examples illustrate based indexed operands: movb Darray (bx) (di), * 1 mov ax, (bx) (si) neg -2 (bp) (si) Indirect Address Operands Indirect address operands are instruction addresses stored in memory at given indirect addresses. Indirect address operands have the form @expression where expression is an absolute expression or a symbol that resolves to an absolute. Indirect address operands may be used only with the calli, call, jmpi, and jmp instructions. When used with the intersegment call or jump instruction, expression must point to a 4-byte segment/offset instruction address. When used with the call or jump instruction, expression must point to a 2-byte offset to an instruction. The following examples illustrate indirect address operands: 7-22 moncall: .word .word subtest': .word .text examp: calli jmp OFFSET SEG SELECT OFFSET @moncall @subtest
- Page 102 and 103: XENIX Programming adb: Program Debu
- Page 104 and 105: XENIX Programming adb: Program Debu
- Page 106 and 107: XENIX Programming adb: Program Debu
- Page 108 and 109: XENIX Programming adb: Program Debu
- Page 110 and 111: XENIX Programming adb: Program Debu
- Page 112 and 113: XENIX Programming adb: Program Debu
- Page 114 and 115: XENIX Programming adb: Program Debu
- Page 116 and 117: XENIX Programming int fcnt,gcnt,hcn
- Page 118 and 119: XENIX Programming adb: Program Debu
- Page 120 and 121: XENIX Programming adb: Program Debu
- Page 122 and 123: XENIX Programming adb: Program Debu
- Page 124 and 125: XENIX Programming adb: Program Debu
- Page 126 and 127: XENIX Programming adb: Program Debu
- Page 128: XENIX Programming adb: Program Debu
- Page 131 and 132: as: A sse m bier XENIX Programming
- Page 133 and 134: as: Assembler XENIX Programming The
- Page 135 and 136: as: Assembler XENIX Programming Key
- Page 137 and 138: as: Assembler The combination rules
- Page 139 and 140: as: Assembler XENIX Programming Ins
- Page 141 and 142: as: Assembler Initial Value Directi
- Page 143 and 144: as: Assembler XENIX Programming int
- Page 145 and 146: as: A sse m bier sub subb test test
- Page 147 and 148: as: Assembler XENIX Programming lnt
- Page 149 and 150: as: Assembler XENIX Programming lnt
- Page 151: as: Assembler XENIX Programming Imm
- Page 156 and 157: CHAPTER 8 csh : C SHEll The C shell
- Page 158 and 159: XENIX Programming csh: C Shell Some
- Page 160 and 161: XENIX Programm ing *w 32 * q % !c -
- Page 162 and 163: XENIX Programming csh: C Shell the
- Page 164 and 165: XENIX Programming csh: C Shell Usin
- Page 166 and 167: XENIX Programming csh: C Shell Usin
- Page 168 and 169: XENIX Programming csh: C Shell The
- Page 170 and 171: XENIX Programming csh: C Shell Note
- Page 172 and 173: XENIX Programming switch ( string c
- Page 174 and 175: XENIX Programming csh: C Shell Star
- Page 176 and 177: XENIX Programming csh: C Shell Spec
- Page 178 and 179: CHAPTER 9 lex : LEXICAL ANA LYZER G
- Page 180 and 181: XENIX Programming lex: Lexical Anal
- Page 182 and 183: XENIX Programming lex: Lexical Anal
- Page 184 and 185: XENIX Programming lex: Lexical Anal
- Page 186 and 187: XENIX Programming lex: Lexical Anal
- Page 188 and 189: XENIX Programming lex: Lexical Anal
- Page 190 and 191: XENIX Programming lex: Lexical Anal
- Page 192 and 193: XENIX Programm ing lex: Lexical Ana
- Page 194 and 195: XENIX Programming Specifying Source
- Page 196 and 197: XENIX Programming lex: Lexical Anal
- Page 198 and 199: XENIX Programming lex: Lexical Anal
- Page 200 and 201: XENIX Programming The definitions s
<strong>XENIX</strong> Programming as: Assembler<br />
Based Operands<br />
Based operands are bytes or words in memory with addresses computed by adding a<br />
constant and one of the base registers bp or bx. The operands have the forms<br />
expression ] (bp)<br />
expression ] (bx)<br />
where expression is an absolute expression or symbol that resolves to an absolute.<br />
Based operands are typically used to access structures. The base register points to the<br />
start of the structure, and items in the structure are addressed by an appropriate<br />
expression.<br />
The following examples illustrate based operands:<br />
mov 2(bp), #1000<br />
movb ax, TOP (bx)<br />
neg -4 (bp)<br />
mov ax, (bx) (bp)<br />
Indexed Operands<br />
Indexed operands are bytes or words in memory with addresses computed by adding a<br />
constant and one of the index registers di or si. The operands have the forms<br />
expression (di)<br />
expression (si)<br />
where expression is an absolute expression or symbol that resolves to an absolute.<br />
Indexed operands are often used to access elements in an array. expression points to the<br />
start of the array. The index register is given the index value of the elem ent to be<br />
accessed. Since all array elements are the same length, simple arithmetic on the index<br />
register will select any element.<br />
The following examples illustrate indexed operands:<br />
movb ax,Darray(di)<br />
addb 4096(si), * 1<br />
7-2 1