Updated the parser to better handle parameters, sort of and including a string length assembly program to use as a test for the whole assembler.

This commit is contained in:
2022-10-03 21:26:28 +00:00
parent 706f480e31
commit be91e3c112
5 changed files with 76 additions and 73 deletions
+2 -2
View File
@@ -14,7 +14,7 @@ const unsigned char ADDRESSMASK = 0x10; //0001 0000
int IsRegisterPattern(unsigned char pattern, char* lexeme);
void GetParameter(unsigned char instruction, char* text);
/*
void Disassemble(unsigned char image[HIGHMEMORY]) {
Image = image;
int position = image[0] + image[1];
@@ -117,7 +117,7 @@ void Disassemble(unsigned char image[HIGHMEMORY]) {
memset(parameter2, '\0', sizeof(char) * 32);
}
}
*/
int IsRegisterPattern(unsigned char pattern, char* lexeme) {
if (pattern > 8) {
lexeme[0] = '\0';