- pic16_addpCode2pBlock(pb, pic16_newpCodeFunction(NULL, NULL));
- noAlloc--;
- }
- else
- {
-
- /* symbol has absolute address but no initial value */
-
- /* allocate space */
- fprintf (code->oFile, "%s:\n", sym->rname);
-
- /* special case for character strings */
- if (IS_ARRAY (sym->type) && IS_CHAR (sym->type->next) &&
- SPEC_CVAL (sym->etype).v_char) {
-
-// fprintf(stderr, "%s:%d printing code string from %s\n", __FILE__, __LINE__, sym->rname);
-
- pic16_pCodeConstString(sym->rname , SPEC_CVAL (sym->etype).v_char);
- } else {
- assert(0);
- }
- }
-
- } else {
-// fprintf(stderr, "%s:%d spec_absa is false for symbol: %s\n",
-// __FILE__, __LINE__, sym->name);
-
-
- /* if it has an initial value */
- if (sym->ival) {
- pBlock *pb;
-
- /* symbol doesn't have absolute address but has initial value */
- fprintf (code->oFile, "%s:\n", sym->rname);
- noAlloc++;
- resolveIvalSym (sym->ival, sym->type);
-
- pb = pic16_newpCodeChain(NULL, 'P',pic16_newpCodeCharP("; Starting pCode block for Ival"));
- pic16_addpBlock(pb);
-
- if(!didcode) {
- /* make sure that 'code' directive is emitted before, once */
- pic16_addpCode2pBlock(pb, pic16_newpCodeAsmDir("code", NULL));
-
- didcode++;
- }
-
-// fprintf(stderr, "%s:%d [2] generating init for label: %s\n", __FILE__, __LINE__, sym->rname);
-
- pic16_addpCode2pBlock(pb,pic16_newpCodeLabel(sym->rname,-1));
- pic16_printIval(sym, sym->type, sym->ival, 'p', (void *)pb);
+ pic16_addpCode2pBlock(pb, pic16_newpCodeFunction(NULL, NULL));
+ noAlloc--;
+ }
+ else
+ {
+
+ /* symbol has absolute address but no initial value */
+
+ /* allocate space */
+ dbuf_printf (&code->oBuf, "%s:\n", sym->rname);
+
+ /* special case for character strings */
+ if (IS_ARRAY (sym->type) && IS_CHAR (sym->type->next) &&
+ SPEC_CVAL (sym->etype).v_char) {
+
+// fprintf(stderr, "%s:%d printing code string from %s\n", __FILE__, __LINE__, sym->rname);
+
+ pic16_pCodeConstString(sym->rname , SPEC_CVAL (sym->etype).v_char);
+ } else {
+ fprintf (stderr, "%s:%u(%s): do not know how to intialize symbol %s\n", __FILE__, __LINE__, __FUNCTION__, sym->rname);
+ assert(0);
+ }
+ }
+
+ } else {
+// fprintf(stderr, "%s:%d spec_absa is false for symbol: %s\n",
+// __FILE__, __LINE__, sym->name);
+
+
+ /* if it has an initial value */
+ if (sym->ival) {
+ pBlock *pb;
+
+ /* symbol doesn't have absolute address but has initial value */
+ dbuf_printf (&code->oBuf, "%s:\n", sym->rname);
+ resolveIvalSym (sym->ival, sym->type);
+
+ pb = pic16_newpCodeChain(NULL, 'P',pic16_newpCodeCharP("; Starting pCode block for Ival"));
+ pic16_addpBlock(pb);
+
+ if(!didcode) {
+ /* make sure that 'code' directive is emitted before, once */
+ pic16_addpCode2pBlock(pb, pic16_newpCodeAsmDir("code", NULL));
+
+ didcode++;
+ }
+
+ pic16_addpCode2pBlock(pb,pic16_newpCodeLabel(sym->rname,-1));
+ //fprintf(stderr, "%s:%d [2] generating init for label: %s\n", __FILE__, __LINE__, sym->rname);
+ pic16_printIval(sym, sym->type, sym->ival, 'p', (void *)pb);