-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathLoader.h
More file actions
23 lines (22 loc) · 778 Bytes
/
Loader.h
File metadata and controls
23 lines (22 loc) · 778 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
class Loader
{
private:
int32_t lastAddress; //last address stored to in memory
bool loaded; //set to true if .yo loaded into memory
//helper methods for checking to make sure the
//input file is properly formed and loading
//the input file
bool badFile(std::string);
int32_t convert(std::string, int32_t, int32_t);
void loadLine(std::string);
bool hasErrors(std::string);
bool hasAddress(std::string);
bool hasData(std::string);
bool hasComment(std::string);
bool errorAddr(std::string);
bool errorData(std::string, int32_t &);
bool isSpaces(std::string, int32_t, int32_t);
public:
Loader(int argc, char * argv[]);
bool isLoaded();
};