Crossware

Table of Contents        Previous topic       Next topic       

MICROPROCESSOR INSTRUCTION REFERENCE->MSAC

MSAC    Multiply and Subract

Compatibility:    Starting with 5206e.

    
Assembler Syntax:MSAC.W Ry.<UL>,Rx<UL>
MSAC.W Ry.<UL>,Rx<UL>,<shift>
MSAC.L Ry,Rx
MSAC.L Ry,Rx,<shift>
where <shift> is either << or >> and <UL> indicates that either a U or L must be used.

Size:    Word, Long

Multiply the 16 bit or 32 bit operands together to produce a 32 bit result and subtract the result optionally shifted one bit to the left or right from the contents of the MAC accumulator ACC. The result is stored back into the accumulator.

If 16 bit operands are used, they may be located in the upper or lower word of the register and U or L must be used to specify upper word or lower word respectively.

MAC status register:

OMC Not affected
S/U Not affected
NSet if the most significant bit of the result is set, else cleared
ZSet if the result is zero, else cleared
VSet if an overflow generated,  else unchanged
CAlways cleared