Keil Logo Arm Logo

A166 User's Guide

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)

Keil logo

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.