]> Shamusworld >> Repos - rmac/blobdiff - direct.c
Fixed WARNING macro to be system agnostic, added doco for -p switch.
[rmac] / direct.c
index 5cdac4ca73b605c297caf6c0b870480677898fd4..a2eef8867618154b181ec48ba513a4afb1c16387 100644 (file)
--- a/direct.c
+++ b/direct.c
@@ -3,7 +3,7 @@
 // DIRECT.C - Directive Handling
 // Copyright (C) 199x Landon Dyer, 2011 Reboot and Friends
 // RMAC derived from MADMAC v1.07 Written by Landon Dyer, 1986
-// Source Utilised with the Kind Permission of Landon Dyer
+// Source utilised with the kind permission of Landon Dyer
 //
 
 #include "direct.h"
@@ -25,6 +25,7 @@
 TOKEN exprbuf[128];                    // Expression buffer 
 SYM * symbolPtr[1000000];      // Symbol pointers table
 static long unused;                    // For supressing 'write' warnings
+char buffer[256];                      // Scratch buffer for messages
 
 
 // Directive handler table
@@ -810,7 +811,6 @@ int d_dc(WORD siz)
                // dc.b 'string' [,] ...
                if (siz == SIZB && *tok == STRING && (tok[2] == ',' || tok[2] == EOL))
                {
-//                     i = strlen((const char*)tok[1]);
                        i = strlen(string[tok[1]]);
 
                        if ((challoc - ch_size) < i) 
@@ -854,7 +854,11 @@ int d_dc(WORD siz)
                                        return error("non-absolute byte value");
 
                                if (eval + 0x100 >= 0x200)
-                                       return error(range_error);
+                               {
+                                       sprintf(buffer, "%s (value = $%X)", range_error, eval);
+//                                     return error(range_error);
+                                       return error(buffer);
+                               }
 
                                D_byte(eval);
                        }