1 <!DOCTYPE HTML PUBLIC
"-//IETF//DTD HTML 2.0//EN">
4 <TITLE>80386 Programmer's Reference Manual -- Opcode OUT
</TITLE>
7 <B>up:
</B> <A HREF=
"c17.htm">
8 Chapter
17 --
80386 Instruction Set
</A><BR>
9 <B>prev:
</B><A HREF=
"OR.htm"> OR Logical Inclusive OR
</A><BR>
10 <B>next:
</B><A HREF=
"OUTS.htm"> OUTS/OUTSB/OUTSW/OUTSD Output String to Port
</A>
14 <H1>OUT -- Output to Port
</H1>
17 Opcode Instruction Clocks Description
19 E6 ib OUT imm8,AL
10,pm=
4*/
24** Output byte AL to immediate port
21 E7 ib OUT imm8,AX
10,pm=
4*/
24** Output word AL to immediate port
23 E7 ib OUT imm8,EAX
10,pm=
4*/
24** Output dword AL to immediate
25 EE OUT DX,AL
11,pm=
5*/
25** Output byte AL to port number in
27 EF OUT DX,AX
11,pm=
5*/
25** Output word AL to port number in
29 EF OUT DX,EAX
11,pm=
5*/
25** Output dword AL to port number
38 **If CPL
> IOPL or if in virtual
8086 mode
45 IF (PE =
1) AND ((VM =
1) OR (CPL
> IOPL))
46 THEN (* Virtual
8086 mode, or protected mode with CPL
> IOPL *)
47 IF NOT I-O-Permission (DEST, width(DEST))
51 [DEST] := SRC; (* I/O address space used *)
56 OUT transfers a data byte or data word from the register (AL, AX, or
57 EAX) given as the second operand to the output port numbered by the
58 first operand. Output to any port from
0 to
65535 is performed by placing
59 the port number in the DX register and then using an OUT instruction
60 with DX as the first operand. If the instruction contains an eight-bit port
61 ID, that value is zero-extended to
16 bits.
63 <H2>Flags Affected
</H2>
67 <H2>Protected Mode Exceptions
</H2>
69 #GP(
0) if the current privilege level is higher (has less privilege) than
70 IOPL and any of the corresponding I/O permission bits in TSS equals
1
72 <H2>Real Address Mode Exceptions
</H2>
76 <H2>Virtual
8086 Mode Exceptions
</H2>
78 #GP(
0) fault if any of the corresponding I/O permission bits in TSS
85 <B>up:
</B> <A HREF=
"c17.htm">
86 Chapter
17 --
80386 Instruction Set
</A><BR>
87 <B>prev:
</B><A HREF=
"OR.htm"> OR Logical Inclusive OR
</A><BR>
88 <B>next:
</B><A HREF=
"OUTS.htm"> OUTS/OUTSB/OUTSW/OUTSD Output String to Port
</A>