Motorola HC12 Refrence Manual page 128

Table of Contents

Advertisement

CPY
(Y) – (M : M + 1)
Operation:
Description:
Compares the content of index register Y to a 16-bit value at the address
specified, and sets the condition codes accordingly. The compare is ac-
complished internally by a 16-bit subtract of (M : M + 1) from Y without
modifying either Y or (M : M + 1).
Condition Codes and Boolean Formulas:
S
N:
Z:
V:
C:
Addressing Modes, Machine Code, and Execution Times:
Source Form
CPY # opr16i
CPY opr8a
CPY opr16a
CPY oprx0_xysp
CPY oprx9,xysp
CPY oprx16,xysp
CPY [D ,xysp ]
CPY [ oprx16,xysp ]
MOTOROLA
6-68
Compare Index Register Y
X
H
I
N
Z
Set if MSB of result is set; cleared otherwise.
Set if result is $0000; cleared otherwise.
Y15 • M15 • R15 + Y15 • M15 • R15
Set if two's complement overflow resulted from the operation; cleared
otherwise.
Y15 • M15 + M15 • R15 + R15 + Y15
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
8D jj kk
9D dd
BD hh ll
AD xb
AD xb ff
AD xb ee ff
AD xb
AD xb ee ff
CPY
Cycles
Access Detail
2
OP
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