Motorola HC12 Refrence Manual page 120

Table of Contents

Advertisement

CMPA
Operation:
(A) – (M)
Description:
Compares the content of accumulator A to the content of memory loca-
tion M and sets the condition codes, which may then be used for arith-
metic and logical conditional branching. The contents of A and location
M are not changed.
Condition Codes and Boolean Formulas:
S
N:
Z:
V:
C:
Addressing Modes, Machine Code, and Execution Times:
Source Form
CMPA # opr8i
CMPA opr8a
CMPA opr16a
CMPA oprx0_xysp
CMPA oprx9,xysp
CMPA oprx16,xysp
CMPA [D, xysp ]
CMPA [ oprx16 , xysp ]
MOTOROLA
6-60
Compare A
X
H
I
N
Z
Set if MSB of result is set; cleared otherwise.
Set if result is $00; cleared otherwise.
X7 • M7 • R7 + X7 • M7 • R7
Set if a two's complement overflow resulted from the operation; cleared
otherwise.
X7 • M7 + M7 • R7 + R7 + X7
Set if there was a borrow from the MSB of the result; cleared otherwise.
Address Mode
IMM
DIR
EXT
IDX
IDX1
IDX2
[D,IDX]
[IDX2]
INSTRUCTION GLOSSARY
V
C
Object Code
81 ii
91 dd
B1 hh ll
A1 xb
A1 xb ff
A1 xb ee ff
A1 xb
A1 xb ee ff
CMPA
Cycles
Access Detail
1
P
3
rfP
3
rOP
3
rfP
3
rPO
4
frPP
6
fIfrfP
6
fIPrfP
CPU12
REFERENCE MANUAL

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cpu12

Table of Contents