-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprocessor.h
More file actions
51 lines (38 loc) · 965 Bytes
/
processor.h
File metadata and controls
51 lines (38 loc) · 965 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#ifndef PROCESSOR_H
#define PROCESSOR_H
#include "controller.h"
#include "alu.h"
class Processor : public QObject
{
Q_OBJECT
signals:
void setGuiProperty(const QString &name, const QVariant &data);
void printLine(const QString &line);
public:
Processor(QObject &appMgr);
/** runs the programm stored in the ram*/
void runProgram();
RAM* getRam();
void toggleAnimations(bool newState);
void reset();
void sendInput(sint value);
void requestTermination();
void cancelTermination();
private:
Controller* controller;
bool doAnimations;
bool continueAnim;
bool idle;
bool waitForInput;
bool sigTerm;
bool animationsPlaying;
sint inputValue;
ALU* alu;
void setCycleState(int state);
void setDecodedOpc(QString opc);
void setEffectiveAddress(QString addr);
public slots:
void stepAnimation();
void togglePlayState(bool newState);
};
#endif // PROCESSOR_H