-LONG symsize = 0; // Size of BSD symbol table
-LONG strindx = 0x00000004; // BSD string table index
-char * strtable; // Pointer to the symbol string table
-char * objimage; // Global object image pointer
+LONG symsize = 0; // Size of BSD symbol table
+LONG strindx = 0x00000004; // BSD string table index
+char * strtable; // Pointer to the symbol string table
+char * objimage; // Global object image pointer
- LONG z; // Scratch long
- WORD w1; // Scratch word
- int w2; // Scratch long
+ chptr = buf; // Point to buffer for deposit longs
+ D_long(strindx); // Deposit the symbol string index
- chptr = buf; // Point to buffer for deposit longs
- D_long(strindx); // Deposit the symbol string index
-
- w1 = sym->sattr; // Obtain symbol attribute
- w2 = sym->sattre;
- z = 0; // Initialise resulting symbol flags
+ WORD w1 = sym->sattr; // Obtain symbol attribute
+ int w2 = sym->sattre;
+ LONG z = 0; // Initialise resulting symbol flags
- strindx += strlen(sym->sname) + 1; // Incr string index incl null terminate
- buf += 12; // Increment buffer to next record
- symsize += 12; // Increment symbol table size
+ strindx += strlen(sym->sname) + 1; // Incr string index incl null terminate
+ buf += 12; // Increment buffer to next record
+ symsize += 12; // Increment symbol table size
trsize = bsdmarkimg(p, tds, sect[TEXT].sloc, TEXT);// Do TEXT relocation table
trsize = bsdmarkimg(p, tds, sect[TEXT].sloc, TEXT);// Do TEXT relocation table
- chptr = buf + 24; // Point to relocation hdr entry
- D_long(trsize); // Write the relocation table size
- p = buf + (BSDHDRSIZE + tds + trsize); // Move obj image ptr to reloc info
+ chptr = buf + 24; // Point to relocation hdr entry
+ D_long(trsize); // Write the relocation table size
+ p = buf + (BSDHDRSIZE + tds + trsize); // Move obj image ptr to reloc info
drsize = bsdmarkimg(p, tds, sect[TEXT].sloc, DATA);// Do DATA relocation table
drsize = bsdmarkimg(p, tds, sect[TEXT].sloc, DATA);// Do DATA relocation table
- chptr = buf + 28; // Point to relocation hdr entry
- D_long(drsize); // Write the relocation table size
+ chptr = buf + 28; // Point to relocation hdr entry
+ D_long(drsize); // Write the relocation table size
- sy_assign(p, constr_bsdsymtab); // Build symbol and string tables
- chptr = buf + 16; // Point to sym table size hdr entry
- D_long(symsize); // Write the symbol table size
+ sy_assign(p, constr_bsdsymtab); // Build symbol and string tables
+ chptr = buf + 16; // Point to sym table size hdr entry
+ D_long(symsize); // Write the symbol table size
// Write the BSD object file from the object image buffer
unused = write(fd, buf, BSDHDRSIZE + tds + trsize + drsize + symsize + strindx + 4);
if (buf)
// Write the BSD object file from the object image buffer
unused = write(fd, buf, BSDHDRSIZE + tds + trsize + drsize + symsize + strindx + 4);
if (buf)