2 A bug caused by an over-eager loop optimization.
7 #pragma disable_warning 85
11 typedef enum { haut
, bas
, gauche
, droite
, entree
} touche
;
14 volatile uint8_t Control_1
;
15 volatile uint8_t next
;
17 void depl(uint16_t touche
, uint8_t* end_piece
)
21 Control_1
= (key
>> 1);
24 uint8_t possible (uint8_t * pce
)
42 if (!(key
& 0b00000010))
43 depl(bas
, &end_piece
);
44 else if (!(key
& 0b00001000))
45 depl(droite
, &end_piece
);
46 else if (!(key
& 0b00000100))
47 depl(gauche
, &end_piece
);
50 end_game
= (!possible(&next
));
57 Control_1
= 0b00000111;