3-464
INSTRUCTION SET REFERENCE
OUT—Output to Port (Continued)
Operation
IF ((PE = 1) AND ((CPL > IOPL) OR (VM = 1)))
THEN (* Protected mode with CPL > IOPL or virtual-8086 mode *)
IF (Any I/O Permission Bit for I/O port being accessed = 1)
THEN (* I/O operation is not allowed *)
#GP(0);
ELSE ( * I/O operation is allowed *)
DEST
<
SRC; (* Writes to selected I/O port *)
FI;
ELSE (Real Mode or Protected Mode with CPL
?
IOPL *)
DEST
<
SRC; (* Writes to selected I/O port *)
FI;
Flags Affected
None.
Protected Mode Exceptions
#GP(0)
If the CPL is greater than (has less privilege) the I/O privilege level (IOPL)
and any of the corresponding I/O permission bits in TSS for the I/O port
being accessed is 1.
Real-Address Mode Exceptions
None.
Virtual-8086 Mode Exceptions
#GP(0)
If any of the I/O permission bits in the TSS for the I/O port being accessed
is 1.