
Instruction Set
4-171
OUT
Output Component to Port
OUT
What It Does
OUT copies a component from a register to a port in I/O memory.
Syntax
Description
OUT transfers a data byte from the register (AL or AX) given as the second operand (
source)
to the output port numbered by the first operand (
port). Output to any port from 0 to 65535
is performed by placing the port number in the DX register and then using an OUT instruction
with the DX register as the first operand. If the instruction contains an 8-bit port number,
that value is zero-extended to 16 bits.
Operation It Performs
Flag Settings After Instruction
Form
Opcode
Description
Clocks
Am186 Am188
OUT
imm8,AL
E6
ib
Output AL to immediate port
9
9
OUT
imm8,AX
E7
ib
Output AX to immediate port
9
13
OUT DX,AL
EE
Output AL to port in DX
7
7
OUT DX,AX
EF
Output AX to port in DX
7
11
OUT
port, source
/* extend port number */
if (size(
port) == 8)
port = 0x00FF & port;
/* move component */
[
port] = source;
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
Processor Status
Flags Register
reserved
OF DF
IF TF SF ZF
AF
PF
CF
? = undefined; – = unchanged
–
–
–
–
–
– res – res – res –
Содержание Am186 Series
Страница 1: ...Am186 and Am188 Family Instruction Set Manual February 1997...
Страница 10: ...Table of Contents x...
Страница 18: ...Programming 1 8...
Страница 40: ...Instruction Set Listing 3 14...