The main function will now write out the output of the parser.

This commit is contained in:
2022-08-29 21:23:02 +00:00
parent 6c7b8d5356
commit 3c7056c5e6
4 changed files with 22 additions and 34 deletions
-20
View File
@@ -32,8 +32,6 @@ int Expect(int, ...);
int ExpectTokenClass(int, ...);
const Symbol* GetSymbol(char*);
List* SymbolsTable;
void WriteMemory(unsigned char value, int location);
void WriteMemoryORMask(unsigned char mask, int location);
unsigned int HeapTop = 4;
unsigned int ProgramCounter = 0;
unsigned char Heap[HIGHMEMORY];
@@ -481,22 +479,4 @@ int ParserAtEnd(void) {
Token* PeekToken(void) {
return TokensList->content[CurrentToken];
}
void WriteMemory(unsigned char value, int location) {
if (location > HIGHMEMORY) {
fprintf(stderr, "[Error] Exceeded memmory size\n");
exit(1);
}
Memory[location] = value;
}
void WriteMemoryORMask(unsigned char mask, int location) {
if (location > HIGHMEMORY) {
fprintf(stderr, "[Error] Exceeded memmory size\n");
exit(1);
}
Memory[location] |= mask;
}