search algorithm for a math mod function (5 mod[2]=1) 
Author Message
 search algorithm for a math mod function (5 mod[2]=1)

Hello everybody
Does somebody know how to code in asm 80x86 the mathematic mod function ?
Thank for help.
Marc.


Wed, 06 May 1998 03:00:00 GMT  
 search algorithm for a math mod function (5 mod[2]=1)
Quote:
> Subject: search algorithm for a math mod function (5 mod[2]=1)

> Hello everybody
> Does somebody know how to code in asm 80x86 the mathematic mod
> function ? Thank for help.
> Marc.

use div ( or idiv ) and look into dx. it would be remainder of the
division that is mod function.
Best Regards!
Voins


Fri, 08 May 1998 03:00:00 GMT  
 search algorithm for a math mod function (5 mod[2]=1)

Quote:
> Hello everybody
> Does somebody know how to code in asm 80x86 the mathematic mod function ?
> Thank for help.
> Marc.

The DIV instruction doesn't only divide, it leaves the rest of the
division in DX. Just try this.

Stephan

+------------------------------------------------------------------+

| !!! NEW !!!   http://www.muc.de/~stephanm   (under developement) |
+------------------------------------------------------------------+



Sat, 09 May 1998 03:00:00 GMT  
 search algorithm for a math mod function (5 mod[2]=1)


Quote:

>> Hello everybody
>> Does somebody know how to code in asm 80x86 the mathematic mod function ?
>> Thank for help.
>> Marc.

>The DIV instruction doesn't only divide, it leaves the rest of the
>division in DX. Just try this.

>Stephan

..and with 8 bit divisors, the remainder would be found in AH.

Bill



Sat, 16 May 1998 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. MOD and /MOD with Pygmy Forth

2. SM/REM FM/MOD and UM/MOD on a 32bit cell ix86 Forth

3. Utils.Mod, ET.Mod

4. Mod-2 or Mod-3 for Mac

5. Mod-2 and Mod-3 compiler

6. Mod-2 and Mod-3 compiler for the IBM PC and compatibles

7. function REM or MOD

8. Mod function with the floating point processor

9. How would I do a complicated mod function?

10. Function Mod philosophy

11. MOD function

12. Equivilant MOD Function

 

 
Powered by phpBB® Forum Software