Keil Logo

MOD Assembler Operator

Arguments
operand1 MOD operand2


Description

The modulo operator divides the value of operand1 by the value of operand2 and returns the remainder after the division. Both operands must be absolute. The result is absolute.

See Also

*, /

Example
        MOV     R1,#12 MOD 7   ; R1 = 5
        MOV     R2,#99 MOD 10  ; R2 = 9
        MOV     R2,#12 MOD (-4)
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.