]> Shamusworld >> Repos - rmac/commitdiff
Fix for bug #33. Thanks to Linkovitch for reporting!
authorShamus Hammons <jlhamm@acm.org>
Wed, 7 Oct 2015 15:21:55 +0000 (10:21 -0500)
committerShamus Hammons <jlhamm@acm.org>
Wed, 7 Oct 2015 15:21:55 +0000 (10:21 -0500)
direct.c
procln.c
version.h

index a2eef8867618154b181ec48ba513a4afb1c16387..04b576c22cc4df94d457c6fff750561937a1a264 100644 (file)
--- a/direct.c
+++ b/direct.c
@@ -292,6 +292,7 @@ int d_equrundef(void)
 //
 int d_noclear(void)
 {
 //
 int d_noclear(void)
 {
+       warn("CLR.L opcode ignored...");
        return 0;
 }
 
        return 0;
 }
 
@@ -803,9 +804,17 @@ int d_dc(WORD siz)
        if ((scattr & SBSS) != 0)
                return error("illegal initialization of section");
 
        if ((scattr & SBSS) != 0)
                return error("illegal initialization of section");
 
+       // Do an auto_even if it's not BYTE sized (hmm, should we be doing this???)
        if ((siz != SIZB) && (sloc & 1))
                auto_even();
 
        if ((siz != SIZB) && (sloc & 1))
                auto_even();
 
+       // Check to see if we're trying to set LONGS on a non 32-bit aligned
+       // address in a GPU or DSP section, in their local RAM
+       if ((siz == SIZL) && (orgaddr & 0x03)
+               && ((rgpu && (orgaddr >= 0xF03000) && (orgaddr <= 0xF03FFFF))
+               || (rdsp && (orgaddr >= 0xF1B000) && (orgaddr <= 0xF1CFFFF))))
+               warn("depositing LONGs on a non-long address in local RAM");
+
        for(;; ++tok)
        {
                // dc.b 'string' [,] ...
        for(;; ++tok)
        {
                // dc.b 'string' [,] ...
@@ -856,7 +865,6 @@ int d_dc(WORD siz)
                                if (eval + 0x100 >= 0x200)
                                {
                                        sprintf(buffer, "%s (value = $%X)", range_error, eval);
                                if (eval + 0x100 >= 0x200)
                                {
                                        sprintf(buffer, "%s (value = $%X)", range_error, eval);
-//                                     return error(range_error);
                                        return error(buffer);
                                }
 
                                        return error(buffer);
                                }
 
index 8739ce6db05630d2a1726efb0efdae67f9042c12..5860734511cdfef8025ce13cbde4f8e43c0ada36 100644 (file)
--- a/procln.c
+++ b/procln.c
@@ -395,13 +395,13 @@ normal:
                // o  everything else
                if (equtyp == EQUREG)
                {
                // o  everything else
                if (equtyp == EQUREG)
                {
-//Linko's request to issue a warning on labels that equated to the same register
-//would go here. Not sure how to implement it though. :-/
+//Linko's request to issue a warning on labels that equated to the same
+//register would go here. Not sure how to implement it though. :-/
 /*
 Maybe like this way:
 have an array of bools with 64 entries. Whenever a register is equated, set the
 /*
 Maybe like this way:
 have an array of bools with 64 entries. Whenever a register is equated, set the
-corresponding register bool to true. Whenever it's undef'ed, set it to false. When
-checking to see if it's already been equated, issue a warning.
+corresponding register bool to true. Whenever it's undef'ed, set it to false.
+When checking to see if it's already been equated, issue a warning.
 */
                        // Check that we are in a RISC section
                        if (!rgpu && !rdsp)
 */
                        // Check that we are in a RISC section
                        if (!rgpu && !rdsp)
index 64a0c5ece9912637602fbcea3fb120d433999d6f..a46c7b171a79763733207cd85b86c6e5d869a1a4 100644 (file)
--- a/version.h
+++ b/version.h
@@ -13,6 +13,6 @@
 
 #define MAJOR   1              // Major version number
 #define MINOR   3              // Minor version number
 
 #define MAJOR   1              // Major version number
 #define MINOR   3              // Minor version number
-#define PATCH   8              // Patch release number
+#define PATCH   9              // Patch release number
 
 #endif // __VERSION_H__
 
 #endif // __VERSION_H__