Mark segments that are referenced in a .BANK statement.
git-svn-id: svn://svn.cc65.org/cc65/trunk@5383 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -42,6 +42,7 @@
|
||||
#include "exprdefs.h"
|
||||
#include "print.h"
|
||||
#include "shift.h"
|
||||
#include "segdefs.h"
|
||||
#include "strbuf.h"
|
||||
#include "tgttrans.h"
|
||||
#include "version.h"
|
||||
@@ -1839,10 +1840,16 @@ ExprNode* FinalizeExpr (ExprNode* Expr, const Collection* LineInfos)
|
||||
LIError (LineInfos,
|
||||
"Too many segment references in argument to .BANK");
|
||||
} else {
|
||||
Segment* S;
|
||||
|
||||
FreeExpr (Expr->Left);
|
||||
Expr->Op = EXPR_BANK;
|
||||
Expr->Left = 0;
|
||||
Expr->V.SecNum = ED.SecRef[0].Ref;
|
||||
|
||||
/* Mark the segment */
|
||||
S = CollAt (&SegmentList, Expr->V.SecNum);
|
||||
S->Flags |= SEG_FLAG_BANKREF;
|
||||
}
|
||||
|
||||
/* Cleanup */
|
||||
|
||||
Reference in New Issue
Block a user