]> Shamusworld >> Repos - rmac/blobdiff - mach.c
Update to the name (don't ask), and copyright dates. Now at v2.1.0.
[rmac] / mach.c
diff --git a/mach.c b/mach.c
index 42268dcde2bd706cbb4b00f691a25338b7273a7e..9a9882e6b7c5c669c8a58c19f18ff58fab51c163 100644 (file)
--- a/mach.c
+++ b/mach.c
@@ -1,7 +1,7 @@
 //
-// RMAC - Reboot's Macro Assembler for all Atari computers
+// RMAC - Renamed Macro Assembler for all Atari computers
 // MACH.C - Code Generation
-// 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
 //
@@ -796,7 +796,11 @@ int m_move(WORD inst, WORD size)
 int m_move30(WORD inst, WORD size)
 {
        int siz = (int)size;
-       inst |= siz_12[siz] | reg_9[a1reg & 7] | a0reg | extra_addressing[am0 - ABASE];
+
+       if (am0 > ABASE)
+               inst |= siz_12[siz] | reg_9[a1reg & 7] | a0reg | extra_addressing[am0 - ABASE];
+       else
+               inst |= siz_12[siz] | reg_9[a1reg & 7] | a0reg | extra_addressing[am1 - ABASE] << 3;
 
        D_word(inst);
 
@@ -2434,7 +2438,6 @@ int m_pload(WORD inst, WORD siz, WORD extension)
                        inst = 1;
                else
                        return error("illegal control register specified");
-
                break;
        case DREG:
                inst = (1 << 3) | a0reg;