Motorola HC12 Refrence Manual page 122

Table of Contents

Advertisement

COM
(M) = $FF – (M) ⇒ M
Operation:
Description:
Replaces the content of memory location M with its one's complement.
Each bit of M is complemented. Immediately after a COM operation on
unsigned values, only the BEQ, BNE, LBEQ, and LBNE branches can
be expected to perform consistently. After operation on two's comple-
ment values, all signed branches are available.
Condition Codes and Boolean Formulas:
S
N:
Z:
V:
C:
Addressing Modes, Machine Code, and Execution Times:
Source Form
COM opr16a
COM oprx0_xysp
,
COM oprx9
xysp
,
COM oprx16
xysp
,
xysp ]
COM [D
,
COM [ oprx16
xysp ]
MOTOROLA
6-62
Complement Memory
X
H
I
N
Z
Set if MSB of result is set; cleared otherwise.
Set if result is $00; cleared otherwise.
0; Cleared.
1; Set (for M6800 compatibility).
Address Mode
EXT
IDX
IDX1
IDX2
[D,IDX]
[IDX2]
INSTRUCTION GLOSSARY
V
C
0
1
Object Code
71 hh ll
61 xb
61 xb ff
61 xb ee ff
61 xb
61 xb ee ff
COM
Cycles
Access Detail
4
rOPw
3
rPw
4
rPOw
5
frPPw
6
fIfrPw
6
fIPrPw
CPU12
REFERENCE MANUAL

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cpu12

Table of Contents