Fixed a bug where CMP REG, REG wouldn't get encoded and a disassembler bug related to said CMP bug.
This commit is contained in:
+10
-10
@@ -21,19 +21,19 @@ int main(int argc, char* args[]) {
|
||||
|
||||
List* list = GenerateTokenList(source_code);
|
||||
|
||||
// for(int i = 0; i < list->size; i++) {
|
||||
// Token* t = (Token*) list->content[i];
|
||||
for(int i = 0; i < list->size; i++) {
|
||||
Token* t = (Token*) list->content[i];
|
||||
|
||||
// if (t->type == LineEnd) {
|
||||
// if (i - 1 >= 0 && ((Token*) list->content[i - 1])->type != LineEnd)
|
||||
// printf("\n");
|
||||
if (t->type == LineEnd) {
|
||||
if (i - 1 >= 0 && ((Token*) list->content[i - 1])->type != LineEnd)
|
||||
printf("\n");
|
||||
|
||||
// continue;
|
||||
// }
|
||||
continue;
|
||||
}
|
||||
|
||||
// printf("[%i] '%s' [%i] ", t->type, t->lexeme, t->token_class);
|
||||
// if (t->type == LABEL) printf("* ");
|
||||
// }
|
||||
printf("[T: %i][C: %i] '%s' ", t->type, t->token_class, t->lexeme);
|
||||
if (t->type == LABEL) printf("* ");
|
||||
}
|
||||
|
||||
unsigned char* image = ParseTokens(list);
|
||||
Disassemble(image);
|
||||
|
||||
Reference in New Issue
Block a user