JPS63180129A - Program connection system - Google Patents

Program connection system

Info

Publication number
JPS63180129A
JPS63180129A JP1189587A JP1189587A JPS63180129A JP S63180129 A JPS63180129 A JP S63180129A JP 1189587 A JP1189587 A JP 1189587A JP 1189587 A JP1189587 A JP 1189587A JP S63180129 A JPS63180129 A JP S63180129A
Authority
JP
Japan
Prior art keywords
program
language
area
processing
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.)
Pending
Application number
JP1189587A
Other languages
Japanese (ja)
Inventor
Masahiro Osada
長田 昌弘
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP1189587A priority Critical patent/JPS63180129A/en
Publication of JPS63180129A publication Critical patent/JPS63180129A/en
Pending legal-status Critical Current

Links

Landscapes

  • Devices For Executing Special Programs (AREA)

Abstract

PURPOSE:To realize the mutual calls between different languages by setting a processing area needed for execution of the program of the called language via a processing area setting means. CONSTITUTION:In case a C-language program 231 is called during execution of a COBOL program 211, a control part 250 transfers the data on a parameter area obtained when the program 211 is executed to a register saving area. Thus the part 250 can use the program 231 and executes it. When the execution of the program 231 is through, the part 250 gives a request to an intermediate program 221 for reset to the program 211. The linkage agreement of the program 211 is included in the linkage agreement of the program 231 and therefore the registers and data, i.e., a register saving area and a parameter area which were used in the program 231 can be used as they are used in the program 211. As a result, the program 221 is reset as it to the program 211, and then to a control program 245 when the processing of the program 211 is through. Thus the entire processing is over.

Description

【発明の詳細な説明】 〔概 要〕 プログラム結合方式であって、第1言語プログラムと第
2言語プログラムの一方を実行中に他方を呼び出す場合
、処理領域設定手段で呼出し先言語のプログラム実行に
必要な処理領域を設定することにより、異種言語の相互
の呼出しが可能となる。
[Detailed Description of the Invention] [Summary] In the program combination method, when one of the first language program and the second language program is called while the other is being executed, the processing area setting means is used to execute the program in the called destination language. By setting the necessary processing areas, mutual calls between different languages become possible.

〔産業上の利用分野〕[Industrial application field]

本発明は、プログラム結合方式に関し、特に、異なるリ
ンケージ規約を持った異種言語プログラム間で相互に呼
出しを行なうときのプログラム結合方式に関するもので
ある。
The present invention relates to a program linkage method, and particularly relates to a program linkage method when mutually calling different language programs having different linkage conventions.

〔従来の技術〕[Conventional technology]

一般に、ソフトウェア製品を開発する場合、その内容を
機能ごとに分割する。そして、その分割された機能ごと
に、機能に応じたプログラム言語で記述したソースプロ
グラムを作成して、それらを結合する。
Generally, when developing a software product, its contents are divided into functions. Then, for each of the divided functions, a source program written in a programming language corresponding to the function is created and combined.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

ところで、上述した従来方式にあっては、機能ごとに異
種言語で記述したプログラムを結合するため、それぞれ
のプログラム言語が同一のリンケージ規約で制御の受は
渡しを行なう必要があり、異なるリンケージ規約を持っ
た異種言語間では、相互に呼出しができないという問題
点があった。
By the way, in the conventional method described above, in order to combine programs written in different languages for each function, it is necessary for each programming language to receive and pass control using the same linkage conventions, and it is necessary to transfer control using the same linkage conventions. The problem was that different languages could not call each other.

本発明は、このような点にかんがみて創作されたもので
あり、異種言語の相互の呼出しが可能になるようにした
プログラム結合方式を提供することを目的としている。
The present invention was created in view of these points, and an object of the present invention is to provide a program combination method that enables mutual calls between different languages.

〔問題点を解決するための手段〕[Means for solving problems]

第1図は、本発明のプログラム結合方式の原理ブロック
図である。
FIG. 1 is a block diagram of the principle of the program combination method of the present invention.

図において、第1言語処理手段111は、第1言語プロ
グラムを実行する。
In the figure, a first language processing means 111 executes a first language program.

第2言語処理手段131は、第2言語プログラムを実行
する。
The second language processing means 131 executes the second language program.

処理領域設定手段121は、第1言語処理手段111と
第2言語処理手段131の相互の呼出しを行なうときの
呼出し先の処理領域を設定する。
The processing area setting means 121 sets a processing area to be called when the first language processing means 111 and the second language processing means 131 call each other.

従って、全体として、処理領域設定手段121によって
呼出し先の処理領域を設定した後に、呼出し先のプログ
ラムを実行するように構成されている。
Therefore, the overall configuration is such that after setting the processing area of the calling destination by the processing area setting means 121, the calling destination program is executed.

〔作 用〕[For production]

第1言語処理手段111は第1言語プログラムを、処理
領域設定手段121は第2言語プログラムを実行する。
The first language processing means 111 executes the first language program, and the processing area setting means 121 executes the second language program.

第1言語処理手段111及び第2言語処理手段131の
一方から他方を呼び出すときは、処理領域設定手段12
1で呼出し先の処理領域を設定した後に、呼出し先のプ
ログラムを実行する。
When one of the first language processing means 111 and the second language processing means 131 calls the other, the processing area setting means 12
After setting the processing area of the called destination in step 1, execute the called program.

本発明にあっては、処理領域設定手段121で呼出し先
言語のプログラム実行に必要な処理領域を設定すること
により、異種言語の相互の呼出しが可能となる。
In the present invention, by setting the processing area necessary for executing the program of the called language using the processing area setting means 121, it becomes possible to mutually call different languages.

〔実施例〕〔Example〕

以下、図面に基づいて本発明の実施例について詳細に説
明する。
Hereinafter, embodiments of the present invention will be described in detail based on the drawings.

第2図は、本発明の一実施例におけるプログラム結合方
式の構成を示す。
FIG. 2 shows the configuration of a program combination method in an embodiment of the present invention.

■、    と 1゛との、・  、 ここで、本発明の実施例と第1図との対応関係を示して
おく。
(2) and (1)... Here, the correspondence between the embodiment of the present invention and FIG. 1 will be shown.

第1言語処理手段111は、コボルプログラム211、
制御プログラム245.データ領域241、制御部25
0に相当する。
The first language processing means 111 includes a cobol program 211,
Control program 245. Data area 241, control unit 25
Corresponds to 0.

第2言語処理手段131は、C言語プログラム231、
制御プログラム245.データ領域241、制御部25
0に相当する。
The second language processing means 131 includes a C language program 231,
Control program 245. Data area 241, control unit 25
Corresponds to 0.

処理領域設定手段121は、仲介プログラム221、制
御プログラム245.データ領域241゜制御部250
に相当する。
The processing area setting means 121 includes an intermediary program 221, a control program 245. Data area 241° control unit 250
corresponds to

↓−実庭■Ω盪底 以上のような対応関係があるものとして、以下本発明の
実施例について説明する。
↓-Jiku ■Ω゜Bottom Examples of the present invention will be described below, assuming that the above-mentioned correspondence exists.

第2図において、制御部250には、周辺機器を接続す
るための周辺制御部280とプログラムやデータを格納
するメモリ210がつながれている。更に、周辺制御部
280にはプログラムの実行結果やリストを出力するプ
リンタ281.プログラムや動作指示などの情報を入力
するキーボード283.情報を表示するディスプレイ2
85゜プログラムやデータを格納する外部記憶装置28
7が接続されている。
In FIG. 2, a control unit 250 is connected to a peripheral control unit 280 for connecting peripheral devices and a memory 210 for storing programs and data. Furthermore, the peripheral control unit 280 includes a printer 281. which outputs program execution results and lists. A keyboard 283 for inputting information such as programs and operation instructions. Display 2 for displaying information
85° External storage device 28 for storing programs and data
7 is connected.

制御部250には、制御を行なうためのレジスタ群25
3が含まれている。また、メモリ210には、既に外部
記憶装置287からロードされたIII ?Iプログラ
ム245.コボルプログラム211゜0言語プログラム
231.仲介プログラム221が格納されており、それ
らの実行に必要なデータ領域241が存在する。
The control unit 250 includes a register group 25 for controlling.
3 is included. Also, the memory 210 contains the III? which has already been loaded from the external storage device 287. I program 245. Kobol Program 211°0 Language Program 231. Mediation programs 221 are stored therein, and there is a data area 241 necessary for their execution.

l−実施撚Ω亘立 第3図は、実施例の動作説明図である。また、第4図は
実施例の処理領域作成の説明図である。
FIG. 3 is an explanatory diagram of the operation of the embodiment. Moreover, FIG. 4 is an explanatory diagram of processing area creation in the embodiment.

C言語プログラムのリンケージ規約はコボルプログラム
のリンケージ規約に加え、更に、以下の2つの条件を満
たしていなければならないものとする。
It is assumed that the linkage conventions for the C language program must satisfy the following two conditions in addition to the linkage conventions for the Cobol program.

+l)  レジスタ群253内のレジスタ3 (第4図
中のR3)は、スタック管理テーブルの先頭アドレスを
示し、スタック管理テーブルの3ワード目はスタック領
域の先頭アドレスを、4ワード目はスタック領域の最終
アドレスを示している。
+l) Register 3 (R3 in Figure 4) in the register group 253 indicates the start address of the stack management table, the third word of the stack management table indicates the start address of the stack area, and the fourth word indicates the start address of the stack area. Shows the final address.

(2)  レジスタ退避領域(レジスタ2(R2)は先
頭アドレスを示す)とパラメータ領域(レジスタ1(R
1)は先頭アドレスを示す)は、スタック領域内にあり
、更に、レジスタ退避領域とパラメータ領域は連続した
領域になければならない。
(2) Register save area (register 2 (R2) indicates the start address) and parameter area (register 1 (R2)
1) indicates the start address) is in the stack area, and furthermore, the register save area and the parameter area must be in continuous areas.

いま、コボルプログラム211の実行中にC言語プログ
ラム231の呼出しを行なう場合を考える。
Now, consider the case where the C language program 231 is called while the COBOL program 211 is being executed.

以下、第2図〜第4図を参照する。Hereinafter, reference will be made to FIGS. 2 to 4.

最初に、制御部250は、メモリ210に格納された制
御プログラム245を実行する。そして、制御プログラ
ム245は、コボルプログラム211からC言語プログ
ラム231を呼び出すための初期処理を行なうために仲
介プログラム221を呼び出す。
First, the control unit 250 executes the control program 245 stored in the memory 210. The control program 245 then calls the intermediary program 221 to perform initial processing for calling the C language program 231 from the COBOL program 211.

制御部250は仲介プログラム221を実行して(ステ
ップ311)、C言語プログラム231の実行に必要な
スタック領域をメモリ210のデータ領域24°1内に
確保する(ステップ312)。
The control unit 250 executes the intermediary program 221 (step 311) and secures a stack area necessary for executing the C language program 231 in the data area 24°1 of the memory 210 (step 312).

次に、スタック管理テーブルを作成し、ステップ312
で確保したスタック領域の先頭アドレスを管理テーブル
の3ワード目に、最終アドレスを管理テーブルの4ワー
ド目に格納する(ステップ313)。
Next, create a stack management table and step 312
The start address of the stack area secured in step 3 is stored in the third word of the management table, and the final address is stored in the fourth word of the management table (step 313).

そして、仲介プログラム221から制御プログラム24
5に復帰する(ステップ314)。
Then, from the mediation program 221 to the control program 24
5 (step 314).

次に、制御プログラム245はコボルプログラム211
を呼び出す。制御部250は、コボルプログラム211
を実行して(ステップ315)、途中でC言語プログラ
ム231の呼出しが生じると、仲介プログラム221に
C言語プログラム231の呼出しを依頼する(ステップ
316)。
Next, the control program 245 is the COBOL program 211
call. The control unit 250 uses the COBOL program 211
is executed (step 315), and if the C language program 231 is called during the process, the intermediary program 221 is requested to call the C language program 231 (step 316).

制御部250は仲介プログラム221を実行すると、最
初に、レジスタ3にスタック管理テーブルの先頭アドレ
スを設定する(ステップ317)。
When the control unit 250 executes the mediation program 221, it first sets the start address of the stack management table in the register 3 (step 317).

次に、レジスタ1にパラメータ領域の先頭アドレスを、
レジスタ3にレジスタ退避領域の先頭アドレスを設定す
る(ステップ318)。尚、C言語のリンケージ規約に
基づいて、スタック領域の最後の所定バイト数(例えば
32バイト)をパラメータ領域とし、それに続く所定バ
イト数(例えば64バイト)をレジスタ退避領域として
、レジスタ1.レジスタ3を設定する。
Next, set the start address of the parameter area in register 1,
The start address of the register save area is set in register 3 (step 318). Based on the C language linkage convention, the last predetermined number of bytes (for example, 32 bytes) of the stack area is used as a parameter area, and the following predetermined number of bytes (for example, 64 bytes) are used as a register save area. Set register 3.

そして、制御部250は、コボルプログラム211を実
行したときのパラメータ領域のデータをステップ318
で設定したパラメータ領域に転送する(ステップ319
)。これによって、コボルプログラム211で使用して
いたデータをC言語プログラム231でも使用すること
ができる。
Then, in step 318, the control unit 250 stores data in the parameter area when the cobol program 211 is executed.
Transfer to the parameter area set in step 319
). As a result, the data used in the COBOL program 211 can also be used in the C language program 231.

次に、制御部250は、C言語プログラム231を実行
する(ステップ320)。
Next, the control unit 250 executes the C language program 231 (step 320).

C言語プログラム231の実行が終わると、仲介プログ
ラム221にコボルプログラム211への復帰の依頼を
行なう(ステップ321)。C言語プログラム231の
リンケージ規約にコボルプログラム211のリンケージ
規約は含まれているので、C言語プログラム231で使
用したレジスタ類とデータ(レジスタ退避領域、パラメ
ータ領域)は、そのまま使うことができる。従って、仲
介プログラム221は、そのままコボルプログラム21
1に復帰して(ステップ322)、更に、コボルプログ
ラム211での処理が終わると、323に復帰して(ス
テップ323)、全体の処理が終了する。
When the execution of the C language program 231 is finished, a request is made to the intermediary program 221 to return to the Cobol program 211 (step 321). Since the linkage rules for the C language program 231 include the linkage rules for the COBOL program 211, the registers and data (register save area, parameter area) used in the C language program 231 can be used as they are. Therefore, the intermediary program 221 is the same as the Cobol program 21.
1 (step 322), and when the processing in the COBOL program 211 is completed, the process returns to 323 (step 323), and the entire process ends.

■、    の とめ このように、最初に仲介プログラム221を実行してス
タック領域とスタック管理テーブルを確保し、コボルプ
ログラム211からC言語プログラム231を呼び出す
ときに仲介プログラム221を実行してC言語プログラ
ム231に必要なレジスタ類をセットして、C言語プロ
グラム231を実行するための準備をした後に、C言語
プログラム231を実行する。
■, Stop As shown above, first execute the intermediary program 221 to secure the stack area and stack management table, and when calling the C language program 231 from the Cobol program 211, execute the intermediary program 221 to save the C language program 231. After setting the necessary registers and making preparations for executing the C language program 231, the C language program 231 is executed.

従って、リンケージ規約の異なる異種言語の呼出しが可
能となる。
Therefore, it is possible to call different languages with different linkage conventions.

■ 、     B  の  ・  ノ F 。■, B's, F.

なお、上述した本発明の実施例にあっては、コボルプロ
グラムとC言語プログラムの相互の呼出しを考えたが、
リンケージ規約の異なる言語であれば、フォートランと
C言語、PL/IとC言語などの組み合わせにも適用で
きる。
In addition, in the embodiment of the present invention described above, mutual calling of the Cobol program and the C language program was considered, but
It can also be applied to combinations of Fortran and C language, PL/I and C language, etc., as long as the languages have different linkage conventions.

また、実施例では、C言語のリンケージ規約はコボルの
リンケージ規約に2つの条件を加えたものとしたが、全
く異なるリンケージ規約を持った言語間でも、仲介プロ
グラム221で呼出し先のレジスタ類やデータ領域等を
作成することによって適用できる。
In addition, in the embodiment, the C language linkage convention is the addition of two conditions to the Cobol linkage convention, but even between languages with completely different linkage conventions, the intermediary program 221 can handle the registers and data of the call destination. It can be applied by creating areas etc.

更に、「1.実施例と第1図との対応関係」において、
第1図と本発明との対応関係を説明しておいたが、これ
に限られることはなく、各種の変形態様があることは当
業者であれば容易に推考できるであろう。
Furthermore, in "1. Correspondence between Examples and FIG. 1",
Although the correspondence between FIG. 1 and the present invention has been described, those skilled in the art will easily imagine that the present invention is not limited to this and that there are various modifications.

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

上述したように、本発明によれば、処理領域設定手段で
呼出し先言語のプログラム実行に必要な処理領域を設定
して、第1言語プログラムと第2言語プログラムの一方
を実行中に他方を呼び出すことができるので、実用的に
は極めて有用である。
As described above, according to the present invention, the processing area setting means sets the processing area necessary for executing the program in the called destination language, and calls one of the first language program and the second language program while the other is being executed. Therefore, it is extremely useful in practical terms.

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

第1図は本発明のプログラム結合方式の原理ブロック図
、 第2図は本発明の一実施例によるプログラム結合方式の
構成ブロック図、 第3図は本発明の実施例の動作説明図、第4図は本発明
の実施例の処理領域作成図である。 図において、 111は第1言語処理手段、 121は処理領域設定手段、 131は第2言語処理手段、 210はメモリ、 211はコボルプログラム、 221は仲介プログラム、 231はC言語プログラム、 241はデータ領域、 245は制御プログラム、 250は制御部、 253はレジスタ群、 280は周辺制御部、 281はプリンタ、 283はキーボード、 285はディスプレイ、 287は外部記憶装置である。 本廻日月C旅坤フ゛o7り図 第1図 第2図 第3図 史奥勿の処理碍週諧明図 第4図
FIG. 1 is a principle block diagram of the program combination method of the present invention, FIG. 2 is a configuration block diagram of the program combination method according to an embodiment of the present invention, FIG. 3 is an explanatory diagram of the operation of the embodiment of the present invention, and FIG. The figure is a processing area creation diagram according to an embodiment of the present invention. In the figure, 111 is a first language processing means, 121 is a processing area setting means, 131 is a second language processing means, 210 is a memory, 211 is a Kobol program, 221 is an intermediary program, 231 is a C language program, and 241 is a data area , 245 is a control program, 250 is a control unit, 253 is a register group, 280 is a peripheral control unit, 281 is a printer, 283 is a keyboard, 285 is a display, and 287 is an external storage device. Figure 1 Figure 2 Figure 3 Processing details of the history Figure 4

Claims (3)

【特許請求の範囲】[Claims] (1)第1言語プログラムを実行する第1言語処理手段
(111)と、 第2言語プログラムを実行する第2言語処理手段(13
1)と、 第1言語処理手段(111)と第2言語処理手段(13
1)の相互の呼出しを行なうときの呼出し先の処理領域
を設定する処理領域設定手段(121)と、 を備え、処理領域設定手段(121)によって呼出し先
の処理領域を設定した後に、呼出し先のプログラムを実
行するように構成したことを特徴とするプログラム結合
方式。
(1) A first language processing means (111) that executes a first language program, and a second language processing means (13) that executes a second language program.
1), a first language processing means (111) and a second language processing means (13)
processing area setting means (121) for setting the processing area of the calling destination when performing the mutual calling of 1); A program combination method characterized in that the program is configured to execute a program.
(2)前記処理領域は、プログラム実行に必要なレジス
タ及びレジスタに格納するデータであることを特徴とす
る特許請求の範囲第1項記載のプログラム結合方式。
(2) The program linking method according to claim 1, wherein the processing area is a register necessary for program execution and data to be stored in the register.
(3)前記処理領域は、プログラム実行に必要なデータ
領域及びデータ領域に格納するデータであることを特徴
とする特許請求の範囲第1項記載のプログラム結合方式
(3) The program combination method according to claim 1, wherein the processing area is a data area necessary for program execution and data to be stored in the data area.
JP1189587A 1987-01-21 1987-01-21 Program connection system Pending JPS63180129A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1189587A JPS63180129A (en) 1987-01-21 1987-01-21 Program connection system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1189587A JPS63180129A (en) 1987-01-21 1987-01-21 Program connection system

Publications (1)

Publication Number Publication Date
JPS63180129A true JPS63180129A (en) 1988-07-25

Family

ID=11790462

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1189587A Pending JPS63180129A (en) 1987-01-21 1987-01-21 Program connection system

Country Status (1)

Country Link
JP (1) JPS63180129A (en)

Similar Documents

Publication Publication Date Title
JPH02201653A (en) Application program interface method
JPH05282260A (en) Computer network and its operation method
JPH03257624A (en) Screen language system
JPS62140137A (en) Data holding system using arithmetic logic unit
JPS63180129A (en) Program connection system
JP2003122410A (en) Method for causing controller to perform computation
JP2663600B2 (en) Control table relocation processing method
JP2000242524A (en) Software simulator for processor
JPH04174028A (en) Control storage overlay system by in-program loader
JPS63249206A (en) Programmable controller
JP2852402B2 (en) Program development equipment
JPH02214942A (en) Production system for control transfer function to master load module
JPH04182726A (en) Demonstration execution system
JPH0421028A (en) Register managing method
JPS6041133A (en) Correcting method of control program
JPH05334249A (en) Nesting management system for catalog in interactive processing system
JPH02205143A (en) Packet switching network information managing method
JPH0367357A (en) Multi-cpu system
JPS62209671A (en) Drawing control system
JPH02190904A (en) Method for controlling inference
JPH0329030A (en) Decentralized cooperative inference device
JPH0263481A (en) Radiation treatment planning device
JPS60214039A (en) Data processor
JPH01128135A (en) Stack control system
JPH07319717A (en) Program switching method for information processor