stuff
This commit is contained in:
parent
59da44580a
commit
3173bc21a1
@ -55,6 +55,7 @@ void debug_token_dump(void) {
|
||||
# define debug_puts(msg)
|
||||
# define debug_printf(...)
|
||||
# define debug_dump_variables() do {} while (0)
|
||||
# define debug_token_dump() do {} while (0)
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -158,7 +158,6 @@ void free_variable(void * data) {
|
||||
}
|
||||
|
||||
int eaxhla_destroy(void) {
|
||||
debug_dump_variables();
|
||||
tommy_hashtable_foreach(&variable_table, free_variable);
|
||||
tommy_hashtable_done(&variable_table);
|
||||
return 0;
|
||||
@ -210,8 +209,11 @@ void dump_variable_to_assembler(void * data) {
|
||||
if (variable->elements == 1) {
|
||||
append_instruction_t1(variable->value);
|
||||
} else {
|
||||
memcpy(t_array + t_count, variable->array_value, variable->elements);
|
||||
t_count += variable->elements;
|
||||
for (unsigned long long i = 0; i < variable->elements; i++) {
|
||||
debug_printf("'%d'\n", (int)*(char*)(variable->array_value + i));
|
||||
append_instruction_t1((int)*(char*)(variable->array_value + i));
|
||||
}
|
||||
//memcpy(t_array + t_count, variable->array_value, variable->elements);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -85,8 +85,10 @@ void dump (const char * file_name) {
|
||||
fwrite (text_sector_byte, sizeof (* text_sector_byte),
|
||||
(size_t) text_sector_size, file);
|
||||
|
||||
/*
|
||||
// data
|
||||
fwrite ("heyo world!\n", 1UL, 12UL, file);
|
||||
*/
|
||||
|
||||
snprintf (meme, 1023UL, "chmod +x %s", file_name);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user