JPS63630A - Program calling system - Google Patents
Program calling systemInfo
- Publication number
- JPS63630A JPS63630A JP61143482A JP14348286A JPS63630A JP S63630 A JPS63630 A JP S63630A JP 61143482 A JP61143482 A JP 61143482A JP 14348286 A JP14348286 A JP 14348286A JP S63630 A JPS63630 A JP S63630A
- Authority
- JP
- Japan
- Prior art keywords
- module
- calling
- control routine
- call
- called
- 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
Links
- 238000000034 method Methods 0.000 claims description 9
- 238000010586 diagram Methods 0.000 description 11
- 238000012217 deletion Methods 0.000 description 1
- 230000037430 deletion Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 239000003607 modifier Substances 0.000 description 1
Landscapes
- Executing Machine-Instructions (AREA)
Abstract
Description
【発明の詳細な説明】
〔概要〕
モジュールを呼出すとき、モジュール制?ff1lルー
チンから呼出し先モジュールを呼出すのではなく、一度
、呼出し元に戻し、そこから呼出すことにより、モジュ
ール制御ルーチンの領域を削減できる ゛ように
したものである。[Detailed Description of the Invention] [Summary] Is it modular when calling a module? Instead of calling the called module from the ff1l routine, the area of the module control routine can be reduced by returning to the calling source and calling from there.
本発明は、成るモジュールAが他のモジュールCを呼出
す際、モジュール呼出し制御ルーチンBに制御を渡し、
モジュール呼出し制御ルーチンBが他のモジュールCを
ロードし1.そのロード・アドレスを所定のレジスタR
15にセットし、しかる後に制御をモジュールAに戻し
、制御が返されると、モジュールAが上記レジスタR1
5で示されるアドレスに分岐するようになったプログラ
ム呼出し方式に関するものである。In the present invention, when a module A calls another module C, control is passed to a module call control routine B,
Module call control routine B loads another module C, and 1. The load address is stored in a predetermined register R.
15 and then returns control to module A. When control is returned, module A sets the above register R1.
This relates to a program calling method that branches to an address indicated by 5.
第6図は従来のプロゲラl、呼出し方式を説明する図で
ある。第6図において、Aは呼出し元モジュール、Bは
モジュール呼出し制御ルーチン、Cは呼出し先モジュー
ルをそれぞれ示している。従来のプログラム呼出し方式
では、モジュールAがモジュールCを呼出す場合、モジ
ュール呼出し制御ルーチン已に制御を渡し、モジュール
呼出し制御ルーチンBが呼出し先モジュールCに制御を
渡している。また呼出し先モジュールCから呼出し元モ
ジュールAに制御を戻す場合には、呼出し先モジュール
Cがモジュール呼出し制御ルーチンBに制御を戻し、モ
ジュール呼出し制御ルーチンBが制御を呼出し元モジュ
ールへに戻している。FIG. 6 is a diagram illustrating a conventional progera calling system. In FIG. 6, A indicates a calling module, B indicates a module call control routine, and C indicates a called module. In the conventional program calling method, when module A calls module C, control is passed to the module call control routine, and module call control routine B passes control to the called module C. When control is returned from the called module C to the calling module A, the called module C returns control to the module call control routine B, and the module call control routine B returns control to the calling module.
第6図に示したような従来の技術では、一つのモジュー
ルから他のモジュールを呼出し、ネストが段々と大きく
なって行くと、モジュール呼出し制御ルーチンBのオー
トマチック領域が増大し、ユーザ領域を圧迫する。In the conventional technology shown in FIG. 6, as one module calls another module and the nest gradually becomes larger, the automatic area of the module call control routine B increases, putting pressure on the user area. .
本発明は、この点に鑑みて創作されたものであって、呼
出しのネストが深くなってもモジュール呼出し制御ルー
チンBによって使用される領域が増大しないようになっ
たプログラム呼出し方式を提供することを目的としてい
る。The present invention was created in view of this point, and it is an object of the present invention to provide a program calling method in which the area used by module call control routine B does not increase even if the nesting of calls becomes deep. The purpose is
C問題点を解決するための手段〕
第1図は本発明の原理図である。モジュールAからモジ
ュールCを呼出す時、一度、モジュール呼出し制御ルー
チンBを呼出す。呼出されたモジュール制御ルーチンF
3は、モジュールCが主記憶にロードされているか否か
を調べ、ロードされていない場合にはモジュールCを主
記憶にロードし、そのロード・アドレスをレジスタR1
5にセットし、しかる後に制御をモジュールAに戻す。Means for Solving Problem C] FIG. 1 is a diagram showing the principle of the present invention. When calling module C from module A, module calling control routine B is called once. Called module control routine F
3 checks whether module C is loaded into main memory or not, and if not loaded, loads module C into main memory and stores its load address in register R1.
5 and then returns control to module A.
モジュールAは、BALRR14,R15を実行し、レ
ジスタR15で示されているアドレスに分岐する。Module A executes BALRR14, R15 and branches to the address indicated by register R15.
第2図はコンパイラの機器構成を示す。第2図において
、1はソース・プログラム、2はコンパイラ、3はオブ
ジェクト・モジュール、4はマクロ・ライブラリをそれ
ぞれ示している。?JSN9 CA L L、は本発明
を実施するために新設されたマクロ命令であり、このマ
クロ命令に対応する命令列はマクロ・ライブラリ4に格
納されている。Figure 2 shows the equipment configuration of the compiler. In FIG. 2, 1 indicates a source program, 2 a compiler, 3 an object module, and 4 a macro library. ? JSN9 CALL is a macro instruction newly created to implement the present invention, and an instruction sequence corresponding to this macro instruction is stored in the macro library 4.
コンパイラ2は、ソース・プログラム1をオブジェクト
・モジュールにコンパイルする際、?JSN9CALL
を対応する命令列に差し換える。When the compiler 2 compiles the source program 1 into an object module, does the compiler 2 compile it into an object module? JSN9CALL
Replace with the corresponding instruction sequence.
第3図は? J S N 9 CA L Lの概要を示
す図である。?JSN9CALL Module
(A)は常駐モジュールAの呼出しを表し、?JSN9
CALL Module (C)は常駐モジュールC
の呼出しを表している。また、?JSN9CALL
Module (F) Delete (0)は、非
常駐モジュールFを呼出し、且つモジュールFを実行終
了後に削除しないことを意味している。エントリ・テー
ブルには、モジュールA、B。What about figure 3? It is a figure showing the outline of JSN9CALL. ? JSN9CALL Module
(A) represents a call to resident module A, and ? JSN9
CALL Module (C) is resident module C
represents a call. Also,? JSN9CALL
Module (F) Delete (0) means that non-resident module F is called and module F is not deleted after execution is completed. The entry table has modules A and B.
C9・・・のオフセントが記入される。常駐モジュール
の呼出しは、コンパイル時にそのモジュール内のオフセ
ットを決定する。セション初期処理時にLOADマクロ
命令を発行し、先頭アドレスを獲得後、BALRのみで
制御を渡すことが出来る。The offset of C9... is entered. A call to a resident module determines its offset within that module at compile time. After issuing a LOAD macro instruction during session initial processing and acquiring the start address, control can be transferred using only BALR.
セション終了時に、常駐モジュールに対してDELET
Eマクロを発行する。非常駐化モジュールの呼出しは、
OAPセション内で必要になった時点でモジュールを呼
出す。DELET the resident module when the session ends
Issue an E macro. Calling the non-resident module is
A module is called when it is needed within an OAP session.
第4図は非常駐モジュールの呼出しの流れを説明する図
である。非常駐モジュールの呼出しは第3図のモジュー
ル管理モジュールによって行われる。モジュール管理モ
ジュールはモジュールEとして常駐化されている。なお
、上述のモジュール呼出し制御ルーチンとは、モジュー
ル管理モジュ−/Iz(7)ことである。起動されると
、モジュール管理モジュールは下記のような処理を行う
。FIG. 4 is a diagram illustrating the flow of calling a non-resident module. Calling of non-resident modules is performed by the module management module of FIG. The module management module is made resident as module E. The above-mentioned module call control routine is the module management module /Iz(7). When started, the module management module performs the following processing.
■ エイトリー・テーブルをサーチする。■ Search for eighty tables.
■ 該当モジュールがあるか否かを調べる。YESのと
きは■の処理を行い、NOのときは■の処理を行う。■ Check whether the corresponding module exists. If YES, process (2) is performed, and if NO, process (2) is performed.
■ LOADマクロを発行する。■ Issue the LOAD macro.
■ エントリ・テーブルに、エントリ化及びエントリ・
アドレス(ロード・アドレスと同義)をセットする。■ Create an entry and create an entry in the entry table.
Set address (synonymous with load address).
■ 言亥当モジュールのエントリ・アドレスをレジスタ
R15にセットする。■ Set the entry address of the relevant module in register R15.
■ 呼出し元にリターンする。■ Return to the caller.
第5図は非常駐モジュールの削除の流れを説明する図で
ある。FIG. 5 is a diagram explaining the flow of deletion of a non-resident module.
■ エントリ・テーブルをサーチする。■ Search the entry table.
■ 言亥当モジ°ニールがあるか否かを調べる。YES
のときは■の処理を行い、NOのときは■の処理を行う
。■ Check to see if there is a modifier. YES
If the answer is ``NO'', process ``■'' is performed, and if ``NO'' is determined, process ``■'' is performed.
■ DELETEマクロを発行する。■ Issue a DELETE macro.
■ エントリ・テーブルの中の1亥当するエントリ名及
びエントリ・アドレスを削除する。■ Delete the entry name and entry address in the entry table.
■ 呼出し元にリターンする。■ Return to the caller.
以」二の説明から明らかなように、本発明によれば、呼
出しのネストが深くなっても、モジュール呼出し制御ル
ーチンによるリージヨンの増大を防ぐことが出来る。As is clear from the following explanation, according to the present invention, even if the nesting of calls becomes deep, it is possible to prevent the region from increasing due to the module call control routine.
第1図は本発明の原理図、第2図はコンパイラの機器構
成を示す図、第3図は?JSN9CALLの概要を示す
図、第4図は非常駐モジュールの呼出しの流れを説明す
る図、第5図は非常駐モジュールの削除の流れを示す図
、第6図は従来のプログラム呼出し方式を説明する図で
ある。
A・・・呼出し元モジュール、B・・・モジュール呼出
し制御ルーチン、C・・・呼出し先モジュール、1・・
・ソース・プログラム、2・・・コンパイラ、3・・・
オブジェクト・モジュール、4・・・マクロ・ライブラ
リ。Fig. 1 is a diagram showing the principle of the present invention, Fig. 2 is a diagram showing the equipment configuration of the compiler, and Fig. 3 is a diagram showing the equipment configuration of the compiler. A diagram showing an overview of JSN9CALL, Figure 4 is a diagram explaining the flow of calling a non-resident module, Figure 5 is a diagram showing the flow of deleting a non-resident module, and Figure 6 is a diagram explaining the conventional program calling method. be. A: Call source module, B: Module call control routine, C: Call destination module, 1...
・Source program, 2... Compiler, 3...
Object module, 4...Macro library.
Claims (1)
ジュール呼出し制御ルーチンBを呼出し、呼出されたモ
ジュール呼出し制御ルーチンBがモジュールCを呼出し
た後、制御をモジュールAに返し、制御が返されたモジ
ュールAが、モジュール呼出し制御ルーチンBから返却
されたモジュールCのロード・アドレスに制御を渡すこ
とを特徴とするプログラム呼出し方式。When calling module C from module A, module call control routine B is called once, and after called module call control routine B calls module C, control is returned to module A, and module A to which control was returned returns. , a program calling method characterized in that control is passed to the load address of module C returned from module call control routine B.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP61143482A JPS63630A (en) | 1986-06-19 | 1986-06-19 | Program calling system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP61143482A JPS63630A (en) | 1986-06-19 | 1986-06-19 | Program calling system |
Publications (1)
Publication Number | Publication Date |
---|---|
JPS63630A true JPS63630A (en) | 1988-01-05 |
Family
ID=15339728
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP61143482A Pending JPS63630A (en) | 1986-06-19 | 1986-06-19 | Program calling system |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPS63630A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH02137029A (en) * | 1988-11-18 | 1990-05-25 | Fujitsu Ltd | Program control system |
JPH04147337A (en) * | 1990-10-10 | 1992-05-20 | Fujitsu Ltd | Method of using transient module |
-
1986
- 1986-06-19 JP JP61143482A patent/JPS63630A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH02137029A (en) * | 1988-11-18 | 1990-05-25 | Fujitsu Ltd | Program control system |
JPH04147337A (en) * | 1990-10-10 | 1992-05-20 | Fujitsu Ltd | Method of using transient module |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP2811990B2 (en) | Program processing device and program processing method | |
BR0014042A (en) | Method and system for using caller preferences to direct special call handling | |
US6101326A (en) | Method and apparatus for frame elimination for simple procedures with tail calls | |
WO1989001203A1 (en) | Mimd computer system | |
JPS63630A (en) | Program calling system | |
JPH04155443A (en) | Method for obtaining address for area acquired at time of execution | |
JPS6156815B2 (en) | ||
JP3018359B2 (en) | Online call information trace method | |
JPH0465717A (en) | Method for accessing program | |
JPS63311439A (en) | Call-return system | |
JPS63106047A (en) | Dynamic subroutine call system | |
JPH0573325A (en) | Program load system | |
JPH01309133A (en) | Function call processing method | |
JPH0264756A (en) | System rising system | |
JP2852402B2 (en) | Program development equipment | |
JPH06266539A (en) | Method and device for link suitable for preparation for load module for debugging | |
JPH01112447A (en) | Adding system for internal file name | |
JPH04147337A (en) | Method of using transient module | |
JPS62171034A (en) | Subroutine link system | |
JPH04363721A (en) | Program switching system | |
JPH0452491B2 (en) | ||
JPS62144237A (en) | Back track system | |
JPH01166224A (en) | Forward inference device | |
JPH0353319A (en) | Dynamic function loading/unloading type program editing system | |
JPH0343829A (en) | Inserting system for additional logic |