New to MASM, but old ASM hobbiest from A386 days wants to know what I did to provoke a "unresolved external" Link error with this..

.model flat, stdcall
option casemap :none

include          ; the include files courtesy of RADASM .dlg
eenee    PROTO    :DWORD
meenee PROTO    :DWORD
mynee  PROTO     :DWORD

   invoke eenee, 8
end start

eenee proc  :DWORD
eenee endp

This compiles and links OK if I comment out the invoke, but gags otherwise.
cheers, gner

Posted on 2010-09-15 10:15:54 by gner

That's something regarding forward references in MASM. If your prototyped procedure isn't defined before invoke, MASM decorates its name accordingly and declares as external.

By the way, you can't omit parameter's name in proc directive.
Posted on 2010-09-15 10:43:05 by baldr
many thanks;
I guess I did define the eenee procedure before the invoke. Isn't that what the  
   eenee PROTO  :DWORD was all about?

and yes I did forget to type the parameters name in the post, but it's in the source that crashed.
cheers gner
Posted on 2010-09-15 11:20:25 by gner

proto declares function, it doesn't define it. ;)

invoke is a hideous beast: while it's quite useful, it can sting in the arse unexpectedly.
Posted on 2010-09-15 11:27:42 by baldr
I guess, at this point, so that I can get some work done, is to cope-out and INVOKE kernel procedures, while CALLing labels. It's a shame though. Error hang-ups are supposed to be an opportunity to learn something; in this case how to code my own procedures to INVOKE. Didn't get it done in this case, in spite of your help, for which I am grateful.
cheers gner
Posted on 2010-09-15 16:24:09 by gner