hi! it's me again.... got a couple of newbie questions...

1) Is it possible to declare functions in MASM?
2) How do i declare boolean variables and give them values

like in C:

BOOL tsongkie;

tsongkie = TRUE;


Something like that....
Posted on 2001-11-15 04:46:20 by Tsongkie[ii]
Tsongkie,

In MASM they are called prototypes and they do the sme thing as declarations in other languages.

If you write a procedure in MASM, you normally write a prototype for it that the assembler can read so it knows what the parameter size and count are.

You also use prototypes when you call DLL functions and that is what the big list of include files are in MASM32.



Prototype
~~~~~~~~~
MyProc PROTO STDCALL :DWORD,:DWORD

Procedure
~~~~~~~~~
MyProc proc var1:DWORD, var2:DWORD
; assembler code here
ret
MyProc endp


Regards,

hutcdh@movsd.com
Posted on 2001-11-15 05:00:59 by hutch--
As for the bool... just use a byte or a dword. A c++ "bool" is usually
a byte, while I think a C (well, microsoft) "BOOL" in a dword.
As for true/false... 0 is false, anything else is true.
Posted on 2001-11-15 07:39:36 by f0dder
thanx!!!!!!!!!!!
Posted on 2001-11-16 01:30:43 by Tsongkie[ii]