X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?p=rmac;a=blobdiff_plain;f=amode.c;h=f0734ea5916dc8f6c86007954062fd162372b1e6;hp=875c324d6175ffe77304c157ab2cb29ff7dcb8f5;hb=60f204cb9e3905100da0d89f14bb40db764acd9e;hpb=d0c28c349ddfb8393568037f68bddbe8979ce0df diff --git a/amode.c b/amode.c index 875c324..f0734ea 100644 --- a/amode.c +++ b/amode.c @@ -1,7 +1,7 @@ // // RMAC - Reboot's Macro Assembler for the Atari Jaguar Console System // AMODE.C - Addressing Modes -// Copyright (C) 199x Landon Dyer, 2011 Reboot and Friends +// Copyright (C) 199x Landon Dyer, 2017 Reboot and Friends // RMAC derived from MADMAC v1.07 Written by Landon Dyer, 1986 // Source utilised with the kind permission of Landon Dyer // @@ -75,9 +75,10 @@ int amode(int acount) #define AnESYM a0esym #define AMn_IX0 am0_ix0 #define AMn_IXN am0_ixn + #define CHK_FOR_DISPn CheckForDisp0 #include "parmode.h" - // If caller wants only one mode, return just one (ignore comma); + // If caller wants only one mode, return just one (ignore comma); // If there is no second addressing mode (no comma), then return just one anyway. nmodes = 1; @@ -102,6 +103,7 @@ int amode(int acount) #define AnESYM a1esym #define AMn_IX0 am1_ix0 #define AMn_IXN am1_ixn + #define CHK_FOR_DISPn CheckForDisp1 #include "parmode.h" nmodes = 2; @@ -144,7 +146,7 @@ int reglist(WORD * a_rmask) if (*tok >= KW_D0 && *tok <= KW_A7) cnt = *tok++ & 15; - else + else return error("register list syntax"); if (cnt < r) @@ -152,7 +154,7 @@ int reglist(WORD * a_rmask) cnt -= r; } - else + else cnt = 0; while (cnt-- >= 0)