Hi @ all and thanx for reading this thread!

I would like to incorporate in my asm code some debugging code (with the new windbg... thanx to vkim and ketilo :)) but, as I seldom made in C, using conditional assembly.
I know thereis an IFDEF, but how can I define something?

Thanx in advance to anyone reading, but more to anyone helping me! ;)

Posted on 2001-10-29 16:05:17 by dguzz
TASM /dMAX=10 /dMIN=2 test1.asm

defines 2 symbols MAX and MIN that the IFDEF in test1.asm car reference...

replace TASM with MASM if you use MASM :)
Posted on 2001-10-29 16:25:03 by BogdanOntanu
I never knew of externally declairing defines that way... neat to know... but i prefer having the variables declaired within:

If i were to do what your asking:

(At the top of the main file ~ before any includes)

MyDebug equ 0 ; This defines a variable 'MyDebug'

(at debug points in my code)


invoke DebugStuff, Bla, Bla, Bla


So, if i want to make a release copy ~ and all debug code is NOT compiled into the mix, i would simply comment out the 'MyDebug equ 0' statement, making all IFDEF's turn false.

Hope this helps..
Posted on 2001-10-29 17:12:05 by NaN
Thanx a lot guys, both for the answers and the being so fast in answering. :grin:

Posted on 2001-10-30 11:38:22 by dguzz