Intel 80286 Computer Accessories User Manual


 
THE
80286
INSTRUCTION SET
INS/INSB/INSW-Input
from
Port
to
String
Opcode
6C
60
6C
60
FLAGS MODIFIED
None
Instruction
INS
eb,OX
INS
ew,OX
INSB
INSW
FLAGS UNDEFINED
None
OPERATION
Clocks
5
5
5
5
Description
Input byte from port
OX
into ES:[OI)
Input
word from port
OX
into ES:[OI)
Input
byte from port
OX
into ES:[OI)
Input
word from port
OX
into ES:[OI)
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