CPU12
INSTRUCTION GLOSSARY
MOTOROLA
REFERENCE MANUAL
6-67
Operation:
(X) – (M : M
+
1)
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:
Addressing Modes, Machine Code, and Execution Times:
CPX
Compare Index Register X
CPX
S
X
H
I
N
Z
V
C
–
–
–
–
∆
∆
∆
∆
N:
Set if MSB of result is set; cleared otherwise.
Z:
Set if result is $0000; cleared otherwise.
V:
X15
•
M15
•
R15
+
X15
•
M15
•
R15
Set if two’s complement overflow resulted from the operation; cleared
otherwise.
C:
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.
Source Form
Address Mode
Object Code
Cycles
Access Detail
CPX #
opr16i
CPX
opr8a
CPX
opr16a
CPX
oprx0_xysp
CPX
oprx9,xysp
CPX
oprx16,xysp
CPX [D
,xysp]
CPX [
oprx16,xysp]
IMM
DIR
EXT
IDX
IDX1
IDX2
[D,IDX]
[IDX2]
8E jj kk
9E dd
BE hh ll
AE xb
AE xb ff
AE xb ee ff
AE xb
AE xb ee ff
2
3
3
3
3
4
6
6
OP
RfP
ROP
RfP
RPO
fRPP
fIfRfP
fIPRfP
Summary of Contents for CPU12
Page 8: ...MOTOROLA CPU12 viii REFERENCE MANUAL ...
Page 14: ...MOTOROLA INTRODUCTION CPU12 1 4 REFERENCE MANUAL ...
Page 20: ...MOTOROLA OVERVIEW CPU12 2 6 REFERENCE MANUAL ...
Page 38: ...MOTOROLA INSTRUCTION QUEUE CPU12 4 6 REFERENCE MANUAL ...
Page 300: ...MOTOROLA DEVELOPMENT AND DEBUG SUPPORT CPU12 8 16 REFERENCE MANUAL ...
Page 338: ...MOTOROLA MEMORY EXPANSION CPU12 10 8 REFERENCE MANUAL ...
Page 364: ...MOTOROLA INSTRUCTION REFERENCE CPU12 A 26 REFERENCE MANUAL ...
Page 386: ...MOTOROLA HIGH LEVEL LANGUAGE SUPPORT CPU12 C 6 REFERENCE MANUAL ...
Page 438: ...MOTOROLA SUMMARY OF CHANGES CPU12 S 2 REFERENCE MANUAL ...
Page 439: ......