English
Language : 

MC68030 Datasheet, PDF (108/602 Pages) Motorola, Inc – ENHANCED 32-BIT MICROPROCESSOR
Instruction Set Summary
DDELETE
DDLOOP
DDEMPTY
DDDONE
LEA
LEA
MOVE.L
BEQ
MOVE.L
BEQ
LEA
CLR.L
CAS2.L
BNE
BRA
CAS2.L
BNE
LIST_PUT, A0
LIST_GET, A1
(A1),D1
DDDONE
(LAST,D1),D2
DDEMPTY
(NEXT,D2),A2
D0
D1:D1,D2:D0,(A1):(A2)
DDLOOP
DDDONE
D1:D1,D2:D2,(A1):(A0)
DDLOOP
BEFORE DELETING ENTRY:
ENTRY
GET ADDRESS OF HEAD POINTER IN A0
GET ADDRESS OF TAIL POINTER IN A1
MOVE TAIL POINTER INTO D1
IF NO LIST, QUIT
PUT BACKWARD POINTER IN D2
IF ONLY ONE ELEMENT, UPDATE POINTERS
PUT ADDRESS OF FORWARD POINTER IN A2
PUT NULL POINTER VALUE IN D0
IF BOTH POINTERS STILL POINT TO THIS ENTRY , UPDATE THEM
IF NOT, TRY AGAIN
IF STILL FIRST ENTRY, SET HEAD AND TAIL POINTERS TO NULL
IF NOT, TRY AGAIN
SUCCESSFUL ENTRY DELETION, ADDRESS OF DELETED ENTRY IN D1
(MAY BE NULL)
ENTRY
ENTRY
+ LAST + NEXT
+ LAST + NEXT
+ LAST + NEXT
LIST_PUT
AFTER DELETING ENTRY:
ENTRY
+ LAST + NEXT
ENTRY
+ LAST + NEXT
LIST_GET
ENTRY
+ LAST + NEXT
LIST_PUT
LIST_GET
Figure 3-5. Doubly Linked List Deletion
DELETED ENTRY
3.5.2 Nested Subroutine Calls
The LINK instruction pushes an address onto the stack, saves the stack address at which
the address is stored, and reserves an area of the stack. Using this instruction in a series of
subroutine calls results in a linked list of stack frames.
The UNLK instruction removes a stack frame from the end of the list by loading an address
into the stack pointer and pulling the value at that address from the stack. When the operand
of the instruction is the address of the link address at the bottom of a stack frame, the effect
is to remove the stack frame from the stack and from the linked list.
3-30
MC68030 USER’S MANUAL
MOTOROLA