A microcomputer comprises a CPU; a nonvolatile memory; a plurality of
volatile memories; a system bus; a program transfer bus; a program
transfer section; an address conversion section; and a voltage detection
section. The volatile memories include a plurality of memories switchable
to be used as transfer and execution memories in accordance with a
program execution state by the CPU. Where the voltage detected by the
voltage detection section is lower than a first voltage, the program
transfer section transfers the part of the program stored in the
nonvolatile memory to the transfer memory, and the address conversion
section converts an address in the nonvolatile memory output from the CPU
into an address in the execution memory.