void printIval (symbol *, sym_link *, initList *, FILE *);
set *publics = NULL; /* public variables */
void printIval (symbol *, sym_link *, initList *, FILE *);
set *publics = NULL; /* public variables */
SPEC_OCLS(newSym->etype)=xinit;
SNPRINTF (newSym->name, sizeof(newSym->name), "__xinit_%s", sym->name);
SNPRINTF (newSym->rname, sizeof(newSym->rname), "__xinit_%s", sym->rname);
SPEC_OCLS(newSym->etype)=xinit;
SNPRINTF (newSym->name, sizeof(newSym->name), "__xinit_%s", sym->name);
SNPRINTF (newSym->rname, sizeof(newSym->rname), "__xinit_%s", sym->rname);
// add it to the "XINIT (CODE)" segment
addSet(&xinit->syms, newSym);
// add it to the "XINIT (CODE)" segment
addSet(&xinit->syms, newSym);
ival = initAggregates (sym, sym->ival, NULL);
} else {
if (getNelements(sym->type, sym->ival)>1) {
ival = initAggregates (sym, sym->ival, NULL);
} else {
if (getNelements(sym->type, sym->ival)>1) {
- werror (W_EXCESS_INITIALIZERS, "scalar",
- sym->name, sym->lineDef);
+ werrorfl (sym->fileDef, sym->lineDef, W_EXCESS_INITIALIZERS, "scalar",
+ sym->name);
- werror (W_EXCESS_INITIALIZERS, "struct", sym->name, sym->lineDef);
+ werrorfl (sym->fileDef, sym->lineDef, W_EXCESS_INITIALIZERS, "struct", sym->name);
printIvalChar (sym_link * type, initList * ilist, FILE * oFile, char *s)
{
value *val;
printIvalChar (sym_link * type, initList * ilist, FILE * oFile, char *s)
{
value *val;
printIval (sym, type->next, iloop, oFile);
if (++size > DCL_ELEM(type)) {
printIval (sym, type->next, iloop, oFile);
if (++size > DCL_ELEM(type)) {
- werror (W_EXCESS_INITIALIZERS, "array", sym->name, sym->lineDef);
+ werrorfl (sym->fileDef, sym->lineDef, W_EXCESS_INITIALIZERS, "array", sym->name);
if (IS_LITERAL(val->etype)) {
if (compareType(type,val->etype)==0) {
if (IS_LITERAL(val->etype)) {
if (compareType(type,val->etype)==0) {
printFromToType (val->type, type);
}
printIvalCharPtr (NULL, type, val, oFile);
printFromToType (val->type, type);
}
printIvalCharPtr (NULL, type, val, oFile);
}
if (port->little_endian) {
fprintf (oFile, "\t.byte %s,%s,%s\n",
}
if (port->little_endian) {
fprintf (oFile, "\t.byte %s,%s,%s\n",
}
if (port->little_endian) {
fprintf (oFile, "\t.byte %s,%s,%s,%s\n",
}
if (port->little_endian) {
fprintf (oFile, "\t.byte %s,%s,%s,%s\n",
- werror (W_EXCESS_INITIALIZERS, "scalar",
- sym->name, sym->lineDef);
+ werrorfl (sym->fileDef, sym->lineDef, W_EXCESS_INITIALIZERS, "scalar",
+ sym->name);
- werror (E_TYPE_MISMATCH, "assignment", " ");
+ werrorfl (ilist->filename, ilist->lineno, E_TYPE_MISMATCH, "assignment", " ");
printIval (sym, sym->type, sym->ival, out);
noAlloc--;
/* if sym is a simple string and sym->ival is a string,
printIval (sym, sym->type, sym->ival, out);
noAlloc--;
/* if sym is a simple string and sym->ival is a string,
}
fprintf (out, "%s:\n", sym->rname);
/* special case for character strings */
}
fprintf (out, "%s:\n", sym->rname);
/* special case for character strings */
SPEC_CVAL (sym->etype).v_char)
printChar (out,
SPEC_CVAL (sym->etype).v_char,
SPEC_CVAL (sym->etype).v_char)
printChar (out,
SPEC_CVAL (sym->etype).v_char,
- fprintf (vFile, "\tljmp\t%s\n\t.ds\t5\n", interrupts[i]->rname);
+ {
+ fprintf (vFile, "\tljmp\t%s\n", interrupts[i]->rname);
+ if ( i != maxInterrupts - 1 )
+ fprintf (vFile, "\t.ds\t5\n");
+ }
- fprintf (vFile, "\treti\n\t.ds\t7\n");
+ {
+ fprintf (vFile, "\treti\n");
+ if ( i != maxInterrupts - 1 )
+ fprintf (vFile, "\t.ds\t7\n");
+ }
{
/* copy the sfr segment */
fprintf (asmFile, "%s", iComments2);
fprintf (asmFile, "; special function registers\n");
fprintf (asmFile, "%s", iComments2);
copyFile (asmFile, sfr->oFile);
{
/* copy the sfr segment */
fprintf (asmFile, "%s", iComments2);
fprintf (asmFile, "; special function registers\n");
fprintf (asmFile, "%s", iComments2);
copyFile (asmFile, sfr->oFile);
/* copy the sbit segment */
fprintf (asmFile, "%s", iComments2);
fprintf (asmFile, "; special function bits \n");
/* copy the sbit segment */
fprintf (asmFile, "%s", iComments2);
fprintf (asmFile, "; special function bits \n");