/*-------------------------------------------------------------------------
- SDCCglue.c - glues everything we have done together into one file.
+ glue.c - glues everything we have done together into one file.
Written By - Sandeep Dutta . sandeep.dutta@usa.net (1998)
This program is free software; you can redistribute it and/or modify it
extern symbol *mainf;
extern struct dbuf_s *codeOutBuf;
-extern DEFSETFUNC(closeTmpFiles);
-extern DEFSETFUNC(rmTmpFiles);
-extern void initialComments(FILE *afile);
-extern operand *operandFromAst(ast *tree, int lvl);
-extern value *initPointer(initList *ilist, sym_link *toType);
+extern void initialComments (FILE *afile);
+extern operand *operandFromAst (ast *tree, int lvl);
+extern value *initPointer (initList *ilist, sym_link *toType);
set *pic14_localFunctions = NULL;
static set *emitted = NULL;
-static void showAllMemmaps(FILE *of); // XXX: emits initialized symbols
+static void showAllMemmaps (FILE *of); // XXX: emits initialized symbols
static void
emitPseudoStack(struct dbuf_s *oBuf, struct dbuf_s *oBufExt)
dbuf_printf (vBuf, "%s", iComments2);
dbuf_printf (vBuf, "; reset vector \n");
dbuf_printf (vBuf, "%s", iComments2);
- dbuf_printf (vBuf, "STARTUP\t%s\n", CODE_NAME); // Lkr file should place section STARTUP at address 0x0
+ // Lkr file should place section STARTUP at address 0x0, but does not ...
+ dbuf_printf (vBuf, "STARTUP\t%s 0x0000\n", CODE_NAME);
dbuf_printf (vBuf, "\tnop\n"); /* first location for used by incircuit debugger */
dbuf_printf (vBuf, "\tpagesel __sdcc_gsinit_startup\n");
dbuf_printf (vBuf, "\tgoto\t__sdcc_gsinit_startup\n");
{
initialComments (afile);
fprintf (afile, "; PIC port for the 14-bit core\n");
- fprintf (afile, iComments2);
+ fprintf (afile, "%s", iComments2);
}
if ((noAssemble || options.c1mode) && fullDstFileName)
{
- sprintf (buffer, fullDstFileName);
+ sprintf (buffer, "%s", fullDstFileName);
}
else
{
- sprintf (buffer, dstFileName);
+ sprintf (buffer, "%s", dstFileName);
strcat (buffer, ".asm");
}