happyreadygo Advanced Cheater
Reputation: 1
Joined: 14 Sep 2011 Posts: 87
|
Posted: Mon Aug 20, 2012 7:48 am Post subject: How to multiply and divided in assemble |
|
|
how can we multiply and divide a number in assemble? I search all the web but all only say about add , sub and little about lea , nothing say about divide .
However , I found something about using lea to mulitply.
If I want to multiply ecx by 2 , ecx = 0x1a0
I must using
If I want to multiply ecx by 3 , ecx = 0x1a0
Code: | lea ecx,[ecx+ecx*2] |
I am still know not much about lea
Can someone show me an example of how to divide and multiply? are there any ceiling or floor when we divide the number?
* just found something interesting
Code: | mov edx,2
imul ecx,edx |
this code multiply ecx by 2
but this code don't do anything and no eror.
|
|