JPS63223994A - Portable electronic equipment - Google Patents

Portable electronic equipment

Info

Publication number
JPS63223994A
JPS63223994A JP62058118A JP5811887A JPS63223994A JP S63223994 A JPS63223994 A JP S63223994A JP 62058118 A JP62058118 A JP 62058118A JP 5811887 A JP5811887 A JP 5811887A JP S63223994 A JPS63223994 A JP S63223994A
Authority
JP
Japan
Prior art keywords
data
area
portable electronic
written
state
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.)
Pending
Application number
JP62058118A
Other languages
Japanese (ja)
Inventor
Toshihiro Miyano
宮野 俊弘
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toshiba Corp
Original Assignee
Toshiba Corp
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Toshiba Corp filed Critical Toshiba Corp
Priority to JP62058118A priority Critical patent/JPS63223994A/en
Publication of JPS63223994A publication Critical patent/JPS63223994A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To report the state of a data area by judging the state of the area where data is written according to an external state information instruction and outputting specific information which indicates the judgement result to the outside when the data is written in the data memory. CONSTITUTION:When instruction data are inputted from a card reader writer R/W, a control element 15 checks whether or not a function code included in the instruction data is a write function code. When so, the element 15 searches the data area 00 of a data memory 16 for an area number added to the instruction data. When it is hot found, the element 15 outputs answer data indicating that the area is not confirmed and becomes ready to wait for instruction data. When the area number is found, the element 15 holds it in a RAM stored with area control information and the number of bytes constituting discrimination information for the corresponding area, i.e. head address data and recognizes the position of the object area.

Description

【発明の詳細な説明】 [発明の目的] (産業上の利用分野) この発明は、たとえば不揮発性のデータメモリおよびC
PUなとの制御素子を有するICチップを内蔵した、い
わゆるICカードと称される携帯可能電子装置に関する
[Detailed Description of the Invention] [Object of the Invention] (Industrial Application Field) The present invention is applicable to, for example, non-volatile data memory and C
The present invention relates to a portable electronic device called an IC card, which has a built-in IC chip having a control element such as a PU.

(従来の技術) 最近、新たな携帯可能なデータ記憶媒体として、不揮発
性のデータメモリおよびCPUなどの制御素子を有する
ICチップを内蔵したICカードが開発されている。こ
の種のICカードは、内部の制m*子あるいは外部装置
により内蔵するデータメモリに対してデータの管理を行
なうようになっている。
(Prior Art) Recently, as a new portable data storage medium, an IC card containing a built-in IC chip having a nonvolatile data memory and a control element such as a CPU has been developed. This type of IC card manages data in the built-in data memory using an internal controller or an external device.

ところで、従来のICカードにおいて、データメモリは
複数のエリアに分割されており、そのエリアにデータ列
を書込む際、ある特定ポイント(たとえば基準アドレス
)から単一方向に書込み、順次エリアごとに行なうこと
がある。この場合、未書込みエリアが存在しなくなると
、外部装置で既にデータが書込まれているエリアの消去
など、新たにエリアを確保する必要がある。
By the way, in conventional IC cards, the data memory is divided into a plurality of areas, and when writing a data string to those areas, the data is written in a single direction from a certain point (for example, a reference address) and sequentially for each area. Sometimes. In this case, if an unwritten area no longer exists, it is necessary to secure a new area by erasing an area in which data has already been written using an external device.

そこで、最近、この対策として、未書込みエリアが存在
しなくなると、最も古いデータのエリアに自動的に重ね
書きする方法が考えられている。
Recently, as a countermeasure to this problem, a method has been considered that automatically overwrites the oldest data area when there is no longer an unwritten area.

しかし、この方法では、データエリアの未書込みエリア
がなくなったことを知らずに、データの書込みを実行し
てしまう、つまりデータエリアの状態を知らずに、デー
タの書込みを実行してしまうという欠点があった。
However, this method has the disadvantage that data is written without knowing that there is no more unwritten area in the data area, that is, data is written without knowing the state of the data area. Ta.

(発明が解決しようとする問題点) 上記したように、データエリアの状態を知らずに、デー
タの書込みを実行してしまうという欠点を除去するもの
で、データエリアの状態を知らせることができる携帯可
能電子装置を提供することを目的とする。
(Problems to be Solved by the Invention) As mentioned above, this invention eliminates the disadvantage of writing data without knowing the state of the data area, and is portable and capable of informing the state of the data area. The purpose is to provide electronic devices.

[発明の構成] (問題点を解決するための手段) この発明の携帯可能電子装置は、複数のエリアからなる
データメモリと、このデータメモリに対してデータの読
出しおよび書込みを行なうための制御素子を有し、選択
的に外部からの入出力を行なうものにおいて、上記デー
タメモリにデータを書込む際、外部からの状態情報命令
に応じてデータを書込むエリアの状態を判断する判断手
段、およびこの判断手段の判断結果を示す特定情報を外
部へ出力する出力手段から構成されている。
[Structure of the Invention] (Means for Solving the Problems) A portable electronic device of the present invention includes a data memory consisting of a plurality of areas, and a control element for reading and writing data to the data memory. and selectively performs input/output from the outside, a determining means for determining the state of the area in which data is to be written in accordance with a state information command from the outside when writing data to the data memory; It is comprised of an output means for outputting specific information indicating the judgment result of the judgment means to the outside.

(作用) この発明は、データメモリにデータを書込む際、外部か
らの状態情報命令に応じてデータを書込むエリアの状態
を判断し、この判断結果を示す特定情報を外部へ出力す
るようにしたものである。
(Operation) When writing data to a data memory, the present invention determines the state of the area in which the data is to be written in accordance with a state information command from the outside, and outputs specific information indicating the result of this judgment to the outside. This is what I did.

(実施例) 以下、この発明の一実施例について図面を参照して説明
する。
(Example) Hereinafter, an example of the present invention will be described with reference to the drawings.

第3図はこの発明に係る携帯可能電子装置としてのIC
カードが適用される、たとえばホームバンキングシステ
ムあるいはショッピングシステムなどの端末装置として
用いられるカード取扱装置の構成例を示すものである。
FIG. 3 shows an IC as a portable electronic device according to the present invention.
This figure shows an example of the configuration of a card handling device used as a terminal device in a home banking system, shopping system, etc., to which a card is applied.

すなわち、この装置は、ICカード1をカードリーダ・
ライタ2を介してCPUなどからなる制御部3と接続可
能にするとともに、lll11部3にキーボード4、C
RTディスプレイ装置5、プリンタ6およびフロッピー
ディスク装置7を接続して構成される。
That is, this device connects the IC card 1 to a card reader.
It is possible to connect to the control section 3 consisting of a CPU etc. via the writer 2, and the keyboard 4 and C
It is configured by connecting an RT display device 5, a printer 6, and a floppy disk device 7.

ICカード1は、ユーザが保持し、たとえば商品購入な
どの際にユーザのみが知得している暗証番号の参照や必
要データの蓄積などを行なうもので、第4図にその機能
ブロックを示すように、リード・ライト部11、暗証設
定・暗証照合部12、および暗号化・?!号化部13な
どの基本機能を実行する部分と、これらの基本機能を管
理するスーパバイザ14とで構成されている。リード・
ライト部11は、カードリーダ・ライタ2との間でデー
タを読出し、書込み、あるいは消去を行なう機能である
。暗証設定・暗証照合部12は、ユーザが設定した暗証
番号の記憶および読出禁止処理を行なうとともに、暗証
番号の設定後にその暗証番号の照合を行ない、以後の処
理の許可を与える機能である。暗号化・復号化部13は
、たとえば通信回線を介して制御部3から他の端末装置
へデータを送信する場合の通信データの漏洩、偽造を防
止するための暗号化や暗号化されたデータの復号化を行
なうものであり、たとえばDES(Oata  Enc
rypt+on  5tandard)など、充分な暗
号強度を有する暗号化アルゴリズムにしたがってデータ
処理を行なう機能である。
The IC card 1 is held by the user and is used to refer to a personal identification number known only to the user when making a purchase, for example, and to store necessary data. Its functional blocks are shown in Figure 4. , a read/write section 11, a password setting/password verification section 12, and an encryption/? ! It consists of a part that executes basic functions such as an encoding unit 13, and a supervisor 14 that manages these basic functions. Lead
The write section 11 has a function of reading, writing, or erasing data from/to the card reader/writer 2. The password setting/password verification unit 12 has a function of storing the password set by the user and prohibiting reading of the password, as well as verifying the password after setting the password and granting permission for subsequent processing. The encryption/decryption unit 13 performs encryption and encryption of encrypted data to prevent leakage and forgery of communication data when transmitting data from the control unit 3 to another terminal device via a communication line, for example. For example, DES (Oata Enc
This function performs data processing according to an encryption algorithm with sufficient cryptographic strength, such as crypt+on 5 standard).

スーパバイザ14は、カードリーダ・ライタ2から入力
された機能コードもしくはデータの付加された機能コー
ドを解読し、前記基本機能のうち必要な機能を選択して
実行させる機能である。
The supervisor 14 has the function of decoding the function code input from the card reader/writer 2 or the function code to which data is added, and selecting and executing a necessary function among the basic functions.

これらの諸機能を発揮させるために、ICカード1は例
えば第5図に示すように、制御部としての制御素子(た
とえばCPLI)15、データメモリ部としての記憶内
容が消去可能な不揮発性のデータメモリ16、プログラ
ムメモリ部としてのプログラムメモリ17、およびカー
ドリーダ・ライタ2との電気的接触を得るためのコンタ
クト部18によって構成されており、これらのうち破線
内の部分(制御素子15、データメモリ16、プログラ
ムメモリ17)は1つのICチップで構成されている。
In order to perform these functions, the IC card 1 has a control element (for example, CPLI) 15 as a control section, and non-volatile data whose storage contents can be erased as a data memory section, as shown in FIG. It is composed of a memory 16, a program memory 17 as a program memory section, and a contact section 18 for obtaining electrical contact with the card reader/writer 2. 16, program memory 17) is composed of one IC chip.

プログラムメモリ17は、たとえばマスクROMで構成
されており、前記各基本機能を実現するサブルーチンを
備えた制御素子15の制御プログラム(処理プログラム
)を記憶するものである。データメモリ16は各種デー
タの記憶に使用され、たとえばEEPROMで構成され
ている。
The program memory 17 is composed of, for example, a mask ROM, and stores a control program (processing program) for the control element 15, which includes subroutines for realizing each of the basic functions. The data memory 16 is used to store various data and is composed of, for example, an EEPROM.

データメモリ16は、複数のエリアに分割されていて、
第7図に示すようなデータエリアの登録状態を識別する
識別情報エリアと、第8図に示すような複数のデータエ
リアとから構成されており、それぞれのエリアにはエリ
ア番号[00〜FF]が与えられている。
The data memory 16 is divided into multiple areas,
It consists of an identification information area that identifies the registration status of the data area as shown in Figure 7, and multiple data areas as shown in Figure 8, and each area has an area number [00 to FF]. is given.

また、各データエリアは、第11図に示すように、書込
みポインタPa、書込み済ポインタPb。
Furthermore, each data area has a write pointer Pa and a written pointer Pb, as shown in FIG.

複数のレコードし、および各レコードの長さを示すレン
グス1で構成されている。
It consists of a plurality of records and a length 1 indicating the length of each record.

第7図に示すデータエリアの登録状態を識別する識別情
報エリアには、全データエリアのそれぞれの先頭アドレ
スおよびデータエリアのサイズがエリア番号に対応して
記憶されているとともに、エリア番号に対応してエリア
制御情報が記憶されるようになっている。エリア制御情
報は、エリアが満杯か否かにより追記書込みが可能であ
るか否か、対象エリアが正常であるか否かを示すように
なっている。
In the identification information area for identifying the registration status of the data area shown in FIG. 7, the start address of all data areas and the size of the data area are stored in correspondence with the area number. area control information is stored. The area control information indicates whether additional writing is possible depending on whether the area is full or not, and whether or not the target area is normal.

たとえば8ビツト構成であり、1ビツト目が“O”の場
合、対応するデータエリアに対して重ね書き(最も古い
レコードの書換え)が可能を示し、1ビツト目が“1”
の場合、対応するデータエリアに対して重ね書きが不可
能を示し、2ビツト目が“0″の場合、対応するデータ
エリアが正常に動作できることを示し、1ビツト目が“
1”の場合、対応するデータエリアが正常に動作できな
いことを示すものである。データエリアは、データエリ
アの登録状態を識別する識別情報エリアによって管理さ
れ、データエリアの各レコードエリアへの書込み後か否
かは上記書込み済ポインタpbで示している。レコード
エリアへの書込みは、上記書込みポインタpaの制御に
よって順次行われる。
For example, if it has an 8-bit configuration and the first bit is "O", it indicates that overwriting (rewriting the oldest record) is possible for the corresponding data area, and the first bit is "1".
, it indicates that overwriting is not possible for the corresponding data area, and when the second bit is “0”, it indicates that the corresponding data area can operate normally, and the first bit is “0”.
1” indicates that the corresponding data area cannot operate normally.The data area is managed by an identification information area that identifies the registration status of the data area, and after writing to each record area of the data area. Whether this is the case is indicated by the written pointer pb.Writing to the record area is performed sequentially under the control of the write pointer pa.

カードリーダ・ライタ2は、ICカード1と制御部3と
の間で機能コードやデータの授受を行なうものである。
The card reader/writer 2 is used to exchange function codes and data between the IC card 1 and the control section 3.

具体的には、第6図に示すように、図示しないカード挿
入口に挿入されたICカード1を所定の位置まで搬送す
る搬送礪構21、所定の位置にセットされたICカード
1のコンタクト部18に電気的に接触されるコンタクト
部22、全体の制御を司るCPUなどからなる制御回路
23、制御回路23と制御部3との間で命令データや応
答データの授受を行なうための入出力インターフェース
回路24、およびデータを記憶するデータメモリ25な
どから構成されている。
Specifically, as shown in FIG. 6, there is a transport mechanism 21 that transports the IC card 1 inserted into a card insertion slot (not shown) to a predetermined position, and a contact portion of the IC card 1 set in the predetermined position. 18, a control circuit 23 consisting of a CPU that controls the entire system, and an input/output interface for exchanging command data and response data between the control circuit 23 and the control unit 3. It is composed of a circuit 24, a data memory 25 for storing data, and the like.

次に、このような構成において動作を説明する。Next, the operation in such a configuration will be explained.

まず、ICカード1は、定常状態においてはカードリー
ダ・ライタ2からの命令データが入力されると、その命
令データにしたがって基本機能を実行し、カードリーダ
・ライタ2にその応答データを出力し、再び命令データ
待ち状態に戻る。
First, in a steady state, when command data is input from the card reader/writer 2, the IC card 1 executes basic functions according to the command data, outputs response data to the card reader/writer 2, The state returns to the instruction data waiting state.

なお、カードリーダ・ライタ2からICカード1に出力
される命令データは、たとえば第9図に示すようなフォ
ーマットであり、同図(a)に示すように機能コードの
みの形態、または同図(b)に示すように機能コードに
データを付加した形態である。
The command data output from the card reader/writer 2 to the IC card 1 has a format as shown in FIG. 9, for example, and may be in the form of only a function code as shown in FIG. As shown in b), data is added to the function code.

たとえば、エリ、アステータス要求の場合、コマンドは
第10図(a)に示すように、エリアステータス要求と
エリア番号とから構成され、レスポンスはエリアステー
タス要求と応答データとから構成されている。応答デー
タは、同図(b)に示すように、上記エリア制御情報、
データエリアの容量(実際にデータを蓄えられるバイト
数)、データエリアの記録済みレコード数(データエリ
ア内に存在する全レコード数)、および追記できるバイ
ト数(特定情報)によって構成されている。
For example, in the case of an area status request, the command consists of an area status request and an area number, and the response consists of an area status request and response data, as shown in FIG. 10(a). The response data includes the above area control information, as shown in FIG.
It consists of the capacity of the data area (the number of bytes that can actually store data), the number of recorded records in the data area (the total number of records existing in the data area), and the number of additionally recordable bytes (specific information).

次に、データメモリ16にデータを書込むデータ書込み
動作について、第2図に示すフローチャートを参照して
説明する。まず、定常状態では、カードリーダ・ライタ
2からの命令データ待ち状態となっており、このときカ
ードリーダ・ライタ2から命令データが入力されると、
制御素子15はまず命令データに含まれる機能コードが
書込み機能コードであるか否かを確認する。書込み機能
コードであれば、IIIIIII素子15は命令データ
に付加されているエリア番号をデータメモリ16のデー
タエリア「00」から探し出す。見つからなければ、制
御素子15はエリア未確認を意味する応答データを出力
し、命令データ待ち状態に戻る。
Next, a data write operation for writing data into the data memory 16 will be explained with reference to the flowchart shown in FIG. First, in the steady state, it is in a state of waiting for command data from the card reader/writer 2, and when command data is input from the card reader/writer 2 at this time,
The control element 15 first checks whether the function code included in the command data is a write function code. If it is a write function code, the IIIIII element 15 searches the data area "00" of the data memory 16 for the area number added to the command data. If it is not found, the control element 15 outputs response data indicating that the area has not been confirmed, and returns to the command data waiting state.

見つかれば、制御素子15はそれに対応したデータエリ
アの識別情報つまり先頭アドレス、データエリアを構成
しているバイト数、およびエリア制御情報を内蔵するR
AMに保持し、対象エリアの位置を認識する。
If found, the control element 15 generates an R containing the identification information of the corresponding data area, that is, the start address, the number of bytes constituting the data area, and area control information.
AM and recognize the position of the target area.

次に、制御素子15は、該当データエリアの書込みポイ
ントPaと命令データに付加されている入力データ列を
加算し、カレントポインタ(図示しない)ヘセットする
。ついで、制御素子15は書込み済ポインタPbが最大
値「0」か否かにより、データエリアが満杯か否か、つ
まり未書込みエリアが存在していないか否かを判断する
。これにより、書込み済ポインタpbが最大111 r
OJでなく、未書込みエリアが存在していると判断した
場合、カレントポインタと書込み済ポインタPbとを比
較する。この比較の結果、カレントポインタの値が最大
値に達していない時、つまり入力データ列が未書込みエ
リアよりも小さい時、第11図(a)に示すように、カ
レントポインタで示されている番地から入力データ列の
長さを示すレングス11と入力データ列としてのレコー
ドLlを書込む。
Next, the control element 15 adds the write point Pa of the data area and the input data string added to the command data, and sets the sum to a current pointer (not shown). Next, the control element 15 determines whether the data area is full, that is, whether there is no unwritten area, based on whether the written pointer Pb is the maximum value "0". This increases the written pointer pb to a maximum of 111 r
If it is determined that there is an unwritten area instead of OJ, the current pointer and written pointer Pb are compared. As a result of this comparison, when the value of the current pointer has not reached the maximum value, that is, when the input data string is smaller than the unwritten area, the address indicated by the current pointer is From there, length 11 indicating the length of the input data string and record Ll as the input data string are written.

そして、IIIIIl素子15は、カレントポインタか
ら命令データを書込んだ後、カレントポインタを書込み
ポインタpaにセットし更新し、書込みポインタPaを
書込み済ポインタPbヘセットし更新する。また、1u
ll素子15は正常な書込み終了の応答データを出力し
、命令データ持ち状態に戻る。
After writing the instruction data from the current pointer, the IIII element 15 sets the current pointer to the write pointer pa and updates it, and sets the write pointer Pa to the written pointer Pb and updates it. Also, 1u
The ll element 15 outputs response data indicating the completion of normal writing, and returns to the command data holding state.

以上の動作を未書込みエリアが無くなるまで繰返す。The above operation is repeated until there are no unwritten areas left.

また、上記書込み済ポインタPbがrOJで、未書込み
エリアが存在していないと判断した場合、あるいはカレ
ントポインタの値が最大値に達している時(第11図(
b)のような状態)、つまり入力データ列が未書込みエ
リアよりも大きい時、制御素子15は、識別情報エリア
内のエリアIII WJ情報により、重ね書きが可能か
不可能かを判断する。そして、重ね書きが可能な場合、
ill m、素子15は該当エリアの最も古いデータ列
(11、Ll)のポインタにカレントポインタをセット
し、第11図(C)に示すように、カレントポインタに
示されている番地から入力データ列の長さを示すレング
ス1bと入力データ列としてのレコードlbを書込む。
Also, when the written pointer Pb is rOJ and it is determined that there is no unwritten area, or when the value of the current pointer has reached the maximum value (see Fig. 11),
In a state like b), that is, when the input data string is larger than the unwritten area, the control element 15 determines whether overwriting is possible or not based on the area III WJ information in the identification information area. And if overwriting is possible,
ill m, element 15 sets the current pointer to the pointer of the oldest data string (11, Ll) in the corresponding area, and starts input data string from the address indicated by the current pointer, as shown in FIG. 11(C). Write length 1b indicating the length of , and record lb as the input data string.

そして、IIJIIl素子15は、カレントポインタか
ら入力データを書込んだ後、カレントポインタを書込み
ポインタPaにセットし更新し、書込み済ポインタpb
が最大値を示している場合、書込み済ポインタpbの値
はそのままとし、また重ね書き実行後は書込み済ポイン
タPbを最大値rOJにセットし更新する。また、制御
素子15は正常な書込み終了の応答データを出力し、命
令データ持ち状態に戻る。
After writing the input data from the current pointer, the IIJIIl element 15 updates the current pointer by setting it to the write pointer Pa, and updates the written pointer pb.
If indicates the maximum value, the value of the written pointer pb is left as is, and after the overwriting is executed, the written pointer Pb is set to the maximum value rOJ and updated. Further, the control element 15 outputs response data indicating the completion of normal writing, and returns to the command data holding state.

また、重6書きが不可能である場合、未書込みエリア無
しを意味する応答データを出力する。
Furthermore, if overlapping 6-write is not possible, response data indicating that there is no unwritten area is output.

次に、カードリーダ・ライタ2からICカード1ヘエリ
アステータス要求(状態情報命令)が出力された場合の
動作について、第1図に示すフローチャートを参照して
説明する。このエリアステータス要求は、所定のデータ
エリアへの書込みを行なう前に行われるようになってい
る。すなわち、カードリーダ・ライタ2から命令データ
として、エリアステータス要求とそのエリアとを示すコ
マンドがICカード1へ入力される。すると、制御素子
15はまず命令データに含まれる機能コードがエリアス
テータス要求であるか否かを確認する。
Next, the operation when an area status request (status information command) is output from the card reader/writer 2 to the IC card 1 will be described with reference to the flowchart shown in FIG. This area status request is made before writing to a predetermined data area. That is, a command indicating an area status request and its area is input to the IC card 1 as command data from the card reader/writer 2. Then, the control element 15 first checks whether the function code included in the command data is an area status request.

エリアステータス要求であれば、制御素子15は命令デ
ータに付加されているエリア番号をデータメモリ16の
データエリア「oO」から探し出す。
If it is an area status request, the control element 15 searches the data area "oO" of the data memory 16 for the area number added to the command data.

見つからなければ、制御素子15はエリア未確認を意味
する応答データを出力し、命令データ持ち状態に戻る。
If it is not found, the control element 15 outputs response data indicating that the area has not been confirmed, and returns to the command data holding state.

見つかれば、制御素子15は識別情報エリアから該当デ
ータエリアのサイズ、エリア制御情報を読出す。また、
制御素子15は、該当するデータエリア内の書込み済ポ
インタPbが最大値「0」であるか否かを判定し、未書
込みエリアが存在している場合、該当するデータエリア
の最大値から書込みポインタPaを減算して実残量を算
出し、この実残量をサイズ、エリア制御情報と合せて、
応答データとし、その応答データをカードリード・ライ
タ2に出力し、命令データ待ち状態に戻る。
If found, the control element 15 reads out the size of the corresponding data area and area control information from the identification information area. Also,
The control element 15 determines whether the written pointer Pb in the applicable data area is the maximum value "0", and if an unwritten area exists, the write pointer is changed from the maximum value of the applicable data area. Calculate the actual remaining amount by subtracting Pa, and combine this actual remaining amount with the size and area control information,
It outputs the response data to the card reader/writer 2 and returns to the command data waiting state.

また、制御素子15は未書込みエリアが存在しないで重
ね書きが行われている場合、未書込みエリアの残量とし
ての追記できるバイト数(特定情報) 「O」をサイズ
、エリアシ1m情報と合せて応答データとし、その応答
データをカードリード・ライタ2に出力し、命令データ
待ち状態に戻る。
In addition, when there is no unwritten area and overwriting is performed, the control element 15 sets the number of bytes (specific information) that can be additionally written as the remaining amount of the unwritten area together with the size and area size 1m information. It outputs the response data to the card reader/writer 2 and returns to the command data waiting state.

これにより、カードリーダ・ライタ2は、ICカード1
からの応答データ、つまり未書込みエリアの実残量とし
ての追記できるバイト数、エリア制御情報、エリアの容
量、エリアの記録済レコード数をCRTディスプレイ装
置5で表示する。この表示により、ユーザは入力データ
列が未記録エリアより小さい場合、その書込み指令を入
力し、入力データ列が未記録エリアより大きく、かつそ
のデータエリアが重ね書き可能な場合、その書込み指令
を入力し、入力データ列が未記録エリアより大きく、か
つそのデータエリアが重ね書き不可能な場合、他のエリ
アに対するステータス要求を出力する。
As a result, the card reader/writer 2 reads the IC card 1.
The CRT display device 5 displays the response data from , that is, the number of bytes that can be additionally written as the actual remaining amount of the unwritten area, area control information, area capacity, and number of recorded records in the area. This display allows the user to input the write command if the input data string is smaller than the unrecorded area, and input the write command if the input data string is larger than the unrecorded area and the data area can be overwritten. However, if the input data string is larger than the unrecorded area and the data area cannot be overwritten, a status request for another area is output.

また、追記できるバイト数(未書込みエリア残量)が「
0]の場合、ユーザは重ね書きが行われているエリアで
あることを判断できる。
Also, the number of bytes that can be added (remaining unwritten area) is "
0], the user can determine that the area is being overwritten.

上記したように、エリアステータス要求に対して対応す
るエリアの状態を応答することができる。
As described above, the status of the corresponding area can be responded to the area status request.

これにより、たとえばデータの追加書込みや更新の繰返
しなどでエリアが満杯となり、未書込みエリアが無くな
った際、最も古いデータ上に重ね書きして良いかをユー
ザへ知らせることができる。
As a result, when the area becomes full due to additional writing of data or repeated updating, for example, and there is no unwritten area left, it is possible to inform the user whether to overwrite the oldest data.

また、エリアの状態を認知した後に書込みデータを送る
ことができ、重ね書きが実行されたことに対してもユー
ザに知らせることが可能である。
Furthermore, it is possible to send write data after recognizing the state of the area, and it is also possible to notify the user that overwriting has been executed.

なお、前記実施例では、ICカードに内蔵されるデータ
メモリに対してデータを記憶する場合について説明した
が、この発明はこれに限定されるものでなく、他の記憶
媒体に対してデータを記憶する場合にも同様に適用でき
る。
In the above embodiments, a case has been described in which data is stored in a data memory built into an IC card, but the present invention is not limited to this, and data may be stored in other storage media. The same applies to cases where

[発明の効果] 以上詳述したようにこの発明によれば、データエリアの
状態を知らせることができる携帯可能電子装置を提供で
きる。
[Effects of the Invention] As detailed above, according to the present invention, it is possible to provide a portable electronic device that can notify the state of a data area.

【図面の簡単な説明】[Brief explanation of drawings]

図面はこの発明の一実施例を説明するためのもので、第
1図はエリアステータスに対する処理を説明するための
フローチャート、第2図はデータの書込み処理を説明す
るためのフローチャート、第3図はカード取扱装置の構
成を示すブロック図、第4図はICカードの機能ブロッ
クを示す図、第5図はICカードに内蔵するICチップ
の構成を示すブロック図、第6図はカードリーダ・ライ
タの構成を示すブロック図、第7図および第8図はデー
タメモリの構成を示す図、第9図はカートリ  −一ダ
・ライタから出力される命令データのフォーマットを示
す図、第10図はエリアステータス要求に対する命令デ
ータと応答データの具体例を示す図、第11図はデータ
メモリ内の具体例を示す図である。 1・・・・・・ICカード(携帯可能電子装置)、2・
・・・・・カードリーダ・ライタ、15・・・・・・制
御素子、16・・・・・・データメモリ(記憶媒体)、
17・・・・・・プログラムメモリ。 出願人代理人 弁理士 鈴 江 武 彦第1図 第3図 第4図 第5図 第6図 第7図 第8図 第9図 (a) (b) 第10図
The drawings are for explaining one embodiment of the present invention, and FIG. 1 is a flowchart for explaining processing for area status, FIG. 2 is a flowchart for explaining data writing processing, and FIG. 3 is a flowchart for explaining processing for writing data. Figure 4 is a block diagram showing the configuration of the card handling device, Figure 4 is a diagram showing the functional blocks of the IC card, Figure 5 is a block diagram showing the configuration of the IC chip built into the IC card, Figure 6 is the block diagram of the card reader/writer. 7 and 8 are block diagrams showing the configuration of the data memory, FIG. 9 is a diagram showing the format of command data output from the cartridge reader/writer, and FIG. 10 is the area status FIG. 11 is a diagram showing a specific example of command data and response data for a request, and FIG. 11 is a diagram showing a specific example of the data in the data memory. 1...IC card (portable electronic device), 2.
... Card reader/writer, 15 ... Control element, 16 ... Data memory (storage medium),
17...Program memory. Applicant's Representative Patent Attorney Takehiko Suzue Figure 1 Figure 3 Figure 4 Figure 5 Figure 6 Figure 7 Figure 8 Figure 9 (a) (b) Figure 10

Claims (6)

【特許請求の範囲】[Claims] (1)複数のエリアからなるデータメモリと、このデー
タメモリに対してデータの読出しおよび書込みを行なう
ための制御素子を有し、選択的に外部からの入出力を行
なう携帯可能電子装置において、上記データメモリにデ
ータを書込む際、外部からの状態情報命令に応じてデー
タを書込むエリアの状態を判断する判断手段と、 この判断手段の判断結果を示す特定情報を外部へ出力す
る出力手段と、 を具備したことを特徴とする携帯可能電子装置。
(1) In a portable electronic device that has a data memory consisting of a plurality of areas and a control element for reading and writing data to the data memory, and selectively performs input/output from the outside, When writing data to the data memory, a determining means determines the state of the area in which data is to be written in response to a status information command from the outside; and an output means outputs specific information indicating the determination result of the determining means to the outside. A portable electronic device characterized by comprising the following.
(2)データを書込むエリアの状態が、重ね書きが行わ
れているか否かであることを特徴とする特許請求の範囲
第1項記載の携帯可能電子装置。
(2) The portable electronic device according to claim 1, wherein the state of the area in which data is written is whether or not overwriting is being performed.
(3)データを書込むエリアの状態が、エリアのサイズ
、エリアの残量であることを特徴とする特許請求の範囲
第1項記載の携帯可能電子装置。
(3) The portable electronic device according to claim 1, wherein the state of the area in which data is written is the size of the area and the remaining amount of the area.
(4)データメモリが、書換え可能な不揮発性メモリで
あることを特徴とする特許請求の範囲第1項記載の携帯
可能電子装置。
(4) The portable electronic device according to claim 1, wherein the data memory is a rewritable nonvolatile memory.
(5)特定情報が、重ね書きを示す情報と対応するエリ
アの残量情報であることを特徴とする特許請求の範囲第
1項記載の携帯可能電子装置。
(5) The portable electronic device according to claim 1, wherein the specific information is information indicating remaining capacity of an area corresponding to information indicating overwriting.
(6)制御素子が、CPUであることを特徴とする特許
請求の範囲第1項記載の携帯可能電子装置。
(6) The portable electronic device according to claim 1, wherein the control element is a CPU.
JP62058118A 1987-03-13 1987-03-13 Portable electronic equipment Pending JPS63223994A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62058118A JPS63223994A (en) 1987-03-13 1987-03-13 Portable electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62058118A JPS63223994A (en) 1987-03-13 1987-03-13 Portable electronic equipment

Publications (1)

Publication Number Publication Date
JPS63223994A true JPS63223994A (en) 1988-09-19

Family

ID=13075061

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62058118A Pending JPS63223994A (en) 1987-03-13 1987-03-13 Portable electronic equipment

Country Status (1)

Country Link
JP (1) JPS63223994A (en)

Similar Documents

Publication Publication Date Title
JP2537199B2 (en) IC card
KR900002071B1 (en) Portable electronic device
JPH0758500B2 (en) Portable electronic device
JP3568970B2 (en) IC card issuing device
JPS62190584A (en) Portable electronic device
US7167943B2 (en) Memory apparatus
JP3471842B2 (en) Data management device, data storage device, and data management method
JPH10198776A (en) Portable information recording medium, and its information writing and reading method
JPS63223994A (en) Portable electronic equipment
JPH026115B2 (en)
JPH0253154A (en) Portable electronic equipment
JPS6383894A (en) Portable electronic device
JP2537200B2 (en) Portable electronic devices
JP2609645B2 (en) Portable electronic devices
JPS63145582A (en) Data storage system
JP2537198B2 (en) Portable electronic devices
JPS62159295A (en) Portable electronic device
JPS63223995A (en) Portable electronic equipment
JP2675563B2 (en) Portable electronic devices
JPS63228282A (en) Portable electronic equipment
JPH0233690A (en) Method for issuing ic card
JPS63787A (en) Portable electronic equipment
JPS63785A (en) Portable electronic equipment
JP3054119B2 (en) Portable electronic devices
JP3209994B2 (en) Portable electronic devices