1
//============================================================================
5
// SS tttttt eeee ll ll aaaa
6
// SSSS tt ee ee ll ll aa
7
// SS tt eeeeee ll ll aaaaa -- "An Atari 2600 VCS Emulator"
8
// SS SS tt ee ll ll aa aa
9
// SSSS ttt eeeee llll llll aaaaa
11
// Copyright (c) 1995-2005 by Bradford W. Mott and the Stella team
13
// See the file "license" for information on usage and redistribution of
14
// this file, and for a DISCLAIMER OF ALL WARRANTIES.
16
// $Id: ModExpression.hxx,v 1.3 2005/09/15 19:43:36 stephena Exp $
17
//============================================================================
19
#ifndef MOD_EXPRESSION_HXX
20
#define MOD_EXPRESSION_HXX
23
#include "Expression.hxx"
27
@version $Id: ModExpression.hxx,v 1.3 2005/09/15 19:43:36 stephena Exp $
29
class ModExpression : public Expression
32
ModExpression(Expression *left, Expression *right);
33
uInt16 evaluate() { int rhs = myRHS->evaluate();
34
return rhs == 0 ? 0 : myLHS->evaluate() % rhs;