MC68030RC33 Nested Subroutine Calls - Motorola

no-image

MC68030RC33

Manufacturer Part Number
MC68030RC33
Description
MC68030RC33ENHANCED 32-BIT MICROPROCESSOR
Manufacturer
Motorola
Datasheet
string(70) "Class: /home/ecomp/master.elcodis.git/htdocs/inc/../Doc.php not found!" string(70) "Class: /home/ecomp/master.elcodis.git/htdocs/inc/../Doc.php not found!" string(70) "Class: /home/ecomp/master.elcodis.git/htdocs/inc/../Doc.php not found!"
Instruction Set Summary
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
DDELETE
DDLOOP
DDEMPTY
DDDONE
BEFORE DELETING ENTRY:
AFTER DELETING ENTRY:
+ LAST
+ LAST
LEA
LEA
MOVE.L
BEQ
MOVE.L
BEQ
LEA
CLR.L
CAS2.L
BNE
BRA
CAS2.L
BNE
ENTRY
ENTRY
+ NEXT
+ NEXT
Figure 3-5. Doubly Linked List Deletion
(A1),D1
DDDONE
(LAST,D1),D2
DDEMPTY
LIST_PUT, A0
LIST_GET, A1
(NEXT,D2),A2
D0
LIST_PUT
LIST_PUT
D1:D1,D2:D0,(A1):(A2)
DDLOOP
DDDONE
D1:D1,D2:D2,(A1):(A0)
DDLOOP
MC68030 USER’S MANUAL
+ LAST
+ LAST
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
+ NEXT
+ NEXT
LIST_GET
+ LAST
+ LAST
ENTRY
ENTRY
+ NEXT
+ NEXT
LIST_GET
DELETED ENTRY
MOTOROLA

Related parts for MC68030RC33