beautypg.com

21 in input from port into word – Texas Instruments MSP50C6xx User Manual

Page 191

background image

Individual Instruction Descriptions

4-105

Assembly Language Instructions

4.14.21

IN

Input From Port Into Word

Syntax

[label]

name

dest, src1

Clock, clk

Word, w

With RPT, clk

Class

IN

{adrs}, port4

Table 4–46

Table 4–46

6a

IN

An[~], port6

1

1

n

R

+3

6b

Execution

dest

content of port6 or port4

PC

PC + w

Flags Affected

dest is An:

OF, SF, ZF, CF are set accordingly

dest is {adrs}

XZF, XSF are set accordingly

Opcode

Instructions

16

15

14

13

12

11

10

9

8

7

6

5

4

3

2

1

0

IN {adrs}, port4

1

1

0

0

0

port4

adrs

x

dma16 (for direct) or offset16 (long relative) [see section 4.13]

IN An[~], port6

1

1

1

0

1

1

0

An

port6

~A

Description

Input from I/O port. Words can be input to memory from one of 16 port
addresses or one of 48 port addresses. The port4 address is multiplied by 4
to get the actual port address.

See Also

INS, OUT, OUTS

Example 4.14.21.1

IN *R0, 0x0c

Input data from port address 0x0c * 4 = 0x30 to data memory location pointed by R0.

Example 4.14.21.2

IN A2~, 0x3d

Input data from port address 0x3d to accumulator A2~.