Intel 80286, 80287 manual INS/INSB/INSW-Input from Port to String, Insb, Insw

Models: 80287 80286

1 515
Download 515 pages 45.04 Kb
Page 257
Image 257

THE 80286 INSTRUCTION SET

INS/INSB/INSW-Input from Port to String

Opcode

Instruction

Clocks

Description

6C

INS

eb,OX

5

Input byte from port OX into ES:[OI)

60

INS

ew,OX

5

Input word from port OX into ES:[OI)

6C

INSB

5

Input byte from port OX into ES:[OI)

60

INSW

5

Input word from port OX into ES:[OI)

FLAGS MODIFIED

None

FLAGS UNDEFINED

None

OPERATION

INS transfers data from the input port numbered by the DX register to the memory byte or word at ES:DI. The memory operand must be addressable from the ES register; no segment override is possible.

INS does not allow the specification of the port number as an immediate value. The port must be addressed through the DX register.

After the transfer is made, DI is automatically advanced. If the direction flag is 0 (CLD was executed), DI increments; if the direction flag is 1 (STD was executed), DI decrements. DI increments or decre- ments by 1 if a byte was moved; by 2 if a word was moved.

INS can be preceded by the REP prefix for block input of CX bytes or words. Refer to the REP instruction for details of this operation.

Intel has reserved I/O port addresses 00F8H through OOFFH; they should not be used.

NOTE

Not all input port devices can handle the rate at which this instruction transfers input data to memory.

PROTECTED MODE EXCEPTIONS

#GP(O) if CPL > 10PL. #GP(O) if the destination is in a non-writable segment. #GP(O) for an illegal memory operand effective address in the CS, DS, or ES segments; #SS(O) for an illegal address in the SS segment.

REAL ADDRESS MODE EXCEPTIONS

Interrupt 13 for a word operand at offset OFFFFH.

B-47

Page 257
Image 257
Intel 80286, 80287 manual INS/INSB/INSW-Input from Port to String, Insb, Insw