-static char* GetLabelName (unsigned flags, unsigned long label, unsigned offs)
+static char* GetLabelName (unsigned flags, unsigned long label, long offs)
{
static char lbuf [128]; /* Label name */
case CF_STATIC:
/* Static memory cell */
- sprintf (lbuf, "%s+%u", LocalLabelName (label), offs);
+ sprintf (lbuf, "%s%+ld", LocalLabelName (label), offs);
break;
case CF_EXTERNAL:
/* External label */
- sprintf (lbuf, "_%s+%u", (char*) label, offs);
+ sprintf (lbuf, "_%s%+ld", (char*) label, offs);
break;
case CF_ABSOLUTE:
-void g_getimmed (unsigned Flags, unsigned long Val, unsigned Offs)
+void g_getimmed (unsigned Flags, unsigned long Val, long Offs)
/* Load a constant into the primary register */
{
unsigned char B1, B2, B3, B4;
-void g_getstatic (unsigned flags, unsigned long label, unsigned offs)
+void g_getstatic (unsigned flags, unsigned long label, long offs)
/* Fetch an static memory cell into the primary register */
{
/* Create the correct label name */
-void g_putstatic (unsigned flags, unsigned long label, unsigned offs)
+void g_putstatic (unsigned flags, unsigned long label, long offs)
/* Store the primary register into the specified static memory cell */
{
/* Create the correct label name */
}
-
+
unsigned g_typecast (unsigned lhs, unsigned rhs)
/* Cast the value in the primary register to the operand size that is flagged
* by the lhs value. Return the result value.
-void g_addstatic (unsigned flags, unsigned long label, unsigned offs)
+void g_addstatic (unsigned flags, unsigned long label, long offs)
/* Add a static variable to ax */
{
unsigned L;
g_getstatic (flags, label, offs);
g_add (flags, 0);
break;
-
+
default:
typeerror (flags);
-void g_addeqstatic (unsigned flags, unsigned long label, unsigned offs,
+void g_addeqstatic (unsigned flags, unsigned long label, long offs,
unsigned long val)
/* Emit += for a static variable */
{
-void g_subeqstatic (unsigned flags, unsigned long label, unsigned offs,
+void g_subeqstatic (unsigned flags, unsigned long label, long offs,
unsigned long val)
/* Emit -= for a static variable */
{
-void g_addaddr_static (unsigned flags, unsigned long label, unsigned offs)
+void g_addaddr_static (unsigned flags, unsigned long label, long offs)
/* Add the address of a static variable to ax */
{
/* Create the correct label name */
-void g_defdata (unsigned flags, unsigned long val, unsigned offs)
+void g_defdata (unsigned flags, unsigned long val, long offs)
/* Define data with the size given in flags */
{
if (flags & CF_CONST) {
-void g_strlen (unsigned flags, unsigned long val, unsigned offs)
+void g_strlen (unsigned flags, unsigned long val, long offs)
/* Inline the strlen() function */
{
/* We need a label in both cases */
-void g_getimmed (unsigned Flags, unsigned long Val, unsigned Offs);
+void g_getimmed (unsigned Flags, unsigned long Val, long Offs);
/* Load a constant into the primary register */
-void g_getstatic (unsigned Flags, unsigned long Label, unsigned Offs);
+void g_getstatic (unsigned Flags, unsigned long Label, long Offs);
/* Fetch an static memory cell into the primary register */
void g_getlocal (unsigned Flags, int Offs);
-void g_putstatic (unsigned flags, unsigned long label, unsigned offs);
+void g_putstatic (unsigned flags, unsigned long label, long offs);
/* Store the primary register into the specified static memory cell */
void g_putlocal (unsigned Flags, int Offs, long Val);
void g_addlocal (unsigned flags, int offs);
/* Add a local variable to ax */
-void g_addstatic (unsigned flags, unsigned long label, unsigned offs);
+void g_addstatic (unsigned flags, unsigned long label, long offs);
/* Add a static variable to ax */
-void g_addeqstatic (unsigned flags, unsigned long label, unsigned offs,
+void g_addeqstatic (unsigned flags, unsigned long label, long offs,
unsigned long val);
/* Emit += for a static variable */
void g_addeqind (unsigned flags, unsigned offs, unsigned long val);
/* Emit += for the location with address in ax */
-void g_subeqstatic (unsigned flags, unsigned long label, unsigned offs,
+void g_subeqstatic (unsigned flags, unsigned long label, long offs,
unsigned long val);
/* Emit -= for a static variable */
/*****************************************************************************/
-/* Add a variable address to the value in ax */
+/* Add a variable address to the value in ax */
/*****************************************************************************/
void g_addaddr_local (unsigned flags, int offs);
/* Add the address of a local variable to ax */
-void g_addaddr_static (unsigned flags, unsigned long label, unsigned offs);
+void g_addaddr_static (unsigned flags, unsigned long label, long offs);
/* Add the address of a static variable to ax */
void g_res (unsigned n);
/* Reserve static storage, n bytes */
-void g_defdata (unsigned flags, unsigned long val, unsigned offs);
+void g_defdata (unsigned flags, unsigned long val, long offs);
/* Define data with the size given in flags */
void g_defbytes (const void* bytes, unsigned count);
-void g_strlen (unsigned flags, unsigned long val, unsigned offs);
+void g_strlen (unsigned flags, unsigned long val, long offs);
/* Inline the strlen() function */