News:

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

invoke problem (newbie question)

Started by swamplord, October 29, 2007, 07:49:20 PM

Previous topic - Next topic

swamplord

Here is my code
TITLE EXP2


.model small,stdcall
.stack 200h
.386   


.CODE
main PROC

INVOKE Procedure

.EXIT
main ENDP

Procedure PROC
ret
Procedure ENDP

END Main


i get an error like this on the "INVOKE" line when i try to build it:
error A2006:       : Procedure
If i change "INVOKE" with "CALL", it builds succesfully.
I am using "make16.bat" in Masm615 to build the code.
What am I doing wrong?

Vortex

You should specify a prototype declaring your function before calling your procedure :

Procedure PROTO

If your function takes one parameter :

Procedure PROTO :DWORD

For two parameters :

Procedure PROTO :DWORD,:DWORD
etc.

If the PROC block comes before the call to the function then you don't need to write prototypes.


Vortex

You are welcome. Don't forget, it's the 16-bit DOS linker used for DOS programming :

http://website.masm32.com/microsoft/Lnk563.exe