-
The following is from Assembly Language for the IBM-PC
by Kip R. Irvine
IN Instruction. The IN instruction inputs a
byte or word from a port. The syntax is
IN accumulator, port
Port may be a constant in the range 0 -FFh, or it may be
a value in DX between 0 and FFFFh. Accumulator must be AL
for 8-bit transfers, and AX for 16-bit transfers. Examples are:
in al,3ch ;input byte
from port 3ch
in al,dx ;DX contains
a port address
in ax,60h ;input word
from port 60h
in ax,dx ;input
word from port named in DX
OUT Instruction. The OUT instruction
outputs a byte or word to a port. The syntax is
OUT port, accumulator