/* */
/* */
/* */
-/* (C) 1998-2003 Ullrich von Bassewitz */
-/* Römerstraße 52 */
-/* D-70794 Filderstadt */
-/* EMail: uz@cc65.org */
+/* (C) 1998-2011, Ullrich von Bassewitz */
+/* Roemerstrasse 52 */
+/* D-70794 Filderstadt */
+/* EMail: uz@cc65.org */
/* */
/* */
/* This software is provided 'as-is', without any expressed or implied */
ExprNode* GenLiteralExpr (long Val);
/* Return an expression tree that encodes the given literal value */
+ExprNode* GenLiteral0 (void);
+/* Return an expression tree that encodes the the number zero */
+
ExprNode* GenSymExpr (struct SymEntry* Sym);
/* Return an expression node that encodes the given symbol */
int IsFarRange (long Val);
/* Return true if this is a far (24 bit) value */
+int IsEasyConst (const ExprNode* E, long* Val);
+/* Do some light checking if the given node is a constant. Don't care if E is
+ * a complex expression. If E is a constant, return true and place its value
+ * into Val, provided that Val is not NULL.
+ */
+
ExprNode* CloneExpr (ExprNode* Expr);
/* Clone the given expression tree. The function will simply clone symbol
* nodes, it will not resolve them.
void WriteExpr (ExprNode* Expr);
/* Write the given expression to the object file */
+void ExprGuessedAddrSize (const ExprNode* Expr, unsigned char AddrSize);
+/* Mark the address size of the given expression tree as guessed. The address
+ * size passed as argument is the one NOT used, because the actual address
+ * size wasn't known. Example: Zero page addressing was not used because symbol
+ * is undefined, and absolute addressing was available.
+ * This function will actually parse the expression tree for undefined symbols,
+ * and mark these symbols accordingly.
+ */
+
+ExprNode* FuncBankByte (void);
+/* Handle the .BANKBYTE builtin function */
+
+ExprNode* FuncLoByte (void);
+/* Handle the .LOBYTE builtin function */
+
+ExprNode* FuncHiByte (void);
+/* Handle the .HIBYTE builtin function */
/* End of expr.h */