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

View file

@ -15,7 +15,7 @@ clean_Tables:
@rm -f Tables/*.o @rm -f Tables/*.o
clean_Lex_Yacc: 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: clean_Inputs:
@rm -f Inputs/* @rm -f Inputs/*

View file

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