mirror of https://github.com/stella-emu/stella.git
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
This commit is contained in:
parent
ce7e272547
commit
d65ab5c62b
|
@ -13,23 +13,24 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// 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
|
#ifndef BINAND_EXPRESSION_HXX
|
||||||
#define BINAND_EXPRESSION_HXX
|
#define BINAND_EXPRESSION_HXX
|
||||||
|
|
||||||
|
#include "bspf.hxx"
|
||||||
#include "Expression.hxx"
|
#include "Expression.hxx"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@author B. Watson
|
@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
|
class BinAndExpression : public Expression
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
BinAndExpression(Expression *left, Expression *right);
|
BinAndExpression(Expression *left, Expression *right);
|
||||||
int evaluate() { return myLHS->evaluate() & myRHS->evaluate(); }
|
uInt16 evaluate() { return myLHS->evaluate() & myRHS->evaluate(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -13,23 +13,24 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// 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
|
#ifndef BINNOT_EXPRESSION_HXX
|
||||||
#define BINNOT_EXPRESSION_HXX
|
#define BINNOT_EXPRESSION_HXX
|
||||||
|
|
||||||
|
#include "bspf.hxx"
|
||||||
#include "Expression.hxx"
|
#include "Expression.hxx"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@author B. Watson
|
@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
|
class BinNotExpression : public Expression
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
BinNotExpression(Expression *left);
|
BinNotExpression(Expression *left);
|
||||||
int evaluate() { return ~(myLHS->evaluate()); }
|
uInt16 evaluate() { return ~(myLHS->evaluate()); }
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -13,23 +13,24 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// 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
|
#ifndef BINOR_EXPRESSION_HXX
|
||||||
#define BINOR_EXPRESSION_HXX
|
#define BINOR_EXPRESSION_HXX
|
||||||
|
|
||||||
|
#include "bspf.hxx"
|
||||||
#include "Expression.hxx"
|
#include "Expression.hxx"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@author B. Watson
|
@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
|
class BinOrExpression : public Expression
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
BinOrExpression(Expression *left, Expression *right);
|
BinOrExpression(Expression *left, Expression *right);
|
||||||
int evaluate() { return myLHS->evaluate() | myRHS->evaluate(); }
|
uInt16 evaluate() { return myLHS->evaluate() | myRHS->evaluate(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -13,23 +13,24 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// 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
|
#ifndef BINXOR_EXPRESSION_HXX
|
||||||
#define BINXOR_EXPRESSION_HXX
|
#define BINXOR_EXPRESSION_HXX
|
||||||
|
|
||||||
|
#include "bspf.hxx"
|
||||||
#include "Expression.hxx"
|
#include "Expression.hxx"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@author B. Watson
|
@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
|
class BinXorExpression : public Expression
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
BinXorExpression(Expression *left, Expression *right);
|
BinXorExpression(Expression *left, Expression *right);
|
||||||
int evaluate() { return myLHS->evaluate() ^ myRHS->evaluate(); }
|
uInt16 evaluate() { return myLHS->evaluate() ^ myRHS->evaluate(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -13,24 +13,25 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// 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
|
#ifndef BYTEDEREF_EXPRESSION_HXX
|
||||||
#define BYTEDEREF_EXPRESSION_HXX
|
#define BYTEDEREF_EXPRESSION_HXX
|
||||||
|
|
||||||
#include "Debugger.hxx"
|
#include "Debugger.hxx"
|
||||||
|
#include "bspf.hxx"
|
||||||
#include "Expression.hxx"
|
#include "Expression.hxx"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@author B. Watson
|
@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
|
class ByteDerefExpression : public Expression
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ByteDerefExpression(Expression *left);
|
ByteDerefExpression(Expression *left);
|
||||||
int evaluate() { return Debugger::debugger().peek(myLHS->evaluate()); }
|
uInt16 evaluate() { return Debugger::debugger().peek(myLHS->evaluate()); }
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -13,24 +13,25 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// 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
|
#ifndef BYTEDEREFOFFSET_EXPRESSION_HXX
|
||||||
#define BYTEDEREFOFFSET_EXPRESSION_HXX
|
#define BYTEDEREFOFFSET_EXPRESSION_HXX
|
||||||
|
|
||||||
#include "Debugger.hxx"
|
#include "Debugger.hxx"
|
||||||
|
#include "bspf.hxx"
|
||||||
#include "Expression.hxx"
|
#include "Expression.hxx"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@author B. Watson
|
@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
|
class ByteDerefOffsetExpression : public Expression
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ByteDerefOffsetExpression(Expression *left, Expression *right);
|
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
|
#endif
|
||||||
|
|
|
@ -13,12 +13,13 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// 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
|
#ifndef CONST_EXPRESSION_HXX
|
||||||
#define CONST_EXPRESSION_HXX
|
#define CONST_EXPRESSION_HXX
|
||||||
|
|
||||||
|
#include "bspf.hxx"
|
||||||
#include "Expression.hxx"
|
#include "Expression.hxx"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -26,13 +27,13 @@
|
||||||
that is, one that consists solely of a constant integer value.
|
that is, one that consists solely of a constant integer value.
|
||||||
|
|
||||||
@author Stephen Anthony
|
@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
|
class ConstExpression : public Expression
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ConstExpression(const int value);
|
ConstExpression(const int value);
|
||||||
int evaluate() { return myValue; }
|
uInt16 evaluate() { return myValue; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int myValue;
|
int myValue;
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// 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
|
#ifndef CPUMETHOD_EXPRESSION_HXX
|
||||||
|
@ -21,17 +21,18 @@
|
||||||
|
|
||||||
//#include "Debugger.hxx"
|
//#include "Debugger.hxx"
|
||||||
#include "CpuDebug.hxx"
|
#include "CpuDebug.hxx"
|
||||||
|
#include "bspf.hxx"
|
||||||
#include "Expression.hxx"
|
#include "Expression.hxx"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@author B. Watson
|
@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
|
class CpuMethodExpression : public Expression
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
CpuMethodExpression(CPUDEBUG_INT_METHOD method);
|
CpuMethodExpression(CPUDEBUG_INT_METHOD method);
|
||||||
int evaluate() { return CALL_CPUDEBUG_METHOD(myMethod); }
|
uInt16 evaluate() { return CALL_CPUDEBUG_METHOD(myMethod); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
CPUDEBUG_INT_METHOD myMethod;
|
CPUDEBUG_INT_METHOD myMethod;
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// 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"
|
#include "bspf.hxx"
|
||||||
|
@ -33,7 +33,7 @@ Command DebuggerParser::commands[] = {
|
||||||
"a",
|
"a",
|
||||||
"Set Accumulator to value xx",
|
"Set Accumulator to value xx",
|
||||||
true,
|
true,
|
||||||
{ kARG_BYTE, kARG_END_ARGS },
|
{ kARG_WORD, kARG_END_ARGS },
|
||||||
&DebuggerParser::executeA
|
&DebuggerParser::executeA
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -105,7 +105,7 @@ Command DebuggerParser::commands[] = {
|
||||||
"colortest",
|
"colortest",
|
||||||
"Color Test",
|
"Color Test",
|
||||||
true,
|
true,
|
||||||
{ kARG_BYTE, kARG_END_ARGS },
|
{ kARG_WORD, kARG_END_ARGS },
|
||||||
&DebuggerParser::executeColortest
|
&DebuggerParser::executeColortest
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -233,7 +233,7 @@ Command DebuggerParser::commands[] = {
|
||||||
"loadstate",
|
"loadstate",
|
||||||
"Load emulator state (0-9)",
|
"Load emulator state (0-9)",
|
||||||
true,
|
true,
|
||||||
{ kARG_BYTE, kARG_END_ARGS },
|
{ kARG_WORD, kARG_END_ARGS },
|
||||||
&DebuggerParser::executeLoadstate
|
&DebuggerParser::executeLoadstate
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -345,7 +345,7 @@ Command DebuggerParser::commands[] = {
|
||||||
"s",
|
"s",
|
||||||
"Set Stack Pointer to value xx",
|
"Set Stack Pointer to value xx",
|
||||||
true,
|
true,
|
||||||
{ kARG_BYTE, kARG_END_ARGS },
|
{ kARG_WORD, kARG_END_ARGS },
|
||||||
&DebuggerParser::executeS
|
&DebuggerParser::executeS
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -369,7 +369,7 @@ Command DebuggerParser::commands[] = {
|
||||||
"savestate",
|
"savestate",
|
||||||
"Save emulator state (valid args 0-9)",
|
"Save emulator state (valid args 0-9)",
|
||||||
true,
|
true,
|
||||||
{ kARG_BYTE, kARG_END_ARGS },
|
{ kARG_WORD, kARG_END_ARGS },
|
||||||
&DebuggerParser::executeSavestate
|
&DebuggerParser::executeSavestate
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -465,7 +465,7 @@ Command DebuggerParser::commands[] = {
|
||||||
"x",
|
"x",
|
||||||
"Set X Register to value xx",
|
"Set X Register to value xx",
|
||||||
true,
|
true,
|
||||||
{ kARG_BYTE, kARG_END_ARGS },
|
{ kARG_WORD, kARG_END_ARGS },
|
||||||
&DebuggerParser::executeX
|
&DebuggerParser::executeX
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -473,7 +473,7 @@ Command DebuggerParser::commands[] = {
|
||||||
"y",
|
"y",
|
||||||
"Set Y Register to value xx",
|
"Set Y Register to value xx",
|
||||||
true,
|
true,
|
||||||
{ kARG_BYTE, kARG_END_ARGS },
|
{ kARG_WORD, kARG_END_ARGS },
|
||||||
&DebuggerParser::executeY
|
&DebuggerParser::executeY
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -1178,7 +1178,7 @@ bool DebuggerParser::saveScriptFile(string file) {
|
||||||
|
|
||||||
// "a"
|
// "a"
|
||||||
void DebuggerParser::executeA() {
|
void DebuggerParser::executeA() {
|
||||||
debugger->cpuDebug().setA(args[0]);
|
debugger->cpuDebug().setA((uInt8)args[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// "bank"
|
// "bank"
|
||||||
|
@ -1517,7 +1517,7 @@ void DebuggerParser::executeRunTo() {
|
||||||
|
|
||||||
// "s"
|
// "s"
|
||||||
void DebuggerParser::executeS() {
|
void DebuggerParser::executeS() {
|
||||||
debugger->cpuDebug().setSP(args[0]);
|
debugger->cpuDebug().setSP((uInt8)args[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// "save"
|
// "save"
|
||||||
|
@ -1630,12 +1630,12 @@ void DebuggerParser::executeWatch() {
|
||||||
|
|
||||||
// "x"
|
// "x"
|
||||||
void DebuggerParser::executeX() {
|
void DebuggerParser::executeX() {
|
||||||
debugger->cpuDebug().setX(args[0]);
|
debugger->cpuDebug().setX((uInt8)args[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// "y"
|
// "y"
|
||||||
void DebuggerParser::executeY() {
|
void DebuggerParser::executeY() {
|
||||||
debugger->cpuDebug().setY(args[0]);
|
debugger->cpuDebug().setY((uInt8)args[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
// "z"
|
// "z"
|
||||||
|
|
|
@ -13,23 +13,24 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// 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
|
#ifndef DIV_EXPRESSION_HXX
|
||||||
#define DIV_EXPRESSION_HXX
|
#define DIV_EXPRESSION_HXX
|
||||||
|
|
||||||
|
#include "bspf.hxx"
|
||||||
#include "Expression.hxx"
|
#include "Expression.hxx"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@author B. Watson
|
@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
|
class DivExpression : public Expression
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
DivExpression(Expression *left, Expression *right);
|
DivExpression(Expression *left, Expression *right);
|
||||||
int evaluate() { int denom = myRHS->evaluate();
|
uInt16 evaluate() { int denom = myRHS->evaluate();
|
||||||
return denom == 0 ? 0 : myLHS->evaluate() / denom;
|
return denom == 0 ? 0 : myLHS->evaluate() / denom;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -13,23 +13,24 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// 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
|
#ifndef EQUALS_EXPRESSION_HXX
|
||||||
#define EQUALS_EXPRESSION_HXX
|
#define EQUALS_EXPRESSION_HXX
|
||||||
|
|
||||||
|
#include "bspf.hxx"
|
||||||
#include "Expression.hxx"
|
#include "Expression.hxx"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@author B. Watson
|
@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
|
class EqualsExpression : public Expression
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
EqualsExpression(Expression *left, Expression *right);
|
EqualsExpression(Expression *left, Expression *right);
|
||||||
int evaluate() { return myLHS->evaluate() == myRHS->evaluate(); }
|
uInt16 evaluate() { return myLHS->evaluate() == myRHS->evaluate(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -13,12 +13,13 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// 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
|
#ifndef EQUATE_EXPRESSION_HXX
|
||||||
#define EQUATE_EXPRESSION_HXX
|
#define EQUATE_EXPRESSION_HXX
|
||||||
|
|
||||||
|
#include "bspf.hxx"
|
||||||
#include "Expression.hxx"
|
#include "Expression.hxx"
|
||||||
#include "Debugger.hxx"
|
#include "Debugger.hxx"
|
||||||
|
|
||||||
|
@ -26,13 +27,13 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@author Stephen Anthony
|
@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
|
class EquateExpression : public Expression
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
EquateExpression(const string& label);
|
EquateExpression(const string& label);
|
||||||
int evaluate() { return Debugger::debugger().equates()->getAddress(myLabel); }
|
uInt16 evaluate() { return Debugger::debugger().equates()->getAddress(myLabel); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
string myLabel;
|
string myLabel;
|
||||||
|
|
|
@ -13,12 +13,14 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// 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
|
#ifndef EXPRESSION_HXX
|
||||||
#define EXPRESSION_HXX
|
#define EXPRESSION_HXX
|
||||||
|
|
||||||
|
#include "bspf.hxx"
|
||||||
|
|
||||||
// define this to count Expression instances. Only useful for debugging
|
// define this to count Expression instances. Only useful for debugging
|
||||||
// Stella itself.
|
// Stella itself.
|
||||||
//#define EXPR_REF_COUNT
|
//#define EXPR_REF_COUNT
|
||||||
|
@ -30,7 +32,7 @@
|
||||||
can represent complex expression statements.
|
can represent complex expression statements.
|
||||||
|
|
||||||
@author Stephen Anthony
|
@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
|
class Expression
|
||||||
{
|
{
|
||||||
|
@ -38,7 +40,7 @@ class Expression
|
||||||
Expression(Expression* lhs, Expression* rhs);
|
Expression(Expression* lhs, Expression* rhs);
|
||||||
virtual ~Expression();
|
virtual ~Expression();
|
||||||
|
|
||||||
virtual int evaluate() = 0;
|
virtual uInt16 evaluate() = 0;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Expression* myLHS;
|
Expression* myLHS;
|
||||||
|
|
|
@ -13,12 +13,13 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// 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
|
#ifndef FUNCTION_EXPRESSION_HXX
|
||||||
#define FUNCTION_EXPRESSION_HXX
|
#define FUNCTION_EXPRESSION_HXX
|
||||||
|
|
||||||
|
#include "bspf.hxx"
|
||||||
#include "Expression.hxx"
|
#include "Expression.hxx"
|
||||||
#include "Debugger.hxx"
|
#include "Debugger.hxx"
|
||||||
|
|
||||||
|
@ -26,13 +27,13 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@author Stephen Anthony
|
@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
|
class FunctionExpression : public Expression
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
FunctionExpression(const string& label);
|
FunctionExpression(const string& label);
|
||||||
int evaluate() {
|
uInt16 evaluate() {
|
||||||
Expression *exp = Debugger::debugger().getFunction(myLabel);
|
Expression *exp = Debugger::debugger().getFunction(myLabel);
|
||||||
if(exp)
|
if(exp)
|
||||||
return exp->evaluate();
|
return exp->evaluate();
|
||||||
|
|
|
@ -13,23 +13,24 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// 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
|
#ifndef GREATEREQUALS_EXPRESSION_HXX
|
||||||
#define GREATEREQUALS_EXPRESSION_HXX
|
#define GREATEREQUALS_EXPRESSION_HXX
|
||||||
|
|
||||||
|
#include "bspf.hxx"
|
||||||
#include "Expression.hxx"
|
#include "Expression.hxx"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@author B. Watson
|
@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
|
class GreaterEqualsExpression : public Expression
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
GreaterEqualsExpression(Expression *left, Expression *right);
|
GreaterEqualsExpression(Expression *left, Expression *right);
|
||||||
int evaluate() { return myLHS->evaluate() >= myRHS->evaluate(); }
|
uInt16 evaluate() { return myLHS->evaluate() >= myRHS->evaluate(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -13,23 +13,24 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// 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
|
#ifndef GREATER_EXPRESSION_HXX
|
||||||
#define GREATER_EXPRESSION_HXX
|
#define GREATER_EXPRESSION_HXX
|
||||||
|
|
||||||
|
#include "bspf.hxx"
|
||||||
#include "Expression.hxx"
|
#include "Expression.hxx"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@author B. Watson
|
@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
|
class GreaterExpression : public Expression
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
GreaterExpression(Expression *left, Expression *right);
|
GreaterExpression(Expression *left, Expression *right);
|
||||||
int evaluate() { return myLHS->evaluate() > myRHS->evaluate(); }
|
uInt16 evaluate() { return myLHS->evaluate() > myRHS->evaluate(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -13,23 +13,24 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// 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
|
#ifndef HIBYTE_EXPRESSION_HXX
|
||||||
#define HIBYTE_EXPRESSION_HXX
|
#define HIBYTE_EXPRESSION_HXX
|
||||||
|
|
||||||
|
#include "bspf.hxx"
|
||||||
#include "Expression.hxx"
|
#include "Expression.hxx"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@author B. Watson
|
@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
|
class HiByteExpression : public Expression
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
HiByteExpression(Expression *left);
|
HiByteExpression(Expression *left);
|
||||||
int evaluate() { return 0xff & (myLHS->evaluate() >> 8); }
|
uInt16 evaluate() { return 0xff & (myLHS->evaluate() >> 8); }
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -13,23 +13,24 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// 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
|
#ifndef LESSEQUALS_EXPRESSION_HXX
|
||||||
#define LESSEQUALS_EXPRESSION_HXX
|
#define LESSEQUALS_EXPRESSION_HXX
|
||||||
|
|
||||||
|
#include "bspf.hxx"
|
||||||
#include "Expression.hxx"
|
#include "Expression.hxx"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@author B. Watson
|
@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
|
class LessEqualsExpression : public Expression
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
LessEqualsExpression(Expression *left, Expression *right);
|
LessEqualsExpression(Expression *left, Expression *right);
|
||||||
int evaluate() { return myLHS->evaluate() <= myRHS->evaluate(); }
|
uInt16 evaluate() { return myLHS->evaluate() <= myRHS->evaluate(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -13,23 +13,24 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// 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
|
#ifndef LESS_EXPRESSION_HXX
|
||||||
#define LESS_EXPRESSION_HXX
|
#define LESS_EXPRESSION_HXX
|
||||||
|
|
||||||
|
#include "bspf.hxx"
|
||||||
#include "Expression.hxx"
|
#include "Expression.hxx"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@author B. Watson
|
@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
|
class LessExpression : public Expression
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
LessExpression(Expression *left, Expression *right);
|
LessExpression(Expression *left, Expression *right);
|
||||||
int evaluate() { return myLHS->evaluate() < myRHS->evaluate(); }
|
uInt16 evaluate() { return myLHS->evaluate() < myRHS->evaluate(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -13,23 +13,24 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// 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
|
#ifndef LOBYTE_EXPRESSION_HXX
|
||||||
#define LOBYTE_EXPRESSION_HXX
|
#define LOBYTE_EXPRESSION_HXX
|
||||||
|
|
||||||
|
#include "bspf.hxx"
|
||||||
#include "Expression.hxx"
|
#include "Expression.hxx"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@author B. Watson
|
@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
|
class LoByteExpression : public Expression
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
LoByteExpression(Expression *left);
|
LoByteExpression(Expression *left);
|
||||||
int evaluate() { return 0xff & myLHS->evaluate(); }
|
uInt16 evaluate() { return 0xff & myLHS->evaluate(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -13,23 +13,24 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// 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
|
#ifndef LOGAND_EXPRESSION_HXX
|
||||||
#define LOGAND_EXPRESSION_HXX
|
#define LOGAND_EXPRESSION_HXX
|
||||||
|
|
||||||
|
#include "bspf.hxx"
|
||||||
#include "Expression.hxx"
|
#include "Expression.hxx"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@author B. Watson
|
@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
|
class LogAndExpression : public Expression
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
LogAndExpression(Expression *left, Expression *right);
|
LogAndExpression(Expression *left, Expression *right);
|
||||||
int evaluate() { return myLHS->evaluate() && myRHS->evaluate(); }
|
uInt16 evaluate() { return myLHS->evaluate() && myRHS->evaluate(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -13,23 +13,24 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// 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
|
#ifndef LOGNOT_EXPRESSION_HXX
|
||||||
#define LOGNOT_EXPRESSION_HXX
|
#define LOGNOT_EXPRESSION_HXX
|
||||||
|
|
||||||
|
#include "bspf.hxx"
|
||||||
#include "Expression.hxx"
|
#include "Expression.hxx"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@author B. Watson
|
@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
|
class LogNotExpression : public Expression
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
LogNotExpression(Expression *left);
|
LogNotExpression(Expression *left);
|
||||||
int evaluate() { return !(myLHS->evaluate()); }
|
uInt16 evaluate() { return !(myLHS->evaluate()); }
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -13,23 +13,24 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// 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
|
#ifndef LOGOR_EXPRESSION_HXX
|
||||||
#define LOGOR_EXPRESSION_HXX
|
#define LOGOR_EXPRESSION_HXX
|
||||||
|
|
||||||
|
#include "bspf.hxx"
|
||||||
#include "Expression.hxx"
|
#include "Expression.hxx"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@author B. Watson
|
@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
|
class LogOrExpression : public Expression
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
LogOrExpression(Expression *left, Expression *right);
|
LogOrExpression(Expression *left, Expression *right);
|
||||||
int evaluate() { return myLHS->evaluate() || myRHS->evaluate(); }
|
uInt16 evaluate() { return myLHS->evaluate() || myRHS->evaluate(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -13,23 +13,24 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// 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
|
#ifndef MINUS_EXPRESSION_HXX
|
||||||
#define MINUS_EXPRESSION_HXX
|
#define MINUS_EXPRESSION_HXX
|
||||||
|
|
||||||
|
#include "bspf.hxx"
|
||||||
#include "Expression.hxx"
|
#include "Expression.hxx"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@author B. Watson
|
@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
|
class MinusExpression : public Expression
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MinusExpression(Expression *left, Expression *right);
|
MinusExpression(Expression *left, Expression *right);
|
||||||
int evaluate() { return myLHS->evaluate() - myRHS->evaluate(); }
|
uInt16 evaluate() { return myLHS->evaluate() - myRHS->evaluate(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -13,23 +13,24 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// 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
|
#ifndef MOD_EXPRESSION_HXX
|
||||||
#define MOD_EXPRESSION_HXX
|
#define MOD_EXPRESSION_HXX
|
||||||
|
|
||||||
|
#include "bspf.hxx"
|
||||||
#include "Expression.hxx"
|
#include "Expression.hxx"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@author B. Watson
|
@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
|
class ModExpression : public Expression
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ModExpression(Expression *left, Expression *right);
|
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
|
#endif
|
||||||
|
|
|
@ -13,23 +13,24 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// 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
|
#ifndef MULT_EXPRESSION_HXX
|
||||||
#define MULT_EXPRESSION_HXX
|
#define MULT_EXPRESSION_HXX
|
||||||
|
|
||||||
|
#include "bspf.hxx"
|
||||||
#include "Expression.hxx"
|
#include "Expression.hxx"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@author B. Watson
|
@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
|
class MultExpression : public Expression
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MultExpression(Expression *left, Expression *right);
|
MultExpression(Expression *left, Expression *right);
|
||||||
int evaluate() { return myLHS->evaluate() * myRHS->evaluate(); }
|
uInt16 evaluate() { return myLHS->evaluate() * myRHS->evaluate(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -13,23 +13,24 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// 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
|
#ifndef NOTEQUALS_EXPRESSION_HXX
|
||||||
#define NOTEQUALS_EXPRESSION_HXX
|
#define NOTEQUALS_EXPRESSION_HXX
|
||||||
|
|
||||||
|
#include "bspf.hxx"
|
||||||
#include "Expression.hxx"
|
#include "Expression.hxx"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@author B. Watson
|
@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
|
class NotEqualsExpression : public Expression
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NotEqualsExpression(Expression *left, Expression *right);
|
NotEqualsExpression(Expression *left, Expression *right);
|
||||||
int evaluate() { return myLHS->evaluate() != myRHS->evaluate(); }
|
uInt16 evaluate() { return myLHS->evaluate() != myRHS->evaluate(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -13,23 +13,24 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// 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
|
#ifndef PLUS_EXPRESSION_HXX
|
||||||
#define PLUS_EXPRESSION_HXX
|
#define PLUS_EXPRESSION_HXX
|
||||||
|
|
||||||
|
#include "bspf.hxx"
|
||||||
#include "Expression.hxx"
|
#include "Expression.hxx"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@author B. Watson
|
@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
|
class PlusExpression : public Expression
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
PlusExpression(Expression *left, Expression *right);
|
PlusExpression(Expression *left, Expression *right);
|
||||||
int evaluate() { return myLHS->evaluate() + myRHS->evaluate(); }
|
uInt16 evaluate() { return myLHS->evaluate() + myRHS->evaluate(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -13,23 +13,24 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// 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
|
#ifndef SHIFTLEFT_EXPRESSION_HXX
|
||||||
#define SHIFTLEFT_EXPRESSION_HXX
|
#define SHIFTLEFT_EXPRESSION_HXX
|
||||||
|
|
||||||
|
#include "bspf.hxx"
|
||||||
#include "Expression.hxx"
|
#include "Expression.hxx"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@author B. Watson
|
@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
|
class ShiftLeftExpression : public Expression
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ShiftLeftExpression(Expression *left, Expression *right);
|
ShiftLeftExpression(Expression *left, Expression *right);
|
||||||
int evaluate() { return myLHS->evaluate() << myRHS->evaluate(); }
|
uInt16 evaluate() { return myLHS->evaluate() << myRHS->evaluate(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -13,23 +13,24 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// 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
|
#ifndef SHIFTRIGHT_EXPRESSION_HXX
|
||||||
#define SHIFTRIGHT_EXPRESSION_HXX
|
#define SHIFTRIGHT_EXPRESSION_HXX
|
||||||
|
|
||||||
|
#include "bspf.hxx"
|
||||||
#include "Expression.hxx"
|
#include "Expression.hxx"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@author B. Watson
|
@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
|
class ShiftRightExpression : public Expression
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ShiftRightExpression(Expression *left, Expression *right);
|
ShiftRightExpression(Expression *left, Expression *right);
|
||||||
int evaluate() { return myLHS->evaluate() >> myRHS->evaluate(); }
|
uInt16 evaluate() { return myLHS->evaluate() >> myRHS->evaluate(); }
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// 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
|
#ifndef TIAMETHOD_EXPRESSION_HXX
|
||||||
|
@ -21,17 +21,18 @@
|
||||||
|
|
||||||
//#include "Debugger.hxx"
|
//#include "Debugger.hxx"
|
||||||
#include "TIADebug.hxx"
|
#include "TIADebug.hxx"
|
||||||
|
#include "bspf.hxx"
|
||||||
#include "Expression.hxx"
|
#include "Expression.hxx"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@author B. Watson
|
@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
|
class TiaMethodExpression : public Expression
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
TiaMethodExpression(TIADEBUG_INT_METHOD method);
|
TiaMethodExpression(TIADEBUG_INT_METHOD method);
|
||||||
int evaluate() { return CALL_TIADEBUG_METHOD(myMethod); }
|
uInt16 evaluate() { return CALL_TIADEBUG_METHOD(myMethod); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
TIADEBUG_INT_METHOD myMethod;
|
TIADEBUG_INT_METHOD myMethod;
|
||||||
|
|
|
@ -13,23 +13,24 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// 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
|
#ifndef UNARYMINUS_EXPRESSION_HXX
|
||||||
#define UNARYMINUS_EXPRESSION_HXX
|
#define UNARYMINUS_EXPRESSION_HXX
|
||||||
|
|
||||||
|
#include "bspf.hxx"
|
||||||
#include "Expression.hxx"
|
#include "Expression.hxx"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@author B. Watson
|
@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
|
class UnaryMinusExpression : public Expression
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
UnaryMinusExpression(Expression *left);
|
UnaryMinusExpression(Expression *left);
|
||||||
int evaluate() { return -(myLHS->evaluate()); }
|
uInt16 evaluate() { return -(myLHS->evaluate()); }
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -13,24 +13,25 @@
|
||||||
// See the file "license" for information on usage and redistribution of
|
// See the file "license" for information on usage and redistribution of
|
||||||
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
|
// 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
|
#ifndef WORDDEREF_EXPRESSION_HXX
|
||||||
#define WORDDEREF_EXPRESSION_HXX
|
#define WORDDEREF_EXPRESSION_HXX
|
||||||
|
|
||||||
#include "Debugger.hxx"
|
#include "Debugger.hxx"
|
||||||
|
#include "bspf.hxx"
|
||||||
#include "Expression.hxx"
|
#include "Expression.hxx"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@author B. Watson
|
@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
|
class WordDerefExpression : public Expression
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
WordDerefExpression(Expression *left);
|
WordDerefExpression(Expression *left);
|
||||||
int evaluate() { return Debugger::debugger().dpeek(myLHS->evaluate()); }
|
uInt16 evaluate() { return Debugger::debugger().dpeek(myLHS->evaluate()); }
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue