![]() |
Dereference Value on the Stack
Howdy all,
I'm kind of new to assembly, and I'm using NASM 2.00. I've learned that you can dereference a value from an address stored in a register, or in memory, by enclosing the memory address in brackets, like this: mov eax, [memory_location] As far as I can tell, this is similar to using * to dereference a pointer in C. I can't figure out how to do the same for an address pushed on the stack, from inside a procedure. Example: :
push memory_locationThe last instruction will move the address stored at [ebp + 8] into the eax register. What I'd like to do is dereference the value stored at [ebp + 8], and store that in eax. Can that be done in one instruction? Or do I have to do something like this: :
mov eax, [ebp + 8] |
| All times are GMT -5. The time now is 2:23 PM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC