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

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.

Ok thanks a lot!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.