JP2538906B2 - IC card - Google Patents
IC cardInfo
- Publication number
- JP2538906B2 JP2538906B2 JP62056742A JP5674287A JP2538906B2 JP 2538906 B2 JP2538906 B2 JP 2538906B2 JP 62056742 A JP62056742 A JP 62056742A JP 5674287 A JP5674287 A JP 5674287A JP 2538906 B2 JP2538906 B2 JP 2538906B2
- Authority
- JP
- Japan
- Prior art keywords
- data
- word
- information
- divided
- memory
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Lifetime
Links
- 238000013500 data storage Methods 0.000 claims description 17
- 238000000034 method Methods 0.000 description 11
- 238000010586 diagram Methods 0.000 description 7
- 230000004044 response Effects 0.000 description 5
- 230000006870 function Effects 0.000 description 2
- 238000011084 recovery Methods 0.000 description 1
Description
【発明の詳細な説明】 [発明の目的] (産業上の利用分野) 本発明は、たとえば、不揮発性のデータメモリおよび
CPUなどの制御素子を有するICチップを内蔵したICカー
ドに関する。DETAILED DESCRIPTION OF THE INVENTION Object of the Invention (Field of Industrial Application) The present invention relates to, for example, a nonvolatile data memory and
The present invention relates to an IC card containing an IC chip having a control element such as a CPU.
(従来の技術) 最近、新たな携帯可能なデータ記憶媒体として、不揮
発性のデータメモリおよびCPUなどの制御素子を有するI
Cチップを内蔵したICカードが開発されている。この種
のICカードは、内蔵する制御素子によって内蔵するデー
タメモリをアクセスし、外部装置からの要求に応じて必
要なデータの入出力を行なう。また、データメモリは複
数のエリアに分割されており、選択的に対象エリアとの
アクセスを行なうようになっている。(Prior Art) Recently, as a new portable data storage medium, I has a nonvolatile data memory and a control element such as a CPU.
An IC card with a built-in C chip has been developed. This type of IC card accesses a built-in data memory by a built-in control element and inputs / outputs necessary data in response to a request from an external device. Further, the data memory is divided into a plurality of areas, and the target area is selectively accessed.
従来、このようなICカードにおいて、データメモリに
対するデータの記憶方式は、アクセスの順にデータを並
べて記憶していた。この方式だと、エリア内に複数のデ
ータが存在していて、ある任意のデータを書換える場
合、書換え前のデータの長さと書換えデータのそれとが
一致していなければならなかった。これは、たとえば前
者のデータ長が後者のデータ長よりも大となる場合に
は、書換え対象となるデータとその次のデータとに数バ
イト(もしくは数ワード)の空白が生じてしまい、また
小なる場合には、次のデータ以降をずらして書換えデー
タが記憶できるスペースを確保しなければならない。Conventionally, in such an IC card, as a data storage method for a data memory, data is arranged and stored in the order of access. According to this method, when there are a plurality of data in the area and some arbitrary data is rewritten, the length of the data before the rewriting and that of the rewriting data must match. This is because, for example, when the former data length is larger than the latter data length, a few bytes (or several words) of white space occur between the data to be rewritten and the next data, and the small data In this case, it is necessary to shift the next data and subsequent data to secure a space for storing the rewrite data.
このような欠点の対策として、記憶しようとする一単
位のデータをワードという概念で複数に分割し、この分
割した各データを、それらにそれぞれ連続情報を付加し
て記憶することにより、ワードの記憶方式に自由度を持
たせる方式が考えられる。As a measure against such a drawback, one unit of data to be stored is divided into a plurality of pieces by the concept of word, and each divided data is stored by adding continuous information to each of them, thereby storing the word. A method that gives flexibility to the method is conceivable.
しかし、この場合、分割した各データを記憶していく
際、順次、連鎖情報を同時に付加して記憶する方式だ
と、たとえば、データの全てを記憶し終わる間に外乱な
どでICカードへの電源供給が遮断され、システムダウン
した場合、システム復帰後、このデータを読出すと、先
に記憶した未完結データの連鎖情報は途中で切断されて
いるいるため、不当なデータを読出してしまう恐れがあ
る。However, in this case, when storing each divided data, if the method of sequentially adding chain information at the same time is stored, for example, power supply to the IC card due to disturbance etc. while all the data is stored If the supply is cut off and the system goes down, if this data is read after the system is restored, the chain information of the incomplete data stored earlier is cut off in the middle, so there is a risk of reading improper data. is there.
(発明が解決しようとする問題点) 上記したように、分割した各データを記憶していく
際、連鎖情報も同時に付加していく方式だと、その記憶
動作中に電源遮断などによりシステムダウンした場合、
システム復帰後、このデータを読出すと不当なデータを
読出してしまう恐れがあるという問題点があった。(Problems to be Solved by the Invention) As described above, when the divided data is stored, if the chain information is also added at the same time, the system is down due to power shutdown during the storage operation. If
If this data is read out after the system is restored, there is a problem that incorrect data may be read out.
そこで、本発明は、データの記憶動作中に電源遮断な
どによりシステムダウンした場合、その記憶途中のデー
タは無効となり、システム復帰後アクセスしても不当な
データを読出す恐れのないICカードを提供することを目
的とする。Therefore, the present invention provides an IC card in which the data in the middle of storage is invalidated when the system goes down due to power interruption or the like during the data storage operation, and there is no fear of reading unjust data even if accessed after the system is restored. The purpose is to do.
また、本発明は、上記したように、データを複数に分
割して、分割した各データに連鎖情報を付加して記憶す
る場合、連鎖情報で繋がっているデータのうち、どのデ
ータが先端であるか、終端であるかの認識、および、次
のデータの識別がワード単位で容易に行なえ、しかも、
内部メモリを有効に利用できるICカードを提供すること
を目的とする。Further, according to the present invention, as described above, when data is divided into a plurality of pieces and chain information is added to each divided data and stored, which of the data connected by the chain information is the tip. It is easy to recognize whether it is the end or the end, and to identify the next data in word units.
The purpose is to provide an IC card that can effectively use the internal memory.
[発明の構成] (問題点を解決するための手段) 本発明のICカードは、外部装置から受信したデータを
内蔵するメモリに記憶するICカードであって、前記メモ
リの領域を複数に分割する情報および分割された各領域
内のデータのワード長を定める定義情報を記憶する定義
エリアと、この定義エリアで定義されたワード長単位で
データを記憶するとともに、各ワードに対応してワード
の連続性を示す連続性情報を記憶する連続性情報記憶部
と、該ワードが先頭のデータであるか否かを示す識別情
報を記憶する識別情報記憶部を有する複数のデータ記憶
エリアとを有するメモリと、外部装置から受信したデー
タをこのデータの書込み対象となる領域における前記ワ
ード長に基づいて複数に分割する分割手段と、この分割
手段によって分割された各データを前記メモリのデータ
記憶エリアに書込む書込手段と、この分割された各デー
タを書込む際、その各データの記憶位置情報を保持する
保持手段と、前記分割された各データが全て正常に記憶
されたか否かを判別する判別手段と、この判別手段によ
って前記分割された各データが全て正常に記憶されたと
判別されたとき、前記保持手段にて保持されている記憶
位置情報に基づき各ワードに続く次のワードの記憶位置
情報を各データの連鎖情報として前記連続性情報記憶部
に付加するとともに、前記メモリに記憶された各データ
のうち最終のデータには連鎖情報とは異なる特定の情報
を前記連続性情報記憶部に付加する第1の付加手段と、
前記判別手段によって前記分割された各データが全て正
常に記憶されたと判別されて、前記第1の付加手段によ
って連鎖情報が付加された後に、前記メモリのデータ記
憶エリアに記憶された各データのうち先頭のデータには
先頭のデータであることを識別するための識別情報を前
記データ記憶エリアの識別情報記憶部に付加する第2の
付加手段と具備している。[Configuration of Invention] (Means for Solving Problems) An IC card of the present invention is an IC card for storing data received from an external device in a built-in memory, and divides the area of the memory into a plurality of areas. A definition area that stores information and definition information that defines the word length of the data in each divided area, and the data is stored in word length units defined in this definition area, and word continuation is associated with each word. And a plurality of data storage areas having an identification information storage unit that stores identification information indicating whether or not the word is head data, and a memory having a plurality of data storage areas Dividing means for dividing the data received from the external device into a plurality of portions based on the word length in the area to which the data is to be written, and each of the dividing means divided by the dividing means. Writing means for writing the data into the data storage area of the memory, holding means for holding the storage position information of each of the divided data when writing the divided data, and all of the divided data. A discriminating means for discriminating whether or not the data is normally stored, and when it is determined by the discriminating means that all of the divided data are normally stored, based on the storage position information held by the holding means. The storage position information of the next word following each word is added to the continuity information storage unit as chain information of each data, and the final data of each data stored in the memory is specified differently from the chain information. First adding means for adding the information of 1 to the continuity information storage section,
Of the data stored in the data storage area of the memory after the determination unit determines that all of the divided data are normally stored and the chain information is added by the first addition unit. The first data is provided with a second adding means for adding identification information for identifying the first data to the identification information storage section of the data storage area.
(作用) 本発明によれば、外部から受信したデータを定められ
たワード長に基づいて複数に分割し、この分割された各
データが全て正常に記憶された場合にのみ、その各デー
タにそれぞれ連鎖情報を付加することにより、分割され
た各データの記憶動作中に電源遮断などによりシステム
ダウンした場合、その記憶途中のデータはまだ連鎖情報
が付加されていないので無効となり、システム復帰後ア
クセスしても、不当なデータを読出す恐れはなくなる。(Operation) According to the present invention, data received from the outside is divided into a plurality of pieces based on a predetermined word length, and only when all the divided pieces of data are normally stored, the respective pieces of data are respectively stored. By adding chain information, if the system goes down due to power cut during storage operation of each divided data, the data in the middle of storage will be invalid because the chain information is not added yet and will be accessed after system recovery. However, there is no fear of reading unjust data.
また、本発明によれば、分割された各データにそれぞ
れ連鎖情報を付加する際、連鎖の先端となるデータには
先端のデータであることを識別するための識別情報を付
加することにより、この識別情報によって連鎖の先端と
なるデータを容易に認識することができる。Further, according to the present invention, when the chain information is added to each of the divided data, by adding the identification information for identifying the data at the tip of the chain to the data at the tip of the chain, The identification information makes it possible to easily recognize the data at the end of the chain.
また、本発明によれば、内部メモリのデータ記憶エリ
アは、各ワードに対応してワードの連続性を示す連続性
情報を記憶する連続性情報記憶部と、該ワードが先頭の
データであるか否かを示す識別情報を記憶する識別情報
記憶部とを有しているので、次のデータの識別、最終デ
ータの識別、先頭データの識別がワード単位で容易に行
なえる。Further, according to the present invention, the data storage area of the internal memory is a continuity information storage unit that stores continuity information indicating word continuity corresponding to each word, and whether the word is head data. Since it has an identification information storage unit that stores identification information indicating whether or not it is possible to easily identify the next data, the final data, and the first data in word units.
さらに、本発明によれば、内部メモリの定義エリアに
データのワード長を定める情報を記憶しておき、このワ
ード長を定める情報に基づきデータを分割することによ
り、各メモリエリアごとに最適なワード長を設定し、内
部メモリを有効に利用できる。Further, according to the present invention, information defining the word length of the data is stored in the definition area of the internal memory, and the data is divided based on the information defining the word length, so that the optimum word for each memory area can be obtained. You can set the length and use the internal memory effectively.
(実施例) 以下、本発明の一実施例について図面を参照して説明
する。(Example) Hereinafter, one example of the present invention will be described with reference to the drawings.
第9図は本発明に係るICカードが適用される、たとえ
ば金融システムあるいはキョッピングシステムなどの端
末装置として用いられるカード取扱装置の構成例を示す
ものである。すなわち、この装置は、ICカード1をカー
ドリーダ・ライタ2を介してCPUなどからなる制御部3
と接続可能にするとともに、制御部3にキーボード4、
CRTディスプレイ装置5、プリンタ6およびフロッピィ
ディスク装置7を接続して構成される。FIG. 9 shows an example of the configuration of a card handling device to which the IC card according to the present invention is applied and which is used as a terminal device such as a financial system or a kopping system. That is, this device has an IC card 1 via a card reader / writer 2 and a control unit 3 including a CPU and the like.
And the keyboard 4,
It is configured by connecting a CRT display device 5, a printer 6 and a floppy disk device 7.
第8図はICカード1の構成例を示すもので、制御部と
しての制御素子(たとえばCPU)11、記憶内容が消去可
能な不揮発性のデータメモリ12、プログラムメモリ13、
およびカードリーダ・ライタ2との電気的接触を得るコ
ンタクト部14によって構成されており、これらのうち破
線内の部分(制御素子11、データメモリ12、プログラム
メモリ13)は1つのICチップで構成されてICカード本体
内に埋設されている。プログラムメモリ13は、たとえば
マスクROMで構成されており、制御素子11の制御プログ
ラムなどを記憶するものである。データメモリ12は各種
データの記憶に使用され、たとえばEEPROMで構成されて
いる。FIG. 8 shows an example of the configuration of the IC card 1. A control element (for example, a CPU) 11 as a control unit, a nonvolatile data memory 12 whose stored contents can be erased, a program memory 13,
And a contact part 14 for making electrical contact with the card reader / writer 2, of which the parts within the broken line (control element 11, data memory 12, program memory 13) are composed of one IC chip. Embedded in the IC card body. The program memory 13 is composed of a mask ROM, for example, and stores a control program for the control element 11 and the like. The data memory 12 is used to store various data and is composed of, for example, an EEPROM.
データメモリ12は、たとえば第5図に示すように複数
のエリアに分割されていて、それぞれのエリアにはエリ
ア番号[00,01,…]が与えられている。このうち、エリ
ア[00]には、エリア[01,02,…]のそれぞれの先頭ア
ドレス、エリアを分割しているワード数、およびワード
のバイト数がエリア番号に対応して記憶されている。た
とえば、エリア[01]の先頭アドレスはaaa番地、エリ
アを分割しているワード数はWa個、ワードのバイト数は
Saバイトであるといったように対応する。そして、各エ
リア[01,02,…]は、ある固定長(Sバイト)を持つワ
ードで分割されていて、これら各ワードにはワード番号
が付与されている。なお、ワード番号は、エリアの先頭
に位置するワードを「1」とし、以降順次1づつ増加す
るヘキサ(Hex)データにより示されている。The data memory 12 is divided into a plurality of areas, for example, as shown in FIG. 5, and area numbers [00, 01, ...] Are given to the respective areas. Of these, in the area [00], the respective start addresses of the areas [01, 02, ...], the number of words dividing the area, and the number of bytes of the word are stored in correspondence with the area number. For example, the start address of area [01] is aaa address, the number of words dividing the area is Wa, and the number of bytes of word is
Correspondence such as Sa byte. Each area [01, 02, ...] Is divided into words having a fixed length (S bytes), and word numbers are given to these words. The word number is indicated by hexadecimal (Hex) data in which the word located at the beginning of the area is set to "1" and sequentially increases by one.
第6図はあるエリアにデータを記憶した状態を示して
おり、分割した各データには連鎖情報および識別情報が
それぞれ付加されている。連鎖情報は、以降に続くデー
タが記憶されるワードのワード番号(つまり、以降継続
する分割データの記憶位置情報)が用いられる。識別情
報は、連鎖の先端データであるか否かを規定するもの
で、たとえば第7図に示すように1バイト(8ビット)
で構成されており、そのうち最上位ビット(MSB)を用
いて他はダミーとなっている。すなわち、MSBが“0"で
あれば先頭データであることを示し、“1"であればそれ
以外であることを示す。FIG. 6 shows a state in which data is stored in a certain area. Chain information and identification information are added to each divided data. As the chain information, the word number of the word in which the data that follows is stored (that is, the storage position information of the divided data that continues thereafter) is used. The identification information defines whether or not the data is the leading data of the chain. For example, as shown in FIG. 7, 1 byte (8 bits).
It consists of, the most significant bit (MSB) is used and the others are dummy. That is, if the MSB is “0”, it indicates that the data is the head data, and if the MSB is “1”, it indicates that it is other than that.
次に、このような構成において本発明のデータ記憶方
式について詳細に説明する。データメモリ12にデータを
書込む際には、第3図に示すようなフォーマットを持つ
書込み命令データをカードリーダ・ライタ2からICカー
ド1に入力する。ICカード1では、制御素子11がこの書
込み命令データ中に含まれる書込み機能コードを認識
し、第1図に示すフローチャートに基づく書込み処理を
実行する。すなわち、まず入力された書込み命令データ
中に含まれるデータ長により書込みデータの総バイト数
を認識し、次にアクセス対象エリア内に全て記憶できる
か否かを判定する。記憶できなければ、バイト数エラー
を意味する応答データを出力して処理を終了する。記憶
できれば、入力された書込み命令データ中に含まれる書
込みデータをワードのバイト数ごとに分割し、データメ
モリ12のアクセス対象エリア内にワード単位で順次書込
む。この際、書込んだワードのワード番号を制御素子11
内のRAMに一時保持しておく。そして、分割したデータ
を全て正常に書込んだことを認識したとき、上記RAMに
保持したワード番号を連鎖情報として最後に書込んだワ
ードから順に付加してゆく。この場合、最後に書込んだ
ワードの連鎖情報を「0」として、連鎖の終端のデータ
であることを表示し、つぎの連鎖情報以降はRAMに最後
に保持したワード番号から順に割り付ける。そして、最
後に連鎖情報が割り付けらたワードの識別情報のMSBを
“0"にして、連鎖の先端のデータであることを表示し、
正常終了を意味する応答データを出力して処理を終了す
る。Next, the data storage system of the present invention having such a configuration will be described in detail. When writing data in the data memory 12, write command data having a format as shown in FIG. 3 is input from the card reader / writer 2 to the IC card 1. In the IC card 1, the control element 11 recognizes the write function code included in the write command data, and executes the write processing based on the flowchart shown in FIG. That is, first, the total number of bytes of write data is recognized based on the data length included in the input write command data, and then it is determined whether or not all the write data can be stored in the access target area. If the data cannot be stored, the response data indicating a byte number error is output and the process ends. If the data can be stored, the write data contained in the input write command data is divided for each byte number of words, and sequentially written in the access target area of the data memory 12 in word units. At this time, the word number of the written word is set to the control element 11
Hold it in the internal RAM temporarily. Then, when it is recognized that all the divided data have been normally written, the word numbers held in the RAM are sequentially added as chain information from the last written word. In this case, the chain information of the last written word is set to "0" to indicate that it is the data at the end of the chain, and the subsequent chain information is allocated sequentially from the word number last held in the RAM. And finally, the MSB of the identification information of the word to which the chain information is assigned is set to “0” to display that it is the data at the end of the chain,
The response data indicating normal termination is output and the processing is terminated.
ここで、第6図を用いて具体的に説明すると、たとえ
ば書込みデータW11,W12,W13と分割し、この順番でワー
ド番号「1,2,3」の各ワードに順次書込む。このとき、R
AMにワード番号「1,2,3」がこの順番で格納される。次
に、データW13の連鎖情報箇所に「0」を付加し、デー
タW12の連鎖情報箇所には「3」が、データW11の連鎖情
報箇所には「2」が付加される。そして、最後に連鎖情
報が付加されたワードW11の識別情報のMSBを“0"とす
る。More specifically, referring to FIG. 6, for example, write data W11, W12, W13 are divided and sequentially written in each word of word numbers "1, 2, 3" in this order. At this time, R
Word numbers “1, 2, 3” are stored in AM in this order. Next, "0" is added to the chain information part of the data W13, "3" is added to the chain information part of the data W12, and "2" is added to the chain information part of the data W11. Then, the MSB of the identification information of the word W11 to which the chain information is added last is set to "0".
次に、データメモリ12からデータを読出す際には、第
4図に示すようなフォーマットを持つ読出し命令データ
をカードリーダ・ライタ2からICカード1に入力する。
ICカード1では、制御素子11がこの読出し命令データ中
に含まれる読出し機能コードを認識し、第2図に示すフ
ローチャートに基づく読出し処理を実行する。すなわ
ち、まずアクセス対象エリア内の識別情報部を参照し、
MSBが“0"となっているものを見付ける。見付からなけ
れば、データ未書込みを意味する応答データを出力して
処理を終了する。見付かれば、次に先頭から数えて、入
力された読出し命令データ中に含まれる読出し対象デー
タ番号以上“0"となっているワードがあるか否かを見
る。なければ、読出し対象データ番号無しを意味する応
答データを出力して処理を終了する。あれば、読出し対
象データ番号と一致する識別情報のMSBが“0"となって
いるワードを参照し、そのワード内のデータを読出して
RAMに一時保持する。次に、対応する連鎖情報により続
くデータを持つワードを認識し、そのワード内のデータ
を読出して先にRAMに保持したデータの後ろに付加す
る。そして、この動作は連鎖情報が「0」となっている
ワードのデータをRAMに保持した時点で終了し、RAMに保
持されたデータを出力して処理を終了する。Next, when reading data from the data memory 12, read command data having a format as shown in FIG. 4 is input from the card reader / writer 2 to the IC card 1.
In the IC card 1, the control element 11 recognizes the read function code included in the read command data and executes the read process based on the flowchart shown in FIG. That is, first, referring to the identification information section in the access target area,
Find the one whose MSB is "0". If not found, the response data indicating that the data has not been written is output, and the process ends. If found, then counting from the beginning, it is checked whether or not there is a word having "0" or more from the read target data number included in the input read command data. If not, the response data indicating that there is no data number to be read is output and the process ends. If so, the word in which the MSB of the identification information that matches the read data number is "0" is referenced and the data in that word is read.
Hold in RAM temporarily. Next, the word having the following data is recognized by the corresponding chain information, the data in the word is read and added after the data previously held in the RAM. Then, this operation ends when the data of the word whose chain information is "0" is held in the RAM, the data held in the RAM is output, and the processing ends.
このように、外部から受信したデータをワードという
概念で複数に分割し、この分割した各データを記憶して
いく際、各データに付加する連鎖情報を一時保持してお
き、分割された各データが全て正常に記憶された場合に
のみ、その各データに上記一時保持しておいた連鎖情報
をそれぞれ付加することにより、分割された各データの
記憶動作中に電極遮断などによりシステムダウンした場
合、その記憶途中のデータはまだ連鎖情報が付加されて
いないので無効となり、システム復帰後にアクセスして
も、不当なデータを読出す恐れはなくなる。In this way, the data received from the outside is divided into a plurality of pieces by the concept of word, and when storing each divided data, chain information to be added to each data is temporarily held and each divided data is stored. Only when all are normally stored, by adding the temporarily stored chain information to each of the respective data, when the system is down due to electrode interruption during the storage operation of each divided data, Since the chain information is not added yet to the data in the middle of storage, it becomes invalid, and even if it is accessed after the system is restored, there is no fear of reading the invalid data.
また、分割した各データをそれらに連鎖情報を付加し
て記憶する際、連鎖の先端となるデータに付加された識
別情報は特定情報(たとえば0)とすることにより、こ
の特定情報によって連鎖の先端となるデータを容易に認
識することができる。In addition, when each piece of the divided data is stored with the chain information added thereto, the identification information added to the data to be the end of the chain is specified information (for example, 0). The data can be easily recognized.
また、内部のデータメモリのデータ記憶エリアは、各
ワードに対応してワードの連続性を示す連続性情報を記
憶する連続性情報記憶部と、該ワードが先頭のデータで
あるか否かを示す識別情報を記憶する識別情報記憶部と
を有しているので、次のデータの識別、最終データの識
別、先頭データの識別がワード単位で容易に行なえる。Further, the data storage area of the internal data memory indicates a continuity information storage unit that stores continuity information indicating word continuity corresponding to each word and whether or not the word is head data. Since it has an identification information storage section for storing identification information, it is possible to easily identify the next data, the final data, and the beginning data in word units.
さらに、内部のデータメモリの定義エリアに分割され
た各領域内のデータのワード長を定める情報を記憶して
おき、このワード長を定める情報に基づきデータを複数
に分割することにより、各メモリエリアごとに最適なワ
ード長を設定し、内部のデータメモリを有効に利用でき
る。Further, by storing information defining the word length of the data in each area divided into the definition areas of the internal data memory, and dividing the data into a plurality of pieces based on the information defining the word length, each memory area The optimum word length can be set for each and the internal data memory can be used effectively.
[発明の効果] 以上詳述したように本発明によれば、データの記憶動
作中に電源遮断などによりシステムダウンした場合、そ
の記憶途中のデータは無効となり、システム復帰後アク
セスしても不当なデータを読出す恐れのないICカードを
提供できる。[Effects of the Invention] As described in detail above, according to the present invention, when the system goes down due to power interruption during the data storage operation, the data in the middle of the storage becomes invalid, and it is not appropriate to access after the system is restored. An IC card without fear of reading data can be provided.
また、本発明によれば、分割された各データにそれぞ
れ連鎖情報を付加する際、連鎖の先端となるデータには
先端のデータであることを識別するための識別情報を付
加することにより、この識別情報によって連鎖の先端と
なるデータを容易に認識することができるICカードを提
供できる。Further, according to the present invention, when the chain information is added to each of the divided data, by adding the identification information for identifying the data at the tip of the chain to the data at the tip of the chain, It is possible to provide an IC card that can easily recognize the data at the end of the chain based on the identification information.
また、本発明によれば、内部メモリのデータ記憶エリ
アは、各ワードに対応してワードの連続性を示す連続性
情報を記憶する連続性情報記憶部と、該ワードが先頭の
データであるか否かを示す識別情報を記憶する識別情報
記憶部とを有しているので、次のデータの識別、最終デ
ータの識別、先頭データの識別がワード単位で容易に行
なえるICカードを提供できる。Further, according to the present invention, the data storage area of the internal memory is a continuity information storage unit that stores continuity information indicating word continuity corresponding to each word, and whether the word is head data. Since it has an identification information storage unit that stores identification information indicating whether or not it is possible to provide an IC card in which the identification of the next data, the identification of the final data, and the identification of the beginning data can be easily performed in word units.
さらに、本発明によれば、内部メモリの定義エリアに
データのワード長を定める情報を記憶しておき、このワ
ード長を定める情報に基づきデータを分割することによ
り、各メモリエリアごとに最適なワード長を設定し、内
部メモリを有効に利用できるICカードを提供できる。Further, according to the present invention, information defining the word length of the data is stored in the definition area of the internal memory, and the data is divided based on the information defining the word length, so that the optimum word for each memory area can be obtained. It is possible to provide an IC card that can set the length and effectively use the internal memory.
図は本発明の一実施例を説明するためのもので、第1図
はデータの書込み処理を説明するフローチャート、第2
図はデータの読出し処理を説明するフローチャート、第
3図は書込み命令データのフォーマット例を示す図、第
4図は読出し命令データのフォーマット例を示す図、第
5図はデータメモリの構成を示す図、第6図はエリアに
データを記憶した状態を示す図、第7図は識別情報の構
成を示す図、第8図はICカードの構成を示すブロック
図、第9図はカード取扱装置の構成を示すブロック図で
ある。 1……ICカード、2……カードリーダ・ライタ、11……
制御素子(制御部)、12……データメモリ、13……プロ
グラムメモリ。FIG. 1 is for explaining an embodiment of the present invention, and FIG. 1 is a flow chart for explaining a data writing process, and FIG.
FIG. 4 is a flow chart for explaining a data read process, FIG. 3 is a diagram showing a format example of write command data, FIG. 4 is a diagram showing a format example of read command data, and FIG. 5 is a diagram showing a configuration of a data memory. , FIG. 6 is a diagram showing a state in which data is stored in an area, FIG. 7 is a diagram showing a configuration of identification information, FIG. 8 is a block diagram showing a configuration of an IC card, and FIG. 9 is a configuration of a card handling device. It is a block diagram showing. 1 …… IC card, 2 …… Card reader / writer, 11 ……
Control element (control section), 12 ... Data memory, 13 ... Program memory.
Claims (1)
モリに記憶するICカードであって、 前記メモリの領域を複数に分割する情報および分割され
た各領域内のデータのワード長を定める定義情報を記憶
する定義エリアと、この定義エリアで定義されたワード
長単位でデータを記憶するとともに、各ワードに対応し
てワードの連続性を示す連続性情報を記憶する連続性情
報記憶部と、該ワードが先頭のデータであるか否かを示
す識別情報を記憶する識別情報記憶部を有する複数のデ
ータ記憶エリアとを有するメモリと、 外部装置から受信したデータをこのデータの書込み対象
となる領域における前記ワード長に基づいて複数に分割
する分割手段と、 この分割手段によって分割された各データを前記メモリ
のデータ記憶エリアに書込む書込手段と、 この分割された各データを書込む際、その各データの記
憶位置情報を保持する保持手段と、 前記分割された各データが全て正常に記憶されたか否か
を判別する判別手段と、 この判別手段によって前記分割された各データが全て正
常に記憶されたと判別されたとき、前記保持手段にて保
持されている記憶位置情報に基づき各ワードに続く次の
ワードの記憶位置情報を各データの連鎖情報として前記
連続性情報記憶部に付加するとともに、前記メモリに記
憶された各データのうち最終のデータには連鎖情報とは
異なる特定の情報を前記連続性情報記憶部に付加する第
1の付加手段と、 前記判別手段によって前記分割された各データが全て正
常に記憶されたと判別されて、前記第1の付加手段によ
って連鎖情報が付加された後に、前記メモリのデータ記
憶エリアに記憶された各データのうち先頭のデータには
先頭のデータであることを識別するための識別情報を前
記データ記憶エリアの識別情報記憶部に付加する第2の
付加手段と、 を具備したことを特徴とするICカード。1. An IC card for storing data received from an external device in a built-in memory, comprising information for dividing an area of the memory into a plurality of pieces and definition information for defining a word length of data in each divided area. And a continuity information storage unit that stores data in units of word lengths defined in this definition area and that stores continuity information indicating word continuity corresponding to each word, A memory having a plurality of data storage areas having an identification information storage unit that stores identification information indicating whether or not a word is the first data, and data received from an external device in an area to which this data is written. Dividing means for dividing the data into a plurality of pieces based on the word length, and a writer for writing each data divided by the dividing means into a data storage area of the memory. And a holding means for holding the storage position information of each divided data when writing the divided data, and a discriminating means for discriminating whether or not all the divided data are normally stored, When it is determined by the discriminating means that all of the divided data are normally stored, the storage position information of the next word following each word is stored in each data based on the storage position information held by the holding means. A first information is added to the continuity information storage unit as chain information, and specific information different from the chain information is added to the continuity information storage unit in the final data of each data stored in the memory. After the addition means and the determination means determine that all of the divided data have been normally stored, and the chain information is added by the first addition means, the memo is added. Second adding means for adding, to the identification information storage section of the data storage area, identification information for identifying the first data among the respective data stored in the data storage area, An IC card characterized by having.
Priority Applications (4)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP62056742A JP2538906B2 (en) | 1987-03-13 | 1987-03-13 | IC card |
US07/164,961 US4949240A (en) | 1987-03-13 | 1988-03-07 | Data storage system having circuitry for dividing received data into sequential wards each stored in storage region identified by chain data |
FR888803232A FR2612317B1 (en) | 1987-03-13 | 1988-03-11 | DATA STORAGE SYSTEM, OF THE PORTABLE DATA RECORDING MEDIUM TYPE |
KR8802642A KR910007036B1 (en) | 1987-03-13 | 1988-03-12 | Data storage system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP62056742A JP2538906B2 (en) | 1987-03-13 | 1987-03-13 | IC card |
Publications (2)
Publication Number | Publication Date |
---|---|
JPS63224092A JPS63224092A (en) | 1988-09-19 |
JP2538906B2 true JP2538906B2 (en) | 1996-10-02 |
Family
ID=13035980
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP62056742A Expired - Lifetime JP2538906B2 (en) | 1987-03-13 | 1987-03-13 | IC card |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2538906B2 (en) |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS621029A (en) * | 1985-06-26 | 1987-01-07 | Nec Corp | Chain searching system |
JPS6258106A (en) * | 1985-09-06 | 1987-03-13 | Tokyo Electric Power Co Inc:The | Optical apparatus for detecting physical quantity |
JPS6258105A (en) * | 1985-09-09 | 1987-03-13 | Inoue Japax Res Inc | Rotary encoder |
-
1987
- 1987-03-13 JP JP62056742A patent/JP2538906B2/en not_active Expired - Lifetime
Also Published As
Publication number | Publication date |
---|---|
JPS63224092A (en) | 1988-09-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP2537199B2 (en) | IC card | |
KR900008768B1 (en) | Portable electronics | |
US5093785A (en) | Portable electronic device with memory having data pointers and circuitry for determining whether a next unwritten memory location exist | |
US6839798B1 (en) | Flash memory capable of storing frequently rewritten data | |
JPS6228297A (en) | Integrated circuit card having reading means of update information and hysteresis information | |
US4949240A (en) | Data storage system having circuitry for dividing received data into sequential wards each stored in storage region identified by chain data | |
JPH05314019A (en) | Memory card device | |
JP3471842B2 (en) | Data management device, data storage device, and data management method | |
JPH03252993A (en) | E↑2PROM information writing device | |
JP2538906B2 (en) | IC card | |
JP2538907B2 (en) | IC card | |
JPH05100961A (en) | Data storage system | |
JPH0795306B2 (en) | Data storage device | |
JP2000243093A (en) | Data storing method for flash memory and data reading out method from flash memory | |
JPH0435780B2 (en) | ||
JP3168572B2 (en) | IC card with CPU runaway detection function | |
JP2598056B2 (en) | Portable electronic devices | |
JPS63145582A (en) | Data storage system | |
JPS63200399A (en) | data processing system | |
JP2537198B2 (en) | Portable electronic devices | |
JP2000222198A (en) | Information processor | |
JP3359934B2 (en) | Data storage device | |
JPS603081A (en) | Ic card | |
JPS62289999A (en) | Data writing method | |
JPH08138005A (en) | Data write system for flash memory card |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
EXPY | Cancellation because of completion of term |