PURPOSE: To again write data when power failure is restored by preserving the written data if power failure occurs while a disk recording and reproducing device is writing the data on a disk.
CONSTITUTION: If power failure occurs in the middle of executing a main loop, a CPU2 is interrupted at the point A of the main loop. The reading of a register, which is necessary for the task that is executed at the point A, is saved in a RAM4, and simultaneously a power source voltage drop flag is set to '1'. When the power failure is restored, the flag is decided to be '1' or not. If it is '1' and the restoration of the power failure is feasible, the readings of various registers, which are saved in the RAM4, are returned to their own registers. Afterwards, the operation is returned to the main loop, and the data is rewritten from beginning (a point B) to end in a data field on a disk, which was recorded when the power failure was detected. Thus the data can be rewritten at the time of restoring the power failure.