There is a way to compute the mod operation, without using DIV or IDIV in assembly x86 language?
For instance, one could use DIV in order to take the remainder of the division. But, instead to use DIV, there are other options?
There is a way to compute the mod operation, without using DIV or IDIV in assembly x86 language?
For instance, one could use DIV in order to take the remainder of the division. But, instead to use DIV, there are other options?
You can always write the division algorithm yourself, completly not using the DIV or IDIV instructions.
There's of course a range of modulo's where you basically just need an AND instruction:
and eax, 255 ;Gives modulo 256
and eax, 15 ;Gives modulo 16