0

Hello all! I'm new here

I was looking through a program and I was wondering what this instruction is:

LEA EAX,DWORD PTR SS:[EBP-34]

I know that LEA moves the offset of the second argument into EAX but I don't understand the segund argument very much:

DWORD PTR SS:[EBP-34]

I'm guessing it's a pointer to a double word located in [EBP-34], but what does the SS stand for (no nazi jokes :p)?

And besides, what's the point in moving the offset of a pointer? Couldn't it just move the pointer directly, since it has the same size, and it wouldn't have to dereference it again afterwards

2
Contributors
2
Replies
3
Views
9 Years
Discussion Span
Last Post by SirDorius
0

SS means stack segment.

EBP typically moves around with ESP (BP=Base Pointer, SP=Stack Pointer).

The BP is typically used to establish a fixed point of reference for a stack frame. BP + offset would typically be parameters, BP - offset would be local variables and temporary storage.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.