STMicroelectronics ST10 Series Programming Manual page 153

Table of Contents

Advertisement

CoMAX
Group
Syntax
Operation
Data Types
Result
Description
Compares a signed 40-bit operand against the ACC register content. The 40-bit operand results from the
concatenation of the two source operands op1 (LSW) and op2 (MSW) which is then sign-extended. If the
contents of the ACC register is smaller than the 40-bit operand, then the ACC register is loaded with it.
Otherwise the ACC register remains unchanged. The MS bit of the MCW register does not affect the
result. This instruction is repeatable with indirect addressing modes.
MAC Flags
N
*
N
Set if the most significant bit of the result is set. Cleared otherwise.
Z
Set if the result equals zero. Cleared otherwise.
C
Cleared always.
SV
Not affected.
E
Set if the MAE is used. Cleared otherwise.
SL
Set if the contents of the ACC register is changed. Not affected otherwise.
Addressing Modes
Mnemonic
CoMAX
Rw
n
CoMAX
[IDX
CoMAX
Rw
n
Examples
CoMAX
[IDX1+QX0], [R11+QR1]
CoMAX
R1, R10
Repeat 23 times CoMAX
CoMAX
R5, [R6 - QR0]
Maximum
Compare Instructions
CoMAXop1, op2
(tmp) <-- (op2)\(op1)
(ACC) <-- max( (ACC), (tmp) )
DOUBLE WORD
40-bit signed value
Z
C
*
0
, Rw
m
⊗], [Rw
⊗]
i
m
⊗]
, [Rw
m
ST10 FAMILY PROGRAMMING MANUAL
SV
-
Rep
Format
No
A3 nm 3A 00
Yes
93 Xm 3A rrrr:rqqq
Yes
83 nm 3A rrrr:rqqq
; (ACC)<-- Max((ACC),((R11))\((IDX1)))
; (R11) <-- (R11) + (QR1)
; (IDX1) <-- (IDX1) + (QX0)
; (ACC) <-- Max( (ACC), (R10)\(R1) )
; (ACC) <-- Max( (ACC), ((R6))\(R5)) )
; (R6) <-- (R6) - (QR0)
E
SL
*
*
Bytes
4
4
4
151/172

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

Table of Contents