X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?p=rmac;a=blobdiff_plain;f=parmode.h;h=955fade88621de27095dad9fba6f613c8498f76f;hp=13b83fcae05cd27827f94b998d95361ccd89f93a;hb=fbbe9b115f949735421485513154ce8abb8453eb;hpb=0561939cf64e5d66153c2e7903e2411b802ff5c8 diff --git a/parmode.h b/parmode.h index 13b83fc..955fade 100644 --- a/parmode.h +++ b/parmode.h @@ -1,7 +1,7 @@ // // RMAC - Reboot's Macro Assembler for all Atari computers // PARMODE.C - Addressing Modes Parser Include -// Copyright (C) 199x Landon Dyer, 2011-2018 Reboot and Friends +// Copyright (C) 199x Landon Dyer, 2011-2020 Reboot and Friends // RMAC derived from MADMAC v1.07 Written by Landon Dyer, 1986 // Source utilised with the kind permission of Landon Dyer // @@ -81,7 +81,7 @@ } else if ((*tok >= KW_D0) && (*tok <= KW_D7)) { - //Since index register isn't used here, store register number in this field + // Since index register isn't used here, store register number in this field AnIXREG = *tok++ & 7; // (Dn) if (*tok == ')') @@ -1169,6 +1169,14 @@ CHK_FOR_DISPn: // expr[.L] AMn = ABSL; + // When PC relative is enforced, check for any symbols that aren't + // EQU'd, in this case it's an illegal mode + if (optim_pc) + if (AnEXATTR & REFERENCED) + if (AnEXATTR & DEFINED) + if (!(AnEXATTR & EQUATED)) + return error("relocation not allowed"); + // .L is forced here if (*tok == DOTL) {