STMicroelectronics ST10 Series Programming Manual page 164

Table of Contents

Advertisement

ST10 FAMILY PROGRAMMING MANUAL
CoNEG
Group
Syntax
Operation
Data Types
Result
Description
The Accumulator content is subtracted from zero and the result is optionally rounded before being stored
in the accumulator register. With "rnd" option MAL is cleared. When the MS bit of the MCW register is set
and when a 32-bit overflow or underflow occurs, the obtained result becomes 00 7FFF FFFF
0000
, respectively. This instruction is not repeatable
h
MAC Flags
N
*
N
Set if the m.s.b. of the result is set. Cleared otherwise.
Z
Set if the result equals zero. Cleared otherwise.
C
Set if a borrow is generated. Cleared otherwise.
SV
Set if an arithmetic overflow occurred. Not affected otherwise.
E
Set if the MAE is used. Cleared otherwise.
SL
Set if the contents of the ACC is automatically saturated. Not affected otherwise.
Addressing Modes
Mnemonic
CoNEG
CoNEG
Examples
CoNEG
CoNEG
Instr
MS
CoNEG
x
CoNEG
x
162/172
Negate Accumulator with Optional Rounding
32-bit Arithmetic Instructions
CoNEG
CoNEG nd
IF (rnd) THEN
(ACC) <-- 0 - (ACC) + 00 0000 8000
(MAL) <-- 0
ELSE
(ACC) <-- 0 - (ACC)
END IF
ACCUMULATOR
40-bit signed value
Z
C
*
*
rnd
; (ACC) <-- 0 - (ACC)
rnd
; (ACC) <-- 0 - (ACC) + rnd
rnd
ACC (before)
No
00 1234 5678
h
Yes
00 1234 5678
h
SV
*
Rep
Format
No
A3 00 32 00
No
A3 00 72 00
ACC (after)
N
FF EDCB A988
1
h
FF EDCC 0000
1
h
h
or FF 8000
h
E
SL
*
*
Bytes
4
4
Z
C
SV
E
0
0
-
0
0
0
-
0
SL
-
-

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ST10 Series and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Table of Contents