EVAL.CPP contains the parser code that evaluates numeric literals. Currently in EASy68K:
$ = hexadecimal
% = binary
@ = base 8
default = base 10
Code:
else if (*p == '$' && isxdigit(*(p+1))) {
/* Convert hex digits until another character is
found. (At least one hex digit is present.) */
x = 0;
while (isxdigit(*++p)) {
if ((unsigned int)x > (unsigned int)LONGLIMIT/16)
NEWERROR(*errorPtr, NUMBER_TOO_BIG);
if (*p > '9')
x = 16 * x + (*p - 'A' + 10);
else
x = 16 * x + (*p - '0');
}
*numberPtr = x;
return p;
}
else if (*p == '%' || *p == '@' || isdigit(*p)) {
/* Convert digits in the appropriate base (binary,
octal, or decimal) until an invalid digit is found. */
if (*p == '%') {
base = 2;
p++;
}
else if (*p == '@') {
base = 8;
p++;
}
else
base = 10;
Modifying EASy68K would require an old copy of Borland C++ Builder 6.x.