Motorola CPU32 Reference Manual page 142

M68300 series central processor unit
Hide thumbs Also See for CPU32:
Table of Contents

Advertisement

LINK
Operation:
Assembler
Syntax:
Attributes:
Link and Allocate
Sp-4
~
Sp; An
~
(SP);
SP
~An;
SP +d
~
SP
LINK An, #(displacement)
Size
=
(Word, Long)
LINK
Descriptio n:
Pushes the contents of the specified address register onto the stack, then loads the
updated stack pointer into the address register. Finally, adds the displacement value to the stack
pointer. For word size operation, the displacement is the sign-extended word following the
operation word.
For long size operation, the displacement is the long word following the
operation word. The address register occupies one long word on the stack. The user should
specify a negative displacement to allocate stack area.
Condition Codes:
Not affected.
Instruction Format:
15
14
13
12
9
8
7
5
4
3
2
1
0
REGISTER
15
14
13
12
11
10
9
8
7
6
5
4
3
2
0
o
1 1 1 0
1 0
1 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 1
REGISTER
HIGH-ORDER DISPLACEMENT
LOW-ORDER DISPLACEMENT
Instruction Fields:
Register field -
Specifies the address register for the link.
Displacement field -
Specifies the twos complement integer to be added to the stack pointer.
NOTE
LINK and UNLK can be used to maintain a linked list of local data and parameter
areas on the stack for nested subroutine calls.
CPU32 REFERENCE MANUAL
INSTRUCTION SET
MOTOROLA
4-89
III

Advertisement

Table of Contents
loading

Table of Contents