Hi to all,
I am writing a dll to read the tags from an mp3 file. Obviously, I have started with the version 1 of the tags. But a problem raised:
I pass to a procedure a pointer that points to the integer to hold the track number. When I write in memory using this pointer directly:
mov [pointertotracknumber], eax
I receive strange results.
When I do exactly the same thing using a register:
mov ebx, pointertotracknumber
mov [ebx], eax
All works fine.
And my question is why this happens and when is correct:
mov [pointertosomething], some value
Thanks in advance.
You can't use a value in memory to write into other memory. MASM does funny things with brackets (or, at least non-standard things), so you are basically removing thre brackets and changing the pointer itself.
-r
Thanks for your answer redskull.
After google a lot I have found that it is not possible to dereference using a memory address. It must be done using a register.
Thanks once more.