diff --git a/ps5/src/generator.c b/ps5/src/generator.c index 5989a19..60ba893 100644 --- a/ps5/src/generator.c +++ b/ps5/src/generator.c @@ -55,6 +55,9 @@ static void generate_stringtable(void) // TODO (Task 1): Print all strings in the program here, with labels you can refer to later // You have access to the global variables string_list and string_list_len from symbols.c + for (int i = 0; i < string_list_len; i++) { + DIRECTIVE("string%d:\t.asciz \"%s\"", i, string_list[i]); + } } // Prints .zero entries in the .bss section to allocate room for global variables and arrays