A SERVICE OF

logo

IN
INPUT
BYTE
OR
WORD
IN
Operation:
(DEST)
+-
(SRC)
Description:
IN
accumulator,port
IN transfers a byte
or
a word from an input
port to the
AL
register or the
AX
register,
respectively. The
port
number may be speci-
fied either with
an
immediate byte constant,
allowing access to ports numbered
0 through
Encoding:
Fixed Port:
1111
001
0 w I
port
if
vJ
= 0
then
SRC = port, DEST =
AL
else SRC =
port
+ 1 :port, OEST = AX
Variable Port:
11110110wl
if w = 0
then
SRC = (OX), OEST = AL
else SRC = (OX) + 1 :(DX), OEST = AX
Flags Affected:
None
255,
or
with a number previously placed in the
DX register, allowing variable access (by
changing the value in DX) to ports numbered
from
0 through 65,535.
IN Operands
Clocks* Transfers Bytes IN Coding Example
accLimulator,
immed8
10(14)
1 2
IN
AL,OEAH
accumulator,
DX
8(12)
1 1
IN
AX,
OX
*b(w):
where
b
denotes
the
number
of
clock
cycles
for
byte
operands
and
w
denotes
the
number
of
clock
cycles
for
word
operands.
2-80