X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=direct.c;h=a14307dde1b9f335a1fb4569df03bdf7740f4bab;hb=295836a17362d5f57e171018fb6658f845f419e8;hp=623bae4a0ee7cf0332fa555de412766a613d0e2d;hpb=d16b8ea0ee65b2ad901ca6b0624c07e6e4930cc4;p=rmac diff --git a/direct.c b/direct.c index 623bae4..a14307d 100644 --- a/direct.c +++ b/direct.c @@ -62,7 +62,7 @@ int (*dirtab[])() = { d_include, // 33 include fpop, // 34 end d_unimpl, // 35* macro - exitmac, // 36* exitm + ExitMacro, // 36* exitm d_unimpl, // 37* endm d_list, // 38 list d_nlist, // 39 nlist @@ -79,23 +79,13 @@ int (*dirtab[])() = { d_equrundef, // 50 .equrundef/.regundef d_ccundef, // 51 .ccundef d_print, // 52 .print - d_gpumain, // 53 .gpumain - d_jpad, // 54 .jpad - d_nojpad, // 55 .nojpad - d_fail, // 56 .fail +// d_gpumain, // 53 .gpumain +// d_jpad, // 54 .jpad +// d_nojpad, // 55 .nojpad +// d_fail, // 56 .fail }; -// -// .fail - User abort -// -int d_fail(void) -{ - fatal("user abort"); - return 0; -} - - // // .org - Set origin // @@ -121,23 +111,6 @@ int d_org(void) } -// -// NOP Padding Directive -// -int d_jpad(void) -{ - jpad = 1; - return 0; -} - - -int d_nojpad(void) -{ - jpad = 0; - return 0; -} - - // // Print Directive // @@ -333,6 +306,13 @@ int d_incbin(void) long pos, size; char buf; + // Check to see if we're in BSS, and, if so, throw an error + if (scattr & SBSS) + { + errors("Cannot include binary file \"%s\" in BSS section", string[tok[1]]); + return ERROR; + } + if (*tok != STRING) { error(syntax_error); @@ -345,7 +325,12 @@ int d_incbin(void) size = lseek(j, 0L, SEEK_END); chcheck(size); pos = lseek(j, 0L, SEEK_SET); - + + DEBUG + { + printf("INCBIN: File '%s' is %li bytes.\n", string[tok[1]], size); + } + for(i=0; i