JPH04111086A - Ic card - Google Patents

Ic card

Info

Publication number
JPH04111086A
JPH04111086A JP2229995A JP22999590A JPH04111086A JP H04111086 A JPH04111086 A JP H04111086A JP 2229995 A JP2229995 A JP 2229995A JP 22999590 A JP22999590 A JP 22999590A JP H04111086 A JPH04111086 A JP H04111086A
Authority
JP
Japan
Prior art keywords
data
card
record
file
address
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
JP2229995A
Other languages
Japanese (ja)
Inventor
Seiji Hirano
誠治 平野
Giichi Yorimoto
寄本 義一
Masami Hayazaki
早崎 政美
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.)
Toppan Inc
Original Assignee
Toppan Printing Co Ltd
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 Toppan Printing Co Ltd filed Critical Toppan Printing Co Ltd
Priority to JP2229995A priority Critical patent/JPH04111086A/en
Publication of JPH04111086A publication Critical patent/JPH04111086A/en
Pending legal-status Critical Current

Links

Landscapes

  • Credit Cards Or The Like (AREA)

Abstract

PURPOSE:To efficiently use a logic address space in a memory by providing a record control table to store coded address information for designating a record area, and an address converting means to prepare a logic address based on the address information. CONSTITUTION:A record control table 3 is provided to store the coded address information, and an address converting means 4 is provided to prepare the logic address. When performing access to a data stored in the record area of a file, a data access means 2 refers to the record control table 3, prepares the logic address space of a record based on the coded address information stored in the table 3 and accesses the data in the address space to be next designated by the logic address. Therefore, when reloading the data, it is enough to change the address information of the record control table 3, and it is not necessary to allocate the logic address space to each file in advance. Thus, the address space of a memory 1 is efficiently used.

Description

【発明の詳細な説明】 〈産業上の利用分野〉 本発明はICカードに係り、特に、ICカードに含まれ
るメモリ構成に関する。
DETAILED DESCRIPTION OF THE INVENTION <Industrial Application Field> The present invention relates to an IC card, and particularly to a memory configuration included in an IC card.

〈従来の技術〉 従来、この種のICカードでは、そのメモリに複数のフ
ァイルを作成し、各ファイルを構成するレコードにはそ
の使用の有無にかかわらず、所定の論理アドレス空間を
ファイルの作成時に予め割り当てていた。
<Prior art> Conventionally, in this type of IC card, multiple files are created in its memory, and a predetermined logical address space is assigned to the records that make up each file at the time of file creation, regardless of whether or not the record is used. It was assigned in advance.

〈発明が解決しようとする課題〉 しかしながら、このような従来のICカードにあっては
、既に作成したファイルに割り当てたメモリの論理アド
レス空間に未使用部分が生じていても、未割当の論理ア
ドレス空間に新たなファイルを作成するだけの余裕がな
ければ、未使用部分を新たなファイルを作成するために
使用することはできず、そのICメモリには、以後、新
たなファイルを作成することができない。その結果、論
理アドレス空間の使用が効率よく使用できず、不経済で
あるという問題点があった。
<Problems to be Solved by the Invention> However, in such conventional IC cards, even if there is an unused portion in the logical address space of the memory allocated to the already created file, the unallocated logical address If there is not enough space to create a new file, the unused portion cannot be used to create a new file, and no new files can be created in that IC memory from now on. Can not. As a result, there is a problem that the logical address space cannot be used efficiently and is uneconomical.

そこで、本発明の目的は、メモリ内の論理アドレス空間
を効率的に使用できるICカードを提供することである
SUMMARY OF THE INVENTION Therefore, an object of the present invention is to provide an IC card that can efficiently use the logical address space within the memory.

〈課題を解決するための手段〉 本発明の要旨は、第1図に示すように所定の論理アドレ
ス空間を有するメモリ1と、データアクセス手段2と、
を備えたICカードにおいて、各ファイル毎に使用レコ
ードエリアを指定するコード化されたアドレス情報を記
憶するレコード管理テーブル3と、該レコードエリアに
アクセスするときは上記コード化されたアドレス情報に
基づき論理アドレスを作成するアドレス変換手段4と、
を有することである。
<Means for Solving the Problems> The gist of the present invention is that, as shown in FIG. 1, a memory 1 having a predetermined logical address space, a data access means 2,
In an IC card with address conversion means 4 for creating an address;
It is to have.

〈作用および効果〉 本発明に係るICカードにあっては、ファイルのレコー
ドエリアに記憶されているデータにアクセスするとき、
データアクセス手段はレコード管理テーブルをHして、
そこに記憶されているコード化されたアドレス情報に基
づきレコードの論理アドレス空間を作成する。次に、デ
ータアクセス手段は、該論理アドレスにより指定される
アドレス空間内のデータにアクセスする。したがって、
データを書き換える場合はレコード管理テーブルのコー
ド化されたアドレス情報を変更すればよく、各ファイル
に予め論理アドレス空間を割り当てておく必要がない。
<Operations and Effects> In the IC card according to the present invention, when accessing data stored in the record area of a file,
The data access means is to H the record management table.
A logical address space of records is created based on the encoded address information stored therein. Next, the data access means accesses data within the address space specified by the logical address. therefore,
When rewriting data, it is only necessary to change the coded address information in the record management table, and there is no need to allocate a logical address space to each file in advance.

このように、ファイルは使用するアトしス空間を可変的
に占めることができるので、メモリのアドレス空間を効
率的に使用することができる。
In this way, the file can variably occupy the address space used, so the memory address space can be used efficiently.

〈実施例〉 以下、本発明に係る実施例を図面を参照して説明する。<Example> Embodiments of the present invention will be described below with reference to the drawings.

第2図はICカードのメモリ構成を示す相系図である。FIG. 2 is a phase diagram showing the memory configuration of the IC card.

第3図はICカードの各ファイルのファイル構成を示す
ブロック図である。
FIG. 3 is a block diagram showing the file structure of each file of the IC card.

第2図に示すように、ICカードのメモリ構成はICカ
ードに搭載されたマイクロプロセッサで実行されるブコ
グラムで管理されているディレクトリ11と該ディレク
トリ11に管理されている複数のファイル12とからな
る。
As shown in FIG. 2, the memory configuration of an IC card consists of a directory 11 managed by a bucogram executed by a microprocessor mounted on the IC card, and a plurality of files 12 managed in the directory 11. .

また、各ファイル12は、第3図に示すように、外部か
ら供給されたデータ13a〜13cを異なる論理アドレ
ス空間X1.  X2.  X3.  、 、 、にデ
ータの種類毎に記録しているレコードエリア14と、各
インデックスに対応させてレコードエリアに記憶されて
いるデータ13a〜13cの種類15a、15b、15
c、、、、と上記論理アドレス空間を指定するコード化
されたアドレス情報(もし、相対アドレッシング方式を
採用しているなら変位量)を記憶しているレコード管理
テーブルエリア16とを有している。
Further, as shown in FIG. 3, each file 12 stores externally supplied data 13a to 13c in a different logical address space X1. X2. X3. , , , record area 14 recorded for each type of data, and types 15a, 15b, 15 of data 13a to 13c stored in the record area in correspondence with each index.
c, . . . and a record management table area 16 that stores coded address information (or displacement amount if a relative addressing method is adopted) specifying the above-mentioned logical address space. .

これらのレコードエリア14とレコード管理テーブルエ
リア16は、各ファイル毎で別個に作られており、ディ
レクトリ11によって管理されている。すなわち、第4
図に示すようにディレクトリ11のデータフォーマット
21は、ファイル名12を記憶する区分22と、該ファ
イルのレコードエリア13の先頭アドレス22を記憶す
る区分23と、該ファイルのレコード管理テーブル16
エリアの先頭アドレスを記憶する区分24と、該レコー
ドエリア14に記録されているレコードの数(RLN)
を記憶する区分25と、該レコードエリアI4の占めて
いるアドレス空間のサイズを記憶する区分26とを含ん
でいる。
These record area 14 and record management table area 16 are created separately for each file and are managed by the directory 11. That is, the fourth
As shown in the figure, the data format 21 of the directory 11 includes a section 22 for storing the file name 12, a section 23 for storing the start address 22 of the record area 13 of the file, and a record management table 16 for the file.
A section 24 that stores the start address of the area and the number of records (RLN) recorded in the record area 14
and a section 26 that stores the size of the address space occupied by the record area I4.

したがって、ICカードのCPUは該ディレクトリ11
のデータフォーマット21をサーチすることにより、所
望のファイルのレコードエリア14がICカードの論理
アドレス空間のどこから記録されているか、また、該フ
ァイルのレコード管理テーブル16がICカードの論理
アドレス空間のどこから記録されているかを判断するこ
とができる。加えて、レコードエリア14の占めている
論理アドレス空間のサイズが示されているので、ICカ
ードのCPUは未使用のアドレス空間の大きさを知るこ
ともてきる。
Therefore, the CPU of the IC card is
By searching the data format 21 of the file, you can find out from where in the logical address space of the IC card the record area 14 of the desired file is recorded, and from where in the logical address space of the IC card the record management table 16 of the file is recorded. It is possible to determine whether In addition, since the size of the logical address space occupied by the record area 14 is shown, the CPU of the IC card can also know the size of the unused address space.

また、第5図で示す該レコード管理テーブル16のデー
タフォーマット31は、インデックスに割り当てられた
区分32と、データの種類を記憶する区分33と、その
データに割り当てられたレコードの論理アドレスを作成
するために使用されるコード化されたアドレス情報、例
えば相対アドレス32を記憶する区分34を含んでいる
Furthermore, the data format 31 of the record management table 16 shown in FIG. 5 creates a section 32 assigned to the index, a section 33 for storing the type of data, and a logical address of the record assigned to the data. It includes a section 34 for storing coded address information used for, for example, a relative address 32.

ICカードのCPUは該レコード管理テーブル16をサ
ーチすることにより、アプリケーションソフトが指定し
ているデータの種類がそのファイルに記憶されているか
否かを判断することができる。更に、ICカードのCP
Uは該ファイルのレコードエリア14の先頭アドレスと
相対アドレスとを加算することにより、アプリケーショ
ンソフトが指定しているデータの記憶されているレコー
ドの論理アドレスを作成することができる。
By searching the record management table 16, the CPU of the IC card can determine whether the type of data specified by the application software is stored in the file. Furthermore, IC card CP
By adding the start address of the record area 14 of the file and the relative address, U can create the logical address of the record in which the data specified by the application software is stored.

ところで、データ端末とICカードとの間でデータの読
み出し、または書き込み動作が行われるが、かかる通信
時には、該情報は可変長のフレームを単位として伝送さ
れる。各フレームはキャラクタと呼ぶ固定長のビット列
を1または複数個直列に並へて構成されている。
Incidentally, data reading or writing operations are performed between a data terminal and an IC card, and during such communication, the information is transmitted in units of variable length frames. Each frame is composed of one or more fixed-length bit strings called characters arranged in series.

まず、書き込み時に使用されるフレームは、第6図(a
)(b)に示すようにアプリケーションから送信される
書き込み時に使用されるもの(第6図(a)!こ示す)
と、書き込み終了後にICカードから送信されるもの(
第6図(b)に示す)とである。
First, the frame used for writing is shown in Figure 6 (a
) As shown in (b), what is used when writing is sent from the application (Figure 6 (a)! This is shown)
and what is sent from the IC card after writing is completed (
(shown in FIG. 6(b)).

書き込み時に使用されるフレーム(a)では、書き込み
/読み出しの命令コードと、ファイル名のデータと、書
き込むデータの種類を示すデータ(AIN)と、該書き
込まれるデータのデータサイズを表すデータと、書き込
むべきデータと、が送信される。
Frame (a) used during writing includes a write/read instruction code, file name data, data (AIN) indicating the type of data to be written, data indicating the data size of the data to be written, and The data that should be sent is sent.

一方、書き込み後のフレーム(b)では、書き込み/読
み出しの命令コードと、書き込み動作が終了したか否か
を表すステータスSTS 1を表すステータスデータと
、データ端末から供給されたデータが正常に書き込まれ
たか否かを示すステータス5TS2を表すステータスデ
ータと、が送信される。
On the other hand, in frame (b) after writing, the write/read instruction code, the status data representing status STS 1 representing whether or not the writing operation has been completed, and the data supplied from the data terminal are correctly written. Status data representing status 5TS2 indicating whether or not the data has been received is transmitted.

そして、読み出し時に使用されるフレームでは、第7図
(a)(b)に示すようにアプリケーションから送信さ
れる読み出し時に使用されるもの(第7図(a)に示す
)と、読み出し終了後にICカードから送信されるもの
(第7図(b)に示す)とである。
As shown in FIGS. 7(a) and 7(b), the frames used for reading include those sent from the application (shown in FIG. 7(a)) and the frames used for reading after reading is completed. and the one transmitted from the card (shown in FIG. 7(b)).

読み出し時に使用されるフレーム(a)では、書き込み
/読み出しの命令コードと、ファイル名のデータと、読
み出しデータの種類を示すデータとが送信される。
In frame (a) used during reading, a write/read instruction code, file name data, and data indicating the type of read data are transmitted.

一方、読み出し後のフレーム(b)では、書き込み/読
み出しの命令コードと、読み出し動作が終了したか否か
を表すステータス5TS3を表すステータスデータと、
データ端末に供給するデータが正常に読み込まれたか否
かを示すステータス5TS4を表すステータスデータと
、読み出すべきデータと、が送信される。
On the other hand, in frame (b) after reading, a write/read instruction code and status data representing status 5TS3 representing whether or not the reading operation has been completed,
Status data representing status 5TS4 indicating whether the data supplied to the data terminal has been read normally or not and data to be read are transmitted.

以下、一実施例に係るICカードで実行されるソフトウ
ェアについて説明する。
Software executed by an IC card according to one embodiment will be described below.

まず、書き込みサブルーチンの動作順序を第8図のフロ
ーチャートを用いて説明する。
First, the operation order of the write subroutine will be explained using the flowchart shown in FIG.

まず、データ端末からICカードにファイルを指定して
、新しいデータを送信してきたとする。
First, assume that a data terminal specifies a file on an IC card and sends new data.

ICカードのCPUはレコード管理テーブル検索サブル
ーチンを実行することにより、レコード管理テーブルを
検索して、アプリケーションソフトがアクセスしようと
しているファイルにアプリケーションソフトが指定して
いる種類のデータがすでに記録されているか否かを判断
する(ステップSl)。
By executing the record management table search subroutine, the IC card's CPU searches the record management table and determines whether the type of data specified by the application software has already been recorded in the file that the application software is trying to access. (Step Sl).

すなわち、第9図のフローチャートに示すように、まず
、ICカードのCPUはフラグSAをクリヤする(ステ
ップ551)。そして、ICカードのCPUはカウンタ
CNT1に「1」をセットすることにより、レコード管
理テーブルの1番目インデックスで指定されたデータを
読み出す準備をする(ステップ552)。そして、IC
カードのCPUはレコード管理テーブルの1番目のイン
デックスで指定されているデータの種類(バッファRC
(CNTI))と書き込みコマンドに記録されているデ
ータの種類(バッファAIN)とが同−か否かを判断す
る(ステップ553)。すなわち、アプリケーションソ
フトがアクセスしようとしているICカートのファイル
にアプリケーションソフトが指定している種類のデータ
がすてに記録されているか否かを判断する。その判断結
果がYESならば、アプリケーションソフトが指定して
いる種類のデータがアクセスしようとしているICカー
トのファイルにすでに記録されているので、フラグSA
に「1」をセットする(ステップ554)。
That is, as shown in the flowchart of FIG. 9, first, the CPU of the IC card clears the flag SA (step 551). Then, the CPU of the IC card prepares to read the data specified by the first index of the record management table by setting the counter CNT1 to "1" (step 552). And I.C.
The card's CPU handles the data type (buffer RC) specified by the first index of the record management table.
(CNTI)) and the type of data (buffer AIN) recorded in the write command are determined (step 553). That is, it is determined whether the type of data specified by the application software has already been recorded in the file of the IC cart that the application software is trying to access. If the judgment result is YES, the type of data specified by the application software has already been recorded in the file of the IC cart that you are trying to access, so the flag SA is
is set to "1" (step 554).

そして、ICカードのCPUはレコード管理テーブル検
索サブルーチンの動作を終了して、書き込みサブルーチ
ンに戻る。
Then, the CPU of the IC card ends the operation of the record management table search subroutine and returns to the write subroutine.

一方、ステップS53の判断結果がNoならば、アプリ
ケーションソフトが指定している種類のデータはまだ記
録されていないのて、カウンタCNT1とアプリケーシ
ョンソフトがアクセスしようとしているICカートのフ
ァイルに記録されているレコード数RLNとが等しいか
否かを判断する(ステップ555)。すなわち、アプリ
ケーションソフトがアクセスしようとしているICカー
トのレコード管理テーブル中のレコードを全部検索した
か否かを判断する。
On the other hand, if the judgment result in step S53 is No, the type of data specified by the application software has not been recorded yet, and is recorded in the counter CNT1 and the file of the IC cart that the application software is trying to access. It is determined whether or not the number of records RLN is equal (step 555). That is, it is determined whether all records in the record management table of the IC cart that the application software is attempting to access have been searched.

その判断結果がNoならば、レコード管理テーブルのレ
コードを全部検索していないので、カウンタCNT1に
「1」を加算して、レコード管理テーブルの(CNT1
’+])番目インデックスで指定されるデータを読み出
す準備をしくステップ557)、ステップS53に戻る
。このようにして−rcカード(7)CPUはステップ
S53.S55゜S57で構成されるループを繰り返し
実行してレコード管理テーブル中の全てのレコードを検
索する。
If the judgment result is No, all the records in the record management table have not been searched, so "1" is added to the counter CNT1, and (CNT1
Step 557) prepares to read the data specified by the index '+]), and returns to step S53. In this way, the -rc card (7) CPU executes step S53. A loop consisting of steps S55 and S57 is repeatedly executed to search for all records in the record management table.

やがて、ステップS55の判断結果がYESなったら、
アプリケーションソフトがアクセスしようとしているI
Cカードのファイルにアプリケーションソフトが指定し
ている種類のデータはまた記録されていないので、フラ
グSAを「0」をセットしくステップ556)、ICカ
ードのCPUはレコード管理テーブル検索サブルーチン
の動作を終了して、書き込みサブルーチンに戻る。
Eventually, when the determination result in step S55 becomes YES,
I that the application software is trying to access
Since the type of data specified by the application software is not recorded in the file of the C card, the flag SA is set to "0" (step 556), and the CPU of the IC card ends the operation of the record management table search subroutine. and return to the write subroutine.

次に、ICカートのCPUの動作は書き込みサブルーチ
ンに戻フて、上記フラグSAにVlJがセットされてい
るか否かを判断する(ステップS2)。
Next, the operation of the CPU of the IC cart returns to the write subroutine and determines whether VlJ is set in the flag SA (step S2).

その判断結果がYESなら、アプリケーションソフトが
指定している種類のデータがアクセスしようとしている
ICカードのファイルにすでに記録されているので、以
下、該データの修正動作を行なう。すなわち、ICカー
ドのCPUは該データがディレクトリのデータフォーマ
ットに記録されているレコードエリアのサイズを超えて
いるか否かを判断する(ステップS3)。
If the result of the determination is YES, the type of data specified by the application software has already been recorded in the file of the IC card to be accessed, so that the data will be corrected. That is, the CPU of the IC card determines whether the data exceeds the size of the record area recorded in the data format of the directory (step S3).

その判断結果がNoならば、レコードエリアのサイズを
超えていないので、ICカードのCPUは該データの記
録先の論理アドレスの作成をする(ステップS4)。詳
しくは、各ファイルのディレクトリに記録されているレ
コードエリアの先頭アドレスにレコード管理テーブルに
記録されているカウンタCNT1で示された偏位値を加
算して相対アドレスを決定して、記録先の論理アドレス
を作成する。
If the determination result is No, the size of the record area has not been exceeded, so the CPU of the IC card creates a logical address for recording the data (step S4). In detail, the relative address is determined by adding the deviation value indicated by the counter CNT1 recorded in the record management table to the start address of the record area recorded in the directory of each file, and the logical address of the recording destination is determined. Create an address.

次に、ICカードのCPUは論理アドレスで示されたレ
コードの位置のデータをアプリケーションソフトから供
給されたデータに修正する(ステップS5)。
Next, the CPU of the IC card modifies the data at the record position indicated by the logical address to the data supplied from the application software (step S5).

そして、ICカードのCPUは書き込みレスポンスのス
テータス5TS1に書き込み動作の終了を示す「0」を
セットする(ステップS6)。
Then, the CPU of the IC card sets the write response status 5TS1 to "0" indicating the end of the write operation (step S6).

その後、1. CカードのCPUは、書き込みルーチン
の動作を終了し、第6図(b)で示されたレポートデー
タをデータ端末に送信する。したがって、データ端末は
該ステータス5TS1を検知することにより、書き込み
ルーチンの実行の終了を判断する。
After that, 1. The CPU of the C card finishes the operation of the write routine and transmits the report data shown in FIG. 6(b) to the data terminal. Therefore, the data terminal determines the end of execution of the write routine by detecting the status 5TS1.

一方、ステップS3の判断結果がYESならば、該デー
タがレコードエリアのサイズを超えているので、書き込
みレスポンスのステータス5TS2に「1」をセットす
ることにより、アプリケーションソフトからのデータが
書き込まれなかったことを示す(ステップ57)。そし
て、ICカードのCPUは該データの修正動作を終了す
るとともに、書き込みルーチンの動作も終了してデータ
端末に報告する。したがって、データ端末では、該ステ
ータス5TS2を検知することにより、アプリケーショ
ンソフトからのデータがICカードに書き込まれなかっ
たと判断する。
On the other hand, if the judgment result in step S3 is YES, the data exceeds the size of the record area, so the data from the application software is not written by setting "1" to the write response status 5TS2. (Step 57). Then, the CPU of the IC card finishes the data modification operation, and also finishes the write routine operation, and reports it to the data terminal. Therefore, by detecting the status 5TS2, the data terminal determines that the data from the application software has not been written to the IC card.

ところで、ステップS2の判断結果がNoなら、アプリ
ケーションソフトが指定している種類のデータがアクセ
スしようとしているICカードのファイルに記録されて
いないので、以下、該データの新規書き込み動作を行な
う。
By the way, if the determination result in step S2 is No, the type of data specified by the application software is not recorded in the file of the IC card to be accessed, so a new write operation for the data is performed.

すなわち、まず、ICカードのCPUは、アフ。That is, first, the CPU of the IC card is activated.

リケーションソフトがアクセスしようとしているファイ
ルに該データを記録するための領域を確保する(ステッ
プS8)。
An area for recording the data is secured in the file that the application software is trying to access (step S8).

次に、ICカードのCPUはレコード管理テーブル更新
サブルーチンを実行することにより、新規に記録するデ
ータの種類を示すデータをアプリケーションソフトがア
クセスしようとしているフッイルレコード管理テーブル
に新たなインデックスを付して記録する(ステップS9
)。
Next, by executing the record management table update subroutine, the IC card's CPU adds a new index to the file record management table that the application software is trying to access, adding data indicating the type of data to be newly recorded. Record (step S9
).

すなわち、第10図のフローチャートで示すように、ま
ず、ICカードのCP−UはフラグCHをクリヤにする
(ステップ571)。
That is, as shown in the flowchart of FIG. 10, first, the CPU-U of the IC card clears the flag CH (step 571).

次に、ICカードのCPUはアプリケーションソフトが
アクセスしようとしているファイルのレコード管理テー
ブルの全データをサーチすることにより、アプリケーシ
ョンソフトが指定した種類のデータと同一種類のデータ
がレコード管理テーブルにあるか否かを判断する(ステ
ップ572)。
Next, the IC card's CPU searches all data in the record management table of the file that the application software is trying to access, and determines whether the same type of data as specified by the application software exists in the record management table. (step 572).

その判断結果がYESならば、レコード管理テーブル更
新サブルーチンでエラーが発生したので、フラグCHに
「1」をセットしくステップ573)ICカードのCP
tJはその旨をデータ端末に報告する。したがって、メ
インプログラムでは該フラグCHを検知することにより
、レコード管理テーブルのデータの更新ができなかった
と判断する。
If the judgment result is YES, an error occurred in the record management table update subroutine, and the flag CH should be set to "1".Step 573) IC card CP
tJ reports this to the data terminal. Therefore, by detecting the flag CH, the main program determines that the data in the record management table could not be updated.

一方、ステップS72の判断結果がNOならば、同一種
類のデータが未だ記録されていないので、ICカードの
CPUはレコード管理テーブルにアプリケーションソフ
トから供給された種類のデータを記録するためのメモリ
領域を確保しようとする(ステップ574)。
On the other hand, if the determination result in step S72 is NO, the same type of data has not been recorded yet, so the CPU of the IC card creates a memory area for recording the type of data supplied from the application software in the record management table. Attempt to secure (step 574).

そして、ICカードのCPUはディレクトリのレコード
エリアのサイズから、データを記録する領域がメモリに
残されているか否かを判断する(ステップ575)。
Then, the CPU of the IC card determines from the size of the record area of the directory whether there is any area left in the memory to record the data (step 575).

その判断結果がYESならば、ICカードのメモリ中の
レコードエリアにデータを記録する領域があるので、新
たに確保したレコードエリアにインデックスを付与する
(ステップ576)。それとともに、該新規に作成した
レコードエリアに関するデータ(例えば、相対アドレス
を作成するための偏位値)をレコード管理テーブルに記
録する(ステップ577)。ここで、ICカードのCP
Uはレコード管理テーブル更新サブルーチンの動作を終
了して、書き込みサブルーチンに戻る。
If the determination result is YES, there is an area for recording data in the record area in the memory of the IC card, so an index is added to the newly secured record area (step 576). At the same time, data regarding the newly created record area (for example, an offset value for creating a relative address) is recorded in the record management table (step 577). Here, the IC card CP
U finishes the operation of the record management table update subroutine and returns to the write subroutine.

一方、ステップS75の判断結果がNOならば、ICカ
ードのCPUはICカードのメモリ領域にデータを記録
する領域がないので、ステップS73を実行することに
より、フラグCHに「1」をセットする。ここで、IC
カードのCPUはレコード管理テーブル更新サブルーチ
ンの動作を終了して、書き込みサブルーチンに戻る。
On the other hand, if the determination result in step S75 is NO, the CPU of the IC card sets flag CH to "1" by executing step S73, since there is no area in the memory area of the IC card to record data. Here, I.C.
The card CPU finishes the operation of the record management table update subroutine and returns to the write subroutine.

そして、書き込みサブルーチンではICカードのCPU
はフラグCHに「0」がセットされているか否かを判断
する(ステップ510)。
In the write subroutine, the IC card's CPU
determines whether flag CH is set to "0" (step 510).

その判断結果がYESならば、ICカードのCPUはレ
コード管理テーブルのデータの更新ができたので、ステ
ップS4と同じくデータの記録先の論理アドレスを作成
する(ステップ511)。
If the determination result is YES, the CPU of the IC card has successfully updated the data in the record management table, and thus creates a logical address for the data recording destination, as in step S4 (step 511).

そして、ICカードのCPUは論理アドレスで示される
レコードの位置にアプリケーションソフトが書き込もう
としているデータを記録する(ステップS 12)。
Then, the CPU of the IC card records the data that the application software is attempting to write at the record position indicated by the logical address (step S12).

そして、ICカードのCPUはデータの新規書き込み動
作を終了して、ステップS6を実行することにより、I
Cカードは書き込みレスポンスのステータスSTS 1
に「0」をセットする。
Then, the CPU of the IC card completes the new data write operation and executes step S6.
C card has write response status STS 1
Set "0" to "0".

その後、ICカートのCPUは、書き込みルーチンの動
作を終了し、データ端末にその旨を報告する。
Thereafter, the IC cart CPU finishes the operation of the write routine and reports this to the data terminal.

一方、ステップS10の判断結果がNOならば、レコー
ド管理テーブルのデータの更新ができなかったので、I
CカードのCPUはステップS7を実行することにより
、書き込みレスポンスのステータス5TS2に「1」を
セットする。
On the other hand, if the determination result in step S10 is NO, it means that the data in the record management table could not be updated.
The CPU of the C card sets "1" to the write response status 5TS2 by executing step S7.

その後、ICカードのCPUは書き込みルーチンの動作
を終了し、その旨をデータ端末に報告する。
Thereafter, the CPU of the IC card finishes the operation of the write routine and reports this to the data terminal.

次に、読み出しサブルーチンの動作順序を第11図のフ
ローチャートを用いて説明する。
Next, the operation order of the read subroutine will be explained using the flowchart of FIG.

まず、ICカードのCPUはレコード管理テーブル検索
サブルーチンを実行することにより、レコード管理テー
ブルを検索して、アプリケーションソフトがアクセスし
ようとしているファイルにアプリケーションソフトが指
定している種類のデータがすてに記録されているか否か
を判断する(ステップ531)。
First, the IC card's CPU searches the record management table by executing the record management table search subroutine to ensure that the type of data specified by the application software has been recorded in the file that the application software is trying to access. It is determined whether or not it has been set (step 531).

次に、ICカードのCPUはフラグSAが「1」か否か
、すなわちアプリケーションソフトがアクセスしようと
しているファイルにアプリケーションソフトが指定して
いるデータがすでに記録されているか否かを判断する(
ステップ532)。
Next, the CPU of the IC card determines whether the flag SA is "1", that is, whether the data specified by the application software has already been recorded in the file that the application software is trying to access.
Step 532).

その判断結果がYESならば、アプリケーションソフト
が指定しているデータがすてに記録されているので、I
Cカードは該データの記録先の論理アドレスの作成をす
る(ステップ533)。詳細は書き込みサブルーチンの
ステップS4で説明したので省略する。
If the judgment result is YES, the data specified by the application software has already been recorded.
The C card creates a logical address for recording the data (step 533). The details have been explained in step S4 of the write subroutine and will therefore be omitted.

次に、ICカードのCPUは該論理アドレスに記録され
ているデータを読み出し用のフォーマットにセットする
(ステップ534)。とともに、ICカードのCPUは
データの読み出し動作が終了したことをアプリケーショ
ンソフトに知らせるために、読み出しレスポンスの5T
S3に「0」セットする(ステップ535)。
Next, the CPU of the IC card sets the data recorded at the logical address in a read format (step 534). At the same time, the IC card CPU sends 5T of the read response in order to notify the application software that the data read operation has been completed.
Set S3 to "0" (step 535).

その後、ICカートのCPUは読み出しルーチンの動作
を終了し、その旨をデータ端末に報告す一方、ステップ
S32の判断結果がNOならば、すなわちアプリケーシ
ョンソフトが指定しているデータが記録されていないの
で、ICカードのCPUはデータの読み出しができなか
ったことをデータ端末に知らせるために、読み出しレス
ポンスの5TS4に「1」セットする(ステップ536
)。その後、ICカードのCPUは読み出しルーチンの
動作を終了し、その旨をデータ端末に報告する。
After that, the CPU of the IC cart finishes the operation of the reading routine and reports this to the data terminal, while if the judgment result in step S32 is NO, that is, the data specified by the application software is not recorded. , the CPU of the IC card sets 5TS4 of the read response to "1" to notify the data terminal that the data could not be read (step 536).
). Thereafter, the CPU of the IC card finishes the operation of the read routine and reports this to the data terminal.

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

第1図は本発明の一実施例に係るICカードのクレーム
対応図、第2図はICカードのメモリ構成を示す樹系図
、第3図はICカードの各ファイルのファイル構成を示
すブロック図、第4図はディレクトリのデータフォーマ
ットを示すブロック図、第5図はレコード管理テーブル
のデータフォーマットを示すブロック図、第6図(a)
(b)はデータの書き込み時に使用されるフレームを不
すブロック図、第7図(a)(b)はデータの読み出し
時に使用されるフレームを示すブロック図、第8図は書
き込みルーチンの動作順序を示すフローチャート、第9
図はレコード管理テーブル検索サブルーチンの動作順序
を示すフローチャート、第10図はレコード管理テーブ
ル変更サブルーチンの動作順序を示すフローチャート、
第11図は読み出しルーチンの動作順序を示すフローチ
ャートである。 1・・・・・メモリ、 2・・・・・データアクセス手段、 3・・・・・レコード管理テーブル、 4・・・・・アドレス変換手段。
FIG. 1 is a complaint correspondence diagram of an IC card according to an embodiment of the present invention, FIG. 2 is a tree diagram showing the memory structure of the IC card, and FIG. 3 is a block diagram showing the file structure of each file of the IC card. Figure 4 is a block diagram showing the data format of the directory, Figure 5 is a block diagram showing the data format of the record management table, Figure 6 (a)
(b) is a block diagram excluding frames used when writing data, Figures 7 (a) and (b) are block diagrams showing frames used when reading data, and Figure 8 is the operating sequence of the write routine. 9th flowchart showing
10 is a flowchart showing the operation order of the record management table search subroutine, FIG. 10 is a flowchart showing the operation order of the record management table change subroutine,
FIG. 11 is a flowchart showing the operating order of the read routine. 1...Memory, 2...Data access means, 3...Record management table, 4...Address conversion means.

Claims (1)

【特許請求の範囲】  所定の論理アドレス空間を有するメモリと、データア
クセス手段と、を備えたICカードにおいて、 各フアイル毎に使用レコードエリアを指定するコード化
されたアドレス情報を記憶するレコード管理テーブルと
、 該レコードエリアにアクセスするときは上記コード化さ
れたアドレス情報に基づき論理アドレスを作成するアド
レス変換手段と、を有することを特徴とするICカード
[Claims] In an IC card equipped with a memory having a predetermined logical address space and data access means, there is provided a record management table that stores coded address information that specifies a record area to be used for each file. and address conversion means for creating a logical address based on the encoded address information when accessing the record area.
JP2229995A 1990-08-30 1990-08-30 Ic card Pending JPH04111086A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2229995A JPH04111086A (en) 1990-08-30 1990-08-30 Ic card

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2229995A JPH04111086A (en) 1990-08-30 1990-08-30 Ic card

Publications (1)

Publication Number Publication Date
JPH04111086A true JPH04111086A (en) 1992-04-13

Family

ID=16900957

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2229995A Pending JPH04111086A (en) 1990-08-30 1990-08-30 Ic card

Country Status (1)

Country Link
JP (1) JPH04111086A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05346894A (en) * 1992-06-15 1993-12-27 Funai Denki Kenkyusho:Kk Data receiving terminal and information transfer system of computer
JPH10134154A (en) * 1996-10-31 1998-05-22 N T T Data Tsushin Kk Hybrid card and its access system

Citations (2)

* 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
JPH0259940A (en) * 1988-08-26 1990-02-28 Toshiba Corp Portable electronic device

Patent Citations (2)

* 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
JPH0259940A (en) * 1988-08-26 1990-02-28 Toshiba Corp Portable electronic device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH05346894A (en) * 1992-06-15 1993-12-27 Funai Denki Kenkyusho:Kk Data receiving terminal and information transfer system of computer
JPH10134154A (en) * 1996-10-31 1998-05-22 N T T Data Tsushin Kk Hybrid card and its access system

Similar Documents

Publication Publication Date Title
US4598357A (en) Cache/disk subsystem with file number for recovery of cached data
US6477616B1 (en) Storage device, storage system, memory management method, recording medium, and computer data signal
US4601012A (en) Zone partitioning in volume recovery system
US6604170B1 (en) Information processing apparatus and method, and computer readable memory
US4027288A (en) Self-managing variable field storage system for handling nested data structures
JPS6122817B2 (en)
US5519860A (en) Central processor index sort followed by direct record sort and write by an intelligent control unit
JPH04111086A (en) Ic card
JPH06243006A (en) Character file access system
CN112035380A (en) Data processing method, device and equipment and readable storage medium
JPH0525359B2 (en)
JP3169596B2 (en) Database management device
JP3061385B2 (en) Data management device and data management method
JPS5850B2 (en) Main memory expansion unit access method
JP2782908B2 (en) IC card
JP2922956B2 (en) File area allocation method
JPH09231110A (en) Ic card
JP2867441B2 (en) List processing method
JPS62226391A (en) Ic card
JPH089795Y2 (en) IC card
JPH1186512A (en) Data rewriting method for optical disk
JPH04156626A (en) File entry generating system for vtoc
JPH02281322A (en) File management method for additional write type auxiliary storage medium
JP2817911B2 (en) Access control method for keyed files
JPS61100853A (en) Data processing system