+ for (i = TEXT; i <= DATA; i++)
+ {
+ for (cp = sect[i].sfcode; cp != NULL; cp = cp->chnext)
+ {
+ memcpy(p, cp->chptr, cp->ch_size);
+ p += cp->ch_size;
+ }
+ }
+
+ if (MarkABSImage(buf, tds, sect[TEXT].sloc, TEXT) != OK) // Do TEXT relocation table
+ {
+ return ERROR;
+ }
+ if (MarkABSImage(buf, tds, sect[TEXT].sloc, DATA) != OK) // Do DATA relocation table
+ {
+ return ERROR;
+ }
+
+ // Write out the header + text & data + symbol table (if any)
+ unused = write(fd, buf, tds);
+
+ }