JPH01258029A - Data processor - Google Patents

Data processor

Info

Publication number
JPH01258029A
JPH01258029A JP8500688A JP8500688A JPH01258029A JP H01258029 A JPH01258029 A JP H01258029A JP 8500688 A JP8500688 A JP 8500688A JP 8500688 A JP8500688 A JP 8500688A JP H01258029 A JPH01258029 A JP H01258029A
Authority
JP
Japan
Prior art keywords
data
program
instruction
storage device
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
JP8500688A
Other languages
Japanese (ja)
Inventor
Shinobu Koizumi
小泉 忍
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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP8500688A priority Critical patent/JPH01258029A/en
Publication of JPH01258029A publication Critical patent/JPH01258029A/en
Pending legal-status Critical Current

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

PURPOSE:To provide a dynamic connection system with rapid performance at the time of execution similarly to a static connection system by executing program connecting edition during the period of execution without including dynamic connection processing in individual programs. CONSTITUTION:A LINK mechanism 5 retrieves a name code string coincident with a name code string of an NAMF part 17 out of name code strings stored in a name storing part 8 in an MAP table 7 and fetches an address in a storage device 2 which corresponds to the name code string from a loading address part 9. The address is set up in an ADRF part 16 and informed to an instruction executing mechanism 4. Consequently, the mechanism 4 knows the address of a subprogram 18 to be called by a CALL instruction 11 and continues program calling processing. During the execution of the instruction 11, the connection edition with the program 18 to be called in executed. Thus, connecting edition can be executed during the period of execution without including dynamic connection processing directly in the program.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、データ処理装置のプログラムを複数に分けて
作成した際にそれらをプログラムの実行中に結合編集す
るデータ処理装置に関するものである。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a data processing device that, when a program for the data processing device is created in multiple parts, is combined and edited during execution of the program.

〔従来の技術〕[Conventional technology]

別々に作成された複数のプログラムを相互に結合しひと
つにまとめる結合編集には、大別して次の2つの方法が
ある。
There are two main methods for combining and editing multiple programs that have been created separately:

その第1は、複数の作成済プログラムを、それらの実行
に先立ちリンケージエディタと呼ぶ結合編集プログラム
により処理する方法である。以下では、この第1の方法
を静的結合方式と呼ぶ、これに対し第2の方法は1例え
ばMadnick、S、E、 。
The first method is to process a plurality of created programs using a combination editing program called a linkage editor prior to their execution. In the following, this first method will be referred to as the static binding method, whereas the second method will be referred to as 1, e.g. Madnick, S.E.

Donovan、J、J、 ”Operating S
ystams” 、 McGraw−HiLL、  1
974  p p 173−179. ニ示すように、
複数のプログラムを、それらの実行中に結合編集する方
法である。以下では、この第2の方法を動的結合方式と
呼ぶ。
Donovan, J. J., “Operating S.
ystams”, McGraw-HiLL, 1
974 pp 173-179. As shown in
This is a method of combining and editing multiple programs while they are running. In the following, this second method will be referred to as a dynamic combination method.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

動的結合方式に比べ静的結合方式には本質的に次の様な
欠点がある。
Compared to the dynamic binding method, the static binding method essentially has the following drawbacks.

(1)結合編集を行なった複数のプログラムのうちのひ
とつを修正すると全体を再度結合編集しなおさなければ
ならない。
(1) If one of the multiple programs that have been jointly edited is modified, the entire program must be jointly edited again.

(2)結合編集されてできたプログラムのひとつのまと
まりと、同様に結合編集されてできたプログラムの別の
まとまりの中に同一のプログラムが別々に含まれている
ことがある。
(2) The same program may be included in one group of programs created by combined editing and another group of programs created by similar combined editing.

プログラムの大型化・複雑化に伴ない、上記の様な欠点
のない動的結合方式が望まれるが、従来の動的結合方式
では結合編集されるプログラム中に第4図のフローチャ
ートで示した様な動的結合処理、すなわち、実際に結合
光プログラムを呼び出す時点で、プログラム自身が結合
編集済かどうかを判定し、(ステップ41)結合編集済
ならば記憶領域から呼び先プログラムの入り口番地を取
り出し分岐するか、(ステップ42.43)結合編集未
完ならば呼び先の検索と分岐を管理プログラム(オペレ
ーティングシステム)に依頼するためのLINKマクロ
を発行する(ステップ44)というコードを組み込んで
おく必要があった。
As programs become larger and more complex, a dynamic linkage method that does not have the drawbacks mentioned above is desired. Dynamic link processing, that is, at the time when the link optical program is actually called, it is determined whether the program itself has been linked and edited (step 41), and if the link has been edited, the entrance address of the called program is retrieved from the storage area. It is necessary to incorporate code that will either branch (steps 42 and 43) or issue a LINK macro to request the management program (operating system) to search for the call destination and branch if the combined edit is not completed (step 44). there were.

また、汎用的なある機能を提供するモジュールがありこ
れを複数の異なるプログラムで利用する場合、上記静的
結合方式では、各プログラムの実行前に結合を完了し全
体を完成させるため、汎用機能提供モジュールのコピー
を作成しそれぞれのプログラムに結合していた。この方
法では、プログラムを格納する記憶装置の必要容量が増
大するばかりでなく、汎用機能提供モジュールの修正の
手間の増大という問題も生じる。一方従来の動的結合方
式では、結合の基本単位がサブプログラムであるため、
データとそれに対する複数の操作をカプセル化するデー
タ抽象化の手法に合致しない面があった。
In addition, when there is a module that provides a general-purpose function and it is used in multiple different programs, the above static combination method completes the combination and completes the whole before executing each program, so the general-purpose function is not provided. A copy of the module was created and combined into each program. This method not only increases the required capacity of the storage device that stores the program, but also increases the amount of effort required to modify the general-purpose function providing module. On the other hand, in the conventional dynamic linkage method, the basic unit of linkage is a subprogram, so
There were some aspects that did not match the data abstraction method that encapsulates data and multiple operations on it.

本発明の第1の目的は、上記の様に動的結合処理を個々
のプログラムに組み込むことなく実行中にプログラムの
結合編集を行なうことにより、動的結合方式に対して、
静的結合方式と同様の記述の簡便さと実行時の高速性を
与えるデータ処理装置を提供することに、ある。
The first object of the present invention is to perform combination editing of programs during execution without incorporating dynamic combination processing into individual programs as described above, thereby improving the dynamic combination method.
An object of the present invention is to provide a data processing device that provides the same simplicity of description and high speed of execution as the static binding method.

本発明の第2の目的は、モジュールすなわちデ−夕領域
と複数のサブプログラムを単位として動的結合可能とす
ることにより、実行前に結合する場合に生じるモジュー
ルの複数コピーの問題を回避できるデータ処理装置を提
供することにある。
A second object of the present invention is to make it possible to dynamically combine a module, that is, a data area, and a plurality of subprograms as a unit, thereby avoiding the problem of multiple copies of modules that occur when combining them before execution. The purpose of this invention is to provide a processing device.

〔課題を解決するための手段〕[Means to solve the problem]

上記目的を達成するために本発明の第1の特徴は、 (al)結合編集が未完了である状態を示す値(以下で
は、この値を未結合値と呼ぶ)かまたは結合先の番地を
保持するフィールド(以下では。
In order to achieve the above object, the first feature of the present invention is: (al) A value indicating that the combined edit is not completed (hereinafter, this value is referred to as an uncombined value) or a value indicating the address of the combining destination. fields to hold (below).

このフィールドをADRF部と呼ぶ)と、結合先の名前
を示す記号列を保持しているフィールド(以下では、こ
のフィールドをNAMF部と呼ぶ。)との2つのフィー
ルドを対にしたデータ形式のデータ。
This field is called the ADRF part), and the field that holds the symbol string indicating the name of the link destination (hereinafter, this field is called the NAMF part) is a pair of data format data. .

(b2)上記(al)のデータ形式のデータを参照して
プログラムの呼び出しを行なう命令(以下では、この命
令をCALL命令と呼ぶ)、及び上記(al)のデータ
形式のデータを参照してデータ領域へアクセスする命令
(以下では、この命令をI) A CS命令と呼ぶ)。
(b2) An instruction to call a program by referring to data in the data format of (al) above (hereinafter, this instruction will be referred to as a CALL instruction), and an instruction to call a program by referring to data in the data format of (al) above. An instruction to access an area (hereinafter, this instruction will be referred to as an IACS instruction).

(cl)記憶装置上のすべてのプログラムやデータ領域
の番地を、それらの名前を示す記号列とともに記録しで
あるテーブル(以下では、このテーブルをMAPテーブ
ルと呼ぶ)。
(cl) A table that records the addresses of all programs and data areas on a storage device, along with symbol strings indicating their names (hereinafter, this table will be referred to as a MAP table).

(di)上記(b)の命令の実行時に上記(al)のデ
ータと上記(cl)のテーブルを利用して結合編集を行
なう機構(以下では、この機構をLINK機構構と呼ぶ
)。
(di) A mechanism for performing combined editing using the data in (al) and the table in (cl) above when executing the instruction in (b) above (hereinafter, this mechanism will be referred to as the LINK mechanism).

を備えたことにある。The reason is that we have prepared the following.

上記目的を達成するために、本発明の第2の特徴は、モ
ジュールを再入可能にし、かつ、プログラム実行中に結
合可能にすることにあり、そのため以下のものを備える
In order to achieve the above object, the second feature of the present invention is to make modules reentrant and connectable during program execution, and for this purpose includes the following.

(a2)外部モジュール参照のための命令、すなわち外
部モジュール中のサブプログラムの呼び出しと外部モジ
ュールのデータ領域中のデータにアクセスするための命
令群。
(a2) Instructions for referencing an external module, that is, a group of instructions for calling a subprogram in the external module and accessing data in the data area of the external module.

(b2)起動済モジュール管理テーブル;以下の情報の
並びである。
(b2) Activated module management table: The following information is arranged.

1、起動済モジュールの名称を示す記号列。1. Symbol string indicating the name of the activated module.

2、起動済モジュールのコード領域の先頭番地。2. Starting address of the code area of the activated module.

3、起動済モジュールのデータ領域の先頭番地。3. Starting address of the data area of the activated module.

なお、本テーブルはタスク毎に作成する。Note that this table is created for each task.

(c2)上記(a2)の命令のオペランドとなるデータ
形式:以下の情報フィールドを含む。
(c2) Data format as the operand of the instruction in (a2) above: includes the following information fields.

1、参照先モジュールの名称を示す記号列。1. A symbol string indicating the name of the referenced module.

2、サブプログラム呼び出し命令のオペランドの場合モ
ジュールのコード領域先頭からサブプログラム入口点ま
でのオフセット、データアクセス命令の場合モジュール
のデータ領域先頭からそのデータまでのオフセット。
2. In the case of an operand of a subprogram call instruction, the offset from the beginning of the module's code area to the subprogram entry point; in the case of a data access instruction, the offset from the beginning of the module's data area to the data.

3、結合完了以前には未結合を示す値、結合完了後はそ
れぞれ目標とするサブプログラム入口点の番地またはデ
ータの番地。
3. A value indicating uncombined before the combination is completed, and a target subprogram entry point address or data address after the combination is completed.

(d2)モジュール管理・結合機構。(d2) Module management/coupling mechanism.

〔作用〕[Effect]

上記(bl)のCA L L、命令とDAC3命令はそ
の実行中に上記(al)のデータ形式のデータを参照す
る。ここで上記(al)のADRF部の値が未結合値の
場合中央処理装置は上記(dl)のL I N K機構
を起動する。LINK機構は、上記(al)のNAMF
部の値である記号列を上記(cl)のMAPテーブル中
より検索し対応するプログラムまたはデータ領域の記憶
装置上の番地を得て(al)のADRF部に設定する。
The above (bl) CALL L instruction and DAC3 instruction refer to the data in the above (al) data format during their execution. Here, if the value of the ADRF section (al) is an unbound value, the central processing unit activates the LINK mechanism (dl). The LINK mechanism is the NAMF of (al) above.
The symbol string that is the value of the section is searched in the MAP table of (cl), the address of the corresponding program or data area on the storage device is obtained, and the address is set in the ADRF section of (al).

さらに中央処理装置はLINK機構が得た番地によりC
ALL命令、DACS命令の実行を続行する。
Furthermore, the central processing unit uses the address obtained by the LINK mechanism to
Continue execution of ALL and DACS instructions.

また上記において上記(al)のA D RF部の値が
未結合値でなく正しい番地が設定されていれば、中央処
理装置はT、 I N K機構を起動することなくCA
LL命令DΔCり命令を実行する。
In addition, in the above, if the value of the A D RF section in (al) above is not an unbound value and a correct address is set, the central processing unit can perform CA without starting the T, I N K mechanism.
Execute the LL instruction DΔC instruction.

以上の構成及び動作によれば、結合編集される個々のプ
ログラムは、上記(al)のデータ形式と上記すの命令
のみを用いることで、そのプログラム中に直接動的結合
処理を組み込むことなくその実行中に結合編集を行なう
ことができる。
According to the above configuration and operation, each program to be combined and edited can be edited by using only the data format in (al) above and the instructions in (a) above, without directly incorporating dynamic combination processing into the program. Combined editing can be done during runtime.

また、上記(c2)の3のフィールドには初期状態にお
いて未結合を示す値を設定する。中央処理装置は上記(
a2)の命令実行時に、その命令のオペランド中の上記
(C2)−3のフィールドが未結合を示す値かどうかを
チエツクし、未結合の値であれば上記(d2)のモジュ
ール管理・結合機構を起動する。モジュール管理・結合
機構は上記(C2)−1のモジュール名称の記号列と上
記(b2)の起動済モジュール管理テーブルによりモジ
ュールのコード領域先頭番地またはデータ領域先頭番地
を検索し、上記(C2)−2のオフセット値を加算して
目標の番地を決定後上記(C2)−3のフィールドに設
定した後、所定の命令動作に復帰する。
Further, in the field 3 of (c2) above, a value indicating unbound is set in the initial state. The central processing unit is as described above (
When executing the instruction in a2), it is checked whether the field (C2)-3 above in the operand of that instruction has a value indicating unbound, and if it is a value indicating unbound, the module management/coupling mechanism in (d2) above is executed. Start. The module management/coupling mechanism searches for the first address of the code area or the first address of the data area of the module using the symbol string of the module name in (C2)-1 above and the activated module management table in (b2) above, and searches for the first address of the code area or data area of the module, After determining the target address by adding the offset value of 2 and setting it in the field (C2)-3, the process returns to the predetermined command operation.

以上の動作により、命令の実行時にモジュールの結合が
完了する。
Through the above operations, the module combination is completed when the instruction is executed.

〔実施例〕〔Example〕

以下、本発明の一実施例を第1図により説明する。 An embodiment of the present invention will be described below with reference to FIG.

データ処理装置は、中央処理装置1、記憶装置2とそれ
らを結合するシステムバス3から構成される。記憶装置
2の上には、結合編集されるべき2つのプログラム(M
AINプログラム10とSUBプログラム18)とMA
INプログラムが使用するMAINデータ領域14が置
かれている。
The data processing device is composed of a central processing unit 1, a storage device 2, and a system bus 3 that connects them. On the storage device 2 are two programs (M
AIN program 10 and SUB program 18) and MA
A MAIN data area 14 used by the IN program is located there.

MAINプログラム10中にはSUBプログラム18を
呼び出すためのCALL命令11がある。
The MAIN program 10 includes a CALL instruction 11 for calling a SUB program 18.

このCA 1. L命令11は、命令コード12とオペ
ランド部13からなるが、命令コード12は中央処理装
置1の内部にある命令実行機構4に対する指令となって
おり、オペランド部13は命令実行の際のデータの位置
を示すものである。ここでは0ΔL L命令11のオペ
ランド部12に、MAINデータ領域14中のリンクデ
ータ15の番地が設定されている。リンクデータ15は
、呼び先であるSUBプログラム18の番地を保持する
予定のA D RF部】6と、SUBプログラム18の
名前記号列が設定されているNAMF部17部名7成さ
れている。ここでCA L L命令11を一度も実行し
ていない状態では、A D RI”部16には番地が未
設定であることを示す値=未結合値が設定されている。
This CA 1. The L instruction 11 consists of an instruction code 12 and an operand section 13. The instruction code 12 is a command to the instruction execution mechanism 4 inside the central processing unit 1, and the operand section 13 is used to store data during instruction execution. It indicates the location. Here, the address of the link data 15 in the MAIN data area 14 is set in the operand section 12 of the 0ΔLL instruction 11. The link data 15 is composed of an AD RF section]6 which is scheduled to hold the address of the SUB program 18 to be called, and a NAMF section 17 where the name symbol string of the SUB program 18 is set. Here, in a state where the CALL instruction 11 has never been executed, a value indicating that the address has not been set = an unbound value is set in the AD RI section 16.

一方、中央処理装置1には命令実行機構4があり、さら
にその中にLINKfi構5と内部バス6を通じて接続
されるMAPテーブル7がある。
On the other hand, the central processing unit 1 includes an instruction execution mechanism 4, and further includes a MAP table 7 connected to a LINKfi structure 5 through an internal bus 6.

MAPテーブル7は、記憶装置2の上にあるすべてのプ
ログラムやデータ領域の名前記号列を保持している名前
記号部8と、それぞれのプログラムやデータ領域の記憶
装置2上の番地を記録しているロード番地部9から構成
されている。
The MAP table 7 includes a name symbol section 8 that holds the name symbol strings of all programs and data areas on the storage device 2, and records the addresses of each program and data area on the storage device 2. It consists of a load address section 9.

さて、ここでMΔTNプログラムlo中のCALL命令
]−1をはじめて実行すると、命令実行機構4が命令コ
ード12を解析し、これがプログラム呼び出し命令であ
ると解釈し第2図のフローチャートに示す処理を命令実
行機構4が行なう、すなわち、この場合、CAI、L命
令11のオペランド部13が示すリンクデータ15のA
 I) RF部16は初期状態で未結合値であるので命
令実行機構14中の■、INK機横5が起動される。(
ステップ23)LINK機構5は、CALL命令11の
オペランド部13が示すリンクデータ15とMAPテー
ブル7を用いて第3図のフローチャートに示す処理を行
なう。すなわち1MAPテーブル7の名前記号部8の名
前記号列の中からリンクデータ15のNAMF部17部
名7記号列と一致するものを検索しくステップ32)、
MAPテーブル7のロード番地部9からその名前記号列
に対応するものの記憶装置2上の番地を取り出しくステ
ップ33)、その番地をリンクデータ15のADRF部
に設定すると同時に命令実行機構4に対しその番地を通
知してLINK機構5の動作を終了する。
Now, when the CALL instruction ]-1 in the MΔTN program lo is executed for the first time, the instruction execution mechanism 4 analyzes the instruction code 12, interprets it as a program call instruction, and instructs the process shown in the flowchart of FIG. The execution unit 4 executes, in this case, the A of the link data 15 indicated by the operand part 13 of the CAI, L instruction 11.
I) Since the RF section 16 has an uncoupled value in the initial state, the INK machine 5 in the instruction execution mechanism 14 is activated. (
Step 23) The LINK mechanism 5 uses the link data 15 indicated by the operand section 13 of the CALL instruction 11 and the MAP table 7 to perform the processing shown in the flowchart of FIG. In other words, search for a name symbol string in the name symbol section 8 of the 1MAP table 7 that matches the name 7 symbol string in the NAMF section 17 of the link data 15 (step 32).
Step 33) of extracting the address on the storage device 2 corresponding to the name symbol string from the load address field 9 of the MAP table 7, setting that address in the ADRF field of the link data 15, and at the same time informing the instruction execution mechanism 4 of that address. The address is notified and the operation of the LINK mechanism 5 is ended.

これにより命令実行機構4はCALL命令11のプログ
ラム呼び出し先であるSUBプログラム18の番地を知
り、プログラム呼び出し処理を続行する。
As a result, the instruction execution mechanism 4 learns the address of the SUB program 18 that is the program call destination of the CALL instruction 11, and continues the program call process.

以上の様にして、CALL命令11の実行中に呼び先で
あるS U Bプログラム18との結合編集が行なわれ
る。
As described above, while the CALL instruction 11 is being executed, editing is performed in conjunction with the called SUB program 18.

一方、上記の様にリンクデータ15のA D RF部1
6にSUBプログラム18の番地が設定された後、CA
LL命令11を実行すると、第2図のフローチャートが
示すようにLINK機構5が起動されることなく呼び出
しが行なわれる。
On the other hand, as mentioned above, the A D RF section 1 of the link data 15
After the address of SUB program 18 is set in 6, CA
When the LL instruction 11 is executed, the LINK mechanism 5 is called without being activated, as shown in the flowchart of FIG.

この例ではプログラムの呼び出しについて記述したが、
データ領域へのアクセスの場合もLINK機構の動作に
ついては同様であり、単にデータアクセス命令の最終的
な動作のみが異なる。
This example describes calling a program, but
In the case of accessing the data area, the operation of the LINK mechanism is similar, and only the final operation of the data access command differs.

また、この例ではLINK411!i摺5とMAPテー
ブル7を命令実行機構の中に置いているが、これらを記
憶装置2上に置き、リンクデータ15のA I) RF
部16が未結合値の場合に命令実行機構4が記憶装置2
上のLINKfi構5を起動する方法もある。
Also, in this example, LINK411! I) RF
When the part 16 is an unbound value, the instruction execution mechanism 4
There is also a method of starting LINKfi structure 5 above.

次に、本発明の他の実施例を第5図により説明する。Next, another embodiment of the present invention will be described with reference to FIG.

本図は、MAINモジュール51から、オペランドデー
タ53とCA L L命令58により、SUBMODモ
ジュール66の中のSUBサブプログラム69を呼び出
すものである。
In this figure, a SUB subprogram 69 in a SUBMOD module 66 is called from a MAIN module 51 using operand data 53 and a CALL instruction 58.

CALL、命令58はMA I N−11−ジュールコ
ード領域57にあり、命令の種別を示す命令コード部5
9とMAINモジュールデータ領域52中のオペランド
データ53を示すオペランド部60からなる。一方オペ
ランドデータ53は、参照先のモジュール名を示す参照
先モジュール名称記号列56、参照先のSURMODモ
ジュールコード領域68の先頭から目標とするS tJ
 Bサブプログラム69の入口点までのオフセットmを
保持するオフセット部55.および初期状態において未
結合を示す値を保持し結合後は目標であるS U Bサ
ブプログラム69の入口点番地を保持するポインタ部5
4からなる。
CALL, the instruction 58 is located in the MA I N-11-joule code area 57, and the instruction code section 5 indicates the type of instruction.
9 and an operand section 60 indicating operand data 53 in the MAIN module data area 52. On the other hand, the operand data 53 includes a reference destination module name symbol string 56 indicating the reference destination module name, and a target S tJ from the beginning of the reference destination SURMOD module code area 68.
An offset section 55 that holds the offset m to the entry point of the B subprogram 69. and a pointer section 5 that holds a value indicating uncombined in the initial state and holds the entry point address of the target SUB subprogram 69 after combining.
Consists of 4.

CA L L命命58は中央処理装置により実行される
が、この際オペランドポインタ58が示すオペランドデ
ータ53のポインタ部54が未結合値かどうかが中央処
理装置によりチエツクされる。
The CALL instruction 58 is executed by the central processing unit, and at this time the central processing unit checks whether the pointer portion 54 of the operand data 53 indicated by the operand pointer 58 is an unbound value.

もしここで未結合値でなければポインタ部54が保持し
ている値をサブプログラム入口点番地を解釈して、ただ
ちに呼び出しが行なわれる。一方ポインタ部が未結合値
であれば呼び出し動作を中断し、モジュール管理・結合
機構を起動する。
If it is not an unbound value, the value held by the pointer section 54 is interpreted as the subprogram entry point address, and the call is made immediately. On the other hand, if the pointer part is an unbound value, the calling operation is interrupted and the module management/coupling mechanism is activated.

モジュール管理・結合機端は第6図に示す処理を行なう
、すなわち1、起動済モジュール管理テーブル61にお
いて起動済モジュール名称記号列65とオペランドデー
タ53の参照モジュール名称記号列56とが一致する起
動済モジュールデータ62を検索する(ステップ71)
。ここで一致する起動済モジュールデータ62が存在す
る場合、元の命令がサブプログラムが呼び出し命令であ
れば(ステップ74)コード領域ポインタ64の値とオ
ペランドデータ53のオフセット部55の値を加算しポ
インタ部52に設定、また元の命令がデータアクセス命
令であればデータ領域ポインタ63の値とオフセット部
55の値を加算しポインタ部54に設定しそれぞれの命
令動作を再開する。
The module management/coupling device end performs the processing shown in FIG. Search module data 62 (step 71)
. If there is matching started module data 62 here, and if the original instruction is a subprogram call instruction (step 74), the value of the code area pointer 64 and the value of the offset part 55 of the operand data 53 are added and the pointer If the original instruction is a data access instruction, the value of the data area pointer 63 and the value of the offset section 55 are added and set in the pointer section 54, and the respective instruction operations are restarted.

第5図の場合はサブプログラム呼び出し命令なのでコー
ド領域先頭ポインタ64の値とオフセット部55の値の
和がポインタ部54に設定されることになる。また、起
動済モジュール管理テーブル61中に参照モジュール名
称記号列66に一致する記号列をもつ起動済モジュール
データ62が存在しない場合には、新たなデータ領域と
コード領域を記憶域中に確保し、コード領域に対応する
モジュールのコードをロードし、データ領域の番地とコ
ード領域の番地とモジュール名称を示す記号列をもつ新
たな起動済モジュールデータ62を起動済モジュール管
理テーブル61に追加登録後、オペランドデータ53の
ポインタ部54の値の設定を行なう。
In the case of FIG. 5, since it is a subprogram call instruction, the sum of the value of the code area head pointer 64 and the value of the offset section 55 is set in the pointer section 54. Furthermore, if there is no activated module data 62 with a symbol string matching the reference module name symbol string 66 in the activated module management table 61, a new data area and code area are secured in the storage area, After loading the code of the module corresponding to the code area and adding new activated module data 62 having a symbol string indicating the data area address, code area address, and module name to the activated module management table 61, the operand The value of the pointer section 54 of the data 53 is set.

なお、第5図はサブプログラム呼び出しの場合であるが
、データアクセスの場合も第5図のオペランドデータ3
と同形式のデータを利用することで実行時にモジュール
を結合することができる。
Note that although Figure 5 shows the case of subprogram calling, operand data 3 in Figure 5 also applies to data access.
Modules can be combined at runtime by using data in the same format as .

〔発明の効果〕〔Effect of the invention〕

以上の様に、本発明の第1の特徴であるデータ処理装置
におけるプログラムの結合編集に動的結合力式を採用す
る場合に次の2つの効果がある。
As described above, there are the following two effects when the dynamic bonding force formula is adopted for program bonding editing in a data processing device, which is the first feature of the present invention.

(1)個々のプログラムについて動的結合処理の組み込
みを省略できる。
(1) It is possible to omit the need to incorporate dynamic linkage processing into individual programs.

(2)結合編集が必要な命令の複数回の実行において、
結合編集は最初の命令実行時にのみ行なわれ2回目以後
は命令実行が高速となる。
(2) In multiple executions of instructions that require combined editing,
Combined editing is performed only when the first instruction is executed, and from the second time onwards, the instruction execution becomes faster.

また本発明の第2.の特徴によれば、モジュールを実行
時に結合するため、実行前に結合する場合に生じるモジ
ュールの複数のコピーの問題を回避することができる。
Also, the second aspect of the present invention. According to this feature, modules are combined at runtime, thereby avoiding the problem of multiple copies of modules that would occur if they were combined before execution.

特に、本発明ではモジュールのデータ領域へのポインタ
とコード領域へのポインタを別々に起動済モジュール管
理テーブルに持つので、モジュールの構成要素のうちプ
ログラムの実行により変化しない部分をコード領域とし
変化する部分をデータ領域として別々に管理することが
できる。このため、一つの中央処理装置が時分割によっ
て並行的に複数のプログラムを実行するマルチタスク環
境下において、各タスク(プログラム)毎に起動済モジ
ュール管理テーブルを作成しデータOi域を個別に確保
することで、コード領域を全タスクで共用することが可
能であり、プログラムの実行に必要な記憶8斌が削減で
きる効果がある。
In particular, in the present invention, the pointer to the module's data area and the pointer to the code area are stored separately in the activated module management table, so that the parts of the module's components that do not change due to program execution are treated as the code area, and the parts that change. can be managed separately as a data area. For this reason, in a multitasking environment where one central processing unit executes multiple programs in parallel by time-sharing, an activated module management table is created for each task (program) and a data Oi area is secured individually. This allows the code area to be shared by all tasks, which has the effect of reducing the amount of memory required for program execution.

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

第1図は本発明の一実施例の全体説明図、第2図は第1
図中の命令実行機構がCA L L命令を実行する時の
処理概要を示すフローチャート、第3図は第1図中のL
 I N K機構のe1作を示すフローチャート、第4
図は従来のe+的結合方式においてプログラムに組み込
んでいた動的結合処理を示すフローチャート、第5図は
本発明の他の実施例の全体説明図、第6図はモジュール
管理・結合機構の概略処理の流れ図である。 1・・・中央処理装置、2・・記憶装置η、3・・・シ
ステムバス、4・・・命令実行機構、5・・・LINK
機構、6・・・内部バス、7・・・MAPテーブル、8
・・・名前記号部、9・・・ロード番地部、10・MA
INプログラム、11・・・CA T、 L命令、+2
・・・命令コード、13・・オペランド部、14・・M
ΔZNデータ領域、15・・・リンクデータ、+6・・
Ar)RF部、17・・NAMF部、18・・S tJ
 Bプログラム。 第2 口        第 3 因 第 4 固 第 6 口
FIG. 1 is an overall explanatory diagram of one embodiment of the present invention, and FIG.
A flowchart showing an outline of the process when the instruction execution mechanism in the figure executes the CAL L instruction.
Flowchart showing e1 work of INK organization, No. 4
The figure is a flowchart showing the dynamic linkage process incorporated into the program in the conventional e+ linkage method, Figure 5 is an overall explanatory diagram of another embodiment of the present invention, and Figure 6 is a schematic process of the module management/linkage mechanism. This is a flowchart. 1...Central processing unit, 2...Storage device η, 3...System bus, 4...Instruction execution mechanism, 5...LINK
Mechanism, 6... Internal bus, 7... MAP table, 8
...Name symbol part, 9...Load address part, 10・MA
IN program, 11...CAT, L instruction, +2
...Instruction code, 13...Operand part, 14...M
ΔZN data area, 15...link data, +6...
Ar) RF section, 17...NAMF section, 18...S tJ
B program. 2nd part 3rd cause 4th part 6th part

Claims (1)

【特許請求の範囲】 1、プログラムとデータが格納される記憶装置と中央処
理装置とを備え、複数のプログラムとそれぞれのプログ
ラムが使用するデータ領域とをそれぞれに識別名を付与
して上記記憶装置に格納しておき、プログラムの呼び出
しとデータ領域へのアクセスに上記記憶装置上のそれぞ
れの格納番地を用いるデータ処理装置において、記憶装
置上のすべてのプログラムとデータ領域についてそれぞ
れの識別名を示す記号列と記憶装置上の格納番地との対
応表を具備し、上記データ処理装置が取り扱うデータと
してプログラムまたはデータ領域の記憶装置上の格納番
地とそれらの識別名を示す記号列とを対にしたデータ形
式と前記データ形式中の記憶装置上の格納番地を保持す
るフィールドについてそれぞれが未設定であるという意
味の値とを有し、上記データ形式を用いてプログラムを
呼び出す命令および上記データ形式を用いてデータ領域
にアクセスする命令とを具備し、それら命令の実行時に
前記データ形式中の記憶装置上の格納番地を保持すべき
フィールドが未設定である場合に前記データ形式中のプ
ログラムまたはデータ領域の識別名を示す記号列を保持
しているフィールドの値と前記対応表とを用いてプログ
ラムまたはデータ領域の格納番地を得てプログラムを実
行することを特徴とするデータ処理装置。 2、請求範囲第1項記載のデータ処理装置において、プ
ログラムまたはデータ領域の識別名を示す記号列とそれ
らと記憶装置上の格納番地との対応表により得られたプ
ログラムまたはデータ領域の記憶装置上の格納番地前記
データ形式中の記憶装置上の格納番地を保持すべきフィ
ールドに設定することにより、命令の2回目以後の実行
に際して前記対応表の検索を省略することを特徴とする
データ処理装置。 3、プログラムとデータを格納する記憶装置とプログラ
ムを実行する中央処理装置とを備え、複数のサブプログ
ラムとそれらが使用するデータ領域とで一つのモジュー
ルを構成し、複数のモジュールを結合することにより全
体プログラムを構成するデータ処理装置において、モジ
ュールの結合を機械語1命令で実行することを特徴とす
るデータ処理装置。 4、請求の範囲第3項記載のデータ処理装置において、
あるモジュール中のサブプログラムから別のモジュール
中のサブプログラムの呼び出しとそれらのモジュールの
結合を同時に行なう機械命令を具備する情報データ処理
装置。 5、請求範囲第3項記載のデータ処理装置において、あ
るモジュール中のサブプログラムから別のモジュールの
データ領域の参照とそれらモジュールの結合を同時に行
なう機械命令を具備するデータ処理装置。
[Claims] 1. The storage device comprises a storage device in which programs and data are stored and a central processing unit, and a plurality of programs and data areas used by each program are each given an identification name. A symbol indicating the respective identification names of all programs and data areas on the storage device in a data processing device that uses each storage address on the storage device to call the program and access the data area. Data that includes a correspondence table between columns and storage addresses on the storage device, and pairs storage addresses on the storage device of programs or data areas with symbol strings indicating their identification names as data handled by the data processing device. format and a field holding a storage address on a storage device in the data format, each of which has a value meaning unset, and an instruction to call a program using the data format and an instruction to call a program using the data format. and an instruction for accessing a data area, and identifies a program or data area in the data format when a field to hold a storage address on a storage device in the data format is not set when the instructions are executed. A data processing device characterized in that the storage address of a program or data area is obtained using the value of a field holding a symbol string indicating a name and the correspondence table, and the program is executed. 2. In the data processing device according to claim 1, the program or data area on the storage device obtained by a correspondence table between the symbol string indicating the identification name of the program or data area and the storage address on the storage device. A data processing device characterized in that by setting a storage address on a storage device in the data format in a field to be held, the search of the correspondence table is omitted when the instruction is executed for the second and subsequent times. 3.Equipped with a storage device that stores programs and data and a central processing unit that executes the programs, one module is composed of multiple subprograms and the data area that they use, and by combining multiple modules. 1. A data processing device constituting an entire program, characterized in that module combination is executed using one machine language instruction. 4. In the data processing device according to claim 3,
An information data processing device comprising machine instructions that simultaneously call a subprogram in one module to a subprogram in another module and combine those modules. 5. A data processing apparatus according to claim 3, comprising a machine instruction for simultaneously referencing a data area of another module from a subprogram in one module and coupling those modules.
JP8500688A 1988-04-08 1988-04-08 Data processor Pending JPH01258029A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP8500688A JPH01258029A (en) 1988-04-08 1988-04-08 Data processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP8500688A JPH01258029A (en) 1988-04-08 1988-04-08 Data processor

Publications (1)

Publication Number Publication Date
JPH01258029A true JPH01258029A (en) 1989-10-16

Family

ID=13846655

Family Applications (1)

Application Number Title Priority Date Filing Date
JP8500688A Pending JPH01258029A (en) 1988-04-08 1988-04-08 Data processor

Country Status (1)

Country Link
JP (1) JPH01258029A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6954926B1 (en) 1999-02-19 2005-10-11 Fujitsu Limited Label address translating device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6954926B1 (en) 1999-02-19 2005-10-11 Fujitsu Limited Label address translating device

Similar Documents

Publication Publication Date Title
JPH0437927A (en) Processor processing method
JPH01258029A (en) Data processor
JP3461185B2 (en) Method and apparatus for registering source code line number to load module
JPH0754467B2 (en) Data processing device
JP2865291B2 (en) Module connection control method
JP2814683B2 (en) Instruction processing unit
JPS583042A (en) Program execution system
JPH02118727A (en) System for calling system sub-routine
JPH021017A (en) Program coupling control system
JP3511935B2 (en) File writing method in multi-thread program
JPS58166455A (en) Relational type data base system
JP2621898B2 (en) Dynamic resolution processing method of external reference type address constant
JP2937636B2 (en) Logic simulator method
JPH1027153A (en) Bus transfer device
JPH0695868A (en) Software management system
JPH04155443A (en) Method for obtaining address for area acquired at time of execution
JPH06266539A (en) Method and device for link suitable for preparation for load module for debugging
JPH03255533A (en) Symbol managing system in programming language processing system
JPS6332634A (en) Computer programming language processor
JPH0421028A (en) Register managing method
JPH031252A (en) Page fault processing system
JPH0775017B2 (en) Memory access method
JPH04324525A (en) Program transplantation supporting device
JPH0359726A (en) Program unit batch translation system
JPS63178345A (en) Data base access processing system