diff --git a/src/Assembler.c b/src/Assembler.c index c94a504..c1b391c 100644 --- a/src/Assembler.c +++ b/src/Assembler.c @@ -512,9 +512,9 @@ void AsNewSymb(int ID) { for(int i = 0; i < Symbols[ID].Length; i++) { switch(TypeSize) { - case 1: fprintf(OutputFile, "\t.byte\t0\n", Symbols[ID].Name); break; - case 4: fprintf(OutputFile, "\t.long\t0\n", Symbols[ID].Name); break; - case 8: fprintf(OutputFile, "\t.quad\t0\n", Symbols[ID].Name); break; + case 1: fprintf(OutputFile, "\t.byte\t0\r\n", Symbols[ID].Name); break; + case 4: fprintf(OutputFile, "\t.long\t0\r\n", Symbols[ID].Name); break; + case 8: fprintf(OutputFile, "\t.quad\t0\r\n", Symbols[ID].Name); break; default: DieDecimal("Unknown type in AsNewSymbol", TypeSize); break; } } diff --git a/src/Statements.c b/src/Statements.c index c229d88..54fd8c7 100644 --- a/src/Statements.c +++ b/src/Statements.c @@ -42,7 +42,7 @@ void BeginVariableDeclaration(int Type) { while(1) { //printf("Identifier: %s\n", CurrentIdentifier); printf("Adding symbol %s of type %s.\n", CurrentIdentifier, TypeNames[Type]); - ID = AddSymbol(CurrentIdentifier, Type, ST_VAR, TypeSizes[Type]); + ID = AddSymbol(CurrentIdentifier, Type, ST_VAR, 1); AsNewSymb(ID); if(CurrentToken.type == LI_SEMIC) {