//
-// RMAC - Reboot's Macro Assembler for all Atari computers
+// RMAC - Renamed Macro Assembler for all Atari computers
// PARMODE.C - Addressing Modes Parser Include
-// Copyright (C) 199x Landon Dyer, 2011-2020 Reboot and Friends
+// Copyright (C) 199x Landon Dyer, 2011-2021 Reboot and Friends
// RMAC derived from MADMAC v1.07 Written by Landon Dyer, 1986
// Source utilised with the kind permission of Landon Dyer
//
tok++;
}
- // Check for address register or PC,
- // suppress base register otherwise
+ // Check for address register or PC, suppress base register
+ // otherwise
if (*tok == KW_PC)
{ // ([bd,PC,...
default:
goto badmode;
}
-
+
}
// Check for od
if (*tok == DOTL)
tok++; // Doesn't matter, we're going for .L anyway
+ WORD od_ea = 0;
+
// od.L
if (!(AnEXTEN & EXT_BS))
- AnEXTEN |= EXT_IISPOSL; // Long outer displacement
+ od_ea = EXT_IISPOSL; // Long outer displacement
else
{
// bd is suppressed, so sticking the od size in bd
- AnEXTEN |= EXT_BDSIZEL;
+ od_ea = EXT_BDSIZEL;
// And of course the expression has to be copied to
// AnBEXPR instead of AnEXPR. Yay. :-/
int i = 0;
{
AnBEXPR[i] = AnEXPR[i];
i++;
- } while (AnEXPR[i] != 'E');
+ }
+ while (AnEXPR[i] != 'E');
AnBEXPR[i] = 'E';
}
&& ((AnEXATTR & (TDB | DEFINED)) == DEFINED)
&& (((uint32_t)AnEXVAL + 0x8000) < 0x10000))
{
- AnEXTEN |= EXT_IISPOSW; // Word outer displacement
+ od_ea = EXT_IISPOSW; // Word outer displacement
AMn = MEMPOST + ea_PC;
+
if (optim_warn_flag)
warn("absolute value in outer displacement ranging $FFFF8000..$00007FFF optimised to absolute short");
}
+ AnEXTEN |= od_ea;
}
// Check for final closing parenthesis