Hello! everyone

I dont know why i a get a error in assembling the below mentioned code
can any one help please??

Error: register value overwritten by INVOKE

my code:

snapit proc

LOCAL Snap:DWORD
LOCAL pro:PROCESSENTRY32

invoke CreateToolhelp32Snapshot,TH32CS_SNAPALL,0
mov Snap,eax
mov pro.dwSize,sizeof pro
invoke Process32First,eax,ADDR pro ; Flags an error here:confused:

snapit endp
:notsure:
Posted on 2004-05-31 00:13:01 by telophase
The MASM INVOKE macro uses EAX to calculate an address on the local stack with LEA. If you have a parameter that uses ADDR that must be calculated before EAX is pushed the INVOKE macro will fail. Just dont use EAX...

invoke Process32First, Snap, ADDR pro
Posted on 2004-05-31 00:26:12 by donkey
Thankyou donkey,

I had heard something about GoAsm from you at some other thread i think.

Does it have a gui to compile like MASM has one?
Posted on 2004-05-31 09:28:48 by telophase
It have a little editor (that I already not test ;)), but have one.

(Also see that have the assembler is diferent from have a editor for edit code and normally you can integrate with your prefered editor).

Have a nice day or night.
Posted on 2004-05-31 09:55:44 by rea
GoAsm can use RadASM by Ketil Olsen, a full IDE. It makes it very easy to switch from MASM to GoAsm and back as the GUI is exactly the same for all assemblers. I have a set of libraries on my website that make it almost the exact same procedure as compiling in MASM32.
Posted on 2004-05-31 10:03:01 by donkey
Thankyou for ur responce
Posted on 2004-05-31 10:11:14 by telophase
"Does it have a gui to compile like MASM has one?" - masm doesn't have a gui. There are GUIs for masm, though :rolleyes:.

And as Donkey said, check out radasm... it can be extended for even more assemblers than it already supports.
Posted on 2004-06-01 11:26:36 by f0dder