[go: up one dir, main page]

JP3007425B2 - IC card - Google Patents

IC card

Info

Publication number
JP3007425B2
JP3007425B2 JP3021080A JP2108091A JP3007425B2 JP 3007425 B2 JP3007425 B2 JP 3007425B2 JP 3021080 A JP3021080 A JP 3021080A JP 2108091 A JP2108091 A JP 2108091A JP 3007425 B2 JP3007425 B2 JP 3007425B2
Authority
JP
Japan
Prior art keywords
address
read
card
file
data
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
Application number
JP3021080A
Other languages
Japanese (ja)
Other versions
JPH0589303A (en
Inventor
誠治 平野
正志 高橋
義一 寄本
Original Assignee
凸版印刷 株式会社
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
Family has litigation
First worldwide family litigation filed litigation Critical https://patents.darts-ip.com/?family=12044909&utm_source=google_patent&utm_medium=platform_link&utm_campaign=public_patent_search&patent=JP3007425(B2) "Global patent litigation dataset” by Darts-ip is licensed under a Creative Commons Attribution 4.0 International License.
Application filed by 凸版印刷 株式会社 filed Critical 凸版印刷 株式会社
Priority to JP3021080A priority Critical patent/JP3007425B2/en
Publication of JPH0589303A publication Critical patent/JPH0589303A/en
Application granted granted Critical
Publication of JP3007425B2 publication Critical patent/JP3007425B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【産業上の利用分野】この発明は、記憶領域でのアドレ
ス方式が異なるアプリケーションを利用可能とするIC
カードに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an IC for making it possible to use an application having a different address system in a storage area.
About the card.

【0001】[0001]

【従来の技術】周知のように、近年、いわゆるICカー
ドと総称するカードが多方面に採用されており、例えば
バンクカード、IDカード、クレジットカード等にCP
U、メモリを内蔵したICカードや、電子手帳または携
帯型のパーソナルコンピュータ等の外部記憶装置として
単にデータを記憶するメモリだけを搭載したICメモリ
カードが使われている。
2. Description of the Related Art As is well known, in recent years, cards generally referred to as so-called IC cards have been widely used. For example, CP cards are used in bank cards, ID cards, credit cards, and the like.
U and IC cards with a built-in memory, and IC memory cards with only a memory for simply storing data as an external storage device such as an electronic organizer or a portable personal computer are used.

【0002】この種のカードに搭載される記憶手段とし
ては、ROM、E2PROM等の不揮発性メモリ、或い
はDRAM、SRAM等の揮発性メモリが用いられてい
る。特に、CPU、メモリを内蔵したICカードでは、
1チップ上に両者を組込形成したマイクロプロセッサが
多用されている。このようなICカードは、カードリー
ダライタを介してデータの授受を行うものであり、それ
ぞれICカードのメモリへのアクセスは、内蔵のCPU
により行われ、メモリカードのメモリへのアクセスは、
端末側のCPUにより行われるようになっている。
As a storage means mounted on this kind of card, a nonvolatile memory such as a ROM and an E 2 PROM, or a volatile memory such as a DRAM and an SRAM is used. In particular, in an IC card with a built-in CPU and memory,
2. Description of the Related Art A microprocessor in which both are incorporated and formed on one chip is often used. Such an IC card transmits and receives data via a card reader / writer. Each of the IC cards accesses the memory of the IC card by a built-in CPU.
The access to the memory of the memory card is performed by
The processing is performed by the CPU on the terminal side.

【0003】このアクセスの際には、所定のメモリアド
レス方式に応じたデータの読み出しおよび書込みがなさ
れる。このアドレス方式には、論理アドレス方式、物理
アドレス方式およびレコード管理方式がある。まず、こ
の論理アドレス方式とは、メモリを管理するソフトウェ
アにおいて定義された相対アドレスによって、当該メモ
リのアドレス空間を規定し、この相対アドレスに基づい
て所定の記憶エリアにアクセスするようにした方式であ
る。なお、この相対アドレスは、所定の変換テーブルに
より実際のメモリアドレス(絶対アドレス)に変換され
る。物理アドレス方式とは、上記絶対アドレスでアドレ
ス空間を規定し、この絶対アドレスに基づいて所定の記
憶エリアにアクセスする方式である。レコード管理方式
とは、メモリ上の記憶エリアを所定データ長毎のレコー
ドに区分し、区分したレコードを識別するレコード番号
またはレコードポインタを用いて記憶エリアを管理する
方式である。故に、データの授受を行う場合には、適用
されるカードのアドレス方式に準拠したアプリケーショ
ンを具備し、それに基づいてデータの読み出し、書込み
とを行うように構成されている。
At the time of this access, data is read and written according to a predetermined memory address system. The address method includes a logical address method, a physical address method, and a record management method. First, the logical address method is a method in which an address space of the memory is defined by a relative address defined in software for managing the memory, and a predetermined storage area is accessed based on the relative address. . This relative address is converted into an actual memory address (absolute address) by a predetermined conversion table. The physical address method is a method in which an address space is defined by the absolute address and a predetermined storage area is accessed based on the absolute address. The record management method is a method of dividing a storage area on a memory into records of a predetermined data length, and managing the storage area using a record number or a record pointer for identifying the divided record. Therefore, when data is transmitted and received, an application compliant with the applicable card addressing system is provided, and data is read and written based on the application.

【0004】[0004]

【発明が解決しようとする課題】ところで、従来のIC
カードおいては、上述した各種アドレス方式のいずれか
によってメモリの記憶エリアが管理されており、これら
各アドレス方式に対応するアプリケーションが種々混在
した状況下にある。したがって、ICカードを異なるア
ドレス方式のアプリケーションに対応させるためには、
これらアドレス方式を個々に管理するマイクロチップを
カード内に具備しなければならないが、こうした場合、
該カードのコスト上昇などの様々な不都合を招致する。
このため、現実的には、ICカードのアドレス方式に対
応したアプリケーションでなければ、カードのデータに
アクセスすることができないという欠点があった。この
発明は上述した事情に鑑みてなされたもので、アドレス
方式が異なるアプリケーションに容易に対応することが
できるICカードを提供することを目的としている。
The conventional IC
In the card, the storage area of the memory is managed by any of the above-described various address systems, and various applications corresponding to these address systems are mixed. Therefore, in order to make the IC card compatible with applications of different address systems,
A microchip for individually managing these addressing schemes must be provided in the card. In such a case,
This leads to various inconveniences such as an increase in the cost of the card.
For this reason, in reality, there is a disadvantage that data on the card cannot be accessed unless the application is compatible with the address method of the IC card. The present invention has been made in view of the above circumstances, and has as its object to provide an IC card that can easily cope with applications having different address systems.

【0005】[0005]

【課題を解決するための手段】この発明は、図1に示す
ように、少なくとも2つ以上に分割された記憶領域を有
し、該記憶領域毎にアドレス方式を識別する属性情報b
の領域を設けた記憶手段aと、前記属性情報bの領域に
対応したアドレス方式で入出力制御する制御手段cとを
具備することを特徴としている。
As shown in FIG. 1, the present invention has a storage area divided into at least two or more sections.
And attribute information b for identifying an address method for each storage area.
Storage means a provided with an area of
Control means c for input / output control by a corresponding address method;
It is characterized by comprising.

【0006】[0006]

【作用】上記構成によれば、記憶手段aには、少なくと
も2つ以上に分割された記憶領域毎にアドレス方式を識
別する属性情報bの領域が設けられ、制御手段cは前記
属性情報bの領域に対応したアドレス方式で入出力制御
を行う。これにより、アドレス方式が異なるアプリケー
ションに対応可能となる。
According to the above arrangement, the storage means a has at least
Also recognizes the address method for each of the two or more divided storage areas.
There is provided another area for attribute information b, and the control means c
Input / output control by address method corresponding to the area of attribute information b
Do. As a result, it is possible to cope with applications having different address systems.

【0007】[0007]

【実施例】以下、図面を参照してこの発明の実施例につ
いて説明する。 A.実施例の構成 図2は、この発明による一実施例の構成を示すブロック
図である。この図に示すように、ICカード11は、カ
ードリーダライタ21との間でコマンド、データの送受
信を行うI/O12と、これらのコマンド処理、あるい
はデータ処理のプログラムやデータなどが格納されるE
EPROM13と、データ通信の制御およびこれらのプ
ログラムに基づいてのデータ処理を行うCPU14と、
このCPU14のワークエリアとして用いられるRAM
15とを具備してなる。
Embodiments of the present invention will be described below with reference to the drawings. A. FIG. 2 is a block diagram showing a configuration of an embodiment according to the present invention. As shown in this figure, the IC card 11 has an I / O 12 for transmitting and receiving commands and data to and from the card reader / writer 21 and an E / O 12 for storing a command processing or data processing program and data.
An EPROM 13, a CPU 14 for controlling data communication and performing data processing based on these programs,
RAM used as a work area of the CPU 14
15 is provided.

【0008】また、このICカード11との間でデータ
の授受を行うカードリーダライタ21は、I/O21
と、ROM23と、CPU24と、RAM25とから構
成されている。なお、このカードリーダライタ21は、
通信回線を介し、ホストコンピュータ側とデータ通信で
きるようになっている。
A card reader / writer 21 for exchanging data with the IC card 11 has an I / O 21
, A ROM 23, a CPU 24, and a RAM 25. In addition, this card reader / writer 21
Data communication can be performed with the host computer via a communication line.

【0009】このICカード11において、EEPRO
M13の記憶エリアは、システム情報を格納しておくシ
ステム領域と、ユーザ情報を格納しておくユーザ領域と
に分れており、さらに、図3に示すファイル構造となっ
ている。図3に示すように、このICカード11は、シ
ステムディレクトリSDの下に3つのルートディレクト
リRT1〜RT3を構成しており、これらによってファ
イル管理がなされている。ここで、ディレクトリRT1
は前述した物理アドレス方式のファイルが管理される領
域、ディレクトリRT2は前述した論理アドレス方式の
ファイルが管理される領域、また、ディレクトリRT3
は前述したレコード管理方式のファイルが管理される領
域である。このように、この実施例によるICカード
は、メモリの所定エリアが3分割され、それぞれ各アド
レス方式により管理されるように構成されている。な
お、このICカードには、CPUが具備され、これによ
り各アドレス方式のファイル管理がなされるように構成
されている。
In this IC card 11, EEPRO
The storage area of M13 is divided into a system area for storing system information and a user area for storing user information, and has a file structure shown in FIG. As shown in FIG. 3, the IC card 11 has three root directories RT1 to RT3 under the system directory SD, and these are used for file management. Here, the directory RT1
Is an area where the above-mentioned physical address file is managed, directory RT2 is an area where the above-mentioned logical address file is managed, and directory RT3 is a directory RT3.
Is an area in which a file of the record management method described above is managed. As described above, the IC card according to the present embodiment is configured such that a predetermined area of the memory is divided into three, and each is managed by each address method. This IC card is provided with a CPU so that file management of each address method is performed.

【0010】これらディレクトリRT1〜RT3は、そ
れぞれ図4に示すフォーマットでアドレス管理情報が登
録されている。すなわち、図4(イ)は物理アドレス方
式の管理フォーマット、図4(ロ)は論理アドレス方式
の管理フォーマットを示し、図4(ハ)はレコード管理
方式の管理フォーマットを示している。この図におい
て、F1〜Fnは、上記の各フォーマットを形成する所
定バイト長のフレームである。例えば、F1はファイル
名が登録される8バイト長のフレーム、F2は上述した
アドレス方式を識別するための格納形式が登録される1
バイト長のフレームである。また、F3はフレームF1
に定義されたファイル名の先頭アドレスが登録されるフ
レームである。なお、Fnはブロックチェックコードで
あり、このアドレス管理情報をチェックする際に用いら
れる。
Address management information is registered in each of the directories RT1 to RT3 in the format shown in FIG. 4A shows the management format of the physical address system, FIG. 4B shows the management format of the logical address system, and FIG. 4C shows the management format of the record management system. In this figure, F1 to Fn are frames of a predetermined byte length forming each of the above formats. For example, F1 is an 8-byte length frame in which a file name is registered, and F2 is a storage format for identifying the above-described addressing system.
This is a byte-length frame. F3 is the frame F1
Is a frame in which the head address of the file name defined in the above is registered. Fn is a block check code, which is used when checking this address management information.

【0011】図5は、上記フレームF2の記述形式を示
す図である。この図に示すように、1バイト中の下位3
ビットでアドレス方式を識別するようになっている。こ
のフレームF2において、例えば、下位3ビットが「0
01」の場合には物理アドレス方式、「010」の場合
には論理アドレス方式、「100」の場合にはレコード
管理方式を各々表わす。そして、この下位3ビットが物
理アドレス方式を表わしている時には、図4(イ)のフ
レームF4,F5,F6はいずれも未使用となる。一
方、下位3ビットが論理アドレス方式を表わしている場
合、図4(ロ)のフレームF5には、アドレスポインタ
が登録されると共に、フレームF6にエリアサイズが登
録される。このアドレスポインタとは、論理アドレスを
絶対(物理)アドレスに変換する際に用いられる変換テ
ーブルの入力番地を指し示すものである。さらに、下位
3ビットがレコード管理方式を表わしている場合、図4
(ハ)のフレームF4には、格納レコード数が登録さ
れ、かつ、フレームF5に次レコード番号、フレームF
6にレコードサイズがそれぞれ登録される。
FIG. 5 is a diagram showing a description format of the frame F2. As shown in FIG.
The address system is identified by bits. In this frame F2, for example, the lower three bits are “0”.
"01" indicates the physical address method, "010" indicates the logical address method, and "100" indicates the record management method. When the lower three bits indicate the physical address system, the frames F4, F5, and F6 in FIG. 4A are all unused. On the other hand, when the lower three bits indicate the logical address system, the address pointer is registered in the frame F5 in FIG. 4B and the area size is registered in the frame F6. The address pointer indicates an input address of a conversion table used for converting a logical address into an absolute (physical) address. When the lower three bits indicate the record management method,
(C) The number of stored records is registered in frame F4, and the next record number and frame F are stored in frame F5.
6, the record size is registered.

【0012】B.実施例の動作 次に、上記構成によるICカード11にアクセスする場
合の動作について図6〜図20を参照し、説明する。な
お、この動作説明においては、ICカード11がカード
リーダライタ21にセットされ、該カードリーダライタ
21により所定のファイルがアクセスされるものとす
る。まず、カードリーダライタ21にICカード11が
セットされると、該カード内部に搭載されたCPU14
が起動する。これにより、図6に示すメインルーチンが
開始し、ステップSa1に進む。ステップSa1では、
イニシャライズが行われ、この結果、各種内部レジスタ
などがリセットされた後、カードリーダライタ21側に
対してATR情報(リセットした旨を表わす情報)が出
力される。次に、ステップSa2に進むと、CPUはカ
ードリーダライタ側からコマンドを受けるまで待機状態
となる。ここで、カードリーダライタ側から後述する各
種コマンドを受けると、ステップSa2の判断結果が
「YES」となり、次のステップSa3に進む。ステッ
プSa3では、受けたコマンドに応じたコマンド処理ル
ーチンが実行される。そして、ステップSa4では、こ
のコマンド処理ルーチンの実行結果を所定のフォーマッ
トに基づくレスポンスデータとしてカードリーダライタ
側へ送出する。そして、以後、上述したステップSa2
〜Sa4を繰り返す動作となる。
B. Operation of Embodiment Next, an operation when accessing the IC card 11 having the above configuration will be described with reference to FIGS. In the description of the operation, it is assumed that the IC card 11 is set in the card reader / writer 21 and a predetermined file is accessed by the card reader / writer 21. First, when the IC card 11 is set in the card reader / writer 21, the CPU 14 mounted inside the card is used.
Starts. Thus, the main routine shown in FIG. 6 starts, and the process proceeds to step Sa1. In step Sa1,
After initialization is performed and various internal registers and the like are reset, ATR information (information indicating that the reset has been performed) is output to the card reader / writer 21 side. Next, when the process proceeds to step Sa2, the CPU enters a standby state until receiving a command from the card reader / writer. Here, when various commands, which will be described later, are received from the card reader / writer, the result of the determination in step Sa2 is "YES", and the flow proceeds to the next step Sa3. In step Sa3, a command processing routine corresponding to the received command is executed. Then, in step Sa4, the execution result of this command processing routine is sent to the card reader / writer as response data based on a predetermined format. Then, thereafter, the above-described step Sa2
To Sa4 are repeated.

【0013】以下では、このようなステップSa2〜S
a4の動作において、前述した各アドレス方式のファイ
ルにアクセスする場合について詳述する。 所定のファイルを開く場合の動作 この場合、カードリーダライタ21側からICカード1
1へオープンコマンドが供給される。なお、このオープ
ンコマンドのコマンドフォーマットは図8(イ)に示す
通りである。このようなオープンコマンドが供給される
と、前述したメインルーチンにおけるステップSa2の
判断結果が「YES」となり、ステップSa3に進む。
これにより、図7に示すオープンコマンド処理ルーチン
が起動され、ステップSb1に進む。ステップSb1で
は、ステイタスデータSTS1を「0」とし、次のステ
ップSb2へ進む。ここで、ステイタスデータSTS1
とは、コマンド処理ルーチンにおけるエラーの有無を表
わすデータである。ステップSb2では、上記オープン
コマンドに付与されるファイル名FNに基づいて、前述
のルートディレクトリRT1〜RT3をサーチする。そ
して、ステップSb3では、サーチした結果、ファイル
名FNに該当するファイルが存在しているか否かを判断
する。ここで、ファイル名FNに該当するファイルが存
在する場合には、判断結果が「YES」となり、次のス
テップSb4へ進む。ステップSb4では、ファイルが
存在するディレクトリのフレームF3にファイルの先頭
アドレスをセットする。次いで、ステップSb5では、
このディレクトリのアドレス管理情報を読み出し、この
ルーチンを終了する。
In the following, steps Sa2 to S
In the operation a4, a case where a file of each address method described above is accessed will be described in detail. Operation when opening a predetermined file In this case, the IC card 1 is read from the card reader / writer 21 side.
1 is supplied with an open command. The command format of the open command is as shown in FIG. When such an open command is supplied, the determination result of step Sa2 in the main routine described above becomes “YES”, and the process proceeds to step Sa3.
Thus, the open command processing routine shown in FIG. 7 is started, and the process proceeds to step Sb1. In step Sb1, the status data STS1 is set to “0”, and the process proceeds to the next step Sb2. Here, the status data STS1
Is data indicating the presence or absence of an error in the command processing routine. In step Sb2, the above-mentioned root directories RT1 to RT3 are searched based on the file name FN given to the open command. In step Sb3, it is determined whether a file corresponding to the file name FN exists as a result of the search. Here, when a file corresponding to the file name FN exists, the determination result is “YES”, and the process proceeds to the next step Sb4. In step Sb4, the head address of the file is set in the frame F3 of the directory where the file exists. Next, in step Sb5,
The address management information of this directory is read, and this routine ends.

【0014】一方、上述したステップSb3の判断結果
が「NO」の場合、すなわち、オープンコマンドに付与
されたファイル名FNに該当するファイルが存在しない
場合には、ステップSb6に進む。ステップSb6で
は、ステイタスデータSTS1に「4」を加算し、この
ルーチンを終了する。そして、CPU14の処理は、こ
のオープンコマンド処理ルーチンからメインルーチンに
戻り、レスポンス送信処理(ステップSa4)が行われ
る。この場合のレスポンス送信処理では、図8(ロ)に
示すフォーマットのレスポンスデータがICカード11
からカードリーダライタ21側へ送出される。ここで、
ステイタスデータSTS1が「4」であると、カードリ
ーダライタ21側は該当するファイルが存在しない旨の
エラー表示を行う。
On the other hand, if the result of the determination in step Sb3 is "NO", that is, if there is no file corresponding to the file name FN assigned to the open command, the process proceeds to step Sb6. In step Sb6, "4" is added to the status data STS1, and this routine ends. Then, the processing of the CPU 14 returns from the open command processing routine to the main routine, and the response transmission processing (step Sa4) is performed. In the response transmission process in this case, the response data in the format shown in FIG.
Is sent to the card reader / writer 21 side. here,
If the status data STS1 is “4”, the card reader / writer 21 displays an error indicating that the corresponding file does not exist.

【0015】物理アドレス方式のファイルにアクセス
する場合の動作 上述したオープンコマンド処理によって開かれたファイ
ルが物理アドレス方式で管理されている場合には、以下
に示す読み出し動作および書込み動作が行われる。 a.読み出し動作 この読み出し動作では、カードリーダライタ21側から
ICカード11へ図10(イ)に示すフォーマットの読
み出しコマンドが供給される。このような読み出しコマ
ンドが供給されると、図9に示す読み出しコマンド処理
ルーチンが起動され、CPU14の処理がステップSc
1に進む。ステップSc1では、ステイタスデータST
S1を「0」とし、次のステップSc2へ進む。ステッ
プSc2では、ディレクトリRT1のフレームF2が物
理アドレスを表わす格納形式であるか否かを判断する。
そして、フレームF2の下位3ビットが「001」であ
る場合には、この判断結果が「YES」となり、ステッ
プSc3に進む。ステップSc3では、読み出しコマン
ドに付与されたアドレスRAを読み取り、これを内部レ
ジスタにセットする。次に、ステップSc4では、この
アドレスRAから順次ファイルのデータを読み出す。こ
の読み出しの際には、読み出しコマンドに含まれるデー
タ長LEN(図10(イ)参照)を読み出し単位として
いる。次いで、ステップSc5では、データ長LEN毎
の読み出しにおいて、アドレスエラーがあるか否かを判
断する。そして、エラーが無い場合には、ステップSc
6に進み、読み出したデータを図示していない出力バッ
ファにセットし、このルーチンを終了する。
Operation when Accessing a File of Physical Address Method When a file opened by the above-described open command processing is managed by the physical address method, the following read operation and write operation are performed. a. Read Operation In this read operation, a read command in the format shown in FIG. 10A is supplied from the card reader / writer 21 to the IC card 11. When such a read command is supplied, the read command processing routine shown in FIG. 9 is started, and the processing of the CPU 14 is executed in step Sc.
Proceed to 1. In step Sc1, the status data ST
S1 is set to “0”, and the process proceeds to the next step Sc2. In step Sc2, it is determined whether or not the frame F2 of the directory RT1 has a storage format representing a physical address.
If the lower three bits of the frame F2 are "001", the result of this determination is "YES", and the flow proceeds to step Sc3. In step Sc3, the address RA assigned to the read command is read, and this is set in an internal register. Next, in step Sc4, the data of the file is sequentially read from this address RA. At the time of this read, the data length LEN (see FIG. 10A) included in the read command is used as a read unit. Next, in step Sc5, it is determined whether there is an address error in reading for each data length LEN. If there is no error, step Sc
The program proceeds to step 6, where the read data is set in an output buffer (not shown), and this routine is terminated.

【0016】一方、上述したステップSc2の判断結果
が「NO」の場合、すなわち、このファイルが物理アド
レス方式でない場合には、ステップSc7に進み、ステ
イタスデータSTS1に「1」を加算する。また、読み
出し時にアドレスエラーがあった場合には、ステップS
c5の判断結果が「NO」となり、ステップSc8に進
み、このステイタスデータSTS1に更に「1」を加算
する。そして、CPU14の処理がメインルーチンのレ
スポンス送信処理(ステップSa4)に移行すると、図
10(ロ)に示すフォーマットによるレスポンスデータ
がICカード11側からカードリーダライタ21側へ送
出される。この結果、読み出しデータがカードリーダラ
イタ21側に受取られることになる。なお、このレスポ
ンスデータにおけるステイタスデータSTS1が「2」
の場合、カードリーダライタ21側は、上述した読み出
しコマンド処理にエラーがあったとしてエラー表示を行
う。
On the other hand, if the result of the determination in step Sc2 is "NO", that is, if the file is not of the physical address type, the flow advances to step Sc7 to add "1" to the status data STS1. If there is an address error at the time of reading, step S
The result of the determination at c5 is "NO", the flow proceeds to step Sc8, and "1" is further added to the status data STS1. When the processing of the CPU 14 shifts to the response transmission processing (step Sa4) of the main routine, response data in the format shown in FIG. 10B is transmitted from the IC card 11 to the card reader / writer 21. As a result, the read data is received by the card reader / writer 21 side. The status data STS1 in the response data is "2".
In the case of (1), the card reader / writer 21 displays an error indicating that there is an error in the above-described read command processing.

【0017】b.書込み動作 この書込み動作では、カードリーダライタ21側からI
Cカード11へ図12(イ)に示すフォーマットの書込
みコマンドが供給される。このような書込みコマンドが
供給されると、図11に示す書込みコマンド処理ルーチ
ンが起動され、ステップSd1に進む。ステップSd1
では、ステイタスデータSTS1を「0」とし、次のス
テップSd2へ進む。ステップSd2では、ディレクト
リRT1のフレームF2が物理アドレスを表わす格納形
式であるか否かを判断する。そして、フレームF2の下
位3ビットが「001」である場合には、この判断結果
が「YES」となり、ステップSd3に進む。ステップ
Sd3では、書込みコマンドに付与された書込みアドレ
スWAを読み取り、これを内部レジスタにセットする。
次に、ステップSd4では、オープンしたファイルの書
込み領域が不足しているか否かを判断する。そして、書
込み領域が不足していない場合には、ここでの判断結果
が「NO」になり、次のステップSd5に進む。ステッ
プSc5では、書込みアドレスWAから順次、書込みコ
マンドに付与された書込みデータWDの書込みが行わ
れ、このルーチンを終了する。
B. Write operation In this write operation, the card reader / writer 21
A write command in the format shown in FIG. When such a write command is supplied, a write command processing routine shown in FIG. 11 is started, and the process proceeds to step Sd1. Step Sd1
Then, the status data STS1 is set to "0", and the process proceeds to the next step Sd2. In step Sd2, it is determined whether or not the frame F2 of the directory RT1 has a storage format representing a physical address. If the lower three bits of the frame F2 are "001", the result of this determination is "YES", and the flow proceeds to step Sd3. In step Sd3, the write address WA assigned to the write command is read and set in an internal register.
Next, in step Sd4, it is determined whether the write area of the opened file is insufficient. If the write area is not insufficient, the determination result is "NO", and the flow advances to the next step Sd5. In step Sc5, the write data WD added to the write command is written sequentially from the write address WA, and this routine ends.

【0018】一方、上述したステップSd2の判断結果
が「NO」の場合、すなわち、このファイルが物理アド
レス方式でない場合には、ステップSd6に進み、ステ
イタスデータSTS1に「2」を加算する。また、ファ
イルの書込み領域が不足している場合には、ステップS
d4の判断結果が「YES」となり、ステップSd7に
進み、このステイタスデータSTS1に更に「1」を加
算する。そして、CPUの処理がメインルーチンのレス
ポンス送信処理(ステップSa4)に移行すると、図1
2(ロ)に示すフォーマットのレスポンスデータがIC
カード11からカードリーダライタ21側へ送出され
る。ここで、このレスポンスデータのステイタスデータ
STS1が「3」の場合、カードリーダライタ21側は
上述した書込みコマンド処理にエラーがあったとしてエ
ラー表示を行う。
On the other hand, if the result of the determination in step Sd2 is "NO", that is, if the file is not of the physical address type, the process proceeds to step Sd6, where "2" is added to the status data STS1. If the file writing area is insufficient, step S
The result of the determination at d4 is "YES", the process proceeds to step Sd7, and "1" is further added to the status data STS1. When the processing of the CPU shifts to the response transmission processing of the main routine (step Sa4), FIG.
Response data in the format shown in 2 (b) is an IC
It is sent from the card 11 to the card reader / writer 21 side. Here, if the status data STS1 of the response data is “3”, the card reader / writer 21 displays an error indicating that there is an error in the above-described write command processing.

【0019】論理アドレス方式のファイルにアクセス
する場合の動作 前述したオープンコマンド処理によって開かれたファイ
ルが論理アドレス方式で管理されている場合には、以下
に示す読み出し動作および書込み動作が行われる。 a.読み出し動作 この読み出し動作では、カードリーダライタ側からIC
カードへ図15(イ)に示すフォーマットの読み出しコ
マンドが供給される。このような読み出しコマンドが供
給されると、図13に示す読み出しコマンド処理ルーチ
ンが起動され、CPU14の処理がステップSe1に進
む。ステップSe1では、ステイタスデータSTS1を
「0」とし、次のステップSe2へ進む。ステップSe
2では、ディレクトリRT2のフレームF2が論理アド
レスを表わす格納形式で記述されているか否かを判断す
る。そして、このフレームF2の下位3ビットが「01
0」である場合には、この判断結果が「YES」とな
り、ステップSe3に進む。ステップSe3では、オー
プンしたファイルの先頭アドレスをセットする。次に、
ステップSe4では、フレームF5に登録されるアドレ
スポインタの値を内部レジスタにセットする。
Operation for Accessing Logical Address System File When a file opened by the above-described open command processing is managed by the logical address system, the following read operation and write operation are performed. a. Read operation In this read operation, the IC is read from the card reader / writer side.
A read command in the format shown in FIG. 15A is supplied to the card. When such a read command is supplied, a read command processing routine shown in FIG. 13 is started, and the processing of the CPU 14 proceeds to step Se1. In Step Se1, the status data STS1 is set to “0”, and the process proceeds to the next Step Se2. Step Se
In 2, it is determined whether or not the frame F2 of the directory RT2 is described in a storage format representing a logical address. Then, the lower 3 bits of the frame F2 are set to “01”.
If it is "0", the result of this determination is "YES", and the flow proceeds to step Se3. In step Se3, the start address of the opened file is set. next,
In step Se4, the value of the address pointer registered in the frame F5 is set in the internal register.

【0020】次いで、ステップSe5では、セットされ
た先頭アドレスを前記アドレスポインタに応じて絶対ア
ドレスに変換し、この絶対アドレスから順次、ファイル
のデータを読み出す。この読み出しの際には、読み出し
コマンドに含まれるデータ長LEN(図15(イ)参
照)を読み出し単位としている。次に、ステップSe6
では、読み出し時にファイル終端を表わすEOFコード
を検出したか否かが判断される。ここで、このEOFコ
ードが検出されない場合には、ファイル終端ではないの
で、EOFエラーとはならず、この判断結果は「NO」
となり、次のステップSe7に進む。そして、ステップ
Se7では、読み出したデータを図示していない出力バ
ッファにセットする。続いて、ステップSe8では、読
み出し完了後の論理アドレスを示すように、前述したフ
レームF3のアドレスポインタを更新し、このルーチン
を終了する。
Next, in step Se5, the set start address is converted into an absolute address according to the address pointer, and the data of the file is sequentially read from the absolute address. At the time of this read, the data length LEN (see FIG. 15A) included in the read command is used as a read unit. Next, step Se6
In, it is determined whether an EOF code indicating the end of the file is detected at the time of reading. Here, if this EOF code is not detected, since it is not the end of the file, no EOF error occurs, and the result of this determination is “NO”.
And the process proceeds to the next Step Se7. Then, in step Se7, the read data is set in an output buffer (not shown). Subsequently, in step Se8, the address pointer of the above-described frame F3 is updated to indicate the logical address after the completion of the reading, and this routine ends.

【0021】一方、上述したステップSe2の判断結果
が「NO」の場合、すなわち、このファイルが論理アド
レス方式でない場合には、ステップSe9に進み、ステ
イタスデータSTS1に「1」を加算する。また、読み
出し時にファイル終端となってしまい、EOFエラーが
発生した場合には、上述したステップSe6の判断結果
が「YES」となってステップSe10に進み、このス
テイタスデータSTS1に更に「1」を加算する。そし
て、CPU14の処理が前述したメインルーチンのレス
ポンス送信処理(ステップSa4)に移行すると、図1
5(ロ)に示すフォーマットによるレスポンスデータが
ICカード11からカードリーダライタ21側へ送出さ
れる。これにより、読み出しデータがカードリーダライ
タ21側に受取られることになる。一方、このレスポン
スデータのステイタスデータSTS1が「2」の場合、
カードリーダライタ21側は、上述した読み出しコマン
ド処理にエラーがあったとしてエラー表示を行う。
On the other hand, if the result of the determination in step Se2 is "NO", that is, if this file is not of the logical address type, the flow advances to step Se9 to add "1" to the status data STS1. When the end of the file is reached at the time of reading and an EOF error occurs, the determination result in step Se6 becomes “YES” and the process proceeds to step Se10, and “1” is further added to the status data STS1. I do. When the processing of the CPU 14 shifts to the response transmission processing (step Sa4) of the main routine described above, FIG.
Response data in the format shown in 5 (b) is sent from the IC card 11 to the card reader / writer 21 side. As a result, the read data is received by the card reader / writer 21 side. On the other hand, when the status data STS1 of the response data is “2”,
The card reader / writer 21 displays an error indicating that there is an error in the above-described read command processing.

【0022】b.書込み動作 この書込み動作では、カードリーダライタ側からICカ
ードへ図16(イ)に示すフォーマットの書込みコマン
ドが供給される。このような書込みコマンドが供給され
ると、図14に示す書込みコマンド処理ルーチンが起動
され、ステップSf1に進む。ステップSf1では、ス
テイタスデータSTS1を「0」とし、次のステップS
f2へ進む。ステップSf2では、ディレクトリRT2
のフレームF2が論理アドレスを表わす格納形式である
か否かを判断する。そして、フレームF2の下位3ビッ
トが「010」である場合には、この判断結果が「YE
S」となり、ステップSf3に進む。ステップSf3で
は、オープンしたファイルの先頭アドレスをセットし、
続いて、ステップSf4では、ディレクトリRT2のフ
レームF5に登録されるアドレスポインタの値を参照
し、この値を内部レジスタにセットする。
B. Write Operation In this write operation, a write command in the format shown in FIG. 16A is supplied from the card reader / writer to the IC card. When such a write command is supplied, a write command processing routine shown in FIG. 14 is started, and the process proceeds to step Sf1. In step Sf1, the status data STS1 is set to “0”, and the next step Sf1 is executed.
Proceed to f2. In step Sf2, the directory RT2
It is determined whether or not the frame F2 has a storage format representing a logical address. If the lower 3 bits of the frame F2 are “010”, the result of this determination is “YE
S ", and proceeds to step Sf3. In step Sf3, the start address of the opened file is set,
Subsequently, in step Sf4, the value of the address pointer registered in the frame F5 of the directory RT2 is referred to, and this value is set in an internal register.

【0023】次に、ステップSf5では、ファイルの書
込み領域が不足しているか否かを判断する。そして、書
込み領域が不足していない場合には、ここでの判断結果
が「NO」になり、次のステップSf6に進む。ステッ
プSf6では、セットされた先頭アドレスを前記アドレ
スポインタに応じて絶対アドレスに変換し、この絶対ア
ドレスから順次、書込みコマンドに付与された書込みデ
ータWDの書込みを行う。次いで、ステップSf7で
は、書込み完了後の論理アドレスを示すように、前述し
たフレームF3のアドレスポインタを更新し、このルー
チンを終了する。一方、上述したステップSf2の判断
結果が「NO」の場合、すなわち、このファイルが論理
アドレス方式でない場合には、ステップSf8に進み、
ステイタスデータSTS1に「2」を加算する。また、
ファイルの書込み領域が不足している場合には、ステッ
プSf5の判断結果が「YES」となってステップSf
9に進み、このステイタスデータSTS1に更に「1」
を加算する。
Next, in step Sf5, it is determined whether or not the file writing area is insufficient. If the write area is not insufficient, the result of the determination here is "NO", and the routine proceeds to the next step Sf6. In step Sf6, the set top address is converted into an absolute address according to the address pointer, and the write data WD assigned to the write command is written sequentially from this absolute address. Next, in step Sf7, the address pointer of the above-described frame F3 is updated so as to indicate the logical address after the completion of the writing, and this routine ends. On the other hand, if the result of the determination in step Sf2 is “NO”, that is, if the file is not of the logical address type, the process proceeds to step Sf8,
"2" is added to the status data STS1. Also,
If the file write area is insufficient, the result of the determination in step Sf5 is "YES" and the
9, the status data STS1 is further set to "1".
Is added.

【0024】そして、CPU14の処理が前述したメイ
ンルーチンのレスポンス送信処理(ステップSa4)に
移行すると、図16(ロ)に示すフォーマットのレスポ
ンスデータがICカード11側からカードリーダライタ
21側へ送出される。ここで、このレスポンスデータの
ステイタスデータSTS1が「3」の場合、カードリー
ダライタ21側は、上述した書込みコマンド処理にエラ
ーがあったとしてエラー表示を行う。
When the processing of the CPU 14 shifts to the response transmission processing of the main routine (step Sa4), response data in the format shown in FIG. 16B is transmitted from the IC card 11 to the card reader / writer 21. You. Here, when the status data STS1 of the response data is “3”, the card reader / writer 21 displays an error indicating that there is an error in the above-described write command processing.

【0025】レコード管理方式のファイルにアクセス
する場合の動作 前述したオープンコマンド処理によって開かれたファイ
ルがレコード管理方式で管理されている場合には、以下
に示す読み出し動作および書込み動作が行われる。 a.読み出し動作 この読み出し動作では、カードリーダライタ側からIC
カードへ図19(イ)に示すフォーマットの読み出しコ
マンドが供給される。なお、このフォーマットにおける
レコード番号Nは、読み出すレコードの番号を指定する
ものである。このレコード番号Nが「0」である時は、
次のレコード番号を指し、通常は、読み出しするレコー
ド番号を1〜255の範囲で表わす。このような読み出
しコマンドが供給されると、図17に示す読み出しコマ
ンド処理ルーチンが起動され、ステップSg1に進む。
ステップSg1では、ステイタスデータSTS1を
「0」とし、次のステップSg2へ進む。ステップSg
2では、ディレクトリRT3のフレームF2がレコード
管理を表わす格納形式で記述されているか否かを判断す
る。そして、このフレームF2の下位3ビットが「10
0」である場合には、この判断結果が「YES」とな
り、ステップSg3に進む。ステップSg3では、オー
プンしたファイルにおけるレコードの先頭アドレスをフ
レームF3から読み出す。そして、ステップSg4で
は、上記レコード番号Nが「0」であるか否かを判断す
る。ここで、レコード番号Nが「0」でない場合には、
判断結果が「NO」になり、次のステップSg6に進
む。一方、レコード番号Nが「0」であると、この判断
結果が「YES」となり、ステップSg5に進む。ステ
ップSg5では、フレームF5に登録された次レコード
番号を読み取り、これを内部レジスタにセットする。
Operation when Accessing a File of Record Management Method When a file opened by the above-described open command processing is managed by a record management method, the following read operation and write operation are performed. a. Read operation In this read operation, the IC is read from the card reader / writer side.
A read command in the format shown in FIG. 19A is supplied to the card. The record number N in this format specifies the number of the record to be read. When this record number N is "0",
Indicates the next record number, and usually indicates the record number to be read in the range of 1 to 255. When such a read command is supplied, the read command processing routine shown in FIG. 17 is started, and the process proceeds to step Sg1.
In step Sg1, the status data STS1 is set to “0”, and the process proceeds to the next step Sg2. Step Sg
In 2, it is determined whether or not the frame F2 of the directory RT3 is described in a storage format representing record management. Then, the lower three bits of the frame F2 are set to “10”.
If it is "0", the result of this determination is "YES", and the flow proceeds to step Sg3. In step Sg3, the head address of the record in the opened file is read from frame F3. Then, in a step Sg4, it is determined whether or not the record number N is "0". Here, if the record number N is not “0”,
The result of the determination is "NO", and the routine proceeds to the next step Sg6. On the other hand, if the record number N is “0”, the result of this determination is “YES”, and the routine proceeds to step Sg5. In step Sg5, the next record number registered in the frame F5 is read and set in an internal register.

【0026】次に、ステップSg6では、フレームF4
から読み出した格納レコード数が、読み出しを行うレコ
ード番号N以上であるか否か、つまり、読み出しするレ
コード番号Nが妥当な値であるかどうかを判断する。こ
こで、このレコード番号が妥当な値である場合には、判
断結果が「YES」となり、次のステップSg7に進
む。ステップSg7では、フレームF6のレコードサイ
ズを読み取り、このレコードサイズと、レコード番号N
および先頭アドレスとから、読み出しを開始すべき絶対
アドレスを求める。すなわち、レコードサイズと次レコ
ード番号(N−1)とを乗じ、この結果を先頭アドレス
に加算する処理がなされる。そして、ステップSg8で
は、こうした処理により求められた絶対アドレスから順
次、レコードのデータを読み出す。次いで、ステップS
g9では、この読み出したデータを図示していない出力
バッファにセットし、このルーチンを終了する。
Next, in step Sg6, the frame F4
Then, it is determined whether or not the number of stored records read from is greater than or equal to the record number N to be read, that is, whether or not the record number N to be read is an appropriate value. Here, if the record number is a valid value, the determination result is “YES”, and the flow proceeds to the next step Sg7. In step Sg7, the record size of frame F6 is read, and this record size and record number N
An absolute address from which reading is to be started is determined from the starting address and the starting address. That is, a process of multiplying the record size by the next record number (N-1) and adding the result to the head address is performed. Then, in step Sg8, the data of the record is sequentially read from the absolute address obtained by such processing. Then, step S
In g9, the read data is set in an output buffer (not shown), and the routine ends.

【0027】一方、上述したステップSg2の判断結果
が「NO」の場合、すなわち、このファイルがレコード
管理方式によらない場合には、ステップSg10に進
み、ステイタスデータSTS1に「2」を加算する。ま
た、読み出しレコード番号が格納レコード数より小さ
く、不正なものである時には、上述したステップSg6
の判断結果が「NO」となってステップSg11に進
み、このステイタスデータSTS1に更に「1」が加算
される。そして、CPU14の処理が前述したメインル
ーチンのレスポンス送信処理(ステップSa4)に移行
すると、図19(ロ)に示すフォーマットによるレスポ
ンスデータがICカード11からカードリーダライタ2
1側へ送出される。これにより、読み出したデータがカ
ードリーダライタ21側に受取られることになる。とこ
ろで、このレスポンスデータのステイタスデータSTS
1が「3」となった場合、カードリーダライタ21は、
上述した読み出しコマンド処理にエラーがあったとして
エラー表示を行う。
On the other hand, if the result of the determination in step Sg2 is "NO", that is, if the file does not conform to the record management method, the flow advances to step Sg10 to add "2" to the status data STS1. On the other hand, when the read record number is smaller than the number of stored records and is invalid, the above-described step Sg6 is performed.
Is "NO", the process proceeds to step Sg11, and "1" is further added to the status data STS1. When the processing of the CPU 14 shifts to the response transmission processing (step Sa4) of the main routine described above, response data in the format shown in FIG.
Sent to one side. Thus, the read data is received by the card reader / writer 21 side. By the way, the status data STS of this response data
When 1 becomes “3”, the card reader / writer 21
An error is displayed assuming that there is an error in the above-described read command processing.

【0028】b.書込み動作 この書込み動作では、カードリーダライタ側からICカ
ードへ図20(イ)に示すフォーマットの書込みコマン
ドが供給される。なお、このフォーマットにおけるレコ
ード番号Nは、書込みを行うレコード番号を指定するも
のである。このような書込みコマンドが供給されると、
図18に示す書込みコマンド処理ルーチンが起動され、
ステップSj1に進む。まず、ステップSj1では、ス
テイタスデータSTS1を「0」とし、次のステップS
j2へ進む。ステップSj2では、ディレクトリRT3
のフレームF2がレコード管理を表わす格納形式で記述
されているか否かを判断する。そして、このフレームF
2の下位3ビットが「100」である場合には、この判
断結果が「YES」となり、ステップSj3に進む。ス
テップSj3では、オープンしたファイルにおけるレコ
ードの先頭アドレスをフレームF3から読み出し、これ
を内部レジスタにセットする。次いで、ステップSj4
では、書込みコマンドに付与されたレコード番号Nが
「0」であるか否かを判断する。ここで、レコード番号
Nが「0」でない場合には、判断結果が「NO」にな
り、次のステップSg6に進む。一方、レコード番号N
が「0」であると、この判断結果が「YES」となり、
ステップSj5に進む。ステップSj5では、フレーム
F5に登録されたレコード番号より1大きい次のレコー
ド番号を内部レジスタにセットし、次のステップSj6
に進む。
B. Write Operation In this write operation, a write command in the format shown in FIG. 20A is supplied from the card reader / writer to the IC card. Note that the record number N in this format specifies a record number to be written. When such a write command is supplied,
The write command processing routine shown in FIG.
Proceed to step Sj1. First, in step Sj1, the status data STS1 is set to “0”, and the next step Sj1 is executed.
Proceed to j2. In step Sj2, the directory RT3
Frame F2 is described in a storage format representing record management. And this frame F
If the lower three bits of 2 are “100”, the result of this determination is “YES”, and the flow proceeds to step Sj3. In step Sj3, the head address of the record in the opened file is read from frame F3, and is set in an internal register. Next, step Sj4
Then, it is determined whether or not the record number N assigned to the write command is “0”. Here, when the record number N is not “0”, the determination result is “NO”, and the process proceeds to the next step Sg6. On the other hand, record number N
Is “0”, the result of this determination is “YES”,
Proceed to step Sj5. In step Sj5, the next record number that is one greater than the record number registered in frame F5 is set in the internal register, and the next step Sj6
Proceed to.

【0029】ステップSj6では、フレームF4から読
み出した格納レコード数が、書込みを行うレコード番号
N以上であるか否か、すなわち、書込みを行うレコード
番号Nが妥当な値であるかどうかを判断する。ここで、
このレコード番号が妥当な値である場合には、判断結果
が「YES」となり、次のステップSj7に進む。ステ
ップSj7では、フレームF6に登録されたレコードサ
イズを読み取り、このレコードサイズと、レコード番号
Nおよび先頭アドレスとから、書込みを開始する絶対ア
ドレスを求める。すなわち、レコードサイズと次レコー
ド番号(N−1)とを乗じ、この結果を先頭アドレスに
加算する処理がなされる。そして、ステップSj8で
は、こうした処理により求められた絶対アドレスから順
次、書込みコマンドに付与された書込みデータWDを書
込む。次いで、ステップSj9では、フレームF4に登
録される格納レコード数を1インクリメントし、このル
ーチンを終了する。
In step Sj6, it is determined whether or not the number of stored records read from the frame F4 is equal to or larger than the record number N for writing, that is, whether or not the record number N for writing is an appropriate value. here,
If this record number is a valid value, the determination result is "YES", and the flow advances to the next step Sj7. In step Sj7, the record size registered in the frame F6 is read, and the absolute address at which writing is started is determined from the record size, the record number N, and the start address. That is, a process of multiplying the record size by the next record number (N-1) and adding the result to the head address is performed. Then, in step Sj8, the write data WD assigned to the write command is written sequentially from the absolute address obtained by such processing. Next, in step Sj9, the number of stored records registered in the frame F4 is incremented by one, and this routine ends.

【0030】ところで、上述したステップSj6におい
て、書込みを行うレコード番号Nが不正な値であると、
判断結果が「NO」となり、ステップSj10に進む。
ステップSj10では、フレームF6に登録されたレコ
ードサイズに基づき、ファイル中にレコードエリアを確
保する。次いで、ステップSj11では、このレコード
エリアを確保する際に、書込み領域が不足しているか否
かを判断する。ここで、書込み領域が足りた場合には、
この判断結果が「NO」となり、次のステップSj12
に進む。ステップSj12では、書込みを行うレコード
番号として、現在のレコード番号を1インクリメント
し、上記ステップSj7に進む。これにより、新たなレ
コードに書込みが行われることになる。
By the way, in the above-mentioned step Sj6, if the record number N to be written is an invalid value,
The result of the determination is "NO", and the routine proceeds to step Sj10.
In step Sj10, a record area is secured in the file based on the record size registered in the frame F6. Next, in step Sj11, when securing this record area, it is determined whether or not the write area is insufficient. Here, if the writing area is sufficient,
The result of this determination is "NO" and the next step Sj12
Proceed to. In step Sj12, the current record number is incremented by 1 as the record number to be written, and the process proceeds to step Sj7. As a result, the new record is written.

【0031】一方、上述したステップSj2の判断結果
が「NO」の場合、すなわち、このファイルがレコード
管理方式によらない場合には、ステップSj13に進
み、ステイタスデータSTS1に「1」を加算する。ま
た、レコードエリアを拡張する際に、書込み領域が不足
した時には、上記ステップSj11の判断結果が「YE
S」となってステップSj14に進み、このステイタス
データSTS1に更に「2」を加算する。そして、CP
U14の処理が前述したメインルーチンのレスポンス送
信処理(ステップSa4)に移行すると、図20(ロ)
に示すフォーマットによるレスポンスデータがICカー
ド11からカードリーダライタ21側へ送出される。と
ころで、このレスポンスデータのステイタスデータST
S1が「3」となった場合、カードリーダライタ21
は、上述した読み出しコマンド処理にエラーがあったと
してエラー表示を行う。
On the other hand, if the result of the determination in step Sj2 is "NO", that is, if the file does not conform to the record management method, the flow advances to step Sj13 to add "1" to the status data STS1. When the write area is insufficient when expanding the record area, the result of the determination in step Sj11 is “YE
S ", the flow advances to step Sj14, and" 2 "is further added to the status data STS1. And CP
When the processing of U14 shifts to the response transmission processing (step Sa4) of the main routine described above, FIG.
Is sent from the IC card 11 to the card reader / writer 21 side. By the way, the status data ST of this response data
When S1 becomes “3”, the card reader / writer 21
Displays an error indicating that there is an error in the above-described read command processing.

【0032】このように、上述した実施例にあっては、
各アドレス方式に対応させたファイルをICカードに具
備させると共に、各アドレス方式に応じた読み出しコマ
ンドおよび書込みコマンドを実行することができるの
で、どのようなカードリーダライタのアプリケーション
にも対応可能になっている。
As described above, in the embodiment described above,
A file corresponding to each address method is provided in the IC card, and a read command and a write command according to each address method can be executed. Therefore, it is possible to correspond to any card reader / writer application. I have.

【0033】[0033]

【発明の効果】以上説明したように、この発明によれ
ば、記憶手段には、少なくとも2つ以上に分割された記
憶領域毎にアドレス方式を識別する属性情報領域が設け
られ、制御手段は前記属性情報領域に対応したアドレス
方式で入出力制御を行うので、アドレス方式が異なるア
プリケーションに対応可能となる。
As described above, according to the present invention, the storage means has at least two divided storages.
Attribute information area for identifying the address method is provided for each storage area
Control means for controlling an address corresponding to the attribute information area
Since the input / output control is performed by the method, it is possible to cope with applications having different address methods.

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

【図1】この発明の構成を示す機能ブロック図。FIG. 1 is a functional block diagram showing a configuration of the present invention.

【図2】この発明の一実施例の構成を示すブロック図。FIG. 2 is a block diagram showing a configuration of one embodiment of the present invention.

【図3】同実施例におけるファイル構造を示す図。FIG. 3 is a view showing a file structure in the embodiment.

【図4】同実施例におけるディレクトリRT1〜RT3
のフォーマットを示す図。
FIG. 4 shows directories RT1 to RT3 in the embodiment.
FIG.

【図5】同実施例におけるフレームF2の格納形式の一
例を示す図。
FIG. 5 is an exemplary view showing an example of a storage format of a frame F2 in the embodiment.

【図6】同実施例におけるメインルーチンを示すフロー
チャート。
FIG. 6 is a flowchart showing a main routine in the embodiment.

【図7】同実施例におけるオープンコマンド処理ルーチ
ンを示すフローチャート。
FIG. 7 is a flowchart showing an open command processing routine in the embodiment.

【図8】同実施例におけるオープンコマンド及び該コマ
ンドに対するレスポンスデータのフォーマットを示す
図。
FIG. 8 is a diagram showing a format of an open command and response data to the command in the embodiment.

【図9】同実施例における物理アドレス方式の読み出し
コマンド処理ルーチンを示すフローチャート。
FIG. 9 is a flowchart showing a read command processing routine of the physical address method in the embodiment.

【図10】同実施例における物理アドレス方式時の読み
出しコマンド及び該コマンドに対するレスポンスデータ
のフォーマットを示す図。
FIG. 10 is an exemplary view showing a read command and a format of response data to the command in the physical address method in the embodiment.

【図11】同実施例における物理アドレス方式の書込み
コマンド処理ルーチンを示すフローチャート。
FIG. 11 is a flowchart showing a physical address type write command processing routine in the embodiment.

【図12】同実施例における物理アドレス方式時の書込
みコマンド及び該コマンドに対するレスポンスデータの
フォーマットを示す図。
FIG. 12 is a diagram showing a format of a write command and response data to the command in the physical address method in the embodiment.

【図13】同実施例における論理アドレス方式の読み出
しコマンド処理ルーチンを示すフローチャート。
FIG. 13 is a flowchart showing a read command processing routine of the logical address method in the embodiment.

【図14】同実施例における論理アドレス方式の書込み
コマンド処理ルーチンを示すフローチャート。
FIG. 14 is a flowchart showing a write command processing routine of the logical address method in the embodiment.

【図15】同実施例における論理アドレス方式時の読み
出しコマンド及び該コマンドに対するレスポンスデータ
のフォーマットを示す図。
FIG. 15 is a diagram showing a format of a read command and response data to the command in the logical address method in the embodiment.

【図16】同実施例における論理アドレス方式時の書込
みコマンド及び該コマンドに対するレスポンスデータの
フォーマットを示す図。
FIG. 16 is a view showing a format of a write command and response data to the command in the logical address method in the embodiment.

【図17】同実施例におけるレコード管理方式の読み出
しコマンド処理ルーチンを示すフローチャート。
FIG. 17 is a flowchart showing a read command processing routine of a record management method in the embodiment.

【図18】同実施例におけるレコード管理方式の書込み
コマンド処理ルーチンを示すフローチャート。
FIG. 18 is a flowchart showing a write command processing routine of a record management method in the embodiment.

【図19】同実施例におけるレコード管理方式時の読み
出しコマンド及び該コマンドに対するレスポンスデータ
のフォーマットを示す図。
FIG. 19 is a diagram showing a format of a read command and response data to the command in the record management system in the embodiment.

【図20】同実施例におけるレコード管理方式時の書込
みコマンド及び該コマンドに対するレスポンスデータの
フォーマットを示す図。
FIG. 20 is an exemplary view showing a write command and a format of response data to the command in the record management system in the embodiment.

【符号の説明】[Explanation of symbols]

13 EEPROM(記憶手段) 14 CPU(制御手段) 13 EEPROM (storage means) 14 CPU (control means)

───────────────────────────────────────────────────── フロントページの続き (72)発明者 寄本 義一 東京都台東区台東一丁目5番1号 凸版 印刷株式会社内 (56)参考文献 特開 昭62−251992(JP,A) ──────────────────────────────────────────────────続 き Continuation of front page (72) Inventor Yoshikazu Yorimoto 1-5-1, Taito, Taito-ku, Tokyo Inside Toppan Printing Co., Ltd. (56) References JP-A-62-251992 (JP, A)

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 少なくとも2つ以上に分割された記憶領
域を有し、該記憶領域毎にアドレス方式を識別する属性
情報領域を設けた記憶手段と、前記属性情報領域 に対応したアドレス方式で入出力制御
する制御手段とを具備することを特徴とするICカー
ド。
1. A storage area divided into at least two or more sections.
Attribute that has an area and identifies the address method for each storage area
An IC card comprising: storage means provided with an information area; and control means for performing input / output control by an address method corresponding to the attribute information area .
JP3021080A 1991-02-14 1991-02-14 IC card Expired - Lifetime JP3007425B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3021080A JP3007425B2 (en) 1991-02-14 1991-02-14 IC card

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3021080A JP3007425B2 (en) 1991-02-14 1991-02-14 IC card

Publications (2)

Publication Number Publication Date
JPH0589303A JPH0589303A (en) 1993-04-09
JP3007425B2 true JP3007425B2 (en) 2000-02-07

Family

ID=12044909

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3021080A Expired - Lifetime JP3007425B2 (en) 1991-02-14 1991-02-14 IC card

Country Status (1)

Country Link
JP (1) JP3007425B2 (en)

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0757336B1 (en) * 1995-08-04 2000-11-22 Belle Gate Investment B.V. Data exchange systems comprising portable data processing units
US6385645B1 (en) 1995-08-04 2002-05-07 Belle Gate Investments B.V. Data exchange system comprising portable data processing units
IL142315A0 (en) 1998-09-29 2002-03-10 Sun Microsystems Inc Superposition of data over voice
US6633984B2 (en) 1999-01-22 2003-10-14 Sun Microsystems, Inc. Techniques for permitting access across a context barrier on a small footprint device using an entry point object
US6907608B1 (en) 1999-01-22 2005-06-14 Sun Microsystems, Inc. Techniques for permitting access across a context barrier in a small footprint device using global data structures
US6823520B1 (en) 1999-01-22 2004-11-23 Sun Microsystems, Inc. Techniques for implementing security on a small footprint device using a context barrier
US7093122B1 (en) 1999-01-22 2006-08-15 Sun Microsystems, Inc. Techniques for permitting access across a context barrier in a small footprint device using shared object interfaces
US6922835B1 (en) 1999-01-22 2005-07-26 Sun Microsystems, Inc. Techniques for permitting access across a context barrier on a small footprint device using run time environment privileges
US6769053B1 (en) 1999-06-10 2004-07-27 Belle Gate Investment B.V. Arrangement storing different versions of a set of data in separate memory areas and method for updating a set of data in a memory
WO2001040910A1 (en) 1999-12-06 2001-06-07 De Jong, Eduard, Karel Computer arrangement using non-refreshed dram
AU777437B2 (en) 1999-12-07 2004-10-14 Sun Microsystems, Inc. Secure photo carrying identification device, as well as means and method for authenticating such an identification device
WO2001043129A1 (en) 1999-12-07 2001-06-14 Sun Microsystems Inc. Computer-readable medium with microprocessor to control reading and computer arranged to communicate with such a medium
JP4673470B2 (en) * 2000-07-04 2011-04-20 大日本印刷株式会社 IC card information reading device and IC card status display device
JP2006163622A (en) * 2004-12-03 2006-06-22 Casio Hitachi Mobile Communications Co Ltd Portable terminal device and data access method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62251992A (en) * 1986-04-25 1987-11-02 Fujitsu Ltd File control system for ic card

Also Published As

Publication number Publication date
JPH0589303A (en) 1993-04-09

Similar Documents

Publication Publication Date Title
JP3007425B2 (en) IC card
US5131089A (en) Solid state disk drive emulation
US6886083B2 (en) Apparatus and method for controlling a card device
JP3015377B2 (en) IC card
JP4676378B2 (en) Data storage device and data storage method
KR100312888B1 (en) Circuit of generating chip enable signal and memory device
JP3480746B2 (en) Portable electronic devices
JPS63143689A (en) Memory card capacity detection device
US4841131A (en) Portable electronic device with means for checking data validity during read-out
US20080235410A1 (en) Usb-Sd Memory Device Having Dma Channels and Method of Storing Data in Usb-Sd Memory Device
JP3727907B2 (en) Issuing system and issuing method for portable electronic medium and portable electronic medium
US5872945A (en) MX bus translation to new system bus protocol
US20040186949A1 (en) XIP system and method for serial memory
JPS61235977A (en) Kana-kanji converter
JP4342629B2 (en) Portable electronic device, file control information storage method, and file control information search method
JPH09231113A (en) IC card
JP2974144B2 (en) Portable electronic devices
JPS63145582A (en) Data storage system
JPH02178869A (en) Recognition processing method for installed input/output cards
JP2003050725A (en) Storage device controller
JP2003281484A (en) IC card
JPH0581496A (en) IC card
JPH0944398A (en) MEMORY CAPACITY DETECTING DEVICE AND MEMORY CAPACITY DETECTING METHOD
JPS63145581A (en) Ic card system
JP2006065505A (en) Memory card and playback device

Legal Events

Date Code Title Description
A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 19961015

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20071126

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20081126

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20091126

Year of fee payment: 10

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20091126

Year of fee payment: 10

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20101126

Year of fee payment: 11

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111126

Year of fee payment: 12

EXPY Cancellation because of completion of term
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20111126

Year of fee payment: 12