The syntax of the IFB and IFNB directives is
IFB < argument > IFNB < argument >
Note that the angle brackets are required. The IFB directive assembles the then part if the argument is blank. The IFNB directive assembles if the argument is not blank.
These directives are useful to test the presence as well as the number of arguments specified in a macro call.
If the above macro is invoked by the statement
READ MSG, 10then since both arguments are present, the following code will be assembled
MOV AH, 0AH LEA DX, MSG MOV MSG, 10 INT 21H
If the macro invocation is
READthen since both arguments are blank, the following code will be assembled
MOV AH, 1 INT 21H
If the macro is improperly called with only one argument, then an error message is displayed using the %OUT directive and the macro expansion process is terminated using the EXITM directive.
The EXITM directive stops any macro expansion or repeat block expansion that is in progress. All remaining statements after EXITM are ignored.
Another way for indicating when a macro is invoked incorrectly is by using the .ERR directive. When the assembler encounters this directive, it displayes the message "forced error", which indicates a fatal assembly error.