flat assembler
Message board for the users of flat assembler.
Index
> Main > DIV questions. |
Author |
|
Teehee 27 Dec 2009, 19:39
152 / 100 = 1.52
Code: mov eax, 152 mov ebx, 100 cdq div ebx ; eax = 1 To where .52 goes? _________________ Sorry if bad english. |
|||
27 Dec 2009, 19:39 |
|
Fanael 27 Dec 2009, 20:03
You mean the remainder? Check EDX.
|
|||
27 Dec 2009, 20:03 |
|
Borsuc 27 Dec 2009, 20:46
In decimal: Multiply numerator by 100, the numbers <100 can be considered fractional.
In binary: Multiply by a power of 2, the respective bits can be used as fractional bits. |
|||
27 Dec 2009, 20:46 |
|
Teehee 27 Dec 2009, 21:06
Oh, nice. Thank you guys.
|
|||
27 Dec 2009, 21:06 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.