Add support for 64-bit evaluations.
[rmac] / macro.c
diff --git a/macro.c b/macro.c
index 469a88c6493e9c9f61f408d3f987ed3da0467951..ccc93dc2f4cf84a1995b77fdbe19c81404484b71 100644 (file)
--- a/macro.c
+++ b/macro.c
@@ -244,7 +244,7 @@ WARNING("!!! Casting (char *) as LONG !!!")
 //
 int HandleRept(void)
 {
-       uint32_t eval;
+       uint64_t eval;
 
        // Evaluate repeat expression
        if (abs_expr(&eval) != OK)
@@ -410,10 +410,11 @@ int InvokeMacro(SYM * mac, WORD siz)
                                for(int i=0; i<3; i++)
                                        *p++ = *tok++;
                        }
-                       else if (*tok == CONST)
+                       else if (*tok == CONST)         // Constants are 64-bits
                        {
-                               *p++ = *tok++;
-                               *p++ = *tok++;
+                               *p++ = *tok++;                  // Token
+                               *p++ = *tok++;                  // Hi LONG
+                               *p++ = *tok++;                  // Lo LONG
                        }
                        else if ((*tok == STRING) || (*tok == SYMBOL))
                        {