The .ERRIDN and .ERRIDNI directives generate an assembly error if the two Text-Arguments are identical.
Syntax
.ERRIDN Text-Argument-1, Text-Argument-2 or .ERRIDNI Text-Argument-1, Text-Argument-2Remarks
The .ERRIDN directive performs a case-sensitive comparision, and the .ERRIDNI directive performs a case-insensitive comparision.
In this example, .ERRIDN protects against the passing the AX register as the second parameter, because the macro does not work if this happens. This example uses the .ERRIDNI directive since the macro needs to check for all possible spellings of the AX register.
ADDEM MACRO AD1,AD2,SUM .ERRIDNI <ax>,<AD2> ;; ERROR IF AD2 is ax MOV AX,AD1 ;; Would overwrite if AD2 were AX ADD AX,AD2 MOV SUM,AX ;; SUM must be register or memory ENDM