flat assembler
Message board for the users of flat assembler.
Index
> Main > help converting C to fasm |
Author |
|
revolution 10 Nov 2011, 13:25
"one = 1 << 30" ---> "mov eax,1 shl 30"
"one >>= 2" ---> "shr eax,2" |
|||
10 Nov 2011, 13:25 |
|
goldenspider 10 Nov 2011, 13:35
Code: xor edx,edx ;res = 0; mov eax,dword 1 shl 30 ;one = 1 << 30 ... shr eax,2 ;one >>= 2 ... lea edx,[edx+2*eax] ;res = res + 2 * one; ... shr edx,1 ;res /= 2 shr eax,2 ;one /= 4 |
|||
10 Nov 2011, 13:35 |
|
Rock_maniak_forever_ 10 Nov 2011, 15:25
magicSqr Compile and try to look in disassembler or debugger. I suppose it's could more be easy.
|
|||
10 Nov 2011, 15:25 |
|
magicSqr 10 Nov 2011, 17:28
Many thanks for the help everyone
|
|||
10 Nov 2011, 17:28 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.