X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?p=rmac;a=blobdiff_plain;f=sect.c;h=fe630b15d3a2f8aaf1b4f8a36ac0d33f34b65f78;hp=21591a0219146b127a7321dbd07dcea4cab0ba1f;hb=0aa220d2e02e982734d05cf3ea840e54d04541eb;hpb=9fb8931331db981c04e062a3ad36c0d79acb30ae diff --git a/sect.c b/sect.c index 21591a0..fe630b1 100644 --- a/sect.c +++ b/sect.c @@ -13,11 +13,15 @@ #include "listing.h" #include "mach.h" #include "mark.h" -#include "risca.h" +#include "riscasm.h" #include "symbol.h" #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