}
// If we got a register in range (0-31), return it
- if (eval <= 31)
- return (int)eval;
+ if (eattr & RISCREG)
+ return (int)eval - KW_R0;
// Otherwise, it's out of range & we flag an error
return error(reg_err);
{
if ((tok[2] == '+') || (tok[2] == '-'))
{
- if ((sy->svalue & 0x1F) == 14 || (sy->svalue & 0x1F) == 15) {
- indexed = (sy->svalue & 0x1F);
+ if ((sy->svalue - KW_R0) == 14 || (sy->svalue - KW_R0) == 15) {
+ indexed = (sy->svalue - KW_R0);
tok++;
}
else
if (sy->sattre & EQUATEDREG)
{
- if (((sy->svalue & 0x1F) == 14 || (sy->svalue & 0x1F) == 15)
+ if (((sy->svalue - KW_R0) == 14 || (sy->svalue - KW_R0) == 15)
&& (tok[2] != ')'))
{
- indexed = (sy->svalue & 0x1F);
+ indexed = (sy->svalue - KW_R0);
tok++;
}
}