Motorola HC12 Refrence Manual page 126

Table of Contents

Advertisement

CPS
(SP) – (M : M + 1)
Operation:
Description:
Compares the content of the SP with a 16-bit value at the address spec-
ified, and sets the condition codes accordingly. The compare is accom-
plished internally by doing a 16-bit subtract of (M : M + 1) from the SP
without modifying either the SP or (M : M + 1).
Condition Codes and Boolean Formulas:
S
N:
Z:
V:
C:
Addressing Modes, Machine Code, and Execution Times:
Source Form
CPS # opr16i
CPS opr8a
CPS opr16a
CPS oprx0_xysp
CPS oprx9,xysp
CPS oprx16,xysp
CPS [D ,xysp ]
CPS [ oprx16,xysp ]
MOTOROLA
6-66
Compare Stack Pointer
X
H
I
N
Z
Set if MSB of result is set; cleared otherwise.
Set if result is $0000; cleared otherwise.
S15 • M15 • R15 + S15 • M15 • R15
Set if two's complement overflow resulted from the operation; cleared
otherwise.
S15 • M15 + M15 • R15 + R15 + S15
Set if the absolute value of the content of memory is larger than the
absolute value of the SP; cleared otherwise.
Address Mode
IMM
DIR
EXT
IDX
IDX1
IDX2
[D,IDX]
[IDX2]
INSTRUCTION GLOSSARY
V
C
Object Code
8F jj kk
9F dd
BF hh ll
AF xb
AF xb ff
AF xb ee ff
AF xb
AF xb ee ff
CPS
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