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....
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....
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.
Regards,
hutcdh@movsd.com
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
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.
a byte, while I think a C (well, microsoft) "BOOL" in a dword.
As for true/false... 0 is false, anything else is true.
thanx!!!!!!!!!!!