Patent ID: 7624227

Claim:
A drive device for writing data transmitted by a host device onto a memory card in accordance with a command issued by the host device, the drive device comprising: a receiving unit operable to receive a plurality of commands issued by the host device; a writing unit operable, if a write end address of one of the received commands is consecutive with a write start address of a following command, to perform the data writing to the memory card by the consecutive commands in a single process; an analysis unit operable to decode the write-start address and a sector number of each command, the sector number being the number of sectors of data for writing with the command; and an instruction unit operable to give the STOP instruction at a point when a written sector number reaches s+t, where s is the sector number of the one command and t is the sector number of the following command, wherein the process involves processing to sequentially write data received from the host device to the memory card being repeated until a STOP instruction is given, the process is activated when the analysis unit decodes a write-start address A and the sector number s from the one command, and involves the data writing being started from the write-start address A, a wait flag is appended to a command received from the host device, the analysis unit analyzes the following command until the written sector number reaches s, if the command with the wait flag is received and a following command has yet to be received, the analysis and instruction units wait for the following command to be received, the instruction unit gives the STOP instruction when the written sector number reaches s+t, if a write-start address B of the following command is consecutive with a write-end address A+s of the one command, the analysis unit judges whether a prohibit flag is appended to the following command, and the instruction unit (i) gives the STOP instruction at a point when the written sector number reaches s if the prohibit flag is appended to the following command, and (ii) gives the STOP instruction at the point when the written sector number reaches s+t if the prohibit flag is not appended to the following command and the write-start address B of the following command is consecutive with the write-end address A+s of the one command.