3-467
INSTRUCTION SET REFERENCE
OUTS/OUTSB/OUTSW/OUTSDOutput String 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 I/O port *)
FI;
ELSE (Real Mode or Protected Mode with CPL
?
IOPL *)
DEST
<
SRC; (* Writes to I/O port *)
FI;
IF (byte transfer)
THEN IF DF = 0
THEN (E)SI
<
(E)SI + 1;
ELSE (E)SI
<
(E)SI 1;
FI;
ELSE IF (word transfer)
THEN IF DF = 0
THEN (E)SI
<
(E)SI + 2;
ELSE (E)SI
<
(E)SI 2;
FI;
ELSE (* doubleword transfer *)
THEN IF DF = 0
THEN (E)SI
<
(E)SI + 4;
ELSE (E)SI
<
(E)SI 4;
FI;
FI;
FI;
Flags Affected
None.