News:

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

Defining Own Function

Started by Slugsnack, May 20, 2008, 06:39:41 PM

Previous topic - Next topic

Slugsnack

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:

  • What instructions are executed when i call the function
  • The function itself

If possible, if it is too much trouble to explain to me, a link would really help me a lot.

Vortex


Slugsnack

#2
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