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
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';