Texas Instruments MSP50C614 manual Call Unconditional Subroutine Call

Models: MSP50C614

1 414
Download 414 pages 24.44 Kb
Page 177
Image 177

Individual Instruction Descriptions

4.14.8 CALL

 

Unconditional Subroutine Call

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Syntax

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

[label]

name

 

address

 

 

 

 

 

 

 

Clock, clk

 

Word, w

 

 

With RPT, clk

Class

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CALL

 

pma16

 

 

 

 

 

 

 

 

2

 

 

 

 

2

 

 

 

 

 

N/R

 

 

 

7c

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CALL

 

*An

 

 

 

 

 

 

 

 

2

 

 

 

 

1

 

 

 

 

 

N/R

 

 

 

7c

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Execution

*R7 TOS

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

TOS

PC + 2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

PC pma16 or *An

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

R7 R7 + 2

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Flags Affected

None

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Opcode

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Instructions

 

 

16

 

15

 

14

13

12

11

10

9

 

8

 

7

 

6

 

5

 

4

 

3

2

 

1

 

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CALL pma16

 

 

1

 

0

 

0

0

0

1

0

1

 

0

 

1

 

0

 

1

 

0

 

0

0

 

0

 

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

x

 

 

 

 

 

 

 

 

 

 

pma16

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CALL *An

 

 

 

1

 

0

 

0

0

1

1

0

 

An

 

0

 

0

 

0

 

0

 

0

0

 

0

 

0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Description

PC + w is pushed onto the top of stack (TOS) and the second word operand

 

 

 

or accumulator value is loaded into the PC. Call instructions cannot immedi-

 

 

 

ately followed by RET instructions. No restrictions apply if IRET is used instead

 

 

 

of RET.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Syntax

 

 

Description

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CALL pma16

 

 

Unconditional call to specified program memory address pma16.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

CALL *An

 

 

Call to address referenced by An.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

See Also

Ccc, VCALL, RET, IRET

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Example 4.14.8.1

CALL 0x2010

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Call unconditionally program memory address 0x2010.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Example 4.14.8.2

CALL *A0

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Call unconditionally program memory address stored in accumulator A0.

Assembly Language Instructions

4-85

Page 177
Image 177
Texas Instruments MSP50C614 manual Call Unconditional Subroutine Call