Method and system for allocating file area in memory area of IC card
First Claim
1. A method for allocating new file area in a memory area of a memory of an IC card having an identification area and a plurality of data file areas, the identification area for storing file identification information having a name of a data file and a head address of the data file and used to identify the data file, the memory area being divided by a plurality of data files, each of the data file areas being allocated in the memory area using the file identification information, data being written into the data file areas by using the file identification information, the method performed on said IC card and comprising the steps of:
- receiving a file identification command and a name of new data file to be allocated, from an external device;
determining whether the name of the new data file is the same as any name of a data file in the memory area of the memory, in accordance with the file identification information stored in the memory, when the file identification command is received from the external device;
allocating the new data file by writing the received name of the new data file to be allocated and size information into the identification area only when the name of the new data file is determined not to be the same in said determining step; and
outputting data representing that the name of the data file has been written from the IC card to the external device when the name of the new data file is determined to coincide with a name of the data file allocated in the memory area of the memory.
1 Assignment
0 Petitions
Accused Products
Abstract
A data memory in an IC card is constituted by a common data file used commonly in all applications and a plurality of application data file independently used for each application. Each data file includes a plurality of areas. Identification data is provided to the data file and the area, respectively. By checking the identification data, duplicated definition can be prevented. By using data other than identification data provided to the common data file as identification data provided to the application data file, access for areas in the common data file and the application data file can be performed in accordance with the same command data.
84 Citations
7 Claims
-
1. A method for allocating new file area in a memory area of a memory of an IC card having an identification area and a plurality of data file areas, the identification area for storing file identification information having a name of a data file and a head address of the data file and used to identify the data file, the memory area being divided by a plurality of data files, each of the data file areas being allocated in the memory area using the file identification information, data being written into the data file areas by using the file identification information, the method performed on said IC card and comprising the steps of:
-
receiving a file identification command and a name of new data file to be allocated, from an external device; determining whether the name of the new data file is the same as any name of a data file in the memory area of the memory, in accordance with the file identification information stored in the memory, when the file identification command is received from the external device; allocating the new data file by writing the received name of the new data file to be allocated and size information into the identification area only when the name of the new data file is determined not to be the same in said determining step; and outputting data representing that the name of the data file has been written from the IC card to the external device when the name of the new data file is determined to coincide with a name of the data file allocated in the memory area of the memory. - View Dependent Claims (2, 3)
-
-
4. A method for allocating new file area in a memory area of a memory of an IC card having an identification area and a plurality of other areas, the identification area for storing file identification information having a name of an area data file and a head address of the area data file and used to identify the area in the identification area, the areas being allocated in the data file using the area identification information, data being written into the areas using the area identification information, the method performed on said IC card and comprising the steps of:
-
receiving an area identification command and a name of new area to be allocated, from an external device; determining whether the name of the new area coincides with a name of an area allocated in the area data file of the memory in accordance with the area identification information stored in the memory when the area identification command is received from the external device; allocating the new area by writing the received name of the new area to be allocated and size information into the identification area only when the name of the new area is different from the name of the area allocated in the data file of the memory; and stopping writing the received name of the area to be allocated and size information to the identification area and outputting data representing that the name of the area has been written from the IC card to the external device when the name of the new area coincides with the name of the area allocated in the data file of the memory.
-
-
5. An IC card comprising:
-
a memory including a file identification table, a plurality of data file areas, an unallocated size storage section and a head address storage section, the file identification table for storing file identification information having a name of a data file, a size of the data file, and a head address of the data file and used to identify the data file, the memory being divided by a plurality of data files, each of the data file areas being allocated in the memory area by using the file identification information, data being written into or read out from the data file areas by using he file identification information, a size of an unallocated area of the memory area in which the data file is not allocated being stored in the unallocated size storage section, a head address of the unallocated area being stored in the head address storage section; means for receiving a file identification command, a name of a new data file to be allocated, and a size of the new data file, from an external device; means for determining whether the name of the new data file is the same as a name of a data file allocated in the memory area of the memory in accordance with the file identification information stored in the memory when the file identification command is received from the external device; means for adding the size of the new data file to a size of the file identification information for identifying the new data file when the name of the new data file is different from the name of the data file allocated in the memory area of the memory; means for comparing an added size with the size of the unallocated area stored in the unallocated size storage section; means for generating a head address of the new data file to be allocated in accordance with the head address of the unallocated area stored in the head storage section and the size of the new data file to be allocated when the added size is equal to or smaller than the size of the unallocated area; means for writing new file identification information including the received name of the new data file to be allocated into the file identification table, the size of the new data file, and the generated head addresses of the new data file, thereby allocating the new data file; means for preventing writing the file identification information of the new data file to the file identification table and outputting data representing that the name of the data file has been written from the IC card to the external device when the name of the new data file coincides with the name of the data file allocated in the memory area of the memory or when the added size is larger than the size of the unallocated area; and means for writing data into or reading data out form the new data file in accordance with the written file identification information. - View Dependent Claims (6)
-
-
7. An IC card comprising:
-
a memory including a file identification table, a plurality of data file areas, an unallocated size storage section and a head address storage section, the file identification table for storing file identification information having a name of a data file, a size of the data file, and a head address of the data file and used to identify the data file, the memory being divided by a plurality of data files, each of the data file areas being allocated in the memory area by using the file identification information, data being written into or read out from the data file areas by using the file identification information, a size of an unallocated area of the memory area in which the data file is not allocated being stored in the unallocated size storage section, a head address of the unallocated area being stored in the head address storage section; means for receiving an area identification command and a name of new area to be allocated, from the external device; means for determining whether the name of the new area coincides with a name of an area allocated in the data file of the memory in accordance with the area identification information stored in the memory when the area identification command is received form the external device; means for allocating the new area by writing the received name of the new area to be allocated and size information into the identification area when the name of the new area is different from the name of the area allocated in the data file of the memory; and means for preventing writing of the received name of the area to be allocated and size information to the identification area and outputting data representing that the name of the area has been written from the IC card to the external device when the name of the new area coincides with a name of the area allocated in the data file of the memory.
-
Specification