+/*-----------------------------------------------------------------*/
+/* allocDefault - assigns the output segment based on SCLASS */
+/*-----------------------------------------------------------------*/
+bool
+allocDefault (symbol * sym)
+{
+ switch (SPEC_SCLS (sym->etype))
+ {
+ case S_SFR:
+ SPEC_OCLS (sym->etype) = sfr;
+ break;
+ case S_SBIT:
+ SPEC_OCLS (sym->etype) = sfrbit;
+ break;
+ case S_CODE:
+ if (sym->_isparm)
+ return FALSE;
+ /* if code change to constant */
+ SPEC_OCLS (sym->etype) = statsg;
+ break;
+ case S_XDATA:
+ // should we move this to the initialized data segment?
+ if (port->genXINIT &&
+ sym->ival && (sym->level==0) && !SPEC_ABSA(sym->etype)) {
+ SPEC_OCLS(sym->etype) = xidata;
+ } else {
+ SPEC_OCLS (sym->etype) = xdata;
+ }
+ break;
+ case S_DATA:
+ SPEC_OCLS (sym->etype) = data;
+ break;
+ case S_IDATA:
+ SPEC_OCLS (sym->etype) = idata;
+ sym->iaccess = 1;
+ break;
+ case S_PDATA:
+ SPEC_OCLS (sym->etype) = pdata;
+ sym->iaccess = 1;
+ break;
+ case S_BIT:
+ SPEC_OCLS (sym->etype) = bit;
+ break;
+ case S_EEPROM:
+ SPEC_OCLS (sym->etype) = eeprom;
+ break;
+ default:
+ return FALSE;
+ }
+ allocIntoSeg (sym);
+ return TRUE;
+}