How can I use IntMul in the masm32 lib? Can I use it to multiply two 32 bits integers?


/Delight
Posted on 2001-09-16 08:04:56 by Delight
Once you include the inc and lib
include \masm32\include\masm32.inc
includelib \masm32\lib\masm32.lib

Its just a question of using it as follows

.data
Val1 dd 56
Val2 dd 32

.code
invoke IntMul,Val1,Val2
; now eax = 56*32

Personally however I recommend using the imul instruction

mov eax,Val1
imul eax,Val2
; now eax = 56*32

The end result is the same but its many times faster, and smaller
Posted on 2001-09-16 10:57:06 by Eóin
OK. thanks, I was just curious:alright:


/Delight
Posted on 2001-09-16 11:09:58 by Delight