I have succeeded to prevent error for the case that symbol is not defined, it will work only with "if 0 and ...".
The fix is in expreval.c starting with line 1169:
DebugMsg1(("get_operand(%s): symbol %s not defined, pass > 1, curr proc=>%s<, \n", tokenarray[i].string_ptr, tmp, CurrProc ? CurrProc->sym.name : "NULL" ));
if ( opnd->type && *opnd->type->name ) {
fnEmitErr( MEMBER_NOT_DEFINED, opnd->type->name, tmp );
} else {
if ((0 == _memicmp(tokenarray[0].tokpos, "if", 2)) &&
(0 == _memicmp(tokenarray[1].tokpos, "0", 1)) &&
(0 == _memicmp(tokenarray[2].tokpos, "and", 3)))
;//skip it
else
fnEmitErr( SYMBOL_NOT_DEFINED, *(tmp+1) == '&' ? "@@" : tmp );
}
return( ERROR );
}
#if ALIAS_IN_EXPR /* v2.04b: added */
the fix is:
if ((0 == _memicmp(tokenarray[0].tokpos, "if", 2)) &&
(0 == _memicmp(tokenarray[1].tokpos, "0", 1)) &&
(0 == _memicmp(tokenarray[2].tokpos, "and", 3)))
;//skip it
else
It is an ugly hack but it works.
Let me know if you are happy with it.
If you can not build UASM I can post it here, because it looks like John is busy lately with his garden.