push avant de manger

This commit is contained in:
2021-12-17 19:29:54 +01:00
parent 18bbd5e10f
commit b7e6ae7e19
3 changed files with 17 additions and 3 deletions

View File

@@ -33,6 +33,7 @@ int calculer_position(int posActuelle, short int modeAddr, short int valeur, str
}
void execute_instruction(union mars_instruction instruction, int player, struct adresse memoire[TAILLE_MEM], int positions[2]){
/* Permet d'executer les instructions des virus */
short int operation = instruction.instruct.codeOp; /* Pour rendre le code un peu plus lisible */
int position = positions[player];
printf("Position dans le exec: %d\n", position);
@@ -97,7 +98,10 @@ void execute_instruction(union mars_instruction instruction, int player, struct
}
case SUB:{
int premiere_valeur;
int first_pos, next_pos;
union mars_instruction first_instruction, next_instruction;
}
case JMP: {
short int modeadresse = instruction.instruct.modeAddrA;