-/* program header */
-prog_header code_header;
-void code_write() {
-
- #if 0
- /* Add test program */
- code_strings_add('\0');
-
- const char *X;
- size_t size = sizeof(X);
- size_t iter = 0;
+void code_init() {
+ /*
+ * The way progs.dat is suppose to work is odd, there needs to be
+ * some null (empty) statements, functions, and 28 globals
+ */
+ prog_section_function empty_function = {0,0,0,0,0,0,0,{0}};
+ prog_section_statement empty_statement = {0,{0},{0},{0}};
+ int i;
+ for(i = 0; i < 28; i++)
+ code_globals_add(0);
+
+ code_strings_add ('\0');
+ code_functions_add (empty_function);
+ code_statements_add(empty_statement);
+}
+
+void code_test() {
+ const char *X;
+ size_t size = sizeof(X);
+ size_t iter = 0;