EasyManua.ls Logo

Motorola 68000 - Page 30

Motorola 68000
60 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
28
The 68000's Instruction Set
Application: LEA is a very powerful instruction used to calculate an effective
address. In particular, the use of LEA facilitates the writing of
position independent code. For example, LEA (TABLE,PC),A0
calculates the effective address of TABLE with respect to the PC
and deposits it in A0.
LEA (Table,PC),A0 Compute address of Table with respect to PC
MOVE (A0),D1 Pick up the first item in the table
. Do something with this item
MOVE D1,(A0) Put it back in the table
.
.
Table DS.B 100
Source operand addressing modes
Condition codes: X N Z V C
- - - - -
LINK Link and allocate
Operation: [SP] [SP] - 4; [M([SP])] [An];
[An]
[SP]; [SP] [SP] + d
Syntax: LINK An,#<displacement>
Sample syntax: LINK A6,#-12
Attributes: Size = word
Description: The contents of the specified address register are first pushed
onto the stack. Then, the address register is loaded with the
updated stack pointer. Finally, the 16-bit sign-extended
displacement is added to the stack pointer. The contents of the
address register occupy two words on the stack. A negative
displacement must be used to allocate stack area to a procedure.
At the end of a LINK instruction, the old value of address register
An has been pushed on the stack and the new An is pointing at

Other manuals for Motorola 68000

Related product manuals