摘要:
When an error is found in a program of the microcomputer, there are stored in a writable memory change address data of an address of a wrong instruction to be subjected to modification or insertion in the read-only memory, change instruction codes of modification or insertion for replacement of the wrong instruction, and a control code controlling a second program counter. When the contents of the program counter match the change address data stored in the writable memory, the program data in the writable memory is executed in place of the wrong instruction in the read-only memory according to the control code controlling the second program counter. Consequently, even when a bug is found in the program, a program replacement and/or insertion can be easily achieved and it is unnecessary to discard the final product on which the program is developed through a mask. Moreover, the program can be easily changed from an external device. This facilitates determining the cause of troubles occurring in the one-chip microcomputer incorporated in an electronic apparatus and hence improves reliability of the apparatus.