JPS6126695B2 - - Google Patents

Info

Publication number
JPS6126695B2
JPS6126695B2 JP56155915A JP15591581A JPS6126695B2 JP S6126695 B2 JPS6126695 B2 JP S6126695B2 JP 56155915 A JP56155915 A JP 56155915A JP 15591581 A JP15591581 A JP 15591581A JP S6126695 B2 JPS6126695 B2 JP S6126695B2
Authority
JP
Japan
Prior art keywords
program
instruction
address
linkage
release
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.)
Expired
Application number
JP56155915A
Other languages
Japanese (ja)
Other versions
JPS5856154A (en
Inventor
Masaaki Hirose
Masaaki Nagao
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 JP56155915A priority Critical patent/JPS5856154A/en
Publication of JPS5856154A publication Critical patent/JPS5856154A/en
Publication of JPS6126695B2 publication Critical patent/JPS6126695B2/ja
Granted legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/448Execution paradigms, e.g. implementations of programming paradigms
    • G06F9/4482Procedural
    • G06F9/4484Executing subprograms
    • G06F9/4486Formation of subprogram jump address

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Executing Machine-Instructions (AREA)

Description

【発明の詳細な説明】 本発明はプログラム間自動リンケージ方式に関
し、特に2つの異なつたプログラム間を必要な場
合のみリンケージするために他プログラムへ分岐
すべき箇所の番地と分岐先番地をテーブルにて管
理し、プログラムの版数が異なるような場合でも
自動的にテーブルを更新することでプログラム間
のリンケージをとるようにしたプログラム間自動
リンケージ方式に関する。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to an automatic linkage method between programs, and in particular, in order to link two different programs only when necessary, the address of the point where a branch should be made to another program and the address of the branch destination are displayed in a table. The present invention relates to an automatic linkage method between programs that automatically updates a table even when the versions of the programs are different.

従来2つの異なるプログラムA,B間を一時的
にリンケージを設定する場合、一般的には次のよ
うにして行なわれる。
Conventionally, when temporarily setting linkage between two different programs A and B, it is generally done as follows.

(1) あるプログラムAにおいて、他のプログラム
Bに分岐すべき命令のメモリ上の番地をアドレ
スリストにより調べる。(ここでアドレスリス
トとは、システム編集時に決定される各プログ
ラムのメモリ配置を表わしたものである。) (2) 前記(1)項で調べた命令を他プログラムBへの
分岐命令に変更する。
(1) In a certain program A, check the memory address of an instruction to be branched to another program B using an address list. (Here, the address list represents the memory layout of each program determined when editing the system.) (2) Change the instruction checked in item (1) above to a branch instruction to other program B. .

(3) 他プログラムBでは、規定の処理を行なつた
後に、呼出し元プログラムAへ復帰するため、
呼出し元分岐命令(すなわち前記(2)項で書き替
えた分岐命令)の次命令へ復帰するように復帰
命令を変更する。
(3) In other program B, after performing the specified processing, it returns to the calling program A, so
Change the return instruction so that it returns to the next instruction of the calling branch instruction (that is, the branch instruction rewritten in item (2) above).

(4) 前記(1)〜(3)項の手順により設定されたリンケ
ージは、プログラムAにおいて前記(2)項により
変更した他プログラムBへの分岐命令をその変
更前の命令に再度変更することにより解放され
る。
(4) The linkage set by the steps in paragraphs (1) to (3) above is such that the branch instruction to another program B that was changed in program A according to paragraph (2) above must be changed again to the instruction before the change. released by

前記各手順の具体例を、第1図〜第3図にもと
づき説明する。
Specific examples of each of the above steps will be explained based on FIGS. 1 to 3.

ここで、第1図はプログラムA,Bのメモリ配
置図であり、第2図はアドレスリストであり、第
3図はリンケージの設定・解放状態を示す。
Here, FIG. 1 is a memory layout diagram of programs A and B, FIG. 2 is an address list, and FIG. 3 shows linkage setting/release states.

いまプログラムAとプログラムBとの一時的な
リンケージをとる場合について説明する。ここで
プログラムAのa1番地(プログラムA内の相対ア
ドレス)のステツプよりプログラムBのb1番地
(プログラムB内の相対アドレス)のステツプに
分岐し、プログラムBによる一定処理終了後、該
プログラムBのb2番地(プログラムB内の相対ア
ドレス)のステツプより再びプログラムAのa1
地の次命令(a1+1番地;ここでa1番地の命令が
占有すメモリ上の番地数は1番地であるとする)
に復帰するものとした場合、次のような手順がと
られる。
Now, a case will be explained in which a temporary linkage between program A and program B is established. Here, the program branches from the step at address a 1 (relative address within program A) of program A to the step at address b 1 (relative address within program B) of program B, and after completion of certain processing by program B, From the step at address b 2 (relative address in program B), the next instruction at address a 1 of program A (address a 1 + 1; here, the number of memory addresses occupied by the instruction at address a 1 is 1 address). )
If it is decided to return to , the following steps will be taken:

(1)′ 先ずプログラムAのa1番地が、メモリM上
の何番地(メモリ上の絶対アドレス)にある
か、またプログラムBのb1番地及びb2番地がそ
れぞれメモリM上の何番地にあるかを調べる。
これはシステム編集時に作成される、第2図に
示すアドレスリストより算出される。アドレス
リストは、各プログラムA,B…の先頭番地、
最終番地、大きさ等のメモリ配置情報が表とし
て作成されているものであつて、プリンタによ
り打出されるので、これを見て前記算出を行な
う。すなわち、プログラムAはメモリM上の
Ah番地より始まるため、プログラム内の相対
アドレスの前記a1番地はメモリM上では、Ah
+a1番地となる。またプログラムBの先頭は
Bh番地より始まるため、前記b1番地及びb2
地はメモリM上においてそれぞれBh+b1番地
及びBh+b2番地となる。このようにして分岐
すべき命令のメモリ上の番地を得る。
(1)' First, what address in memory M is address a 1 of program A located (absolute address on memory), and what address in memory M are addresses b 1 and b 2 of program B, respectively. Find out if there is one.
This is calculated from the address list shown in FIG. 2, which is created when editing the system. The address list includes the starting addresses of each program A, B...
Memory arrangement information such as the final address and size is prepared as a table and is printed out by a printer, so the above calculations are performed by looking at this table. In other words, program A is stored in memory M.
Since it starts from address Ah, the above relative address a1 in the program is written as Ah on memory M.
+a becomes address 1 . Also, the beginning of program B is
Since the process starts from the Bh address, the b1 address and b2 address become the Bh+ b1 address and Bh+ b2 address on the memory M, respectively. In this way, the memory address of the instruction to be branched is obtained.

(2)′ プログラムAのa1番地の命令をプログラム
Bのb1番地への分岐命令に書き換える。すなわ
ちメモリM上のAh+a1番地(プログラムAの
a1番地)の命令をBh+b1番地(プログラムB
のb1番地)への分岐命令「JUMP B1番地」に
書き換える。
(2)' Rewrite the instruction at address a 1 of program A with a branch instruction to address b 1 of program B. In other words, address Ah + a 1 on memory M (program A's
a 1 address) Bh+b address 1 (program B
Rewrite the branch instruction to "JUMP B 1 address" to "JUMP B 1 address".

(3)′ またプログラムBでは、一定処理終了後の
呼出し元への復帰命令を、プログラムAのa1
地の次命令へ分岐するように書き替える。すな
わち、メモリM上のBh+b2番地(プログラム
Bのb2番地)の命令を、Ah+a1+1番地への
復帰命令とする。
(3)' Also, in program B, the instruction to return to the caller after the completion of certain processing is rewritten to branch to the next instruction at address a1 in program A. That is, the instruction at address Bh+b 2 (address b 2 of program B) on memory M is set as the instruction to return to address Ah+a 1 +1.

(4)′ 前記(2)′及び(3)′項で設定されたリンケージ
は、プログラムA内のa1番番地の分岐命令、つ
まり前記(2)′項で書き替えた命令を書き替え前
の命令に再度書き替えることにより解放され
る。それ故、メモリM上のAh+a1番地(プロ
グラムAのa1番地)を分岐命令への書き替え前
の命令(a1番地の本来の命令)に書き替える。
(4)' The linkage set in paragraphs (2)' and (3)' above applies to the branch instruction at address a1 in program A, that is, the instruction rewritten in paragraph (2)' above, before it is rewritten. It can be released by rewriting the command. Therefore, address Ah+a 1 (address a 1 of program A) on memory M is rewritten to the instruction before being rewritten to the branch instruction (original instruction at address a 1 ).

従来では、このような前記(1)′〜(4)′の手順にし
たがつて手動(人為的)により一時的リンケージ
の設定及び解放を行なつていた。しかしながらシ
ステム開発途中においては、第4図に示す如く、
プログラム変更に伴なう再配置にもとづき、シス
テム編集が数回行なわれることがあり、このため
一時的リンケージの認定解放を行なう毎にメモリ
上のアドレスを版数(システム編集毎に割付けら
れる識別数)に応じたアドレスリストより調べ
て、一連の手順を人為的に行なう必要がある。こ
のためアドレス調査ミス等によりリンケージ設定
の失敗が多発する可能性があつた。
Conventionally, the temporary linkage has been manually set and released according to the steps (1)' to (4)'. However, during system development, as shown in Figure 4,
System editing may be performed several times based on relocation due to program changes, so each time a temporary linkage is released, the memory address is changed to the version number (identification number assigned for each system edit). ) and manually perform a series of steps. For this reason, there was a possibility that linkage setting failures would occur frequently due to address research errors and the like.

したがつて本発明の目的は、異なるプログラム
間の一時的リンケージの設定解放を人為的にアド
レスリストを調査し書替えることなく、これを自
動的に行なうようにしたプログラム間自動リンケ
ージ方式を提供することを目的とする。そしてこ
のために本発明におけるプログラム間自動リンケ
ージ方式では、複数の異なるプログラムをリンケ
ージしたり解放する場合において、プログラムに
命令を記入する命令記入手段と、リンケージ先の
プログラムのアドレスにおける呼出し元番地とリ
ンケージを行なうプログラムのアドレスにおける
呼出し元番地ともとのプログラムへ復帰する命令
が記入されている復帰命令番地がそれぞれ記入さ
れているアドレス保持手段と、命令作成手段と、
リンケージの設定あるいは解放を指示する設定指
示手段および解放指示手段を設け、リンケージの
設定指示のあるときに前記アドレス保持手段を読
出してリンケージに必要な命令を前記命令作成手
段で作成し、この作成した命令を前記命令記入手
段により当該プログラムに自動的に記入し、また
リンケージの解放指示のあるときに前記プログラ
ムの呼出し元番地に記入した命令を自動的に変更
するようにしたことを特徴とする。
Therefore, an object of the present invention is to provide an automatic linkage method between programs that automatically sets and releases temporary linkage between different programs without having to manually investigate and rewrite address lists. The purpose is to For this reason, in the program-to-program automatic linkage method of the present invention, when linking or releasing a plurality of different programs, an instruction writing means for writing instructions into the program, and a caller address and linkage at the address of the linkage destination program are provided. an address holding means in which a call source address and a return instruction address in which an instruction to return to the original program is written in the address of the program that performs the program; and an instruction creation means;
Setting instruction means and release instruction means are provided for instructing setting or release of linkage, and when a linkage setting instruction is given, the address holding means is read and an instruction necessary for linkage is created by the instruction creation means, The present invention is characterized in that an instruction is automatically written into the program by the instruction writing means, and the instruction written in the calling address of the program is automatically changed when a linkage release instruction is given.

本発明を一実施例にもとづき詳述するに先立ち
その動作原理を説明する。
Before describing the present invention in detail based on one embodiment, its operating principle will be explained.

I システムの前提機能 本発明の方式には次のa,bで説明する2つの
機能が必要である。
I System Prerequisite Functions The method of the present invention requires two functions described in a and b below.

a プログラムの起動要求(タイミング又は他の
プログラムよりの要求)により、要求されてい
るプログラムに制御を移行するモニタ機能、つ
まりプログラムが、X,Y,…の順で起動する
ことがわかつているとき、プログラムXが終つ
たら次のプログラムYを起動する手段が必要で
ある。
a Monitor function that transfers control to the requested program in response to a program startup request (timing or request from another program), that is, when it is known that the programs will be activated in the order of X, Y, ... , a means is required to start the next program Y when program X is finished.

b システム編集時、プログラムのソース上で規
定された記号ラベルに対するメモリ上の絶対番
地を算出し、該記号ラベラを参照しているエリ
アに対して該絶対番地を書き込むエデイツト機
能が必要である。
b. When editing the system, an edit function is required that calculates the absolute address in memory for the symbol label defined on the program source and writes the absolute address to the area that references the symbol labeler.

リンケージ管理テーブル リンケージ管理テーブルは、リンケージを設定
又は解放するために必要な番地情報を管理するテ
ーブルである。このリンケージ管理テーブルは、
第5図においてLTとして示されるものであつ
て、必要な番地情報は、該当するプログラムのソ
ース上で、呼出し元ステツプ、呼出し先ステツ
プ、復帰命令ステツプに対して該ステツプの先頭
に記号ラベル(Label C,D,E等)を付与
し、かつリンケージ管理テーブルのソーステーブ
ルSTによりまとめておき、システム編集時のエ
デイツト機能EDを用いてリンケージ管理テーブ
ルLTを作成するときにその該当する欄の該当記
号ラベルを絶対番地に変換することにより、その
リンケージ管理テーブルLTに呼出し元A1番地
(ここでA1=Ah+a1)、呼出し先B1番地(B1=Bh
+b1)、復帰命令、B2番地(B2=Bh+b2)を書き
込むことになる。
Linkage Management Table The linkage management table is a table that manages address information necessary to set or release linkage. This linkage management table is
The necessary address information, shown as LT in FIG. 5, is provided by a symbolic label (Label) at the beginning of the step for the calling step, called step, and return instruction step on the source of the corresponding program. C, D, E, etc.) and summarize them in the source table ST of the linkage management table, and when creating the linkage management table LT using the edit function ED when editing the system, use the corresponding symbol in the corresponding column. By converting the label to an absolute address, the linkage management table LT contains the caller A 1 address (here, A 1 =Ah + a 1 ) and the callee B 1 address (B 1 = Bh
+b 1 ), return instruction, and address B 2 (B 2 =Bh+b 2 ).

第5図は、システム編集時におけるこれらの処
理の概略を図示したものである。
FIG. 5 shows an outline of these processes during system editing.

リンケージ設定解放プログラム プログラムAとプログラムBとのリンケージ設
定要求および設定したリンケージの解放要求があ
つた場合、リンケージ管理テーブルLT内の各情
報にしたがつて各プログラム間のリンケージの設
定及び解放を行なうためにこのリンケージ設定解
放プログラムが設けられている。第7図に示す如
く、このリンケージ設定解放プログラムは、モニ
タ機能を有するオペレーテング制御部OCから一
定時間毎に周期起動される。そしてこのリンケー
ジ設定解放プログラムの動作フローが第6図に示
される、そしてこのリンケージ設定時のデータと
処理の流れ状態が第7図に示されている。この第
7図の数字は第6図の各処理ステツプの数字に対
応するものである。
Linkage setting release program When there is a request to set linkage between program A and program B and a request to release the set linkage, this program sets and releases the linkage between each program according to each information in the linkage management table LT. This linkage setting release program is provided in . As shown in FIG. 7, this linkage setting release program is periodically activated at fixed time intervals by the operating control unit OC having a monitoring function. The operational flow of this linkage setting release program is shown in FIG. 6, and the flow state of data and processing at the time of linkage setting is shown in FIG. The numbers in FIG. 7 correspond to the numbers of each processing step in FIG.

次にこのリンケージ設定解放プログラムについ
て第6図、第7図にもとづき説明する。
Next, this linkage setting release program will be explained based on FIGS. 6 and 7.

(イ) 先ずリンケージ設定解放プログラムが起動さ
れると、要求管理テーブルRTを読出す。この
要求管理テーブルRTにおける設定要求表示は
オペレータの操作によつても、また別のプログ
ラムによつても行なうことができる。そしてこ
れが設定要求表示が行なわれて要求有りの場合
には次の制御が行なわれる。
(a) First, when the linkage setting release program is started, it reads the request management table RT. The setting request display in the request management table RT can be performed by an operator's operation or by another program. Then, a setting request is displayed, and if there is a request, the following control is performed.

リンケージ設定解放プログラムは、リンケ
ージ管理テーブルLTより呼出し先番地B1
抽出し、呼出し先プログラムBへの分岐命令
JUMPB1を作成する。
The linkage setting release program extracts the call destination address B 1 from the linkage management table LT and issues a branch instruction to the call destination program B.
Create JUMPB 1 .

次にリンケージ管理テーブルLTより呼出
し元番地A1を抽出してプログラムAへの復
帰先番地A1+1を算出し、呼出し元プログ
ラムAへの分岐命令JUMPA1+1を作成す
る。
Next, the calling source address A 1 is extracted from the linkage management table LT, the return destination address A 1 +1 to the program A is calculated, and a branch instruction JUMPA 1 +1 to the calling program A is created.

さらにリンケージ管理テーブルLTより復
帰命令番地B2を抽出し、前記で作成した
分岐命令JUMPA1+1を書込む。
Furthermore, the return instruction address B2 is extracted from the linkage management table LT, and the branch instruction JUMPA 1 +1 created above is written.

またリンケージ管理テーブルLTより呼出
し元番地A1を抽出し、前記で作成した分
岐命令JUMPB1を書込む。
Also, extract the caller address A1 from the linkage management table LT, and write the branch instruction JUMPB1 created above.

それから要求管理テーブルRTにおける設
定要求表示を落して要求無しとする。
Then, the setting request display in the request management table RT is dropped to indicate that there is no request.

(ロ) また前記(イ)において最初に要求管理テーブル
RTの設定要求表示が要求無しの場合には、同
テーブルRTの解放要求表示をみてリンケージ
解放要求表示の有無をみる。そしてこれが解放
要求有りの場合には、呼出し元番地A1に記入
されているJUMPB1を消して本来の命令に復元
する。それから要求管理テーブルRTの解放要
求表示を要求無しとする。もしこの項の初めに
おいて解放要求表示をみて解放要求無しの場合
にはこのリンケージ設定解放プログラムの動作
はそのまま終了することになる。
(b) Also, in (b) above, first the request management table is
If the RT setting request display indicates no request, check the release request display of the same table RT to see if there is a linkage release request display. If there is a release request, JUMPB 1 written in the calling address A1 is deleted and the original command is restored. Then, the release request display in the request management table RT is set to no request. If there is no release request when looking at the release request display at the beginning of this section, the operation of this linkage setting release program will end as is.

上記(イ)、(ロ)で説明したリンケージ設定解放プロ
グラムにおけるリンケージ設定時の処理概念及び
解放処理概念を第8図及び第9図について簡単に
説明する。
The processing concept and release processing concept at the time of linkage setting in the linkage setting release program explained in (a) and (b) above will be briefly explained with reference to FIGS. 8 and 9.

第8図においてオペレーテング制御部OCから
の通常起動にもとづき、プログラムAが通常の処
理を行なつている。このときユーザの要求によ
り、あるいは他のプログラムの要求により各種要
求表示設定部Eが動作し要求管理テーブルRTに
おける設定要求表示を要求有に記入する。そして
オペレーテング制御部OCにより周期的に起動す
るリンケージ設定解放プログラムが動作して、先
ずその設定要求表示をみる。このとき、もしもこ
れに要求無しが記入されておればこのリンケージ
設定解放プログラムの動作は何も行なわれないま
ま終了するが、この場合には要求有が表示されて
いるので、これをみてリンケージ設定解放プログ
ラムは、リンケージ管理テーブルLTを参照して
上記(イ)に説明した如く命令の書替を行なう。それ
から設定要求表示における要求有有の表示を消
す。
In FIG. 8, program A is performing normal processing based on normal activation from the operating control unit OC. At this time, the various request display setting section E operates according to a user's request or a request from another program, and writes the setting request display in the request management table RT as "required". Then, the linkage setting release program that is activated periodically by the operating control unit OC runs, and the setting request display is first seen. At this time, if "No request" is entered in this field, the operation of this linkage setting release program will end without doing anything, but in this case, "Required" is displayed, so check this and set the linkage. The release program refers to the linkage management table LT and rewrites the instructions as explained in (a) above. Then, the display indicating the presence of a request on the setting request display is erased.

これにより第9図に示す如く、プログラムAの
呼出し元番地A1にはプログラムBに対する分岐
命令JUMPB1が記入され、プログラムBの復帰命
令番地B2にはプログラムAへの復帰先の分岐命
令JUMPA1+1が記入されることになる。そして
オペレーテング制御部OCからの通常起動により
プログラムAが動作されるとき、プログラムBに
対する分岐が行なわれ、プログラムBにもとづく
制御処理動作も行なわれることになる。そしてこ
のプログラムBにもとづく動作は、要求管理テー
ブルRTの解放要求表示が要求有を表示するまで
続けられる。
As a result, as shown in FIG. 9, the branch instruction JUMPB 1 for program B is written in the call source address A 1 of program A, and the branch instruction JUMPA to return to program A is written in the return instruction address B 2 of program B. 1 + 1 will be entered. Then, when program A is operated by normal activation from operating control unit OC, a branch to program B is performed, and control processing operations based on program B are also performed. The operation based on this program B is continued until the release request display in the request management table RT indicates that there is a request.

そして解放要求表示に要求有が記入された後
に、オペレーテング制御部OCが周期起動により
リンケージ設定解放プログラムを起動すれば、先
ずこのリンケージ設定解放プログラムは要求管理
テーブルをみて解放要求表示に要求有が記入され
ていることを読出し、前記(ロ)に説明した如く、命
令の書替を行ない、プログラムAとBとのリンケ
ージ状態を解放し、それから解放要求表示に記入
されている要求有を消去する。かくしてオペレー
テング制御部OCがプログラムAを通常起動すれ
ば、プログラムAはプログラムBに分岐すること
なくその処理を行なうことになる。
Then, after the presence of a request is entered in the release request display, if the operating control unit OC activates the linkage setting release program by periodic activation, the linkage setting release program first looks at the request management table and indicates that the release request display indicates the presence of a request. Read what has been written, rewrite the command as explained in (b) above, release the linkage state between programs A and B, and then erase the request written in the release request display. . Thus, if the operating control unit OC normally starts program A, program A will perform its processing without branching to program B.

次に、以上説明したような動作を行なう本発明
のプログラム間自動リンケージ方式を第10図に
もとづき説明する。
Next, the program-to-program automatic linkage system of the present invention, which operates as described above, will be explained based on FIG.

図中、1は命令レジスタ、2はデコーダ、3は
アドレス・レジスタ、4〜6はレジスタ、7は第
1演算回路、8は第2演算回路、9はジヤンプ命
令出力部であつて分岐命令作成に必要なジヤンプ
命令、コードJUMPを出力するもの、10は+1
加算回路、11,12はレジスタ、13は書込レ
ジスタであつて、メモリMM中に格納されている
プログラムA及びBに記入すべき命令等が書込ま
れるもの、14はデータ保持レジスタである。
In the figure, 1 is an instruction register, 2 is a decoder, 3 is an address register, 4 to 6 are registers, 7 is a first arithmetic circuit, 8 is a second arithmetic circuit, and 9 is a jump instruction output unit that creates a branch instruction. JUMP instruction required for , one that outputs code JUMP, 10 is +1
The adder circuit includes registers 11 and 12, a write register 13 into which commands and the like to be written into programs A and B stored in the memory MM are written, and 14 a data holding register.

第10図においてリンケージ設定解放プログラ
ムLSRPはオペレーテング制御部OCにより起動
される。そしてリンケージ設定解放プログラムが
実行されると、このプログラムを構成する各命令
が順次命令レジスタ1に読出され、これがデコー
ダ2により解読され、要求管理テーブルRTを読
出したり、各レジスタ等のゲートを制御したりし
て、データ処理を順次実行する。
In FIG. 10, the linkage setting release program LSRP is activated by the operating control unit OC. When the linkage setting release program is executed, each instruction composing this program is sequentially read into the instruction register 1, which is decoded by the decoder 2, and which reads the request management table RT and controls the gates of each register. data processing in sequence.

先ず命令レジスタ1に読出された命令をデコー
ダ2で解読し、その指令にもとづき要求管理テー
ブルRTの設定要求表示を読出し、要求有を認識
する。次にリンケージ管理テーブルLTから、プ
ログラムAとプログラムBとのリンケージ設定に
必要な、呼出し元番地A1、呼出し先番地B1およ
び復帰命令番地B2をそれぞれレジスタ4,5,
6に読出し、保持する。そして先ずレジスタ4に
記入されたA1番地をアドレス・レジスタ3にセ
ツトし、メモリMMをアクセスする。このメモリ
MMのアクセスに先立ち、レジスタ5よりB1を第
2演算回路8に出力し、またジヤンプ命令出力部
9からジヤンプ命令JUMPを第2演算回路8に出
力してこのB1とJUMPを合成して、メモリMMの
A1番地に書込むべきデータである分岐命令
「JUMPB1×××」を作成し、この分岐命令をレ
ジスタ12を経由して書込みレジスタ13にセツ
トする。そして前記アドレス・レジスタ3に記入
されたA1番地にこの分岐命令「JUMPB1×××」
を記入する。
First, the instruction read out to the instruction register 1 is decoded by the decoder 2, and based on the instruction, the setting request display of the request management table RT is read out, and the existence of the request is recognized. Next, from the linkage management table LT, set the call source address A 1 , call destination address B 1 and return instruction address B 2 necessary for linkage settings between program A and program B in registers 4, 5, and 5, respectively.
6 and hold it. First, address A1 written in register 4 is set in address register 3, and memory MM is accessed. this memory
Prior to accessing the MM, B1 is output from the register 5 to the second arithmetic circuit 8, and a jump instruction JUMP is output from the jump instruction output section 9 to the second arithmetic circuit 8, and this B1 and JUMP are combined. , memory MM
A branch instruction "JUMPB 1 XXX", which is data to be written to address A1 , is created, and this branch instruction is set in the write register 13 via the register 12. Then, this branch instruction “JUMPB 1 ×××” is written to address A1 written in the address register 3.
Enter.

この間に第1演算回路7では、レジスタ4から
伝達されたA1と+1加算回路より出力された+
1によりA1+1の演算が行なわれ、これにジヤ
ンプ命令出力部9から出力されたジヤンプ命令
JUMPとが合成されて、メモリMMのB2番地に書
込むべきデータである分岐命令「JUMPA1×××
+1」が作成されたレジスタ11に保持される。
そして今度はこの分岐命令「JUMPA1×××+
1」が書込レジスタ13に伝達され、これがレジ
スタ6から伝達されてアドレス・レジスタ3に記
入されているメモリMMのB2番地に書込まれるこ
とになる。このようにして、プログラムAとBと
のリンケージが設定されることになる。
During this time, the first arithmetic circuit 7 uses A1 transmitted from the register 4 and +1 outputted from the +1 addition circuit.
1, the operation A 1 +1 is performed, and the jump instruction output from the jump instruction output section 9 is added to this.
JUMP is combined with the branch instruction “ JUMPA 1
+1" is held in the created register 11.
And this time, this branch instruction “JUMPA 1 ×××+
1'' is transmitted to the write register 13, which is transmitted from the register 6 and written to the B2 address of the memory MM written in the address register 3. In this way, the linkage between programs A and B is established.

また、このリンケージを解放する場合には、初
めにA1番地にアクセスしたとき読出した、該A1
番地に記入されていた原命令を保持している、デ
ータ保持レジスタ14からこの原命令が書込レジ
スタ13に記入されている。一方、レジスタ4か
ら出力されたA1番地がアドレス・レジスタ3に
セツトされ、かくしてメモリMMのA1番地に原命
令が再び記入される。そしてこれによりプログラ
ムAとBとのリンケージが解放されることにな
る。なおこの場合、前記メモリMMのA1番地に記
入されていた原命令を保持する手段は、データ保
持レジスタに限定されるものではなく、例えばプ
ログラムBの適当なところにあらかじめ置いても
よく、メモリMMの適当な番地に確保することも
できる。さらにまたこれをリンケージ管理テーブ
ル等のテーブルに保持することもできる。
In addition, when releasing this linkage, the A 1 address read when the A 1 address was first accessed is
This original instruction is written into the write register 13 from the data holding register 14 which holds the original instruction written at the address. On the other hand, address A1 outputted from register 4 is set in address register 3, and thus the original instruction is written again at address A1 of memory MM. This releases the linkage between programs A and B. In this case, the means for holding the original instruction written in address A1 of the memory MM is not limited to the data holding register, but may be placed in advance at an appropriate location in program B, for example, It can also be secured at an appropriate address in MM. Furthermore, this can also be held in a table such as a linkage management table.

以上説明の如く、本発明によれば、リンケージ
管理テーブルを設けることにより、プログラムの
版数が異なつた場合でもシステム編集時に該当ア
ドレスを書込んでくれるため、何等テーブル及び
プログラムを変更する必要はない。
As explained above, according to the present invention, by providing a linkage management table, even if the version of the program differs, the corresponding address is written during system editing, so there is no need to change the table or program. .

また、リンケージ設定解放プログラムを設ける
ことで、リンケージの設定解放の要求時のみこの
リンケージ設定解放プログラムがテーブルに登録
されたプログラム間のリンケージを設定/解放す
るため、解放後は各プログラム本来の処理に影響
することはない。
In addition, by providing a linkage setting release program, this linkage setting release program sets/releases the linkage between programs registered in the table only when a linkage setting release is requested. It has no effect.

このようなことをシステムに追加することで一
時的なプログラム間リンケージを容易に行なうこ
とができる。
By adding something like this to the system, temporary linkage between programs can be easily performed.

さらに本発明の他の実施例を第11図にもとづ
き説明する。
Furthermore, another embodiment of the present invention will be described based on FIG. 11.

第11図に示すものは、本来プログラム(プロ
グラムA′)の必要箇所にNOP命令(No
Operation命令)を挿入しておき、これにラベル
を付与してグローバルを出す。またリンケージさ
れるサポートプログラム(プログラムB′)のリン
ケージ設定・解除プログラム(SET〜
RETURN)はリンケージ管理テーブルLT′に
て、本来プログラムにおけるNOP命令のアドレ
スA1,A2…と、サポートプログラムまたはサブ
ルーチンのエントリアドレスS1,S2…を対で管理
し、サポートプログラムをリンケージするときに
本体プログラム(プログラムA′)のNOP命令
を、第11図の下方に示す如く、サポートプログ
ラムへのジヤンプ命令(JUMP S1,JUMP S2)に
書き替える。そしてサポートプログラム(プログ
ラムB′)の復帰命令(JUMP*)を本体プログラ
ムへの復帰命令(JUMP A1+1,JUMP A2
1)に書き替える。そしてサポートプログラムの
使用が終了し、リンケージ解放のとき、本体プロ
グラムのジヤンプ命令をNOP命令に戻す。
The program shown in Figure 11 originally has a NOP instruction (No.
Operation command), give it a label, and make it global. Also, the linkage setting/cancellation program (SET~
RETURN) manages the NOP instruction addresses A 1 , A 2 ... of the program and the entry addresses S 1 , S 2 ... of the support program or subroutine as pairs in the linkage management table LT', and links the support program. Sometimes, the NOP instruction of the main program (program A') is rewritten with jump instructions (JUMP S 1 , JUMP S 2 ) to the support program, as shown in the lower part of FIG. Then, the return instruction (JUMP*) of the support program (program B') is converted into the return instruction (JUMP A 1 + 1, JUMP A 2 +) to the main program.
Rewrite to 1). When the use of the support program is finished and the linkage is released, the jump instruction of the main program is returned to the NOP instruction.

このようにすれば本体の通常処理はNOP命令
以外影響を受けないので、実際上問題は生じな
い。また本体プログラムのVersion Upが行なわ
れてもサポートプログラムの変更(サポートプロ
グラムのジヤンプ命令等)を必要としない。
If this is done, the main body's normal processing will not be affected except by the NOP command, so there will be no practical problem. Furthermore, even if the main program is upgraded, there is no need to change the support program (jump instruction for the support program, etc.).

なお本発明では、設定要求表示は特に設定する
必要がなく、要求時のみリンケージ設定解放プロ
グラムに対する起動が行なわれればよい。すなわ
ち前記説明ではオペレーテング制御部の如きモニ
タ機能によりタイミングで周期起動を行なうもの
であるが、他のプログラムよりの起動であつても
効果は変らない。リンケージの解放要求表示につ
いても同様である。
In the present invention, there is no need to specifically set the setting request display, and it is sufficient that the linkage setting release program is activated only when requested. That is, in the above description, periodic activation is performed at timing by a monitor function such as an operating control unit, but the effect remains the same even if activation is performed by another program. The same applies to the linkage release request display.

呼出し元番地にリンケージのための分岐命令を
書き込んだ場合、本来の命令が破壊されることに
なる。このために前記説明では破壊した命令と同
一命令を呼出し先プログラム内に置き身代り処理
を行なうことともしたが、破壊される命令を
NOP命令(無処理命令)とすることにより身代
り処理を行なう必要がなくなる。さらにリンケー
ジ解放時に破壊命令を復元する必要から破壊命令
をテーブル内等で記憶しておくこととしたが、破
壊命令をNOP命令とした場合は、復元する処理
が一意的であるため容易に行なうことが可能であ
る。この他にも破壊命令に対する処置が考えられ
るが本発明としての効果は変わらない。
If a branch instruction for linkage is written to the caller address, the original instruction will be destroyed. For this reason, in the above explanation, the same instruction as the destroyed instruction is placed in the called program to perform substitute processing, but the instruction to be destroyed is
By using a NOP instruction (no processing instruction), there is no need to perform substitute processing. Furthermore, since it is necessary to restore the destruction instruction when the linkage is released, we decided to store the destruction instruction in a table, etc. However, if the destruction instruction is a NOP instruction, the restoration process is unique and can be easily performed. is possible. Although other measures can be considered for the destruction command, the effects of the present invention will not change.

またリンケージはすべて分岐命令で構成した
が、計算機によつては復帰アドレスを用意して分
岐する命令(例えばBAL命令:Branch and
Linkを行なうもので、BAL;B1,R5という命令
は指定番地B1への分岐とレジスタR5に記入され
た番地への復帰を示している)が使用可能なもの
もあるが、本発明としての効果は変らない。その
他様々な命令が考えられるが、制御を他番地へ移
行することが可能な命令であれば効果は変らな
い。
In addition, all linkages are configured with branch instructions, but depending on the computer, there are instructions that prepare a return address and branch (for example, BAL instructions: Branch and
There are some that perform Link, and the instruction BAL;B 1 , R 5 (indicating a branch to the specified address B 1 and a return to the address written in register R 5 ) can be used, but this The effect as an invention remains unchanged. Various other commands are possible, but the effect will remain the same as long as the command can transfer control to another address.

リンケージ管理テーブルへの分岐情報は、シス
テム編集時に記号ラベルを用いて書き込むことと
したが他プログラムによる書き込みが行なわれて
も効果は変らない。
Branch information to the linkage management table was written using symbolic labels when editing the system, but the effect remains the same even if writing is done by another program.

本実施例は、初めにリンケージが1つの場合に
ついて示したが、複数のリンケージを設定解放す
る場合も同様である。
Although this embodiment first describes the case where there is one linkage, the same applies to the case where a plurality of linkages are set and released.

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

第1図はプログラムA,Bのメモリ配置図、第
2図はメモリ配置リスト、第3図は一時的プログ
ラムリンケージの説明図、第4図はプログラム変
更にともなうメモリ再配置図、第5図は本発明に
おいて使用するリンケージ管理テーブルへの番地
情報設定説明図、第6図は本発明において使用す
るリンケージ設定解放プログラムの概略フロー、
第7図はリンケージ設定時の説明図、第8図及び
第9図は本発明におけるリンケージ設定時及び解
放時の処理状態説明図、第10図は本発明の一実
施例構成図、第11図は本発明の他の動作説明図
である。 図中、1は命令レジスタ、2はデコーダ、3は
アドレス・レジスタ、4〜6はレジスタ、7は第
1演算回路、8は第2演算回路、9はジヤンプ命
令出力部、10は+1加算回路、11,12はレ
ジスタ、13は書込レジスタ、14はデータ保持
レジスタをそれぞれ示す。
Figure 1 is a memory allocation diagram of programs A and B, Figure 2 is a memory allocation list, Figure 3 is an explanatory diagram of temporary program linkage, Figure 4 is a diagram of memory relocation due to program changes, and Figure 5 is An explanatory diagram of address information setting in the linkage management table used in the present invention, FIG. 6 is a schematic flowchart of the linkage setting release program used in the present invention,
FIG. 7 is an explanatory diagram when linkage is set; FIGS. 8 and 9 are explanatory diagrams of processing states when linkage is set and released in the present invention; FIG. 10 is a configuration diagram of an embodiment of the present invention; FIG. 11 FIG. 2 is another operational explanatory diagram of the present invention. In the figure, 1 is an instruction register, 2 is a decoder, 3 is an address register, 4 to 6 are registers, 7 is a first arithmetic circuit, 8 is a second arithmetic circuit, 9 is a jump instruction output section, and 10 is a +1 adder circuit. , 11 and 12 are registers, 13 is a write register, and 14 is a data holding register, respectively.

Claims (1)

【特許請求の範囲】[Claims] 1 複数の異なるプログラムをリンケージしたり
解放する場合において、プログラムに命令を記入
する命令記入手段と、リンケージ先のプログラム
のアドレスにおける呼出し先番地とリンケージを
行なうプログラムのアドレスにおける呼出し元番
地ともとのプログラムへ復帰する命令が記入され
ている復帰命令番地がそれぞれ記入されているア
ドレス保持手段と、命令作成手段と、リンケージ
の設定あるいは解放を指示する設定指示手段およ
び解放指示手段を設け、リンケージの設定指示の
あるときに前記アドレス保持手段を読出してリン
ケージに必要な命令を前記命令作成手段で作成
し、この作成した命令を前記命令記入手段により
当該プログラムに自動的に記入し、またリンケー
ジの解放指示のあるときに前記プログラムの呼出
し元番地に記入した命令を自動的に変更するよう
にしたことを特徴とするプログラム間自動リンケ
ージ方式。
1. When linking or releasing multiple different programs, an instruction writing means for writing instructions into the program, a call destination address at the address of the program to be linked, a call source address at the address of the linking program, and the original program. address holding means in which return instruction addresses are written, command creation means, and setting instruction means and release instruction means for instructing linkage setting or release; At a certain time, the address holding means is read out, an instruction necessary for linkage is created by the instruction creation means, the created instruction is automatically written into the program by the instruction writing means, and the instruction to release the linkage is automatically written into the program. An automatic linkage system between programs, characterized in that an instruction written in a call source address of the program at a certain time is automatically changed.
JP56155915A 1981-09-30 1981-09-30 Automatic interprogram linkage system Granted JPS5856154A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP56155915A JPS5856154A (en) 1981-09-30 1981-09-30 Automatic interprogram linkage system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP56155915A JPS5856154A (en) 1981-09-30 1981-09-30 Automatic interprogram linkage system

Publications (2)

Publication Number Publication Date
JPS5856154A JPS5856154A (en) 1983-04-02
JPS6126695B2 true JPS6126695B2 (en) 1986-06-21

Family

ID=15616286

Family Applications (1)

Application Number Title Priority Date Filing Date
JP56155915A Granted JPS5856154A (en) 1981-09-30 1981-09-30 Automatic interprogram linkage system

Country Status (1)

Country Link
JP (1) JPS5856154A (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4831517A (en) * 1986-10-10 1989-05-16 International Business Machines Corporation Branch and return on address instruction and methods and apparatus for implementing same in a digital data processing system
JPH01226093A (en) * 1988-03-07 1989-09-08 Mitsubishi Heavy Ind Ltd Coin discriminating device
JP4915863B2 (en) * 2007-04-25 2012-04-11 ヤマハモーターパワープロダクツ株式会社 Canister arrangement structure in power generator

Also Published As

Publication number Publication date
JPS5856154A (en) 1983-04-02

Similar Documents

Publication Publication Date Title
JP4006337B2 (en) How to fix executable execution using shared libraries
EP0665496B1 (en) Method and apparatus for run-time error checking using dynamic patching
KR100415371B1 (en) Computer
US5418954A (en) Method for preparing and dynamically loading context files
JPH0254337A (en) Data processing system for facilitating generation of executable image
US6925522B2 (en) Device and method capable of changing codes of micro-controller
JPH10214203A (en) Information processor
JPS6126695B2 (en)
US5995987A (en) Programming method and programming unit for programmable controller in which only common names for application instructions need be designated by the programmer
EP1265136A2 (en) Linking of applications into devices having overlays and shadow memories
JP3131098B2 (en) Simulator
JPS6365983B2 (en)
JPH11259308A (en) Programmable controller
JP3130798B2 (en) Bus transfer device
JPH11126161A (en) Fault avoiding method for control memory
JP2841363B2 (en) External module acquisition method
KR100308251B1 (en) Integrated management method of runtime backup information and its system
JPH11161484A (en) Information processor
JP2568708B2 (en) How to update the double link queue
KR20000003162A (en) Effective operation method of flash memory
JPH1040094A (en) Program controller for firmware
JPS60114944A (en) Instruction address control system
JPS58140852A (en) Microprogram controller
JPH05334070A (en) Correction system for operating system
JPS6129022B2 (en)