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 Add ressing Modes The XENIX 8086/286 assembler provides many different ways to access instruction operands. Operands may be contained in registers, within the instruction itself, in memory, or in 1/0 ports. In addition, the addresses of memory and 1/0 port operands can be calculated in several different ways. The following sections describe the format and meaning of instruction operands. Register Operands Register operands are the 8086/286 CPU registers. In an instruction, a register operand causes the instruction's action to be performed on the contents of the register. A register operand may be any one of the following: ax ah al bx bh bl ex ch cl dx dh dl di si bp sp cs ds ss es Register operands may be used for the source or destination in an instruction. Since these operands are encoded in a few bits, instructions that specify only register operands are generally the most compact. They are also the fastest, since operations on registers are performed entirely within the CPU. The following are examples of instructions with register operands: sub ax,bx addb ah,dl cmp cs,ds 7-19
as: Assembler XENIX Programming Immediate Operands Immediate operands are byte or word constants given with the instruction itself. These operands have the forms * expression # expression where * specifies a byte constant, # specifies a word constant, and expression is an absolute expression or a symbol that defines the constant's value. Since immediate operands are constants, they cannot be used as the destination operand. Note that the assembler does not check the operand size. The following examples illustrate immediate operands: movb mov ad db ex, *33 ex,#( 1 22/2) ax,*NAME Direct Address Operands Direct address operands are the bytes or words in memory at the given direct addresses. Direct addresses have the form expression where expression is an absolute expression or symbol that resolves to a memory address. The direct address gives the locat ion of the operand in terms of an offset from the beginning of the current segment or the segment in which the given symbol is defined. - Direct address operands may be used for source or destination. Although absolute addresses are allowed, symbols should be used whenever possible. The size of the operand depends on the instruction in which it is used. The following examples illustrate direct address operands: 7-20 mov movb ex, free Darray + 204, * 1
- Page 100 and 101: XENIX Programming adb: Program Debu
- 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: as: Assembler XENIX Programming lnt
- Page 153 and 154: as: A sse m bier XENIX Programming
- 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
<strong>XENIX</strong> Programming as: Assembler<br />
Add ressing Modes<br />
The <strong>XENIX</strong> 80<strong>86</strong>/<strong>2<strong>86</strong></strong> assembler provides many different ways to access instruction<br />
operands. Operands may be contained in registers, within the instruction itself, in<br />
memory, or in 1/0 ports. In addition, the addresses of memory and 1/0 port operands<br />
can be calculated in several different ways.<br />
The following sections describe the format and meaning of instruction operands.<br />
Register Operands<br />
Register operands are the 80<strong>86</strong>/<strong>2<strong>86</strong></strong> CPU registers. In an instruction, a register operand<br />
causes the instruction's action to be performed on the contents of the register. A<br />
register operand may be any one of the following:<br />
ax ah al<br />
bx bh bl<br />
ex ch cl<br />
dx dh dl<br />
di si bp<br />
sp cs ds<br />
ss es<br />
Register operands may be used for the source or destination in an instruction. Since<br />
these operands are encoded in a few bits, instructions that specify only register<br />
operands are generally the most compact. They are also the fastest, since operations on<br />
registers are performed entirely within the CPU.<br />
The following are examples of instructions with register operands:<br />
sub ax,bx<br />
addb ah,dl<br />
cmp cs,ds<br />
7-19