From d65ab5c62b228b46d2db022a6f3184e67b11485b Mon Sep 17 00:00:00 2001 From: urchlay Date: Wed, 27 Jul 2005 01:36:51 +0000 Subject: [PATCH] Steve, I know you hate uInt8 and uInt16, and I hate them too... ...but we need them in the Expression classes and the DebuggerParser. Expressions now return uInt16 instead of int. This gets us 6502-like behaviour when dealing with numbers that don't fit into the 6502's 16-bit address space. -1 in 6502-speak is equal to $ffff (twos' complement); this is exactly what happens in C++ if you try to assign -1 to an unsigned short (aka a uInt16). I believe the C++ standard doesn't *require* conforming implementations to use twos' complement math, but I doubt anyone will ever port Stella to any hardware old or esoteric enough to use anything else. Also, I've added casts to uInt8 to the debugger commands that set registers. This also results in 6502-like handling of negative numbers: using "a -2" to set the Accumulator will result in it having the value $fe, which is exactly correct for a 6502. This may seem like undesirable behaviour (and in a regular C++ program, when it happens by accident, it IS undesired), but trust me, this is exactly what a 6502 assembly programmer would expect. Also also, I got rid of the distinction between commands that take a byte or word argument. They all take words now. I had to do this to make the "a -2" example work. A side effect is that you can now say something like "a $1234" and the value will get truncated to $34 (due to the cast to uInt8). What remains to be seen is whether all this behaves the way I think it should on a big-endian platform (e.g. the Mac). My poor Mac is having cooling issues, so I can't actually compile Stella any more :( However, I can get it to run long enough to compile a little 5-10 line test program to see how these casts work. If I'm wrong, and they behave differently on the Mac, I'll have to add platform-dependent "uInt16_to_uInt8" type functions, which I'd really rather avoid... But the debugger has GOT to treat negative and out-of-range values the same way as a 6502 does. git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@694 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba --- stella/src/debugger/BinAndExpression.hxx | 7 +++--- stella/src/debugger/BinNotExpression.hxx | 7 +++--- stella/src/debugger/BinOrExpression.hxx | 7 +++--- stella/src/debugger/BinXorExpression.hxx | 7 +++--- stella/src/debugger/ByteDerefExpression.hxx | 7 +++--- .../debugger/ByteDerefOffsetExpression.hxx | 7 +++--- stella/src/debugger/ConstExpression.hxx | 7 +++--- stella/src/debugger/CpuMethodExpression.hxx | 7 +++--- stella/src/debugger/DebuggerParser.cxx | 24 +++++++++---------- stella/src/debugger/DivExpression.hxx | 7 +++--- stella/src/debugger/EqualsExpression.hxx | 7 +++--- stella/src/debugger/EquateExpression.hxx | 7 +++--- stella/src/debugger/Expression.hxx | 8 ++++--- stella/src/debugger/FunctionExpression.hxx | 7 +++--- .../src/debugger/GreaterEqualsExpression.hxx | 7 +++--- stella/src/debugger/GreaterExpression.hxx | 7 +++--- stella/src/debugger/HiByteExpression.hxx | 7 +++--- stella/src/debugger/LessEqualsExpression.hxx | 7 +++--- stella/src/debugger/LessExpression.hxx | 7 +++--- stella/src/debugger/LoByteExpression.hxx | 7 +++--- stella/src/debugger/LogAndExpression.hxx | 7 +++--- stella/src/debugger/LogNotExpression.hxx | 7 +++--- stella/src/debugger/LogOrExpression.hxx | 7 +++--- stella/src/debugger/MinusExpression.hxx | 7 +++--- stella/src/debugger/ModExpression.hxx | 7 +++--- stella/src/debugger/MultExpression.hxx | 7 +++--- stella/src/debugger/NotEqualsExpression.hxx | 7 +++--- stella/src/debugger/PlusExpression.hxx | 7 +++--- stella/src/debugger/ShiftLeftExpression.hxx | 7 +++--- stella/src/debugger/ShiftRightExpression.hxx | 7 +++--- stella/src/debugger/TiaMethodExpression.hxx | 7 +++--- stella/src/debugger/UnaryMinusExpression.hxx | 7 +++--- stella/src/debugger/WordDerefExpression.hxx | 7 +++--- 33 files changed, 141 insertions(+), 108 deletions(-) diff --git a/stella/src/debugger/BinAndExpression.hxx b/stella/src/debugger/BinAndExpression.hxx index 650485f39..f85f2a569 100644 --- a/stella/src/debugger/BinAndExpression.hxx +++ b/stella/src/debugger/BinAndExpression.hxx @@ -13,23 +13,24 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: BinAndExpression.hxx,v 1.1 2005-07-13 04:26:19 urchlay Exp $ +// $Id: BinAndExpression.hxx,v 1.2 2005-07-27 01:36:50 urchlay Exp $ //============================================================================ #ifndef BINAND_EXPRESSION_HXX #define BINAND_EXPRESSION_HXX +#include "bspf.hxx" #include "Expression.hxx" /** @author B. Watson - @version $Id: BinAndExpression.hxx,v 1.1 2005-07-13 04:26:19 urchlay Exp $ + @version $Id: BinAndExpression.hxx,v 1.2 2005-07-27 01:36:50 urchlay Exp $ */ class BinAndExpression : public Expression { public: BinAndExpression(Expression *left, Expression *right); - int evaluate() { return myLHS->evaluate() & myRHS->evaluate(); } + uInt16 evaluate() { return myLHS->evaluate() & myRHS->evaluate(); } }; #endif diff --git a/stella/src/debugger/BinNotExpression.hxx b/stella/src/debugger/BinNotExpression.hxx index dd3c6c1b2..cd99a5850 100644 --- a/stella/src/debugger/BinNotExpression.hxx +++ b/stella/src/debugger/BinNotExpression.hxx @@ -13,23 +13,24 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: BinNotExpression.hxx,v 1.1 2005-07-13 04:49:18 urchlay Exp $ +// $Id: BinNotExpression.hxx,v 1.2 2005-07-27 01:36:50 urchlay Exp $ //============================================================================ #ifndef BINNOT_EXPRESSION_HXX #define BINNOT_EXPRESSION_HXX +#include "bspf.hxx" #include "Expression.hxx" /** @author B. Watson - @version $Id: BinNotExpression.hxx,v 1.1 2005-07-13 04:49:18 urchlay Exp $ + @version $Id: BinNotExpression.hxx,v 1.2 2005-07-27 01:36:50 urchlay Exp $ */ class BinNotExpression : public Expression { public: BinNotExpression(Expression *left); - int evaluate() { return ~(myLHS->evaluate()); } + uInt16 evaluate() { return ~(myLHS->evaluate()); } }; #endif diff --git a/stella/src/debugger/BinOrExpression.hxx b/stella/src/debugger/BinOrExpression.hxx index 7e8cbca33..7239e6868 100644 --- a/stella/src/debugger/BinOrExpression.hxx +++ b/stella/src/debugger/BinOrExpression.hxx @@ -13,23 +13,24 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: BinOrExpression.hxx,v 1.1 2005-07-13 04:26:19 urchlay Exp $ +// $Id: BinOrExpression.hxx,v 1.2 2005-07-27 01:36:50 urchlay Exp $ //============================================================================ #ifndef BINOR_EXPRESSION_HXX #define BINOR_EXPRESSION_HXX +#include "bspf.hxx" #include "Expression.hxx" /** @author B. Watson - @version $Id: BinOrExpression.hxx,v 1.1 2005-07-13 04:26:19 urchlay Exp $ + @version $Id: BinOrExpression.hxx,v 1.2 2005-07-27 01:36:50 urchlay Exp $ */ class BinOrExpression : public Expression { public: BinOrExpression(Expression *left, Expression *right); - int evaluate() { return myLHS->evaluate() | myRHS->evaluate(); } + uInt16 evaluate() { return myLHS->evaluate() | myRHS->evaluate(); } }; #endif diff --git a/stella/src/debugger/BinXorExpression.hxx b/stella/src/debugger/BinXorExpression.hxx index 143a32095..a885bc408 100644 --- a/stella/src/debugger/BinXorExpression.hxx +++ b/stella/src/debugger/BinXorExpression.hxx @@ -13,23 +13,24 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: BinXorExpression.hxx,v 1.1 2005-07-13 04:26:19 urchlay Exp $ +// $Id: BinXorExpression.hxx,v 1.2 2005-07-27 01:36:50 urchlay Exp $ //============================================================================ #ifndef BINXOR_EXPRESSION_HXX #define BINXOR_EXPRESSION_HXX +#include "bspf.hxx" #include "Expression.hxx" /** @author B. Watson - @version $Id: BinXorExpression.hxx,v 1.1 2005-07-13 04:26:19 urchlay Exp $ + @version $Id: BinXorExpression.hxx,v 1.2 2005-07-27 01:36:50 urchlay Exp $ */ class BinXorExpression : public Expression { public: BinXorExpression(Expression *left, Expression *right); - int evaluate() { return myLHS->evaluate() ^ myRHS->evaluate(); } + uInt16 evaluate() { return myLHS->evaluate() ^ myRHS->evaluate(); } }; #endif diff --git a/stella/src/debugger/ByteDerefExpression.hxx b/stella/src/debugger/ByteDerefExpression.hxx index 4b5aefe3f..5cfbbdb98 100644 --- a/stella/src/debugger/ByteDerefExpression.hxx +++ b/stella/src/debugger/ByteDerefExpression.hxx @@ -13,24 +13,25 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: ByteDerefExpression.hxx,v 1.1 2005-07-15 01:20:11 urchlay Exp $ +// $Id: ByteDerefExpression.hxx,v 1.2 2005-07-27 01:36:50 urchlay Exp $ //============================================================================ #ifndef BYTEDEREF_EXPRESSION_HXX #define BYTEDEREF_EXPRESSION_HXX #include "Debugger.hxx" +#include "bspf.hxx" #include "Expression.hxx" /** @author B. Watson - @version $Id: ByteDerefExpression.hxx,v 1.1 2005-07-15 01:20:11 urchlay Exp $ + @version $Id: ByteDerefExpression.hxx,v 1.2 2005-07-27 01:36:50 urchlay Exp $ */ class ByteDerefExpression : public Expression { public: ByteDerefExpression(Expression *left); - int evaluate() { return Debugger::debugger().peek(myLHS->evaluate()); } + uInt16 evaluate() { return Debugger::debugger().peek(myLHS->evaluate()); } }; #endif diff --git a/stella/src/debugger/ByteDerefOffsetExpression.hxx b/stella/src/debugger/ByteDerefOffsetExpression.hxx index 2d8745642..c0351fa7e 100644 --- a/stella/src/debugger/ByteDerefOffsetExpression.hxx +++ b/stella/src/debugger/ByteDerefOffsetExpression.hxx @@ -13,24 +13,25 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: ByteDerefOffsetExpression.hxx,v 1.1 2005-07-19 01:31:36 urchlay Exp $ +// $Id: ByteDerefOffsetExpression.hxx,v 1.2 2005-07-27 01:36:50 urchlay Exp $ //============================================================================ #ifndef BYTEDEREFOFFSET_EXPRESSION_HXX #define BYTEDEREFOFFSET_EXPRESSION_HXX #include "Debugger.hxx" +#include "bspf.hxx" #include "Expression.hxx" /** @author B. Watson - @version $Id: ByteDerefOffsetExpression.hxx,v 1.1 2005-07-19 01:31:36 urchlay Exp $ + @version $Id: ByteDerefOffsetExpression.hxx,v 1.2 2005-07-27 01:36:50 urchlay Exp $ */ class ByteDerefOffsetExpression : public Expression { public: ByteDerefOffsetExpression(Expression *left, Expression *right); - int evaluate() { return Debugger::debugger().peek(myLHS->evaluate() + myRHS->evaluate()); } + uInt16 evaluate() { return Debugger::debugger().peek(myLHS->evaluate() + myRHS->evaluate()); } }; #endif diff --git a/stella/src/debugger/ConstExpression.hxx b/stella/src/debugger/ConstExpression.hxx index d0fc8ce99..deccd5e49 100644 --- a/stella/src/debugger/ConstExpression.hxx +++ b/stella/src/debugger/ConstExpression.hxx @@ -13,12 +13,13 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: ConstExpression.hxx,v 1.1 2005-07-12 17:02:35 stephena Exp $ +// $Id: ConstExpression.hxx,v 1.2 2005-07-27 01:36:50 urchlay Exp $ //============================================================================ #ifndef CONST_EXPRESSION_HXX #define CONST_EXPRESSION_HXX +#include "bspf.hxx" #include "Expression.hxx" /** @@ -26,13 +27,13 @@ that is, one that consists solely of a constant integer value. @author Stephen Anthony - @version $Id: ConstExpression.hxx,v 1.1 2005-07-12 17:02:35 stephena Exp $ + @version $Id: ConstExpression.hxx,v 1.2 2005-07-27 01:36:50 urchlay Exp $ */ class ConstExpression : public Expression { public: ConstExpression(const int value); - int evaluate() { return myValue; } + uInt16 evaluate() { return myValue; } private: int myValue; diff --git a/stella/src/debugger/CpuMethodExpression.hxx b/stella/src/debugger/CpuMethodExpression.hxx index 12aa9ae05..07f057ee9 100644 --- a/stella/src/debugger/CpuMethodExpression.hxx +++ b/stella/src/debugger/CpuMethodExpression.hxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: CpuMethodExpression.hxx,v 1.1 2005-07-18 23:50:27 urchlay Exp $ +// $Id: CpuMethodExpression.hxx,v 1.2 2005-07-27 01:36:50 urchlay Exp $ //============================================================================ #ifndef CPUMETHOD_EXPRESSION_HXX @@ -21,17 +21,18 @@ //#include "Debugger.hxx" #include "CpuDebug.hxx" +#include "bspf.hxx" #include "Expression.hxx" /** @author B. Watson - @version $Id: CpuMethodExpression.hxx,v 1.1 2005-07-18 23:50:27 urchlay Exp $ + @version $Id: CpuMethodExpression.hxx,v 1.2 2005-07-27 01:36:50 urchlay Exp $ */ class CpuMethodExpression : public Expression { public: CpuMethodExpression(CPUDEBUG_INT_METHOD method); - int evaluate() { return CALL_CPUDEBUG_METHOD(myMethod); } + uInt16 evaluate() { return CALL_CPUDEBUG_METHOD(myMethod); } private: CPUDEBUG_INT_METHOD myMethod; diff --git a/stella/src/debugger/DebuggerParser.cxx b/stella/src/debugger/DebuggerParser.cxx index e510d7bb6..1fa13f3fa 100644 --- a/stella/src/debugger/DebuggerParser.cxx +++ b/stella/src/debugger/DebuggerParser.cxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: DebuggerParser.cxx,v 1.70 2005-07-23 21:16:57 urchlay Exp $ +// $Id: DebuggerParser.cxx,v 1.71 2005-07-27 01:36:50 urchlay Exp $ //============================================================================ #include "bspf.hxx" @@ -33,7 +33,7 @@ Command DebuggerParser::commands[] = { "a", "Set Accumulator to value xx", true, - { kARG_BYTE, kARG_END_ARGS }, + { kARG_WORD, kARG_END_ARGS }, &DebuggerParser::executeA }, @@ -105,7 +105,7 @@ Command DebuggerParser::commands[] = { "colortest", "Color Test", true, - { kARG_BYTE, kARG_END_ARGS }, + { kARG_WORD, kARG_END_ARGS }, &DebuggerParser::executeColortest }, @@ -233,7 +233,7 @@ Command DebuggerParser::commands[] = { "loadstate", "Load emulator state (0-9)", true, - { kARG_BYTE, kARG_END_ARGS }, + { kARG_WORD, kARG_END_ARGS }, &DebuggerParser::executeLoadstate }, @@ -345,7 +345,7 @@ Command DebuggerParser::commands[] = { "s", "Set Stack Pointer to value xx", true, - { kARG_BYTE, kARG_END_ARGS }, + { kARG_WORD, kARG_END_ARGS }, &DebuggerParser::executeS }, @@ -369,7 +369,7 @@ Command DebuggerParser::commands[] = { "savestate", "Save emulator state (valid args 0-9)", true, - { kARG_BYTE, kARG_END_ARGS }, + { kARG_WORD, kARG_END_ARGS }, &DebuggerParser::executeSavestate }, @@ -465,7 +465,7 @@ Command DebuggerParser::commands[] = { "x", "Set X Register to value xx", true, - { kARG_BYTE, kARG_END_ARGS }, + { kARG_WORD, kARG_END_ARGS }, &DebuggerParser::executeX }, @@ -473,7 +473,7 @@ Command DebuggerParser::commands[] = { "y", "Set Y Register to value xx", true, - { kARG_BYTE, kARG_END_ARGS }, + { kARG_WORD, kARG_END_ARGS }, &DebuggerParser::executeY }, @@ -1178,7 +1178,7 @@ bool DebuggerParser::saveScriptFile(string file) { // "a" void DebuggerParser::executeA() { - debugger->cpuDebug().setA(args[0]); + debugger->cpuDebug().setA((uInt8)args[0]); } // "bank" @@ -1517,7 +1517,7 @@ void DebuggerParser::executeRunTo() { // "s" void DebuggerParser::executeS() { - debugger->cpuDebug().setSP(args[0]); + debugger->cpuDebug().setSP((uInt8)args[0]); } // "save" @@ -1630,12 +1630,12 @@ void DebuggerParser::executeWatch() { // "x" void DebuggerParser::executeX() { - debugger->cpuDebug().setX(args[0]); + debugger->cpuDebug().setX((uInt8)args[0]); } // "y" void DebuggerParser::executeY() { - debugger->cpuDebug().setY(args[0]); + debugger->cpuDebug().setY((uInt8)args[0]); } // "z" diff --git a/stella/src/debugger/DivExpression.hxx b/stella/src/debugger/DivExpression.hxx index 2943f98ab..37ebd6142 100644 --- a/stella/src/debugger/DivExpression.hxx +++ b/stella/src/debugger/DivExpression.hxx @@ -13,23 +13,24 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: DivExpression.hxx,v 1.2 2005-07-14 12:28:53 stephena Exp $ +// $Id: DivExpression.hxx,v 1.3 2005-07-27 01:36:50 urchlay Exp $ //============================================================================ #ifndef DIV_EXPRESSION_HXX #define DIV_EXPRESSION_HXX +#include "bspf.hxx" #include "Expression.hxx" /** @author B. Watson - @version $Id: DivExpression.hxx,v 1.2 2005-07-14 12:28:53 stephena Exp $ + @version $Id: DivExpression.hxx,v 1.3 2005-07-27 01:36:50 urchlay Exp $ */ class DivExpression : public Expression { public: DivExpression(Expression *left, Expression *right); - int evaluate() { int denom = myRHS->evaluate(); + uInt16 evaluate() { int denom = myRHS->evaluate(); return denom == 0 ? 0 : myLHS->evaluate() / denom; } }; diff --git a/stella/src/debugger/EqualsExpression.hxx b/stella/src/debugger/EqualsExpression.hxx index de2533520..9dff10670 100644 --- a/stella/src/debugger/EqualsExpression.hxx +++ b/stella/src/debugger/EqualsExpression.hxx @@ -13,23 +13,24 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: EqualsExpression.hxx,v 1.2 2005-07-13 04:26:19 urchlay Exp $ +// $Id: EqualsExpression.hxx,v 1.3 2005-07-27 01:36:50 urchlay Exp $ //============================================================================ #ifndef EQUALS_EXPRESSION_HXX #define EQUALS_EXPRESSION_HXX +#include "bspf.hxx" #include "Expression.hxx" /** @author B. Watson - @version $Id: EqualsExpression.hxx,v 1.2 2005-07-13 04:26:19 urchlay Exp $ + @version $Id: EqualsExpression.hxx,v 1.3 2005-07-27 01:36:50 urchlay Exp $ */ class EqualsExpression : public Expression { public: EqualsExpression(Expression *left, Expression *right); - int evaluate() { return myLHS->evaluate() == myRHS->evaluate(); } + uInt16 evaluate() { return myLHS->evaluate() == myRHS->evaluate(); } }; #endif diff --git a/stella/src/debugger/EquateExpression.hxx b/stella/src/debugger/EquateExpression.hxx index c412e8f5f..9e74e8d7b 100644 --- a/stella/src/debugger/EquateExpression.hxx +++ b/stella/src/debugger/EquateExpression.hxx @@ -13,12 +13,13 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: EquateExpression.hxx,v 1.1 2005-07-14 11:28:38 stephena Exp $ +// $Id: EquateExpression.hxx,v 1.2 2005-07-27 01:36:50 urchlay Exp $ //============================================================================ #ifndef EQUATE_EXPRESSION_HXX #define EQUATE_EXPRESSION_HXX +#include "bspf.hxx" #include "Expression.hxx" #include "Debugger.hxx" @@ -26,13 +27,13 @@ /** @author Stephen Anthony - @version $Id: EquateExpression.hxx,v 1.1 2005-07-14 11:28:38 stephena Exp $ + @version $Id: EquateExpression.hxx,v 1.2 2005-07-27 01:36:50 urchlay Exp $ */ class EquateExpression : public Expression { public: EquateExpression(const string& label); - int evaluate() { return Debugger::debugger().equates()->getAddress(myLabel); } + uInt16 evaluate() { return Debugger::debugger().equates()->getAddress(myLabel); } private: string myLabel; diff --git a/stella/src/debugger/Expression.hxx b/stella/src/debugger/Expression.hxx index 2263c2d38..54555945d 100644 --- a/stella/src/debugger/Expression.hxx +++ b/stella/src/debugger/Expression.hxx @@ -13,12 +13,14 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: Expression.hxx,v 1.2 2005-07-18 02:03:41 urchlay Exp $ +// $Id: Expression.hxx,v 1.3 2005-07-27 01:36:50 urchlay Exp $ //============================================================================ #ifndef EXPRESSION_HXX #define EXPRESSION_HXX +#include "bspf.hxx" + // define this to count Expression instances. Only useful for debugging // Stella itself. //#define EXPR_REF_COUNT @@ -30,7 +32,7 @@ can represent complex expression statements. @author Stephen Anthony - @version $Id: Expression.hxx,v 1.2 2005-07-18 02:03:41 urchlay Exp $ + @version $Id: Expression.hxx,v 1.3 2005-07-27 01:36:50 urchlay Exp $ */ class Expression { @@ -38,7 +40,7 @@ class Expression Expression(Expression* lhs, Expression* rhs); virtual ~Expression(); - virtual int evaluate() = 0; + virtual uInt16 evaluate() = 0; protected: Expression* myLHS; diff --git a/stella/src/debugger/FunctionExpression.hxx b/stella/src/debugger/FunctionExpression.hxx index f4a43767c..8ef95ba08 100644 --- a/stella/src/debugger/FunctionExpression.hxx +++ b/stella/src/debugger/FunctionExpression.hxx @@ -13,12 +13,13 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: FunctionExpression.hxx,v 1.1 2005-07-21 03:26:58 urchlay Exp $ +// $Id: FunctionExpression.hxx,v 1.2 2005-07-27 01:36:50 urchlay Exp $ //============================================================================ #ifndef FUNCTION_EXPRESSION_HXX #define FUNCTION_EXPRESSION_HXX +#include "bspf.hxx" #include "Expression.hxx" #include "Debugger.hxx" @@ -26,13 +27,13 @@ /** @author Stephen Anthony - @version $Id: FunctionExpression.hxx,v 1.1 2005-07-21 03:26:58 urchlay Exp $ + @version $Id: FunctionExpression.hxx,v 1.2 2005-07-27 01:36:50 urchlay Exp $ */ class FunctionExpression : public Expression { public: FunctionExpression(const string& label); - int evaluate() { + uInt16 evaluate() { Expression *exp = Debugger::debugger().getFunction(myLabel); if(exp) return exp->evaluate(); diff --git a/stella/src/debugger/GreaterEqualsExpression.hxx b/stella/src/debugger/GreaterEqualsExpression.hxx index 16c13e5c6..87c677cb7 100644 --- a/stella/src/debugger/GreaterEqualsExpression.hxx +++ b/stella/src/debugger/GreaterEqualsExpression.hxx @@ -13,23 +13,24 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: GreaterEqualsExpression.hxx,v 1.1 2005-07-13 04:49:18 urchlay Exp $ +// $Id: GreaterEqualsExpression.hxx,v 1.2 2005-07-27 01:36:50 urchlay Exp $ //============================================================================ #ifndef GREATEREQUALS_EXPRESSION_HXX #define GREATEREQUALS_EXPRESSION_HXX +#include "bspf.hxx" #include "Expression.hxx" /** @author B. Watson - @version $Id: GreaterEqualsExpression.hxx,v 1.1 2005-07-13 04:49:18 urchlay Exp $ + @version $Id: GreaterEqualsExpression.hxx,v 1.2 2005-07-27 01:36:50 urchlay Exp $ */ class GreaterEqualsExpression : public Expression { public: GreaterEqualsExpression(Expression *left, Expression *right); - int evaluate() { return myLHS->evaluate() >= myRHS->evaluate(); } + uInt16 evaluate() { return myLHS->evaluate() >= myRHS->evaluate(); } }; #endif diff --git a/stella/src/debugger/GreaterExpression.hxx b/stella/src/debugger/GreaterExpression.hxx index a13efc438..3b143e5d2 100644 --- a/stella/src/debugger/GreaterExpression.hxx +++ b/stella/src/debugger/GreaterExpression.hxx @@ -13,23 +13,24 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: GreaterExpression.hxx,v 1.1 2005-07-13 04:49:18 urchlay Exp $ +// $Id: GreaterExpression.hxx,v 1.2 2005-07-27 01:36:50 urchlay Exp $ //============================================================================ #ifndef GREATER_EXPRESSION_HXX #define GREATER_EXPRESSION_HXX +#include "bspf.hxx" #include "Expression.hxx" /** @author B. Watson - @version $Id: GreaterExpression.hxx,v 1.1 2005-07-13 04:49:18 urchlay Exp $ + @version $Id: GreaterExpression.hxx,v 1.2 2005-07-27 01:36:50 urchlay Exp $ */ class GreaterExpression : public Expression { public: GreaterExpression(Expression *left, Expression *right); - int evaluate() { return myLHS->evaluate() > myRHS->evaluate(); } + uInt16 evaluate() { return myLHS->evaluate() > myRHS->evaluate(); } }; #endif diff --git a/stella/src/debugger/HiByteExpression.hxx b/stella/src/debugger/HiByteExpression.hxx index 53bf7afac..6e3a28d61 100644 --- a/stella/src/debugger/HiByteExpression.hxx +++ b/stella/src/debugger/HiByteExpression.hxx @@ -13,23 +13,24 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: HiByteExpression.hxx,v 1.1 2005-07-15 01:40:34 urchlay Exp $ +// $Id: HiByteExpression.hxx,v 1.2 2005-07-27 01:36:50 urchlay Exp $ //============================================================================ #ifndef HIBYTE_EXPRESSION_HXX #define HIBYTE_EXPRESSION_HXX +#include "bspf.hxx" #include "Expression.hxx" /** @author B. Watson - @version $Id: HiByteExpression.hxx,v 1.1 2005-07-15 01:40:34 urchlay Exp $ + @version $Id: HiByteExpression.hxx,v 1.2 2005-07-27 01:36:50 urchlay Exp $ */ class HiByteExpression : public Expression { public: HiByteExpression(Expression *left); - int evaluate() { return 0xff & (myLHS->evaluate() >> 8); } + uInt16 evaluate() { return 0xff & (myLHS->evaluate() >> 8); } }; #endif diff --git a/stella/src/debugger/LessEqualsExpression.hxx b/stella/src/debugger/LessEqualsExpression.hxx index 645abd3a4..996b5cebb 100644 --- a/stella/src/debugger/LessEqualsExpression.hxx +++ b/stella/src/debugger/LessEqualsExpression.hxx @@ -13,23 +13,24 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: LessEqualsExpression.hxx,v 1.1 2005-07-13 04:49:18 urchlay Exp $ +// $Id: LessEqualsExpression.hxx,v 1.2 2005-07-27 01:36:51 urchlay Exp $ //============================================================================ #ifndef LESSEQUALS_EXPRESSION_HXX #define LESSEQUALS_EXPRESSION_HXX +#include "bspf.hxx" #include "Expression.hxx" /** @author B. Watson - @version $Id: LessEqualsExpression.hxx,v 1.1 2005-07-13 04:49:18 urchlay Exp $ + @version $Id: LessEqualsExpression.hxx,v 1.2 2005-07-27 01:36:51 urchlay Exp $ */ class LessEqualsExpression : public Expression { public: LessEqualsExpression(Expression *left, Expression *right); - int evaluate() { return myLHS->evaluate() <= myRHS->evaluate(); } + uInt16 evaluate() { return myLHS->evaluate() <= myRHS->evaluate(); } }; #endif diff --git a/stella/src/debugger/LessExpression.hxx b/stella/src/debugger/LessExpression.hxx index ea346bea8..6eb4c5e41 100644 --- a/stella/src/debugger/LessExpression.hxx +++ b/stella/src/debugger/LessExpression.hxx @@ -13,23 +13,24 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: LessExpression.hxx,v 1.1 2005-07-13 04:49:18 urchlay Exp $ +// $Id: LessExpression.hxx,v 1.2 2005-07-27 01:36:51 urchlay Exp $ //============================================================================ #ifndef LESS_EXPRESSION_HXX #define LESS_EXPRESSION_HXX +#include "bspf.hxx" #include "Expression.hxx" /** @author B. Watson - @version $Id: LessExpression.hxx,v 1.1 2005-07-13 04:49:18 urchlay Exp $ + @version $Id: LessExpression.hxx,v 1.2 2005-07-27 01:36:51 urchlay Exp $ */ class LessExpression : public Expression { public: LessExpression(Expression *left, Expression *right); - int evaluate() { return myLHS->evaluate() < myRHS->evaluate(); } + uInt16 evaluate() { return myLHS->evaluate() < myRHS->evaluate(); } }; #endif diff --git a/stella/src/debugger/LoByteExpression.hxx b/stella/src/debugger/LoByteExpression.hxx index 458d35e91..a246165f0 100644 --- a/stella/src/debugger/LoByteExpression.hxx +++ b/stella/src/debugger/LoByteExpression.hxx @@ -13,23 +13,24 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: LoByteExpression.hxx,v 1.1 2005-07-15 01:40:34 urchlay Exp $ +// $Id: LoByteExpression.hxx,v 1.2 2005-07-27 01:36:51 urchlay Exp $ //============================================================================ #ifndef LOBYTE_EXPRESSION_HXX #define LOBYTE_EXPRESSION_HXX +#include "bspf.hxx" #include "Expression.hxx" /** @author B. Watson - @version $Id: LoByteExpression.hxx,v 1.1 2005-07-15 01:40:34 urchlay Exp $ + @version $Id: LoByteExpression.hxx,v 1.2 2005-07-27 01:36:51 urchlay Exp $ */ class LoByteExpression : public Expression { public: LoByteExpression(Expression *left); - int evaluate() { return 0xff & myLHS->evaluate(); } + uInt16 evaluate() { return 0xff & myLHS->evaluate(); } }; #endif diff --git a/stella/src/debugger/LogAndExpression.hxx b/stella/src/debugger/LogAndExpression.hxx index aff1cab77..26d4cb3b5 100644 --- a/stella/src/debugger/LogAndExpression.hxx +++ b/stella/src/debugger/LogAndExpression.hxx @@ -13,23 +13,24 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: LogAndExpression.hxx,v 1.1 2005-07-13 04:26:19 urchlay Exp $ +// $Id: LogAndExpression.hxx,v 1.2 2005-07-27 01:36:51 urchlay Exp $ //============================================================================ #ifndef LOGAND_EXPRESSION_HXX #define LOGAND_EXPRESSION_HXX +#include "bspf.hxx" #include "Expression.hxx" /** @author B. Watson - @version $Id: LogAndExpression.hxx,v 1.1 2005-07-13 04:26:19 urchlay Exp $ + @version $Id: LogAndExpression.hxx,v 1.2 2005-07-27 01:36:51 urchlay Exp $ */ class LogAndExpression : public Expression { public: LogAndExpression(Expression *left, Expression *right); - int evaluate() { return myLHS->evaluate() && myRHS->evaluate(); } + uInt16 evaluate() { return myLHS->evaluate() && myRHS->evaluate(); } }; #endif diff --git a/stella/src/debugger/LogNotExpression.hxx b/stella/src/debugger/LogNotExpression.hxx index 856c5b91e..448e1688d 100644 --- a/stella/src/debugger/LogNotExpression.hxx +++ b/stella/src/debugger/LogNotExpression.hxx @@ -13,23 +13,24 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: LogNotExpression.hxx,v 1.1 2005-07-13 04:49:18 urchlay Exp $ +// $Id: LogNotExpression.hxx,v 1.2 2005-07-27 01:36:51 urchlay Exp $ //============================================================================ #ifndef LOGNOT_EXPRESSION_HXX #define LOGNOT_EXPRESSION_HXX +#include "bspf.hxx" #include "Expression.hxx" /** @author B. Watson - @version $Id: LogNotExpression.hxx,v 1.1 2005-07-13 04:49:18 urchlay Exp $ + @version $Id: LogNotExpression.hxx,v 1.2 2005-07-27 01:36:51 urchlay Exp $ */ class LogNotExpression : public Expression { public: LogNotExpression(Expression *left); - int evaluate() { return !(myLHS->evaluate()); } + uInt16 evaluate() { return !(myLHS->evaluate()); } }; #endif diff --git a/stella/src/debugger/LogOrExpression.hxx b/stella/src/debugger/LogOrExpression.hxx index 85a098061..232dd8670 100644 --- a/stella/src/debugger/LogOrExpression.hxx +++ b/stella/src/debugger/LogOrExpression.hxx @@ -13,23 +13,24 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: LogOrExpression.hxx,v 1.1 2005-07-13 04:26:19 urchlay Exp $ +// $Id: LogOrExpression.hxx,v 1.2 2005-07-27 01:36:51 urchlay Exp $ //============================================================================ #ifndef LOGOR_EXPRESSION_HXX #define LOGOR_EXPRESSION_HXX +#include "bspf.hxx" #include "Expression.hxx" /** @author B. Watson - @version $Id: LogOrExpression.hxx,v 1.1 2005-07-13 04:26:19 urchlay Exp $ + @version $Id: LogOrExpression.hxx,v 1.2 2005-07-27 01:36:51 urchlay Exp $ */ class LogOrExpression : public Expression { public: LogOrExpression(Expression *left, Expression *right); - int evaluate() { return myLHS->evaluate() || myRHS->evaluate(); } + uInt16 evaluate() { return myLHS->evaluate() || myRHS->evaluate(); } }; #endif diff --git a/stella/src/debugger/MinusExpression.hxx b/stella/src/debugger/MinusExpression.hxx index 53832f936..ddef1f9ed 100644 --- a/stella/src/debugger/MinusExpression.hxx +++ b/stella/src/debugger/MinusExpression.hxx @@ -13,23 +13,24 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: MinusExpression.hxx,v 1.2 2005-07-13 04:26:19 urchlay Exp $ +// $Id: MinusExpression.hxx,v 1.3 2005-07-27 01:36:51 urchlay Exp $ //============================================================================ #ifndef MINUS_EXPRESSION_HXX #define MINUS_EXPRESSION_HXX +#include "bspf.hxx" #include "Expression.hxx" /** @author B. Watson - @version $Id: MinusExpression.hxx,v 1.2 2005-07-13 04:26:19 urchlay Exp $ + @version $Id: MinusExpression.hxx,v 1.3 2005-07-27 01:36:51 urchlay Exp $ */ class MinusExpression : public Expression { public: MinusExpression(Expression *left, Expression *right); - int evaluate() { return myLHS->evaluate() - myRHS->evaluate(); } + uInt16 evaluate() { return myLHS->evaluate() - myRHS->evaluate(); } }; #endif diff --git a/stella/src/debugger/ModExpression.hxx b/stella/src/debugger/ModExpression.hxx index 82a1e597e..3b9dfaf70 100644 --- a/stella/src/debugger/ModExpression.hxx +++ b/stella/src/debugger/ModExpression.hxx @@ -13,23 +13,24 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: ModExpression.hxx,v 1.1 2005-07-13 04:26:19 urchlay Exp $ +// $Id: ModExpression.hxx,v 1.2 2005-07-27 01:36:51 urchlay Exp $ //============================================================================ #ifndef MOD_EXPRESSION_HXX #define MOD_EXPRESSION_HXX +#include "bspf.hxx" #include "Expression.hxx" /** @author B. Watson - @version $Id: ModExpression.hxx,v 1.1 2005-07-13 04:26:19 urchlay Exp $ + @version $Id: ModExpression.hxx,v 1.2 2005-07-27 01:36:51 urchlay Exp $ */ class ModExpression : public Expression { public: ModExpression(Expression *left, Expression *right); - int evaluate() { return myLHS->evaluate() % myRHS->evaluate(); } // FIXME: div by zero? + uInt16 evaluate() { return myLHS->evaluate() % myRHS->evaluate(); } // FIXME: div by zero? }; #endif diff --git a/stella/src/debugger/MultExpression.hxx b/stella/src/debugger/MultExpression.hxx index 7ea41e604..99a68f8f6 100644 --- a/stella/src/debugger/MultExpression.hxx +++ b/stella/src/debugger/MultExpression.hxx @@ -13,23 +13,24 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: MultExpression.hxx,v 1.1 2005-07-13 04:26:19 urchlay Exp $ +// $Id: MultExpression.hxx,v 1.2 2005-07-27 01:36:51 urchlay Exp $ //============================================================================ #ifndef MULT_EXPRESSION_HXX #define MULT_EXPRESSION_HXX +#include "bspf.hxx" #include "Expression.hxx" /** @author B. Watson - @version $Id: MultExpression.hxx,v 1.1 2005-07-13 04:26:19 urchlay Exp $ + @version $Id: MultExpression.hxx,v 1.2 2005-07-27 01:36:51 urchlay Exp $ */ class MultExpression : public Expression { public: MultExpression(Expression *left, Expression *right); - int evaluate() { return myLHS->evaluate() * myRHS->evaluate(); } + uInt16 evaluate() { return myLHS->evaluate() * myRHS->evaluate(); } }; #endif diff --git a/stella/src/debugger/NotEqualsExpression.hxx b/stella/src/debugger/NotEqualsExpression.hxx index e923754c5..0423a21a1 100644 --- a/stella/src/debugger/NotEqualsExpression.hxx +++ b/stella/src/debugger/NotEqualsExpression.hxx @@ -13,23 +13,24 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: NotEqualsExpression.hxx,v 1.1 2005-07-13 04:49:18 urchlay Exp $ +// $Id: NotEqualsExpression.hxx,v 1.2 2005-07-27 01:36:51 urchlay Exp $ //============================================================================ #ifndef NOTEQUALS_EXPRESSION_HXX #define NOTEQUALS_EXPRESSION_HXX +#include "bspf.hxx" #include "Expression.hxx" /** @author B. Watson - @version $Id: NotEqualsExpression.hxx,v 1.1 2005-07-13 04:49:18 urchlay Exp $ + @version $Id: NotEqualsExpression.hxx,v 1.2 2005-07-27 01:36:51 urchlay Exp $ */ class NotEqualsExpression : public Expression { public: NotEqualsExpression(Expression *left, Expression *right); - int evaluate() { return myLHS->evaluate() != myRHS->evaluate(); } + uInt16 evaluate() { return myLHS->evaluate() != myRHS->evaluate(); } }; #endif diff --git a/stella/src/debugger/PlusExpression.hxx b/stella/src/debugger/PlusExpression.hxx index 3a3ac5546..b6b3761e2 100644 --- a/stella/src/debugger/PlusExpression.hxx +++ b/stella/src/debugger/PlusExpression.hxx @@ -13,23 +13,24 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: PlusExpression.hxx,v 1.2 2005-07-13 04:26:19 urchlay Exp $ +// $Id: PlusExpression.hxx,v 1.3 2005-07-27 01:36:51 urchlay Exp $ //============================================================================ #ifndef PLUS_EXPRESSION_HXX #define PLUS_EXPRESSION_HXX +#include "bspf.hxx" #include "Expression.hxx" /** @author B. Watson - @version $Id: PlusExpression.hxx,v 1.2 2005-07-13 04:26:19 urchlay Exp $ + @version $Id: PlusExpression.hxx,v 1.3 2005-07-27 01:36:51 urchlay Exp $ */ class PlusExpression : public Expression { public: PlusExpression(Expression *left, Expression *right); - int evaluate() { return myLHS->evaluate() + myRHS->evaluate(); } + uInt16 evaluate() { return myLHS->evaluate() + myRHS->evaluate(); } }; #endif diff --git a/stella/src/debugger/ShiftLeftExpression.hxx b/stella/src/debugger/ShiftLeftExpression.hxx index 32223ed31..6a70f3999 100644 --- a/stella/src/debugger/ShiftLeftExpression.hxx +++ b/stella/src/debugger/ShiftLeftExpression.hxx @@ -13,23 +13,24 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: ShiftLeftExpression.hxx,v 1.1 2005-07-13 04:49:18 urchlay Exp $ +// $Id: ShiftLeftExpression.hxx,v 1.2 2005-07-27 01:36:51 urchlay Exp $ //============================================================================ #ifndef SHIFTLEFT_EXPRESSION_HXX #define SHIFTLEFT_EXPRESSION_HXX +#include "bspf.hxx" #include "Expression.hxx" /** @author B. Watson - @version $Id: ShiftLeftExpression.hxx,v 1.1 2005-07-13 04:49:18 urchlay Exp $ + @version $Id: ShiftLeftExpression.hxx,v 1.2 2005-07-27 01:36:51 urchlay Exp $ */ class ShiftLeftExpression : public Expression { public: ShiftLeftExpression(Expression *left, Expression *right); - int evaluate() { return myLHS->evaluate() << myRHS->evaluate(); } + uInt16 evaluate() { return myLHS->evaluate() << myRHS->evaluate(); } }; #endif diff --git a/stella/src/debugger/ShiftRightExpression.hxx b/stella/src/debugger/ShiftRightExpression.hxx index 375cfa805..da8abb1db 100644 --- a/stella/src/debugger/ShiftRightExpression.hxx +++ b/stella/src/debugger/ShiftRightExpression.hxx @@ -13,23 +13,24 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: ShiftRightExpression.hxx,v 1.1 2005-07-13 04:49:18 urchlay Exp $ +// $Id: ShiftRightExpression.hxx,v 1.2 2005-07-27 01:36:51 urchlay Exp $ //============================================================================ #ifndef SHIFTRIGHT_EXPRESSION_HXX #define SHIFTRIGHT_EXPRESSION_HXX +#include "bspf.hxx" #include "Expression.hxx" /** @author B. Watson - @version $Id: ShiftRightExpression.hxx,v 1.1 2005-07-13 04:49:18 urchlay Exp $ + @version $Id: ShiftRightExpression.hxx,v 1.2 2005-07-27 01:36:51 urchlay Exp $ */ class ShiftRightExpression : public Expression { public: ShiftRightExpression(Expression *left, Expression *right); - int evaluate() { return myLHS->evaluate() >> myRHS->evaluate(); } + uInt16 evaluate() { return myLHS->evaluate() >> myRHS->evaluate(); } }; #endif diff --git a/stella/src/debugger/TiaMethodExpression.hxx b/stella/src/debugger/TiaMethodExpression.hxx index 9592f1c10..f393b0453 100644 --- a/stella/src/debugger/TiaMethodExpression.hxx +++ b/stella/src/debugger/TiaMethodExpression.hxx @@ -13,7 +13,7 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: TiaMethodExpression.hxx,v 1.1 2005-07-19 00:05:21 urchlay Exp $ +// $Id: TiaMethodExpression.hxx,v 1.2 2005-07-27 01:36:51 urchlay Exp $ //============================================================================ #ifndef TIAMETHOD_EXPRESSION_HXX @@ -21,17 +21,18 @@ //#include "Debugger.hxx" #include "TIADebug.hxx" +#include "bspf.hxx" #include "Expression.hxx" /** @author B. Watson - @version $Id: TiaMethodExpression.hxx,v 1.1 2005-07-19 00:05:21 urchlay Exp $ + @version $Id: TiaMethodExpression.hxx,v 1.2 2005-07-27 01:36:51 urchlay Exp $ */ class TiaMethodExpression : public Expression { public: TiaMethodExpression(TIADEBUG_INT_METHOD method); - int evaluate() { return CALL_TIADEBUG_METHOD(myMethod); } + uInt16 evaluate() { return CALL_TIADEBUG_METHOD(myMethod); } private: TIADEBUG_INT_METHOD myMethod; diff --git a/stella/src/debugger/UnaryMinusExpression.hxx b/stella/src/debugger/UnaryMinusExpression.hxx index 11997188c..0e07230b6 100644 --- a/stella/src/debugger/UnaryMinusExpression.hxx +++ b/stella/src/debugger/UnaryMinusExpression.hxx @@ -13,23 +13,24 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: UnaryMinusExpression.hxx,v 1.1 2005-07-13 04:49:18 urchlay Exp $ +// $Id: UnaryMinusExpression.hxx,v 1.2 2005-07-27 01:36:51 urchlay Exp $ //============================================================================ #ifndef UNARYMINUS_EXPRESSION_HXX #define UNARYMINUS_EXPRESSION_HXX +#include "bspf.hxx" #include "Expression.hxx" /** @author B. Watson - @version $Id: UnaryMinusExpression.hxx,v 1.1 2005-07-13 04:49:18 urchlay Exp $ + @version $Id: UnaryMinusExpression.hxx,v 1.2 2005-07-27 01:36:51 urchlay Exp $ */ class UnaryMinusExpression : public Expression { public: UnaryMinusExpression(Expression *left); - int evaluate() { return -(myLHS->evaluate()); } + uInt16 evaluate() { return -(myLHS->evaluate()); } }; #endif diff --git a/stella/src/debugger/WordDerefExpression.hxx b/stella/src/debugger/WordDerefExpression.hxx index a88f79f44..1bc9f7160 100644 --- a/stella/src/debugger/WordDerefExpression.hxx +++ b/stella/src/debugger/WordDerefExpression.hxx @@ -13,24 +13,25 @@ // See the file "license" for information on usage and redistribution of // this file, and for a DISCLAIMER OF ALL WARRANTIES. // -// $Id: WordDerefExpression.hxx,v 1.1 2005-07-15 01:20:11 urchlay Exp $ +// $Id: WordDerefExpression.hxx,v 1.2 2005-07-27 01:36:51 urchlay Exp $ //============================================================================ #ifndef WORDDEREF_EXPRESSION_HXX #define WORDDEREF_EXPRESSION_HXX #include "Debugger.hxx" +#include "bspf.hxx" #include "Expression.hxx" /** @author B. Watson - @version $Id: WordDerefExpression.hxx,v 1.1 2005-07-15 01:20:11 urchlay Exp $ + @version $Id: WordDerefExpression.hxx,v 1.2 2005-07-27 01:36:51 urchlay Exp $ */ class WordDerefExpression : public Expression { public: WordDerefExpression(Expression *left); - int evaluate() { return Debugger::debugger().dpeek(myLHS->evaluate()); } + uInt16 evaluate() { return Debugger::debugger().dpeek(myLHS->evaluate()); } }; #endif