Input Data From Port
IN
7-69
Assembly Language Instructions
Syntax
IN
dma, PA
Direct addressing
IN
ind, PA [, ARn]
Indirect addressing
Operands
dma:
7 LSBs of the data-memory address
n:
Value from 0 to 7 designating the next auxiliary register
PA:
16-bit I/O port or I/O-mapped register address
ind:
Select one of the following seven options:
* *+ *– *0+ *0– *BR0+ *BR0–
IN
dma , PA
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
1
0
1
0
1
1
1
1
0
dma
PA
IN
ind ,PA [,ARn]
15
14
13
12
11
10
9
8
7
6
5
4
3
2
1
0
1
0
1
0
1
1
1
1
1
ARU
N
NAR
PA
Note:
ARU, N, and NAR are defined in Section 6.3,
Indirect Addressing Mode (page 6-9).
Execution
Increment PC, then ...
PA
→
address bus lines A15–A0
Data bus lines D15–D0
→
data-memory address
(PA)
→
data-memory address
Status Bits
None
Description
The IN instruction reads a 16-bit value from an I/O location into the specified
data-memory location. The IS line goes low to indicate an I/O access. The
STRB, RD, and READY timings are the same as for an external data-memory
read.
The repeat (RPT) instruction can be used with the IN instruction to read in con-
secutive words from I/O space to data space.
Words
2
Opcode