New .FEATURE org_per_seg. If enabled, .org/.reloc do only influence the

current segment. Idea by Peter Wendrich <pwsoft@syntiac.com>.


git-svn-id: svn://svn.cc65.org/cc65/trunk@3794 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz
2007-08-23 19:48:43 +00:00
parent 5eadec958c
commit a7358314a0
11 changed files with 131 additions and 50 deletions

View File

@@ -6,8 +6,8 @@
/* */
/* */
/* */
/* (C) 1998-2006 Ullrich von Bassewitz */
/* R<EFBFBD>merstra<EFBFBD>e 52 */
/* (C) 1998-2007 Ullrich von Bassewitz */
/* Roemerstrasse 52 */
/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
/* */
@@ -1482,7 +1482,7 @@ ExprNode* GenCurrentPC (void)
{
ExprNode* Root;
if (RelocMode) {
if (GetRelocMode ()) {
/* Create SegmentBase + Offset */
Root = GenAddExpr (GenSectionExpr (GetCurrentSegNum ()),
GenLiteralExpr (GetPC ()));
@@ -1531,7 +1531,7 @@ ExprNode* GenBranchExpr (unsigned Offs)
* (Val - PC - Offs) - Seg
*/
Root = GenLiteralExpr (Val - GetPC () - Offs);
if (RelocMode) {
if (GetRelocMode ()) {
N = Root;
Root = NewExprNode (EXPR_MINUS);
Root->Left = N;
@@ -1549,7 +1549,7 @@ ExprNode* GenBranchExpr (unsigned Offs)
Root = NewExprNode (EXPR_MINUS);
Root->Left = N;
Root->Right = GenLiteralExpr (GetPC () + Offs);
if (RelocMode) {
if (GetRelocMode ()) {
N = Root;
Root = NewExprNode (EXPR_MINUS);
Root->Left = N;