-
Notifications
You must be signed in to change notification settings - Fork 0
/
methods.h
58 lines (53 loc) · 1.24 KB
/
methods.h
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
52
53
54
55
56
57
58
#ifndef _METHODS_H
#define _METHODS_H
#include <string>
#include "headers.h"
using namespace std;
struct elements {
string pc;
string start;
string registers[7];
map<string, string> memory;
int flags[8];
vector<string> breakPoints;
};
int execute(elements *);
bool validAddress(string);
bool validInst(string);
int jmp(struct elements *);
int jc(struct elements *);
int jnc(struct elements *);
int jz(struct elements * );
int jnz(struct elements *);
int lhld(struct elements *);
int lxi(struct elements *);
int mov(struct elements *);
int mvi(struct elements *);
int sett(struct elements *);
int shld(struct elements *);
int sta(struct elements *);
int xchg(struct elements *);
int lda(struct elements *);
void display(elements *);
int adiSui(elements *);
int addSub(elements *);
int dad(elements *);
int inrDcr(elements *);
int inxDcx(elements *);
int cma(elements *);
int cmp(elements *);
int debug(elements *);
bool* ToBin(string);
string ToHex(bool*);
int convert2int(char);
char convert2char(int);
string addPc(string ,string);
int instSize(string);
bool val16(string);
int updatePc(elements *);
bool val8(string);
bool threeByte(vector<string>);
bool twoByte(vector<string> );
bool oneByte(vector<string> );
int instByteSize(string );
#endif