News:

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

proc and end proc

Started by runtimeTerror, February 03, 2005, 04:59:21 PM

Previous topic - Next topic

runtimeTerror

Just was looking at some code for init'ing a window. The statements WinMain proc AND WinMain endp, are these the equivalent to Public Function and End Function syntax in VB? Or is it standard whenever you make a window to include any window creation code within a WinMain Proc/ WinMain endp block?

00100b


<label> PROC

<label> ENDP


Is the syntax for declaring a procedure, so yes, it is similar to the Function/End Function (or Sub/End Sub) syntax used in VB.  It is not specific to WinMain.

You could just as well use:

Foo PROC

Foo ENDP


runtimeTerror

Thanks for your reply. I'm doing my best to not use my existing knowledge (ie the syntax of vb or asp.net) to determine my learning curve on masm, but its habit to look for familiar things i guess.

00100b

Separating yourself from what you know and what you want to learn can be difficult.  We are in the same boat.  Wait until you get to a point where you find out that you didn't really know what you thought you knew.  Them thar epiphany thingies can be a real ego-buster. :lol

Randall Hyde

Quote from: runtimeTerror on February 04, 2005, 07:36:22 PM
Thanks for your reply. I'm doing my best to not use my existing knowledge (ie the syntax of vb or asp.net) to determine my learning curve on masm, but its habit to look for familiar things i guess.

You *should* use your existing knowledge. It can help.
Though assembly is quite a bit different from most HLLs (and certainly visual languages like VB), by drawing appropriate analogies you can improve the speed at which you pick up assembly.  Though one can pick up some bad habits in certain languages, that's no reason to try and forget everything you've learned when you're learning assembly
Cheers,
Randy Hyde

Robert Collins

Quote from: Randall Hyde on February 04, 2005, 11:20:55 PM
You *should* use your existing knowledge. It can help.
Though assembly is quite a bit different from most HLLs (and certainly visual languages like VB), by drawing appropriate analogies you can improve the speed at which you pick up assembly.  Though one can pick up some bad habits in certain languages, that's no reason to try and forget everything you've learned when you're learning assembly
Cheers,
Randy Hyde


Once my boss told me to write a new application of one that already existed in a different language than I was acustomed to. He told me to start from stratch so as not to be influenced from the old code in the original application. He didn't mean that I couldn't use my knowledge of the other language he meant that I should not let the other application be my guide as to how I was to write a new version.