case EXPR_WORD1:
return (GetExprVal (Expr->Left) >> 16) & 0xFFFF;
+
+ case EXPR_FARADDR:
+ return GetExprVal (Expr->Left) & 0xFFFFFF;
+
+ case EXPR_DWORD:
+ return GetExprVal (Expr->Left) & 0xFFFFFFFF;
default:
Internal ("Unknown expression Op type: %u", Expr->Op);
/* */
/* */
/* */
-/* (C) 1999-2011, Ullrich von Bassewitz */
+/* (C) 1999-2012, Ullrich von Bassewitz */
/* Roemerstrasse 52 */
/* D-70794 Filderstadt */
/* EMail: uz@cc65.org */
/* Determine the expression to relocate */
Expr = E;
- if (E->Op == EXPR_BYTE0 || E->Op == EXPR_BYTE1 ||
- E->Op == EXPR_BYTE2 || E->Op == EXPR_BYTE3 ||
- E->Op == EXPR_WORD0 || E->Op == EXPR_WORD1) {
+ if (E->Op == EXPR_BYTE0 || E->Op == EXPR_BYTE1 ||
+ E->Op == EXPR_BYTE2 || E->Op == EXPR_BYTE3 ||
+ E->Op == EXPR_WORD0 || E->Op == EXPR_WORD1 ||
+ E->Op == EXPR_FARADDR || E->Op == EXPR_DWORD) {
/* Use the real expression */
Expr = E->Left;
}
case EXPR_BYTE3: BinVal = (BinVal >> 24) & 0xFF; break;
case EXPR_WORD0: BinVal &= 0xFFFF; break;
case EXPR_WORD1: BinVal = (BinVal >> 16) & 0xFFFF; break;
+ case EXPR_FARADDR: BinVal &= 0xFFFFFFUL; break;
+ case EXPR_DWORD: BinVal &= 0xFFFFFFFFUL; break;
}
WriteVal (D->F, BinVal, Size);
/* Initialize variables */
D->CurReloc = 0;
- /* Dump all bss segments */
+ /* Dump all bss segments */
O65WriteSeg (D, D->BssSeg, D->BssCount, 0);
/* Set the size of the segment */