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 684B

123456789101112131415161718192021222324
  1. #ifndef TAB_INST_H
  2. #define TAB_INST_H
  3. #include <stdlib.h>
  4. #include <string.h>
  5. #include <stdio.h>
  6. // Liste de codes des instruction
  7. enum opcode_t {ADD,MUL,SOU,DIV,COP,AFC,AFCA,JMP,JMF,INF,SUP,EQU,PRI,READ,WR,CALL,RET,GET,STOP};
  8. //Ajoute une opération dans la table (à la fin)
  9. void add_operation(enum opcode_t opcode, int arg1, int arg2, int arg3);
  10. //Renvoi le prochain slot disponible
  11. int get_current_index();
  12. //Permet de patcher les Jump (pas de Van Halen)
  13. void patch(int index, int arg);
  14. //Ecrit la table des intructions dans un fichier ASM
  15. void create_asm();
  16. //Crée la ligne assembleur en 1er dans le fichier pour sauter au main
  17. void create_jump_to_main(int line);
  18. #endif