MC68030CRC25C Freescale Semiconductor, MC68030CRC25C Datasheet - Page 112

no-image

MC68030CRC25C

Manufacturer Part Number
MC68030CRC25C
Description
IC MPU 32BIT ENHANCED 128-PGA
Manufacturer
Freescale Semiconductor
Datasheet

Specifications of MC68030CRC25C

Processor Type
M680x0 32-Bit
Speed
25MHz
Voltage
5V
Mounting Type
Surface Mount
Package / Case
128-PGA
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
Features
-
MOTOROLA
The next code (see Figure 3-3) fragment shows the use of a CAS2 instruction
to delete an element from a linked list. The first LEA instruction loads the
the BEQ instruction branches to a routine at label SDEMPTY if the list is
the address of the newest structure to the value in HEAD and the address in
value into location HEAD. If an element has been inserted or deleted, the
effective address of HEAD into A0. The MOVE instruction loads the address
in pointer HEAD into DO. The TST instruction checks for an empty list, and
empty. Otherwise, a second LEA instruction loads the address of the NEXT
instruction loads the pointer contents into D1. The CAS2 instruction compares
deleted by another routine while this routine has been executing, the results
of these comparisons are equal, and the CAS2 instruction stores the new
CAS2 instruction loads the new address in location HEAD into DO, and the
SDELETE
SDLOOP
SDEMPTY
AFTER DELETING AN ELEMENT'
pointer in the newest element on the list into A1, and the following MOVE
D1 to the pointer in the address in A1. If no element has been inserted or
BNE instruction branches to the TST instruction to try again.
3EFORE DELETING AN ELEMEN T`
'I
LEA
MOVE.L
TST L
BEQ
LEA
MOVE.L
CAS2.L
BNE
ENTRY
HEAD.AO
{AOEDO
DO
SDEMPTY
(NEXT DO .At
(AlkOl
SDLOOP
DO:D1 01:0" AO):(A1
Figure 3-3. Linked List Deletion
1 ~
I
MC68030 USER'S MANUAL
LOAD ADDRESS OF HEAD POINTER INTO AO
MOVE VALUE OF HEAD POINTER INTO DO
CHECK FOR NULL HEAD POINTER
IF EMPTY NOTHING TO DELETE
IF STILL POINT TO ENTRY TO BE DELETED, THEN UPDATE HEAD AND FORWARD POINTERS
IF NOT TRY AGAIN
SUCCESSFUL DELETION ADDRESS OF DELETED ENTRY IN DO (MAY BE NULL)
_DAD ADDRESS OF FORWARD LINK INTO A1
~UT FORWARD LINK VALUE IN D1
ENTRY
I
. . . ~
ENTRY
ENTRY
]
I
3-27
3

Related parts for MC68030CRC25C