EasyManua.ls Logo

Motorola 68000 - Page 21

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...
19
The 68000's Instruction Set
Description: Subtract the immediate data from the destination operand and
set the condition codes accordingly  the destination is not
modified. CMPI permits the comparison of a literal with memory.
Condition codes: X N Z V C
- * * * *
Destination operand addressing modes
CMPM Compare memory with memory
Operation: [destination] - [source]
Syntax: CMPM (Ay)+,(Ax)+
Attributes: Size = byte, word, longword
Sample syntax: CMPM.B (A3)+,(A4)+
Description: Subtract the source operand from the destination operand and
set the condition codes accordingly. The destination is not
modified by this instruction. The only permitted addressing mode
is address register indirect with post-incrementing for both source
and destination operands.
Application: Used to compare the contents of two blocks of memory. For
example:
* Compare two blocks of memory for equality
LEA Source,A0 A0 points to source block
LEA Destination,A1 A1 points to destination block
MOVE.W #Count-1,D0 Compare Count words
RPT CMPM.W (A0)+,(A1)+ Compare pair of words
DBNE D0,RPT Repeat until all done
.
.
Condition codes: X N Z V C
- * * * *

Other manuals for Motorola 68000

Related product manuals