Im trying to conditionally define some constant with equ directive by putting it in the if block, but it seems that even when this condition is false, the constant gets defined. Why?
That’s because all symbolic constants and macroinstruction (that means every symbol you define with equ, macro, or struc directive) are processed at the preprocessor stage, while directives like if or repeat are processed at assembly stage, when all macroinstructions and symbolic constants have already been replaced with corresponding values (generally structures which you have to end with the end directive followed by the name of structure are processed at assembly stage). On the other hand, the numerical constants (which you define with = symbol) are of the same kind as labels, and therefore are processed at assembly stage, so you can define and use them conditionally.
Related Questions
- Im trying to conditionally define some constant with equ directive by putting it in the if block, but it seems that even when this condition is false, the constant gets defined. Why?
- Can I reduce footstep noises by putting the mic on a foam block or other padding?
- How does the industry define a rare coins condition?