uint8_t c1;
int stringNum = 0; // Pointer to string locations in tokenized line
SYM* sy; // For looking up symbols (.equr)
+ int equrundef = 0; // Flag for equrundef scanning
retry:
case 119: // macdef
case 120: // time
case 121: // date
+ case KW_FILESIZE: // filesize
+ j = -1;
+ }
+
+ // If we detected equrundef/regundef set relevant flag
+ if (j == KW_EQURUNDEF)
+ {
+ equrundef = 1;
j = -1;
}
// If not tokenized keyword OR token was not found
if ((j < 0) || (state < 0))
{
- // Last attempt: let's see if this is an equated register
- sy = lookup(nullspot, LABEL, 0);
- if (sy)
+ // Only proceed if no equrundef has been detected. In that case we need to store the symbol
+ // because the directive handler (d_equrundef) will run outside this loop, further into procln.c
+ if (!equrundef && !disabled)
{
- if (sy->sattre & EQUATEDREG)
+ // Last attempt: let's see if this is an equated register.
+ // If yes, then just store the register's keyword value instead of the symbol
+ char temp = *ln;
+ *ln = 0;
+ sy = lookup(nullspot, LABEL, 0);
+ *ln = temp;
+ if (sy)
{
- *tk.u32++ = sy->svalue;
- stuffnull = 0;
- continue;
+ if (sy->sattre & EQUATEDREG)
+ {
+ *tk.u32++ = sy->svalue;
+ stuffnull = 0;
+ continue;
+ }
}
}
// Ok, that failed, let's store the symbol instead