X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?p=rmac;a=blobdiff_plain;f=direct.c;h=a14307dde1b9f335a1fb4569df03bdf7740f4bab;hp=d3e03031d51a108855632ec7aa9d55af2c3df6dd;hb=295836a17362d5f57e171018fb6658f845f419e8;hpb=daf2f61a3664329ae7f9609e1e14da2b8780fd10 diff --git a/direct.c b/direct.c index d3e0303..a14307d 100644 --- a/direct.c +++ b/direct.c @@ -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