Use of Shl in assembly
- by user3097712
I have the following piece of lines and I do not understand that. Hope that someone can help me:
.....
MOV EAX, DWORD PTR SS:[EBP-0x4]
SHL EAX, 0x2
ADD EAX, DWORD PTR SS:[EBP-0x8]
PUSH EAX
....
Normally, it helps me to translate that into C language. But somehow I cant find a way to do it in that case.
So, I only know that in the second line with SHL the register is multiplied by 4.
And that the DWORD PTR SS:[EBP-0x4] looks like an array representation but i am not sure.
I also find the following link
x86 Assembler: shl and other instructions
But I dont understand the answer there.
So my question would be: What it is going on there? Thx...