ST10 FAMILY PROGRAMMING MANUAL
164/172
CoRND
Round Accumulator
Group
Shift Instructions
Syntax
CoRND
Operation
(ACC) <-- (ACC) + 00 0000 8000
h
(MAL) <-- 0
Data Types
ACCUMULATOR
Result
40-bit signed value
Description
Rounds the ACC register contents by adding 0000 8000h to it and store the result in the ACC register and
the lower part of the ACC register, 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
Notes: CoRND is equivalent to CoASHR #0, rnd.
Example
N
Z
C
SV
E
SL
*
*
*
*
*
*
N
Set if the most significant bit of the result is set. Cleared otherwise.
Z
Set if the result equals zero. Cleared otherwise.
C
Set if a carry 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
CoRND
No
A3 00 B2 00
4
CoRND
; (ACC) <-- (ACC) + rnd
Содержание ST10 Series
Страница 2: ......
Страница 4: ...ST10 FAMILY PROGRAMMING MANUAL 2 172...