Motorola HC12 Refrence Manual page 127

Table of Contents

Advertisement

CPX
(X) – (M : M + 1)
Operation:
Description:
Compares the content of index register X with a 16-bit value at the ad-
dress specified, and sets the condition codes accordingly. The compare
is accomplished internally by a 16-bit subtract of (M : M + 1) from index
register X without modifying either index register X or (M : M + 1).
Condition Codes and Boolean Formulas:
S
N:
Z:
V:
C:
Addressing Modes, Machine Code, and Execution Times:
Source Form
CPX # opr16i
CPX opr8a
CPX opr16a
CPX oprx0_xysp
CPX oprx9,xysp
CPX oprx16,xysp
CPX [D ,xysp ]
CPX [ oprx16,xysp ]
CPU12
REFERENCE MANUAL
Compare Index Register X
X
H
I
N
Z
Set if MSB of result is set; cleared otherwise.
Set if result is $0000; cleared otherwise.
X15 • M15 • R15 + X15 • M15 • R15
Set if two's complement overflow resulted from the operation; cleared
otherwise.
X15 • M15 + M15 • R15 + R15 + X15
Set if the absolute value of the content of memory is larger than the
absolute value of the index register; cleared otherwise.
Address Mode
IMM
DIR
EXT
IDX
IDX1
IDX2
[D,IDX]
[IDX2]
INSTRUCTION GLOSSARY
V
C
Object Code
8E jj kk
9E dd
BE hh ll
AE xb
AE xb ff
AE xb ee ff
AE xb
AE xb ee ff
CPX
Cycles
Access Detail
2
OP
3
RfP
3
ROP
3
RfP
3
RPO
4
fRPP
6
fIfRfP
6
fIPRfP
MOTOROLA
6-67

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cpu12

Table of Contents