Motorola HC12 Refrence Manual page 121

Table of Contents

Advertisement

CMPB
Operation:
(B) – (M)
Description:
Compares the content of accumulator B 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 B 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
CMPB # opr8i
CMPB opr8a
CMPB opr16a
CMPB oprx0_xysp
CMPB oprx9 , xysp
CMPB oprx16 , xysp
CMPB [D, xysp ]
CMPB [ oprx16 , xysp ]
CPU12
REFERENCE MANUAL
Compare B
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
C1 ii
D1 dd
F1 hh ll
E1 xb
E1 xb ff
E1 xb ee ff
E1 xb
E1 xb ee ff
CMPB
Cycles
Access Detail
1
P
3
rfP
3
rOP
3
rfP
3
rPO
4
frPP
6
fIfrfP
6
fIPrfP
MOTOROLA
6-61

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cpu12

Table of Contents