The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: Slugsnack on May 20, 2008, 06:39:41 PM

Title: Defining Own Function
Post by: Slugsnack on May 20, 2008, 06:39:41 PM
Hi all !

I am trying to define my own function in MASM32 that I can invoke or call.

I think the PROTO function is what I am looking for:
http://msdn.microsoft.com/en-us/library/de68s2h5(VS.80).aspx

I am also learning C and I know that when I define my own function in C, I declare my function outside main and make a prototype for the arguments and make the function return a value afterwards (optional).

From what I understand, PROTO will let me define what arguments my function will take but I'm not sure where to define:

If possible, if it is too much trouble to explain to me, a link would really help me a lot.
Title: Re: Defining Own Function
Post by: Vortex on May 20, 2008, 06:47:28 PM
Hi Slugsnack,

Welcome to the forum.

User defined functions (http://www.masm32.com/board/index.php?topic=8746.0)
Title: Re: Defining Own Function
Post by: Slugsnack on May 20, 2008, 06:53:43 PM
Thanks very much !  I will read through that thread now, it looks like just what I was looking for.  I guess I'm just sucky at searching.  Anyway, will post back if I am still stuck.

Thanks again.

//edit :  Just got it working, that thread was perfect for what I wanted to know especially your code example  :bg