No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

tables.h 983B

1234567891011121314151617181920212223242526272829303132333435
  1. #ifndef TABLE_H
  2. #define TABLE_H
  3. /*
  4. ----------------------------------------
  5. | Adresse | Registre | Modifié |
  6. ----------------------------------------
  7. | | | |
  8. | | | |
  9. | | | |
  10. | i | 0x777756b8 | int |
  11. | size | 0x777756b8 | int |
  12. ----------------------------------------
  13. */
  14. #include <stdint.h>
  15. #include <stdio.h>
  16. enum instruction_t {NOP, ADD, MUL, SUB, DIV, CPY, AFC, LOAD, STORE};
  17. void init(void);
  18. void print();
  19. void increment_time();
  20. int get_reg_read(int adresse, int * added_instruction);
  21. int get_reg_write(int adresse, int * added_instruction);
  22. void unlink(int adresse);
  23. int flush_and_init();
  24. void new_instruction(int nb_inst);
  25. void write_asm(FILE * file);
  26. void write_code_machine(FILE * file);
  27. void add_instruction(enum instruction_t inst, int param1, int param2, int param3);
  28. #endif