View previous topic :: View next topic |
Author |
Message |
Coreveen Cheater Reputation: 0
Joined: 12 May 2011 Posts: 39
|
Posted: Mon Mar 13, 2017 10:09 pm Post subject: Enter Multiplication! |
|
|
Hello! Would anyone mind helping me learn how to multiply a specific register if that's possible?
Basically I'd like to turn this code:
Code: | add ecx,edx
mov [rax],ecx |
Into the same thing except multiply edx by a custom amount (say 3 or 5) before it gets added with ecx.
How would I go about translating this desire in the auto assemble?
Thank you for your time.
|
|
Back to top |
|
|
TheyCallMeTim13 Wiki Contributor Reputation: 50
Joined: 24 Feb 2017 Posts: 976 Location: Pluto
|
|
Back to top |
|
|
mgr.inz.Player I post too much Reputation: 218
Joined: 07 Nov 2008 Posts: 4438 Location: W kraju nad Wisla. UTC+01:00
|
Posted: Tue Mar 14, 2017 5:40 am Post subject: |
|
|
Code: | imul edx,edx,5
add ecx,edx
mov [rax],ecx |
_________________
|
|
Back to top |
|
|
Coreveen Cheater Reputation: 0
Joined: 12 May 2011 Posts: 39
|
Posted: Tue Mar 14, 2017 7:10 am Post subject: |
|
|
@mgr.inz.Player
Much appreciated, sir!
@TheyCallMeTim13
I wasn't able to understand the information on the webpage you linked, sorry.
|
|
Back to top |
|
|
|