beautypg.com

Intel 253666-024US User Manual

Page 515

background image

Vol. 2A 3-469

INSTRUCTION SET REFERENCE, A-M

INS/INSB/INSW/INSD—Input from Port to String

IF (Byte transfer)

THEN IF DF

=

0

THEN (E)DI

← (E)DI + 1;

ELSE (E)DI ← (E)DI – 1; FI;

ELSE IF (Word transfer)

THEN IF DF

=

0

THEN (E)DI

← (E)DI + 2;

ELSE (E)DI ← (E)DI – 2; FI;

ELSE (* Doubleword transfer *)

THEN IF DF

=

0

THEN (E)DI

← (E)DI + 4;

ELSE (E)DI ← (E)DI – 4; FI;

FI;

FI;

FI64-bit Mode:

IF (Byte transfer)

THEN IF DF

=

0

THEN (E|R)DI

← (E|R)DI + 1;

ELSE (E|R)DI ← (E|R)DI – 1; FI;

ELSE IF (Word transfer)

THEN IF DF

=

0

THEN (E)DI

← (E)DI + 2;

ELSE (E)DI ← (E)DI – 2; FI;

ELSE (* Doubleword transfer *)

THEN IF DF

=

0

THEN (E|R)DI

← (E|R)DI + 4;

ELSE (E|R)DI ← (E|R)DI – 4; FI;

FI;

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.

If the destination is located in a non-writable segment.
If an illegal memory operand effective address in the ES

segments is given.

#PF(fault-code)

If a page fault occurs.