JPS63311439A - Call-return system - Google Patents

Call-return system

Info

Publication number
JPS63311439A
JPS63311439A JP14765387A JP14765387A JPS63311439A JP S63311439 A JPS63311439 A JP S63311439A JP 14765387 A JP14765387 A JP 14765387A JP 14765387 A JP14765387 A JP 14765387A JP S63311439 A JPS63311439 A JP S63311439A
Authority
JP
Japan
Prior art keywords
module
call
processing
name
return
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
JP14765387A
Other languages
Japanese (ja)
Inventor
Shiro Kondo
近藤 四郎
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.)
NEC Corp
Original Assignee
NEC Corp
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 NEC Corp filed Critical NEC Corp
Priority to JP14765387A priority Critical patent/JPS63311439A/en
Publication of JPS63311439A publication Critical patent/JPS63311439A/en
Pending legal-status Critical Current

Links

Landscapes

  • Executing Machine-Instructions (AREA)

Abstract

PURPOSE:To decrease the number of dynamic steps and to shorten the processing time in a call-return system by performing the direct return to a specific calling module from an optional called module. CONSTITUTION:An inlet variable table 4 which stores the name of a module of the remote side to be called is previously defined into an M module 1 and this module 1 is processed based on a logic. If 'YenW#ABAL (ETBL, NUM)' is detected during the processing, the execution sequence of a program moves to a module having the same number as the NUM. Hereafter the processing is carried out continuously based on a logic until 'YenW#AEND (X)' is detected. When said 'YenW#AEND (X)' is detected, the program execution sequence returns to a module having the same name as that equal to the contents of X. Thus the direct return is possible to a specific calling module from an optional called module.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はコール・リターン方式に関し、特に任意のコー
ル先モジュールから特定のコール元モジュールに直接リ
ターンするコール・リターン方式に間する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a call return method, and particularly to a call return method in which an arbitrary called module returns directly to a specific caller module.

〔従来の技術〕[Conventional technology]

従来のコール・リターン方式は、第2図に示すような階
層化モジュール構造で、第3図に示すような処理フロー
の場合、メインルーチンであるMモジュールの処理中に
、CALL命令を見つけると1階層低いAモジュールに
、プログラムの実行シーケンスが移動する。移動後、A
モジュールの処理中に再びCALL命令を見つけると、
再度1階層低いDモジュールにプログラムの実行シーケ
ンスが移動する。以降、前述と同様にFモジュールもし
くはGモジュールまでプログラムの実行シーケンスが移
動し、FモジュールもしくはGモジュールのプログラム
の実行が終了すると、コール元モジュールであるDモジ
ュールにリターンし、DモジュールからAモジュールを
経てMモジュールにリターンする。このときリターンさ
れた各コール元モジュールは、それぞれのCALL命令
以降の処理を構築する必要がある。
The conventional call return method has a hierarchical module structure as shown in Figure 2, and in the case of the processing flow as shown in Figure 3, when a CALL instruction is found during the processing of the M module which is the main routine, 1 The program execution sequence is moved to module A, which is lower in the hierarchy. After moving, A
If you find the CALL instruction again while processing the module,
The program execution sequence is moved again to the D module one level lower. Thereafter, the program execution sequence moves to the F module or G module in the same way as described above, and when the program execution of the F module or G module is completed, it returns to the D module, which is the calling module, and the A module is transferred from the D module. After that, it returns to M module. Each caller module returned at this time needs to construct processing subsequent to each CALL instruction.

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

上述した従来のコール・リターン方式は、シール先モジ
ュールからコール元モジュールに必ずリターンする方式
を採っており、各モジュールでリターン後の処理を必ず
構築しなければいけない。このためダイナミックステッ
プ数も増えることになり、処理時間を増加させることに
なる。
The above-mentioned conventional call return method employs a method in which a seal destination module always returns to a calling module, and each module must necessarily construct a process after the return. Therefore, the number of dynamic steps also increases, which increases the processing time.

またコールのネストが複雑になるようなケースでは、プ
ログラムの作成に相当量の工数が係るという欠点がある
Another disadvantage is that in cases where the nesting of calls becomes complex, a considerable amount of man-hours are required to create the program.

本発明の目的は、任意のコール先モジュールから特定の
コール元モジュールへ直接リターンするコール・リター
ン方式を提供することにある。
An object of the present invention is to provide a call return method that returns directly from any called module to a specific calling module.

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

本発明のコール・リターン方式は、階層化モジュール構
造におけるモジュールのコール・リターン方式において
、呼び出すモジュールのモジュール名を格納している入
口変数テーブルと、前記入口変数テーブルで指定したモ
ジュールを呼び出すときにコール機能を含んだマクロ命
令のアドレスをワークエリアに退避させモジュールをコ
ールするモジュールコール手段と、このモジュールコー
ル手段により退避させたアドレスを復旧するモジュール
リターン手段とを備えて構成されている。
In the call return method of modules in a hierarchical module structure, the call return method of the present invention includes an entry variable table that stores the module name of the module to be called, and a call return method when calling a module specified in the entry variable table. It is constructed with a module call means for saving the address of a macro instruction including a function in a work area and calling a module, and a module return means for restoring the address saved by the module call means.

〔実施例〕〔Example〕

次に本発明の実施例について図面を参照して説明する。 Next, embodiments of the present invention will be described with reference to the drawings.

第1図は本発明の一実施例の処理手順を説明するための
説明図である。
FIG. 1 is an explanatory diagram for explaining the processing procedure of an embodiment of the present invention.

第1図に示すMモジュール1中にコールする相手先モジ
ュールのモジュール名を格納した入口変数テーブル4を
予め定義しておき、Mモジュール1の処理をロジック通
り行う。処理中に“¥W#ABAL (ETBL、NU
M)” (ここで¥W#A B A Lはマクロ名であ
り、ETBLは入口変数テーブルの名称であり、NUM
は入口変数テーブル4の個別部番号である)を検出する
と、NUMの番号のモジュール名と同じモジュールへプ
ログラムの実行シーケンスが移動する。移動後は、¥W
#AEND (X)” (ここで¥W#AENDはマク
ロ名であり、Xはリターン先モジュールのモジュール名
を意味する)を検出するまでそのモジュールのロジック
通りに処理を行う。“¥W#AEND (X)″を検出
すると、Xの内容であるモジュール名と同じモジュール
へプログラムの実行シーケンスが戻る。
An entry variable table 4 storing the module name of the destination module to be called is defined in advance in the M module 1 shown in FIG. 1, and the processing of the M module 1 is performed according to logic. During processing “\W#ABAL (ETBL, NU
M)" (where \W#A B A L is the macro name, ETBL is the name of the entry variable table, and NUM
is the individual part number of the entrance variable table 4), the program execution sequence moves to the module with the same module name as the number NUM. After moving, ¥W
#AEND (X)" (where \W#AEND is a macro name, and X means the module name of the return destination module) is processed according to the logic of that module. "\W#AEND When (X)'' is detected, the program execution sequence returns to the module with the same module name as the content of X.

次に本実施例の動作説明を行う、メインルーチンである
Mモジュールlの処理をロジックに従い通常通り行う、
処理途中で“¥W#ABAL(ETBL、NUM)”を
検出すると、Mモジュール1中に定義しである入口変数
テーブル4をNUMの内容に基いて参照(この場合、S
モジュール)する。入口変数テーブル4の中には、呼び
出す各モジュールのモジュール名が格納されている。こ
の格納されている各モジュール名のアドレスをリンカ−
がリンク時に、アドレス専用テーブル(図示省略)に自
動的に格納し、該当するモジュール名のアドレスを用い
ることでプログラムの実行シーケンスが移動する。この
実施例の場合は、Sモジュール2へ移動する。このとき
、“¥W#ABAL (ETBL、NUM)内でコンパ
イラ作業域アドレスをワークエリアに退避させておく。
Next, the operation of this embodiment will be explained.The processing of the M module l, which is the main routine, is carried out as usual according to the logic.
When "\W#ABAL (ETBL, NUM)" is detected during processing, the entry variable table 4 defined in M module 1 is referenced based on the contents of NUM (in this case, S
module). In the entry variable table 4, the module name of each module to be called is stored. The address of each stored module name is
When linking, the program is automatically stored in an address-only table (not shown), and the program execution sequence is moved by using the address of the corresponding module name. In this embodiment, the process moves to S module 2. At this time, save the compiler work area address in the work area in "\W#ABAL (ETBL, NUM).

Sモジュール2からTモジュール3をコールするときに
は、通常のコール命令を使用し、プログラムの実行シー
ケンスが移動する。
When calling the T module 3 from the S module 2, a normal call instruction is used and the program execution sequence is moved.

処理途中で“¥W#AEND (X)”を検出すると、
Xの内容のモジュール名と同じモジュール内でワークエ
リアに退避させたコンパイラ作業域アドレスを復旧させ
ることにより、Xの内容のモジュール名と同じモジュー
ルへ直接リターンすることができる。
If “¥W#AEND (X)” is detected during processing,
By restoring the compiler work area address saved in the work area in the module with the same module name as the contents of X, it is possible to directly return to the module with the same module name as the contents of X.

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

以上説明したように本発明のコール・リターン方式は、
任意のコール先モジュールから特定のコール元モジュー
ルへ、直接リターンすることを可能としたことにより、
従来方式のようにリターン時に各モジュールで後処理を
構築する必要がなく、ダイナミックステップの削減およ
び処理時間の短縮が図れるという効果がある。
As explained above, the call return method of the present invention is
By making it possible to return directly from any called module to a specific calling module,
Unlike the conventional method, there is no need to construct post-processing in each module at the time of return, and this has the effect of reducing dynamic steps and processing time.

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

第1図は本発明の一実施例処理手順を説明する説明図、
第2図は階層化されたモジュールの構成図、第3図は従
来のコール・リターン方式の処理フローの説明図である
。 1・・・Mモジュール、2・・・Sモジュール、3・・
・Tモジュール、4・・・入口変数テーブル。 1〜−1?′ 躬2図
FIG. 1 is an explanatory diagram illustrating the processing procedure of an embodiment of the present invention;
FIG. 2 is a block diagram of a hierarchical module, and FIG. 3 is an explanatory diagram of a conventional call-return method processing flow. 1...M module, 2...S module, 3...
・T module, 4... Entrance variable table. 1~-1? ′ 庬2 fig.

Claims (1)

【特許請求の範囲】[Claims] 階層化モジュール構造におけるモジュールのコール・リ
ターン方式において、呼び出すモジュールのモジュール
名を格納している入口変数テーブルと、前記入口変数テ
ーブルで指定したモジュールを呼び出すときにコール機
能を含んだマクロ命令のアドレスをワークエリアに退避
させモジュールをコールするモジュールコール手段と、
このモジュールコール手段により退避させたアドレスを
復旧するモジュールリターン手段とを備えたことを特徴
とするコール・リターン方式。
In the call-return method of modules in a hierarchical module structure, there is an entry variable table that stores the module name of the module to be called, and an address of a macro instruction containing the call function when calling the module specified in the entry variable table. a module call means for evacuating the module to a work area and calling the module;
A call return method characterized by comprising module return means for restoring the address saved by the module call means.
JP14765387A 1987-06-12 1987-06-12 Call-return system Pending JPS63311439A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP14765387A JPS63311439A (en) 1987-06-12 1987-06-12 Call-return system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP14765387A JPS63311439A (en) 1987-06-12 1987-06-12 Call-return system

Publications (1)

Publication Number Publication Date
JPS63311439A true JPS63311439A (en) 1988-12-20

Family

ID=15435215

Family Applications (1)

Application Number Title Priority Date Filing Date
JP14765387A Pending JPS63311439A (en) 1987-06-12 1987-06-12 Call-return system

Country Status (1)

Country Link
JP (1) JPS63311439A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008530712A (en) * 2005-02-18 2008-08-07 クゥアルコム・インコーポレイテッド Method and apparatus for managing a return stack

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008530712A (en) * 2005-02-18 2008-08-07 クゥアルコム・インコーポレイテッド Method and apparatus for managing a return stack
JP2012123810A (en) * 2005-02-18 2012-06-28 Qualcomm Inc Method and apparatus for managing return stack

Similar Documents

Publication Publication Date Title
JPS63311439A (en) Call-return system
JPS6232497B2 (en)
JPH10293691A (en) Register allocating method
JPS5856153A (en) Subroutine return system
JPH02206838A (en) Common sub routine linking method
JPS63156255A (en) Overlaying method by interpreter
JPH0368417B2 (en)
JPH01193940A (en) System for processing time by object steering language
JPS584451A (en) Function type information processor
JPH0675757A (en) Link system for virtual space resident program
JPH02199540A (en) Automatic formation system for calling sentence
JPH0341518A (en) Program accessing system
JPH04138530A (en) Software interruption control system
JPH02214942A (en) Production system for control transfer function to master load module
JPH01292501A (en) Control information/state relation processing system
JPS63180129A (en) Program connection system
JPS628230A (en) Program specialization system
JPS62137641A (en) High-grade language compiler
JPH03103975A (en) Storage element allocating supporting device
JPS6244836A (en) Microaddress stack control system
JPH09311792A (en) Register allocation method
JPH01205331A (en) Large-scale program link system
JPS6027032A (en) Program starting method
JPH08328883A (en) System program calling method
JPH05233278A (en) Method for branching processing to plural processing routines