X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?p=rmac;a=blobdiff_plain;f=sect.c;h=fe630b15d3a2f8aaf1b4f8a36ac0d33f34b65f78;hp=f9c8a588531a4d655b2981189b845ad859294b51;hb=b10167d55798ea184f97fafda075255c0852f3b6;hpb=82307651be6db411532b317a5ebc6edd933eea8d diff --git a/sect.c b/sect.c index f9c8a58..fe630b1 100644 --- a/sect.c +++ b/sect.c @@ -18,6 +18,10 @@ #include "token.h" +// Function prototypes +void mksect(int, WORD); +void switchsect(int); + // Section descriptors SECT sect[NSECTS]; // All sections... int cursect; // Current section number @@ -38,10 +42,6 @@ LONG fchalloc; // # bytes alloc'd to fixup chunk LONG fchsize; // # bytes used in fixup chunk PTR fchptr; // Deposit point in fixup chunk buffer -// BOLLOCKS -//unsigned fwdjump[MAXFWDJUMPS]; // forward jump check table -//unsigned fwindex = 0; // forward jump index - // Return a size (SIZB, SIZW, SIZL) or 0, depending on what kind of fixup is // associated with a location. static char fusiztab[] = { @@ -68,6 +68,28 @@ static char fusizoffs[] = { }; +// +// Initialize Sections; Setup initial ABS, TEXT, DATA and BSS sections +// +void InitSection(void) +{ + int i; + + // Cleanup all sections + for(i=0; i