Other assembler directives (FASM Specific)
Up until now, we mostly considered macro instructions to be some sort of replacement for procedure calls, although I believe it would be correct to refer to them as convenience instruments for simplifying the writing and maintenance of the code. In this part of the chapter, we will see some so to say built-in macro instructions--assembler directives--which may virtually be divided into three categories:
- Conditional assembly
- Repeat directives
- Inclusion directives
Note
Additional categories may be present depending on assembler implementation. You should refer to the documentation of the assembler you are using for more information.
The conditional assembly
Sometimes we may want a macro instruction or a code fragment to be assembled differently depending on certain conditions. Both MASM and GAS provide this functionality too, but let's get back to FASM (as the most convenient one) and consider the following macro instruction:
macro exordd p1, p2 { if ...