Download Print this page

Siemens C16 Series Instruction Set Manual page 54

16-bit cmos single-chip microcontrollers

Advertisement

CMP
Syntax
Operation
Data Types
Description
Condition Flags
Addressing Modes
Semiconductor Group
30Mar98@15:00h
Integer Compare
CMP
op1, op2
(op1) ⇔ (op2)
WORD
The source operand specified by op1 is compared to the source operand
specified by op2 by performing a 2's complement binary subtraction of
op2 from op1. The flags are set according to the rules of subtraction. The
operands remain unchanged.
E
Z
*
*
E Set if the value of op2 represents the lowest possible negative number.
Cleared otherwise. Used to signal the end of a table.
Z Set if result equals zero. Cleared otherwise.
V Set if an arithmetic underflow occurred, ie. the result cannot be repre-
sented in the specified data type. Cleared otherwise.
C Set if a borrow is generated. Cleared otherwise.
N Set if the most significant bit of the result is set. Cleared otherwise.
Mnemonic
CMP
Rw
, Rw
n
CMP
Rw
, [Rw
n
CMP
Rw
, [Rw
n
CMP
Rw
, #data3
n
CMP
reg, #data16
CMP
reg, mem
C166 Family Instruction Set
V
C
N
*
S
*
Format
40 nm
m
]
48 n:10ii
i
+]
48 n:11ii
i
48 n:0###
46 RR ## ##
42 RR MM MM
54
Instruction Description
CMP
Version 1.2, 12.97
Bytes
2
2
2
2
4
4

Hide quick links:

Advertisement

loading