Nettoyage fini

This commit is contained in:
Paul Faure 2021-05-18 15:05:29 +02:00
parent 5f88839a5b
commit 712e686699
5 changed files with 13 additions and 5 deletions

8
.gitignore vendored Normal file
View file

@ -0,0 +1,8 @@
Lex_Yacc/as.tab*
Lex_Yacc/as.dot
Lex_Yacc/as.output
Lex_Yacc/lex.yy.*
Tables/tables.o
rondoudou_cross_assembleur
Inputs/*
Outputs/*

View file

@ -2,7 +2,7 @@
int nombre;
}
%{
#include "tables.h"
#include "../Tables/tables.h"
#include <stdio.h>
FILE * file;
@ -153,6 +153,6 @@ int main(void) {
init();
yyparse();
write_asm(file);
write_code_machine_compact(file2);
write_code_machine(file2, 0);
return 0;
}

View file

@ -15,7 +15,7 @@ clean_Tables:
@rm -f Tables/*.o
clean_Lex_Yacc:
@rm -f Lex_Yacc/as.output Lex_Yacc/as.tab.* Lex_Yacc/lex.yy.*
@rm -f Lex_Yacc/as.output Lex_Yacc/as.tab.* Lex_Yacc/lex.yy.* Lex_Yacc/as.dot
clean_Inputs:
@rm -f Inputs/*

View file

@ -383,12 +383,12 @@ void write_code_machine(FILE * file, char compact) {
i--;
}
} else {
printf(file, "\"");
fprintf(file, "\"");
int i = MEM_INST_SIZE - 1;
while (i>=0) {
write_instruction_binary(file, buffer[i], 1);
i--;
}
printf(file, "\"\n");
fprintf(file, "\"\n");
}
}