-
Notifications
You must be signed in to change notification settings - Fork 0
/
miasm.h
34 lines (26 loc) · 860 Bytes
/
miasm.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
#include <string>
#include <vector>
using namespace std;
int toMachineCode(string line);
int getWords(string line, std::vector<std::string> & ret);
void loadLabels(vector<string> & ret, int words);
void fillMemory(vector<string> & ret, int words);
bool isLabel(string word);
bool isRegister(string word);
bool isArgument(string word);
bool isOperation(string word);
bool isSpecial(string word);
void performSpecialOp(int operation, string word);
bool addLabel(string word);
int getLabelValue(string word);
bool labelExists(string word);
int getAddressMode(string word);
int toHex(string number);
int getRegisterNumber(string word);
int getAdr(string word);
bool isHex(string number);
bool isNumeric(string word);
int evalExpr(string word);
void memoryDump();
void usage(string name);
void reportError(string message);