X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?p=rmac;a=blobdiff_plain;f=sect.h;h=d86056d33372df357fa664a770f9b8e22d0cc174;hp=7f09d6bff314908be0612582c849ffb0ece0d132;hb=75969398d9b8a9f82ea76fc4e4cbfb97b11160a4;hpb=d16b8ea0ee65b2ad901ca6b0624c07e6e4930cc4 diff --git a/sect.h b/sect.h index 7f09d6b..d86056d 100644 --- a/sect.h +++ b/sect.h @@ -14,17 +14,17 @@ // Macros to deposit code in the current section // D_rword deposits a "6502" format (low, high) word (01). // D_rlong deposits a MWC "canonical byte order" longword (2301). -#define D_byte(b) {*chptr++=(char)b; ++sloc; ++ch_size; if(orgactive) ++orgaddr;} -#define D_word(w) {chcheck(2);*chptr++=(char)(w>>8); *chptr++=(char)w; \ - sloc+=2; ch_size+=2; if(orgactive) orgaddr += 2;} -#define D_long(lw) {*chptr++=(char)(lw>>24); *chptr++=(char)(lw>>16);\ - *chptr++=(char)(lw>>8); *chptr++=(char)lw; \ - sloc+=4; ch_size += 4; if(orgactive) orgaddr += 4;} -#define D_rword(w) {*chptr++=(char)w; *chptr++=(char)(w>>8); \ - sloc+=2; ch_size+=2;if(orgactive) orgaddr += 2;} -#define D_rlong(lw) {*chptr++=(char)(lw>>16);*chptr++=(char)(lw>>24);\ - *chptr++=(char)lw;*chptr++=(char)(lw>>8); \ - sloc+=4; ch_size += 4;if(orgactive) orgaddr += 4;} +#define D_byte(b) {*chptr++=(char)b; ++sloc; ++ch_size; if(orgactive) ++orgaddr;} +#define D_word(w) {chcheck(2);*chptr++=(char)(w>>8); *chptr++=(char)w; \ + sloc+=2; ch_size+=2; if(orgactive) orgaddr += 2;} +#define D_long(lw) {*chptr++=(char)(lw>>24); *chptr++=(char)(lw>>16);\ + *chptr++=(char)(lw>>8); *chptr++=(char)lw; \ + sloc+=4; ch_size += 4; if(orgactive) orgaddr += 4;} +//#define D_rword(w) {*chptr++=(char)w; *chptr++=(char)(w>>8); \ +// sloc+=2; ch_size+=2;if(orgactive) orgaddr += 2;} +//#define D_rlong(lw) {*chptr++=(char)(lw>>16);*chptr++=(char)(lw>>24);\ +// *chptr++=(char)lw;*chptr++=(char)(lw>>8); \ +// sloc+=4; ch_size += 4;if(orgactive) orgaddr += 4;} #define NSECTS 16 // Max. number of sections @@ -66,7 +66,7 @@ #define FU_MOVEI 0x0100 #define FU_JR 0x0200 -#define FU_MJR 0x0300 +//#define FU_MJR 0x0300 #define FU_REGONE 0x0400 #define FU_NUM15 0x0500 #define FU_NUM31 0x0600 @@ -120,9 +120,9 @@ MCHUNK { #define MCHEND 0x2000 // Indicates end of mark chunk #define MPCREL 0x1000 // Mark is PC-relative -#define MAXFWDJUMPS 1024 // Maximum forward jumps to check -extern unsigned fwdjump[MAXFWDJUMPS]; -extern unsigned fwindex; +//#define MAXFWDJUMPS 1024 // Maximum forward jumps to check +//extern unsigned fwdjump[MAXFWDJUMPS]; +//extern unsigned fwindex; // Globals, external etc extern LONG sloc; @@ -135,13 +135,12 @@ extern LONG challoc; extern CHUNK * scode; // Prototypes -void init_sect(void); +void InitSection(void); void switchsect(int); void savsect(void); int fixtest(int, LONG); int chcheck(LONG); int fixup(WORD, LONG, TOKEN *); int ResolveAllFixups(void); -//int ResolveFixups(int); #endif // __SECT_H__