News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

File Operations, Please Help

Started by tuto, May 18, 2005, 10:34:09 AM

Previous topic - Next topic

AeroASM

Some clarification on pointers and derefencing:


.data

MyVar DWORD 0

.code

start:

mov eax,MyVar                           ;puts the value of MyVar into eax
mov eax,offset MyVar                  ;puts the address of MyVar into eax, eax is now a pointer to MyVar.
mov edx,[eax]                            ;square brackets mean memory access: this means put (the value at (the address in eax)) into edx
;however because the address in eax is the address of MyVar, the above instruction puts the value of MyVar into edx.


Got it?  :thumbu :U

tuto

I'm astonished!!!  :eek I haven't met so friendly and helpful people aywhere else! I am so happy that I found this forum! I will do my best to improve myself and maybe someday I will be able to help someone like me... You people really help me progress faster. THANK YOU!!!  :U :thumbu :clap: :U :thumbu :clap: :U :thumbu :clap:

Thanks again!
Edgars