LINK

LINK

Operation:
SP - 4 -->; SP; An -->; (SP);
SP -->; An; SP + d -->; SP

Compatibility: 68000 Family

Assembler Syntax:
LINK An, #<displacement>

Attributes: Size = (Word, Long*)
* Applies to MC68020/MC68030/MC68040 only

Description: 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 in order to allocate
stack area.

Condition Codes:
Not affected.

Instruction Format (word):
\i2-+--+++--+-+-3Reg,0Word Displacement,

Instruction Format (long):
\i3-+--+-------+3Reg,0High-order Displacement,0Low-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.

Related Instructions:
UNLK,498
.451453