1 #ifndef AVR_SCRIPTABLEANALYZER_H
2 #define AVR_SCRIPTABLEANALYZER_H
5 #include "script/Scriptable.h"
10 class ScriptableAnalyzer
: public Analyzer
, public script::Scriptable
{
12 ScriptableAnalyzer(Core
*core
, ScriptEngine
*vm
, const char *scriptname
);
13 ~ScriptableAnalyzer();
16 virtual void reset(unsigned int type
);
17 virtual void step(dword address
, lword ticks
);
20 virtual void readRegister(int r
, byte val
) = 0;
21 virtual void writeRegister(int r
, byte val
) = 0;
22 virtual void readStatus(byte val
) = 0;
23 virtual void writeStatus(byte val
) = 0;
24 virtual void readIORegister(int r
, byte val
) = 0;
25 virtual void writeIORegister(int r
, byte val
) = 0;
26 virtual void readByte(unsigned int addr
, byte val
) = 0;
27 virtual void writeByte(unsigned int addr
, byte val
) = 0;
28 virtual void readFlash(unsigned int addr
, byte val
) = 0;
29 virtual void writeFlash(unsigned int addr
, word data
) = 0;
30 virtual void fetchOperand(word val
) = 0;
33 virtual void push(byte val
) = 0;
34 virtual void pop(byte val
) = 0;
35 virtual void jump(sbyte offset
, bool push
) = 0;
36 virtual void skip() = 0;
37 virtual void call(dword address
, bool push
) = 0;
38 virtual void ret(bool interrupt
) = 0;
41 virtual void sleep(unsigned int mode
) = 0;
42 virtual void interrupt(unsigned int vector
, unsigned int addr
) = 0;
45 void callHelper(const char *method
);
46 void callHelper(const char *method
, float x
);
47 void callHelperb(const char *method
, bool b
);
48 void callHelper(const char *method
, float x
, float y
);
49 void callHelperb(const char *method
, float x
, bool val
);
54 #endif /*AVR_SCRIPTABLEANALYZER_H*/