Patent ID: 7877562

Claim:
A memory controller, comprising: table holding unit which holds an address translation table for managing correspondence between logical blocks defined based on logical addresses designated by a host system which uses a flash memory as its storage medium, and physical blocks in the flash memory; an address managing unit which makes and modifies the address translation table based on logical numbers assigned to the physical blocks, wherein the logical numbers include numbers corresponding to logical blocks and numbers not corresponding to logical blocks; a writing unit which writes data in the physical blocks based on logical addresses designated by the host system, wherein data is stored in a physical block to which a logical number corresponding to the data is assigned; a reading unit which reads out data from the physical blocks based on the address translation table and transfers the data read out to the host system, wherein data is read out from a physical block corresponding to a logical block to which logical addresses designated by the host system belong; and a determination unit which determines whether or not a boot program to be executed by the host system is properly stored in the flash memory, wherein the boot program and its backup program are stored in arbitrary physical blocks, there are logical blocks corresponding to first logical numbers assigned to physical blocks storing the boot program, and there are not any logical blocks corresponding to second logical numbers assigned to physical blocks storing the backup program; the address managing unit also manages correspondence between logical blocks and logical numbers, and modifies the correspondence so that the second logical numbers replace the first logical numbers when the determination unit determines that the boot program is not stored properly; and the reading unit reads out the boot program or the backup program from physical blocks to which the first logical numbers or the second logical numbers are assigned.