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.

tab_instruc.h 580B

1234567891011121314151617181920212223
  1. #define MAXTAILLE 1024
  2. #include <stdlib.h>
  3. #include <string.h>
  4. #include <stdio.h>
  5. enum opcode_t {ADD,MUL,SOU,DIV,COP,AFC,AFCA,JMP,JMF,INF,SUP,EQU,PRI,READ,WR};
  6. struct operation_t {
  7. enum opcode_t opcode;
  8. int arg1;
  9. int arg2;
  10. int arg3;
  11. };
  12. //Ajoute une opération dans la table (à la fin)
  13. void add_operation(enum opcode_t opcode, int arg1, int arg2, int arg3);
  14. //Renvoi le prochain slot disponible
  15. int get_current_index();
  16. //Permet de patcher les Jump (pas de Van Halen)
  17. void patch(int index, int arg);
  18. //Ecrit la table des intructions dans un fichier ASM
  19. void create_asm();