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
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
//
}
-//
-// NOP Padding Directive
-//
-int d_jpad(void)
-{
- jpad = 1;
- return 0;
-}
-
-
-int d_nojpad(void)
-{
- jpad = 0;
- return 0;
-}
-
-
//
// Print Directive
//
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);
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<size; i++)
{
buf = '\0';
int d_68000(void)
{
rgpu = rdsp = 0;
- in_main = 0;
+// in_main = 0;
// Switching from gpu/dsp sections should reset any ORG'd Address
orgactive = 0;
orgwarning = 0;
rgpu = 1; // Set GPU assembly
rdsp = 0; // Unset DSP assembly
regbank = BANK_N; // Set no default register bank
- in_main = 0;
- jpad = 0;
- return 0;
-}
-
-
-//
-// GPU Main Code Directive
-//
-
-int d_gpumain(void)
-{
- if ((cursect != TEXT) && (cursect != DATA))
- {
- error(".gpumain can only be used in the TEXT or DATA segments");
- return ERROR;
- }
-
- // If previous section was dsp or 68000 then we need to reset ORG'd Addresses
- if (!rgpu)
- {
- orgactive = 0;
- orgwarning = 0;
- }
-
- rgpu = 1; // Set GPU assembly
- rdsp = 0; // Unset DSP assembly
- regbank = BANK_N; // Set no default register bank
- in_main = 1; // Enable main code execution rules
- jpad = 0;
+// in_main = 0;
+// jpad = 0;
return 0;
}
rdsp = 1; // Set DSP assembly
rgpu = 0; // Unset GPU assembly
regbank = BANK_N; // Set no default register bank
- in_main = 0;
- jpad = 0;
+// in_main = 0;
+// jpad = 0;
return 0;
}