| | |
What does this instruction do?
Thread Solved |
•
•
Join Date: Jun 2008
Posts: 10
Reputation:
Solved Threads: 1
Hello all! I'm new here
I was looking through a program and I was wondering what this instruction is:
I know that LEA moves the offset of the second argument into EAX but I don't understand the segund argument very much:
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
I was looking through a program and I was wondering what this instruction is:
Assembly Syntax (Toggle Plain Text)
LEA EAX,DWORD PTR SS:[EBP-34]
Assembly Syntax (Toggle Plain Text)
DWORD PTR SS:[EBP-34]
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.
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.
If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
--
If your code lacks code tags, you will be IGNORED
--
If your code lacks code tags, you will be IGNORED
![]() |
Similar Threads
- Instruction Set / Compiler (Assembly)
- How to extract the opcode and the data form the instruction (Assembly)
- VB Instruction to EXIT a Program (Visual Basic 4 / 5 / 6)
- shrd instruction and converting integers to ascii (Assembly)
- NTVDM CPU has encountered an illegal instruction (C++)
- help with an instruction (Assembly)
- addcc instruction (Assembly)
- "Error Message - tried to execute invalid instruction" (C++)
Other Threads in the Assembly Forum
- Previous Thread: completely lost
- Next Thread: urgent help needed regarding assembly
Views: 1317 | Replies: 2
| Thread Tools | Search this Thread |
Tag cloud for Assembly
80386 :( adress array asm assembler assembly boot bootloader buffer call compression cursor directory display div division docs dos endtask error exceptions file int10h integer intel interrupt interrupts language loop main mmx multiple newbie osdevelopment print program range read remainder string text theory tsr x86






