Patent ID: 8141145

Claim:
Method to control the execution of a program by a microcontroller including at least a program memory and a processing unit, wherein the method includes the following steps: separation of said program into at least two blocks each containing a plurality of instructions that can be executed by said microcontroller; integration into these blocks of at least one input control area containing input conditions, these input conditions including reference addresses corresponding to instructions from where the program is authorised to enter said input control area; integration into these blocks of at least one output control area containing output conditions; at the time of the execution of the instructions of said program memorised in a given block, implementation of verification tests of adequacy between effective running of the program and the input and/or of output conditions; implementation of countermeasures if the verification tests indicate an inadequacy between the effective running of the program and the input and/or output conditions; and when the program leaves a block in order to execute an instruction contained in another block, the program carries out, before leaving the block, the verification tests contained in said output control area and memorises, in a history memory, at least the address of the last instruction executed in the block.