ST10 FAMILY PROGRAMMING MANUAL
162/172
CoNEG
Negate Accumulator with Optional Rounding
Group
32-bit Arithmetic Instructions
Syntax
CoNEG
CoNEG nd
Operation
IF (rnd) THEN
(ACC) <-- 0 - (ACC) + 00 0000 8000
h
(MAL) <-- 0
ELSE
(ACC) <-- 0 - (ACC)
END IF
Data Types
ACCUMULATOR
Result
40-bit signed value
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
h
or FF 8000
0000
h
, respectively. This instruction is not repeatable
MAC Flags
Addressing Modes
Examples
N
Z
C
SV
E
SL
*
*
*
*
*
*
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.
Mnemonic
Rep
Format
Bytes
CoNEG
No
A3 00 32 00
4
CoNEG
rnd
No
A3 00 72 00
4
CoNEG
; (ACC) <-- 0 - (ACC)
CoNEG
rnd
; (ACC) <-- 0 - (ACC) + rnd
Instr
MS
rnd
ACC (before)
ACC (after)
N
Z
C
SV
E
SL
CoNEG
x
No
00 1234 5678
h
FF EDCB A988
h
1
0
0
-
0
-
CoNEG
x
Yes
00 1234 5678
h
FF EDCC 0000
h
1
0
0
-
0
-
Содержание ST10 Series
Страница 2: ......
Страница 4: ...ST10 FAMILY PROGRAMMING MANUAL 2 172...