PURPOSE: To attain massproduction and safety by initializing a nonvolatile memory with the aid of instruction groups required for initialization at the time of initialization and insuring the instruction groups against being accepted after a flag showing the completion of initialization is set up in the nonvolatile memory.
CONSTITUTION: When initialization is done or an IC card that has been initialized is used, transactions are made after the state of the flag in the flag area 7c of a data memory 7 is checked. If the transaction is the initialization instruction, a judgement is made from the state of the flag whether initialization is completed or not. If so, the initialization instruction is not accepted as an instruction error. If initialization is not completed, the initialization instruction is executed. If the accepted instruction does not instruct initialization, a judgement is made in a next step whether initialization is completed or not. If so, instructions are executed by recognizing that a correct instruction is accepted. If initialization is not completed, the instruction that is accepted as an instruction error is not executed. Thus massproduction is attainable, and safety is enhanced.