To prevent a destruction of a file when a power interruption, an error and so on occur at the time of data writing and to improve response to a host computer.
Write data from a host computer 1 are written to a main area 27c of a nonvolatile storage area after it is transiently written to a storage area 27b for temporary storage. Also at the time of turning on power source, write data of non-written data in the storage area 27b for temporary storage is written to the main area 27c. Thus, even if a power interruption occurs during data inputting from the host computer to an IC card 2, data in the main area 27b are not destroyed; and even if the power interruption occurs during data writing to the main area 27c from the temporary storage area 27b, it is possible to restore the data in the main area 27c on the basis of data remained in the temporary storage area 27b.