JPH10232772A - Program changing device - Google Patents

Program changing device

Info

Publication number
JPH10232772A
JPH10232772A JP9036315A JP3631597A JPH10232772A JP H10232772 A JPH10232772 A JP H10232772A JP 9036315 A JP9036315 A JP 9036315A JP 3631597 A JP3631597 A JP 3631597A JP H10232772 A JPH10232772 A JP H10232772A
Authority
JP
Japan
Prior art keywords
address
program
change
branch
branch source
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
JP9036315A
Other languages
Japanese (ja)
Inventor
Norihiko Ishizaki
徳彦 石崎
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 JP9036315A priority Critical patent/JPH10232772A/en
Publication of JPH10232772A publication Critical patent/JPH10232772A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide a program changing device with which the addition/change/ reduction of program trouble spread over plural instructions can be executed in a minimum processing time. SOLUTION: When an address comparator 103 detects the coincidence between an execution address from a program counter 101 and a branching source address from a branching source address register 102, a branching destination address register 104 stores a branching destination address corresponding to the coincident branching source address in a program counter 101 and branches that address into addition/change/reduction program. When the addition/change/ reduction program is completely executed, a return address corresponding to the coincident branching source address is selected out of a return address register 106, stored in the program counter 101 and branched. Therefore, it is not necessary to add the branching instruction to the end of addition/change/ reduction program.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明はプログラム変更装置
に係り、特にプログラムの設計ミスなどにより既存のプ
ログラムに変更すべき箇所や追加すべき箇所、削減すべ
き箇所が発生した場合に、プログラムの不具合部分を他
のプログラムに置き換えて実行するプログラム変更装置
に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a program changing apparatus, and more particularly to a program changing apparatus in which a program to be changed, added, or reduced due to a program design error or the like occurs. The present invention relates to a program change device that executes a program by replacing a part with another program.

【0002】[0002]

【従来の技術】図7は、特開昭61−213928号公
報に開示された、従来のプログラム変更装置の第1の例
の構成図を示す。このプログラム変更装置は、実行中の
プログラムアドレスを保持するプログラムカウンタ10
1と、プログラムの追加、変更を行うべきアドレスを保
持する分岐元アドレスレジスタ702と、イネーブル信
号によりプログラムの追加/変更/削減が許可された場
合に、プログラムカウンタ101が示す実行アドレスと
分岐元アドレスレジスタ702が保持する分岐元アドレ
スとを比較するアドレス比較器703と、実行アドレス
と分岐元アドレスが一致した場合に分岐すべき分岐元ア
ドレスを保持する分岐先アドレスレジスタ704と、実
行アドレスと分岐先アドレスの一致時に分岐元アドレス
+1を保持するアドレス待避レジスタ405とから構成
されている。
2. Description of the Related Art FIG. 7 is a block diagram of a first example of a conventional program changing apparatus disclosed in Japanese Patent Laid-Open Publication No. Sho 61-213928. This program changing device includes a program counter 10 for holding a program address being executed.
1, a branch source address register 702 for holding an address where a program is to be added or changed, and an execution address and a branch source address indicated by the program counter 101 when addition / change / reduction of the program is permitted by an enable signal. An address comparator 703 that compares the branch source address held by the register 702; a branch destination address register 704 that stores a branch source address to be branched when the execution address matches the branch source address; An address save register 405 holds the branch source address +1 when the addresses match.

【0003】次に、この従来例の動作について、図8の
フローチャートと共に説明する。修正すべき箇所を含ん
だ従来プログラムの実行を開始する場合、まず始めに追
加/変更/削減するプログラムをプログラム変更装置が
実行可能な領域に読み込み、従来プログラムにおいて変
更又は追加又は削減すべきアドレスを分岐元アドレスレ
ジスタ702に設定し、追加/変更/削減プログラムの
先頭アドレスを分岐先レジスタ704に格納する(ステ
ップ801)。
Next, the operation of this conventional example will be described with reference to the flowchart of FIG. When starting the execution of a conventional program including a portion to be corrected, first, a program to be added / changed / reduced is read into an area executable by the program change device, and an address to be changed or added or reduced in the conventional program is read. The start address of the addition / change / reduction program is set in the branch source address register 702 and stored in the branch destination register 704 (step 801).

【0004】次に、イネーブル信号によりアドレス比較
器703での実行アドレスと分岐元アドレスの比較動作
を許可し(ステップ802)、プログラムカウンタ10
1は順次アドレスをインクリメントして、従来プログラ
ムを実行する。このとき、アドレス比較器703で実行
アドレスと分岐元アドレスが比較され(ステップ80
3)、両者が一致すると、分岐先アドレスレジスタ70
4はプログラムカウンタ101を追加/変更/削減プロ
グラムの先頭アドレスに書き換えて分岐を行う(ステッ
プ804)。同時に、アドレス待避レジスタ405は分
岐前のプログラムカウンタ101のアドレスをインクリ
メントして戻りアドレスとして保持する。
Next, the operation of comparing the execution address and the branch source address in the address comparator 703 is permitted by the enable signal (step 802), and the program counter 10
1 sequentially executes the conventional program by incrementing the address. At this time, the execution address and the branch source address are compared by the address comparator 703 (step 80).
3) If they match, the branch destination address register 70
4 rewrites the program counter 101 to the start address of the addition / change / reduction program and branches (step 804). At the same time, the address save register 405 increments the address of the program counter 101 before branching and holds the incremented value as a return address.

【0005】追加/変更/削減プログラムの実行が行わ
れ(ステップ805)、その追加/変更/削減プログラ
ムの実行の完了が検出されると(ステップ806)、ア
ドレス待避レジスタ405が保持する分岐前のアドレス
+1をプログラムカウンタ101に書き戻して従来のプ
ログラムに分岐し(ステップ807)、従来プログラム
の実行を再開する(ステップ808)。そして、ステッ
プ808の従来プログラムの実行再開後は、従来プログ
ラムの実行完了かどうか判定され(ステップ809)、
実行完了でないときは再びステップ803に戻ってアド
レス比較器703で実行アドレスと分岐元アドレスが比
較される。
When the execution of the addition / change / reduction program is performed (step 805) and the completion of the execution of the addition / change / reduction program is detected (step 806), the address save register 405 stores the information before branching. The address +1 is written back to the program counter 101 to branch to the conventional program (step 807), and the execution of the conventional program is resumed (step 808). After the execution of the conventional program is resumed in step 808, it is determined whether the execution of the conventional program is completed (step 809).
If the execution is not completed, the process returns to step 803 again and the address comparator 703 compares the execution address with the branch source address.

【0006】ステップ803で実行アドレスと分岐元ア
ドレスが不一致と判定されたときは、従来プログラムが
実行される(ステップ808)。以下、上記と同様にし
て、従来プログラムの実行完了まで、上記のステップ8
03〜809の処理が繰り返される。
If it is determined in step 803 that the execution address does not match the branch source address, the conventional program is executed (step 808). Thereafter, in the same manner as described above, until the execution of the conventional program is completed, the above-described step 8 is performed.
Steps 03 to 809 are repeated.

【0007】プログラムカウンタ101は分岐先アドレ
スレジスタ702、アドレス待避レジスタ405からの
アドレス設定による分岐以外にも、分岐命令による分岐
先アドレスBR、サブルーチンコール命令による分岐先
アドレスSUB、リターン命令による分岐先アドレスR
ETによる分岐手段を有している。
The program counter 101 includes a branch destination address BR based on a branch instruction, a branch destination address SUB based on a subroutine call instruction, and a branch destination address based on a return instruction, in addition to the branch based on the address setting from the branch destination address register 702 and the address saving register 405. R
It has a branching means by ET.

【0008】なお、戻りアドレスレジスタ405は常に
分岐前のアドレス+1を書き戻すため、第1の従来例で
は、従来プログラム中の1命令のみを、追加/変更/削
減プログラムに置き換えることしかできなかった。図9
は従来プログラムの命令4を追加/変更/削減プログラ
ムの変更命令1、変更命令2、変更命令3に置き換えて
いる様子を示している。
Since the return address register 405 always writes back the address +1 before the branch, in the first conventional example, only one instruction in the conventional program can be replaced with an addition / change / reduction program. . FIG.
Shows that the instruction 4 of the conventional program is replaced with the change instruction 1, the change instruction 2, and the change instruction 3 of the addition / change / reduction program.

【0009】次に、従来のプログラム変更装置の第2の
例について説明する。図10は特開平7−325711
号公報に開示された、従来のプログラム変更装置の第2
の例の構成図を示す。このプログラム変更装置と図7に
示した従来の第1の例との相違点は、テーブル状に配置
された複数の分岐元アドレスを保持する分岐元アドレス
レジスタ102と、それぞれの分岐元アドレスレジスタ
102に対応した複数の分岐先アドレスを保持する分岐
先アドレスレジスタ104とを有している点と、アドレ
ス比較器103が複数の分岐元アドレスと実行アドレス
とを比較している点と、アドレス待避レジスタを有して
いない点である。その他は従来の第1の例と同じである
のでその説明は省略する。
Next, a second example of the conventional program changing apparatus will be described. FIG.
Of the conventional program change device disclosed in
FIG. The difference between this program changing apparatus and the first conventional example shown in FIG. 7 is that a branch source address register 102 for holding a plurality of branch source addresses arranged in a table and a respective branch source address register 102 , A branch destination address register 104 for holding a plurality of branch destination addresses corresponding to the above, an address comparator 103 comparing a plurality of branch source addresses with an execution address, and an address save register. It is a point which does not have. The other parts are the same as the first example of the related art, and the description thereof is omitted.

【0010】次に、この従来の第2の例の動作につい
て、従来の第1の例との相違点を中心に図11のフロー
チャートを併せ参照して説明する。図10の従来装置で
は、まず、変更/追加/削減すべき複数のアドレスを分
岐元アドレスレジスタ102に設定し、それぞれの分岐
元アドレスに対応する複数の追加/変更/削減プログラ
ムの先頭アドレスを分岐先プログラム104に格納する
(ステップ1101)。次に、イネーブル信号によりア
ドレス比較器103でのアドレス比較を許可し、従来の
プログラムを実行する(ステップ1102)。
Next, the operation of the second conventional example will be described with reference to the flowchart of FIG. 11 focusing on the differences from the first conventional example. In the conventional apparatus of FIG. 10, first, a plurality of addresses to be changed / added / reduced are set in the branch source address register 102, and the start addresses of the plurality of addition / change / reduction programs corresponding to the respective branch source addresses are branched. It is stored in the destination program 104 (step 1101). Next, the address comparison in the address comparator 103 is permitted by the enable signal, and the conventional program is executed (step 1102).

【0011】続いて、実行アドレスが分岐元アドレスの
うちの一つと一致するかどうか判定し(ステップ110
3)、一致した場合は分岐先アドレスレジスタ104は
プログラムカウンタ101を、一致した分岐元アドレス
に対応した分岐先アドレスに書き換えて分岐を行う(ス
テップ1104)。続いて、追加/変更/削減プログラ
ムの実行が行われる(ステップ1105)。このとき、
この従来の第2の例では後述の戻りアドレスを保持する
手段を持たない。そのため、分岐先の追加/変更/削減
プログラムの実行が完了する際には、追加/変更/削減
プログラムの中で分岐命令を実行し、従来プログラムの
戻るべき任意のアドレスに分岐し(ステップ110
7)、従来プログラムの実行を再開する(ステップ11
08)。
Subsequently, it is determined whether or not the execution address matches one of the branch source addresses (step 110).
3) If there is a match, the branch destination address register 104 rewrites the program counter 101 to a branch destination address corresponding to the matched branch source address and performs branching (step 1104). Subsequently, the addition / change / reduction program is executed (step 1105). At this time,
In the second conventional example, there is no means for holding a return address described later. Therefore, when the execution of the addition / change / reduction program at the branch destination is completed, a branch instruction is executed in the addition / change / reduction program, and the program branches to an arbitrary address to which the conventional program returns (step 110).
7), execution of the conventional program is resumed (step 11)
08).

【0012】追加/変更/削減プログラムの実行が完了
するまで当該プログラムの実行が行われる(ステップ1
106)。このように、従来の第2の例では、複数の分
岐先アドレス、複数の分岐元アドレスを保持することに
より、複数箇所のプログラムを追加/変更/削減できる
手段を提供している。また、分岐命令により任意のアド
レスに復帰するため、複数命令に跨った不具合プログラ
ムを追加/変更/削減プログラムに置き換えることがで
きる。
The execution of the addition / change / reduction program is executed until the execution of the program is completed (step 1).
106). As described above, the second example of the related art provides a means for adding / changing / reducing programs at a plurality of locations by holding a plurality of branch destination addresses and a plurality of branch source addresses. In addition, since a branch instruction is used to return to an arbitrary address, a defective program that spans a plurality of instructions can be replaced with an addition / change / reduction program.

【0013】そして、ステップ1108の従来プログラ
ムの実行再開後は、従来プログラムの実行完了かどうか
判定され(ステップ1109)、実行完了でないときは
再びステップ1103に戻ってアドレス比較器103で
実行アドレスと分岐元アドレスが比較される。ステップ
1103で実行アドレスと分岐元アドレスが不一致と判
定されたときは、従来プログラムが実行される(ステッ
プ1108)。以下、上記と同様にして、従来プログラ
ムの実行完了まで、上記のステップ1103〜1109
の処理が繰り返される。
After resuming the execution of the conventional program in step 1108, it is determined whether the execution of the conventional program is completed (step 1109). If the execution is not completed, the process returns to step 1103 and the address comparator 103 branches to the execution address. The original addresses are compared. If it is determined in step 1103 that the execution address does not match the branch source address, the conventional program is executed (step 1108). Thereafter, in the same manner as above, steps 1103 to 1109 are performed until the execution of the conventional program is completed.
Is repeated.

【0014】図12は従来プログラムの命令4、命令5
を変更命令1、変更命令2、分岐命令に置き換えている
様子を示す。なお、従来例における追加/変更/削減プ
ログラムの読み込み手段については、特開平7−325
711号公報に例示されているので説明を省略する。
FIG. 12 shows instructions 4 and 5 of the conventional program.
Is replaced with a change instruction 1, a change instruction 2, and a branch instruction. The means for reading the addition / change / reduction program in the conventional example is disclosed in Japanese Patent Laid-Open No. 7-325.
The description is omitted because it is exemplified in Japanese Patent Publication No. 711.

【0015】[0015]

【発明が解決しようとする課題】しかるに、図7に示し
たアドレス待避レジスタ405を有する従来のプログラ
ム変更装置では、アドレス待避レジスタ405に保持す
る戻りアドレスが元の実行アドレス+1という値に限ら
れているため、1命令に対してのみの追加/変更しか許
されておらず、複数命令にまたがったプログラムの不具
合を置き換えることができない。
However, in the conventional program changing apparatus having the address saving register 405 shown in FIG. 7, the return address held in the address saving register 405 is limited to the original execution address + 1. Therefore, only addition / change is allowed for only one instruction, and it is not possible to replace a defect in a program extending over a plurality of instructions.

【0016】また、図10に示した分岐命令を用いて復
帰する従来のプログラム変更装置では、従来プログラム
に戻る戻りアドレスについては考慮されておらず、従来
命令の復帰に通常の分岐命令を使用せざるを得ないた
め、追加/変更/削減プログラムの中で、戻り番地の生
成を行わねばならず、本来必要な追加/変更/削減プロ
グラムに、復帰アドレス情報を含んだ分岐命令を追加す
ることとなり、修正すべき元のプログラムに比較して追
加/変更/削減プログラムの実行時間が長くなり、所定
の時間内にプログラムの実行が収まらなくなる危険があ
る。
Further, in the conventional program changing apparatus which returns by using the branch instruction shown in FIG. 10, the return address for returning to the conventional program is not considered, and the normal branch instruction is used for the return of the conventional instruction. Inevitably, the return address must be generated in the addition / change / reduction program, and a branch instruction including return address information is added to the originally required addition / change / reduction program. The execution time of the addition / change / reduction program is longer than that of the original program to be corrected, and there is a danger that the execution of the program will not be completed within a predetermined time.

【0017】特に変更されるべきプログラムが、タイミ
ング的に厳しい制約を受けている場合や、繰り返し実行
されるような場合には、実行時間の増加はシステムの性
能に致命的な影響を及ぼす可能性がある。
Particularly, when a program to be changed is severely restricted in terms of timing or is repeatedly executed, an increase in execution time may have a fatal effect on system performance. There is.

【0018】本発明は以上の点に鑑みなされたもので、
複数の命令にまたがるプログラム不具合の追加/変更/
削減を最小限の処理時間で実行し得るプログラム変更装
置を提供することを目的とする。
The present invention has been made in view of the above points,
Add / change / defect program defects that span multiple instructions
It is an object of the present invention to provide a program change device capable of executing reduction with a minimum processing time.

【0019】[0019]

【課題を解決するための手段】本発明は上記の目的を達
成するため、実行中のプログラムアドレスを保持するプ
ログラムカウンタと、従来プログラムの追加/変更/削
減するアドレスを分岐元アドレスとして保持する分岐元
アドレス保持手段と、分岐元アドレスに対応する追加/
変更/削減プログラムの先頭アドレスを分岐先アドレス
として保持する分岐先アドレス保持手段と、追加/変更
/削減プログラムの完了時の分岐元アドレスに対応する
戻りアドレスを保持又は生成する戻りアドレス発生手段
と、イネーブル信号によりプログラムの追加/変更/削
減が許可された場合に、プログラムカウンタよりの実行
アドレスと分岐元アドレス保持手段からの分岐元アドレ
スとを比較し一致したときに、一致した分岐元アドレス
に対応する分岐先アドレスを分岐先アドレス保持手段か
ら出力してプログラムカウンタに格納して追加/変更/
削減プログラムに分岐させるアドレス比較手段と、追加
/変更/削減プログラムの実行完了時に、戻りアドレス
発生手段よりの戻りアドレスを実行アドレスとしてプロ
グラムカウンタに格納して従来プログラムに分岐して従
来プログラムを実行する制御手段とを有する構成とした
ものである。
In order to achieve the above object, the present invention provides a program counter for holding a program address being executed and a branch for holding an address to be added / changed / reduced in a conventional program as a branch source address. Source address holding means and addition / deletion corresponding to the branch source address
Branch destination address holding means for holding the start address of the change / reduction program as a branch destination address, return address generation means for holding or generating a return address corresponding to the branch source address when the addition / change / reduction program is completed, When the addition / change / reduction of the program is permitted by the enable signal, the execution address from the program counter is compared with the branch source address from the branch source address holding means, and when they match, the corresponding branch source address is matched. The branch destination address to be output is output from the branch destination address holding means, stored in the program counter, and added / changed /
Address comparison means for branching to the reduction program, and upon completion of execution of the addition / change / reduction program, the return address from the return address generation means is stored in the program counter as the execution address, and the program is branched to the conventional program to execute the conventional program. And a control means.

【0020】本発明では、実行アドレスと分岐元アドレ
スとが一致したときに、一致した分岐元アドレスに対応
する分岐先アドレスをプログラムカウンタに格納して追
加/変更/削減プログラムに分岐させて実行させ、追加
/変更/削減プログラムの実行完了時に、分岐元アドレ
スに対応する戻りアドレスを実行アドレスとしてプログ
ラムカウンタに格納して従来プログラムに分岐して従来
プログラムを実行するようにしているため、分岐命令を
付加することなく、従来プログラムを追加/変更/削減
プログラムに置き換えることができる。
According to the present invention, when the execution address matches the branch source address, the branch destination address corresponding to the matched branch source address is stored in the program counter, and the program is branched to the addition / change / reduction program and executed. When the execution of the addition / change / reduction program is completed, the return address corresponding to the branch source address is stored in the program counter as the execution address, the program is branched to the conventional program, and the conventional program is executed. A conventional program can be replaced with an addition / change / reduction program without addition.

【0021】また、本発明では、アドレス比較手段によ
り実行アドレスと分岐元アドレス保持手段からの分岐元
アドレスとの一致が判定されたときに、そのときの実行
アドレスに+1加算した値を保持するアドレス待避手段
と、分岐元アドレスに対応して変更されるべきプログラ
ムのサイズ情報に−1した値を保持する変更サイズ保持
手段と、アドレス待避手段が保持する内容と変更サイズ
保持手段が保持する内容とを加算する加算手段とを戻り
アドレス発生手段に代えて有するか、又は分岐元アドレ
スに対応して変更されるべきプログラムのサイズ情報を
保持する変更サイズ保持手段と、アドレス比較手段によ
り実行アドレスと分岐元アドレス保持手段からの分岐元
アドレスとの一致が判定されたときの分岐元アドレス保
持手段の分岐元アドレスと変更サイズ保持手段が保持す
る内容とを加算する加算手段とを戻りアドレス発生手段
に代えて有する構成とし、制御手段は追加/変更/削減
プログラムの完了時に、加算手段の出力アドレスをプロ
グラムカウンタに格納して従来プログラムに分岐して従
来プログラムを実行する構成としたものである。
According to the present invention, when the address comparing means determines that the execution address matches the branch source address from the branch source address holding means, the address holding the value obtained by adding +1 to the execution address at that time. Saving means, changing size holding means for holding a value equal to -1 to size information of a program to be changed corresponding to the branch source address, contents held by the address saving means and contents held by the changing size holding means Or a change size holding means for holding size information of a program to be changed corresponding to a branch source address, and an execution address and a branch by an address comparing means. The branch source address of the branch source address holding unit when a match with the branch source address from the source address holding unit is determined. And an adder for adding the contents held by the change size holding means in place of the return address generating means. When the addition / change / reduction program is completed, the control means sets the output address of the addition means to a program counter. And branch to the conventional program to execute the conventional program.

【0022】この発明でも、分岐命令を付加することな
く、従来プログラムを追加/変更/削減プログラムに置
き換えることができる。
According to the present invention, a conventional program can be replaced with an addition / change / reduction program without adding a branch instruction.

【0023】更に、本発明では、分岐元アドレス保持手
段は、分岐元アドレスを複数テーブル状に配置して保持
し、分岐先アドレス保持手段は、複数の分岐元アドレス
にそれぞれ対応した複数の分岐先アドレスをテーブル状
に配置して保持することを特徴とする。
Further, in the present invention, the branch source address holding means arranges and holds a plurality of branch source addresses in a table form, and the branch destination address holding means stores a plurality of branch destination addresses respectively corresponding to the plurality of branch source addresses. It is characterized in that addresses are arranged and held in a table.

【0024】この発明では、従来プログラムの複数の命
令を、分岐命令を付加することなく、追加/変更/削減
プログラムに置き換えることができる。従って、追加/
変更/削減プログラムのうち、分岐命令に費やしていた
実行時間を削減することができる。
According to the present invention, a plurality of instructions of the conventional program can be replaced with an addition / change / reduction program without adding a branch instruction. Therefore, add /
Of the change / reduction programs, the execution time spent on branch instructions can be reduced.

【0025】[0025]

【発明の実施の形態】次に、本発明の実施の形態につい
て図面と共に説明する。図1は本発明になるプログラム
変更装置の第1の実施の形態の構成図を示す。この実施
の形態のプログラム変更装置は、プログラムカウンタ1
01、分岐元アドレスレジスタ102、アドレス比較器
103、分岐先アドレスレジスタ104、及び戻りアド
レスレジスタ106から構成されている。ここで、分岐
元アドレスレジスタ102、アドレス比較器103及び
分岐先アドレスレジスタ104は、従来装置の第2の例
と同じものである。
Next, embodiments of the present invention will be described with reference to the drawings. FIG. 1 shows a configuration diagram of a first embodiment of a program change device according to the present invention. The program changing device according to the present embodiment has a program counter 1
01, a branch source address register 102, an address comparator 103, a branch destination address register 104, and a return address register 106. Here, the branch source address register 102, the address comparator 103, and the branch destination address register 104 are the same as those in the second example of the conventional device.

【0026】プログラムカウンタ101は、実行中のプ
ログラムアドレスを保持する。分岐元アドレスレジスタ
102は、テーブル状に配置された複数の分岐元アドレ
スを保持する。アドレス比較器103はイネーブル信号
によりプログラムの追加/変更/削減が許可された場合
に、実行アドレスと分岐元アドレスとを比較する。分岐
先アドレスレジスタ104は、それぞれの分岐元アドレ
スに対応した複数の分岐先アドレスを保持する。
The program counter 101 holds a program address being executed. The branch source address register 102 holds a plurality of branch source addresses arranged in a table. The address comparator 103 compares the execution address with the branch source address when the addition / change / reduction of the program is permitted by the enable signal. The branch destination address register 104 holds a plurality of branch destination addresses corresponding to each branch source address.

【0027】戻りアドレスレジスタ106は、それぞれ
の分岐元アドレスに対応してテーブル状に配置された複
数の戻りアドレスを保持し、追加/変更/削減プログラ
ムの完了時に分岐元アドレスに対応した戻りアドレスを
プログラムカウンタ101に出力する。プログラムの追
加/変更/削減の際には、追加/変更/削減されたプロ
グラムを現在実行中のプログラム(従来プログラム)と
は別の領域に作成する。
The return address register 106 holds a plurality of return addresses arranged in a table corresponding to the respective branch source addresses, and stores the return address corresponding to the branch source address when the addition / change / reduction program is completed. Output to the program counter 101. When a program is added / changed / reduced, the added / changed / reduced program is created in a different area from the currently executing program (conventional program).

【0028】この第1の実施の形態は、予め戻りアドレ
スレジスタ106に追加/変更/削減プログラムの完了
時の戻りアドレスを設定しておく点と、追加/変更/削
減プログラムの完了時に分岐命令を用いず、戻りアドレ
スレジスタ106の有する分岐元アドレスに対応した戻
りアドレスをプログラムカウンタ101に格納して分岐
する点が、図10の従来の第2の例と異なる。
The first embodiment is different from the first embodiment in that a return address at the time of completion of the addition / change / reduction program is set in the return address register 106 in advance. This is different from the second conventional example in FIG. 10 in that the return address corresponding to the branch source address of the return address register 106 is stored in the program counter 101 and branching is not performed.

【0029】次に、この第1の実施の形態の動作につい
て、図2のフローチャートを併せ参照して説明する。ま
ず、変更/追加/削減すべき複数のアドレスを分岐元ア
ドレスレジスタ102に設定し、それぞれの分岐元アド
レスに対応する複数の追加/変更/削減プログラムの先
頭アドレスを分岐先アドレスレジスタ104に格納し、
それぞれの分岐元アドレスに対応してテーブル状に配置
された複数の戻りアドレスを戻りアドレスレジスタ10
6に格納する(ステップ201)。
Next, the operation of the first embodiment will be described with reference to the flowchart of FIG. First, a plurality of addresses to be changed / added / reduced are set in the branch source address register 102, and head addresses of a plurality of addition / change / reduction programs corresponding to the respective branch source addresses are stored in the branch destination address register 104. ,
A plurality of return addresses arranged in a table corresponding to each branch source address are stored in a return address register 10.
6 (step 201).

【0030】次に、イネーブル信号によりアドレス比較
器103でのアドレス比較を許可し、従来のプログラム
を実行する(ステップ202)。プログラムカウンタ1
01は順次アドレスをインクリメントして、従来プログ
ラムを実行する。このとき、アドレス比較器103でプ
ログラムカウンタ101よりの実行アドレスと分岐元ア
ドレスレジスタ102よりの分岐元アドレスが比較され
る(ステップ203)。両者が一致すると、そのときの
アドレス比較器103の出力一致信号に基づき、分岐先
アドレスレジスタ104は一致した分岐元アドレスに対
応する分岐先アドレスをプログラムカウンタ101に格
納して、追加/変更/削減プログラムに分岐する(ステ
ップ204)。
Next, the address comparison in the address comparator 103 is permitted by the enable signal, and the conventional program is executed (step 202). Program counter 1
01 sequentially increments the address and executes the conventional program. At this time, the address comparator 103 compares the execution address from the program counter 101 with the branch source address from the branch source address register 102 (step 203). If they match, the branch destination address register 104 stores the branch destination address corresponding to the matched branch source address in the program counter 101 based on the output match signal of the address comparator 103 at that time, and adds / changes / reduces. The process branches to a program (step 204).

【0031】続いて、追加/変更/削減プログラムの実
行が行われる(ステップ205)。そして、分岐先の追
加/変更/削減プログラムの実行が完了しかたどうか監
視され(ステップ206)、完了した際には、この実施
の形態のプログラム変更装置は、予め戻りアドレスレジ
スタ106に格納された戻りアドレスのうち、アドレス
比較器103で一致した分岐元アドレスに対応する戻り
アドレスを選択して、プログラムカウンタ101に格納
して分岐する。従って、この実施の形態では、追加/変
更/削減プログラムの末尾に分岐命令を付加しておく必
要がない。
Subsequently, the addition / change / reduction program is executed (step 205). Then, it is monitored whether or not the execution of the branch destination addition / change / reduction program has been completed (step 206). When the execution is completed, the program change device of this embodiment stores the return address stored in the return address register 106 in advance. Among the addresses, the address comparator 103 selects a return address corresponding to the coincident branch source address, stores the selected return address in the program counter 101, and branches. Therefore, in this embodiment, it is not necessary to add a branch instruction at the end of the addition / change / reduction program.

【0032】その後は、従来の第2の例と同様に、従来
プログラムの実行を再開し(ステップ208)、追加/
変更/削減プログラムの実行が完了するまで当該プログ
ラムの実行が行われる(ステップ206)。その際に実
行アドレスと分岐元アドレスが一致した場合は、再びス
テップ204〜209の処理が繰り返される。
Thereafter, as in the second conventional example, the execution of the conventional program is resumed (step 208), and
The execution of the change / reduction program is performed until the execution of the program is completed (step 206). If the execution address matches the branch source address at that time, the processing of steps 204 to 209 is repeated again.

【0033】図3は、この第1の実施の形態の命令の変
更の様子を示す。同図に示すように、第1の実施の形態
では、従来プログラムの命令4、命令5を変更命令1と
変更命令2に置き換えた場合、追加/変更/削減プログ
ラムの命令の後に分岐命令を付加する必要がないので、
プログラムの実行時間が延びなくて済むという特長があ
る。
FIG. 3 shows how instructions are changed in the first embodiment. As shown in the figure, in the first embodiment, when instructions 4 and 5 of the conventional program are replaced with change instructions 1 and 2, a branch instruction is added after the instruction of the add / change / reduction program. You do n’t have to
The feature is that the program execution time does not need to be extended.

【0034】次に、本発明の第2の実施の形態について
説明する。図4は本発明になるプログラム変更装置の第
2の実施の形態の構成図を示す。同図中、図1と同一構
成部分には同一符号を付し、その説明を省略する。図4
に示すプログラム変更装置は、第1の実施の形態が有す
る戻りアドレスレジスタ106の代わりに、アドレス待
避レジスタ405、変更サイズレジスタ407及び加算
器408を設けた点に特徴がある。
Next, a second embodiment of the present invention will be described. FIG. 4 shows a configuration diagram of a second embodiment of the program change device according to the present invention. In the figure, the same components as those of FIG. 1 are denoted by the same reference numerals, and description thereof will be omitted. FIG.
Is characterized in that an address save register 405, a change size register 407, and an adder 408 are provided in place of the return address register 106 of the first embodiment.

【0035】ここで、アドレス待避レジスタ405は、
アドレス一致時にそれまでの実行アドレスに+1加算し
た値(すなわち実行アドレス+1)を保持する。変更サ
イズレジスタ407は、それぞれの分岐元アドレスに対
応してテーブル状に配置された複数の変更されるべきプ
ログラムのサイズ情報を保持する。加算器408は、追
加/変更/削減プログラムの完了時に、アドレス待避レ
ジスタ405が保持する内容と変更サイズレジスタ40
7が保持する変更されるべきプログラムサイズとを加算
して、プログラムカウンタ101に出力する。
Here, the address save register 405 is
When an address matches, a value obtained by adding +1 to the previous execution address (that is, execution address + 1) is held. The change size register 407 holds size information of a plurality of programs to be changed arranged in a table corresponding to each branch source address. When the addition / change / reduction program is completed, the adder 408 stores the contents held by the address save register 405 and the change size register 40.
7 is added to the program size to be changed, which is held in 7, and the result is output to the program counter 101.

【0036】この第2の実施の形態と、図10に示した
従来の第2の例との相違は、アドレスの一致時にプログ
ラムカウンタ101に保持している実行アドレスに+1
した値をアドレス待避レジスタ405に格納して保持す
る点と、始めに変更サイズレジスタ407に変更される
べき元のプログラムサイズに−1した値を設定しておく
点と、追加/変更/削減プログラムの完了時に、アドレ
ス待避レジスタ405の内容と変更サイズレジスタ40
7の内容とを加算器408で加算してプログラムカウン
タ101に格納して分岐する点である。
The difference between the second embodiment and the second conventional example shown in FIG. 10 is that the execution address held in the program counter 101 is incremented by +1 when the addresses match.
Storing the changed value in the address save register 405, holding the changed size register 407 at first with a value smaller than the original program size to be changed, and adding / changing / reducing the program. Is completed, the contents of the address save register 405 and the change size register 40
7 is added by the adder 408, stored in the program counter 101, and branched.

【0037】次に、この実施の形態の動作について、図
5のフローチャートを併せ参照して説明する。図5中、
図2と同一の処理ステップには同一符号を付し、その説
明を省略する。この実施の形態では、まず、まず、変更
/追加/削減すべき複数のアドレスを分岐元アドレスレ
ジスタ102に設定し、それぞれの分岐元アドレスに対
応する複数の追加/変更/削減プログラムの先頭アドレ
スを分岐先アドレスレジスタ104に格納し、変更され
るべき元のプログラムサイズに−1した値を変更サイズ
レジスタ407に設定する(ステップ501)。
Next, the operation of this embodiment will be described with reference to the flowchart of FIG. In FIG.
The same processing steps as those in FIG. 2 are denoted by the same reference numerals, and description thereof will be omitted. In this embodiment, first, a plurality of addresses to be changed / added / reduced are set in the branch source address register 102, and the start addresses of the plurality of addition / change / reduction programs corresponding to the respective branch source addresses are set. It is stored in the branch destination address register 104, and a value obtained by subtracting -1 from the original program size to be changed is set in the change size register 407 (step 501).

【0038】次に、イネーブル信号によりアドレス比較
器103でのアドレス比較を許可し、従来のプログラム
を実行し(ステップ202)、実行アドレスと分岐元ア
ドレスが一致すると(ステップ203)、プログラムカ
ウンタ101に保持している実行アドレス(これはこの
とき分岐元アドレスに等しい)に+1した値をアドレス
待避レジスタ405に格納して保持すると共に、アドレ
ス比較器103の出力一致信号に基づき、分岐先アドレ
スレジスタ104は一致した分岐元アドレスに対応した
分岐先アドレスをプログラムカウンタ101に格納し
て、追加/変更/削減プログラムに分岐する(ステップ
502)。
Next, the address comparison in the address comparator 103 is permitted by the enable signal, and the conventional program is executed (step 202). When the execution address matches the branch source address (step 203), the program counter 101 A value obtained by adding +1 to the held execution address (which is equal to the branch source address at this time) is stored and held in the address save register 405, and based on the output coincidence signal of the address comparator 103, the branch destination address register 104 Stores the branch destination address corresponding to the coincident branch source address in the program counter 101, and branches to the addition / change / reduction program (step 502).

【0039】続いて、追加/変更/削減プログラムが実
行され(ステップ205)分岐先の追加/変更/削減プ
ログラムの実行が完了しかたどうか監視され(ステップ
206)、完了した際には、アドレス待避レジスタ40
5に待避されているアドレス(分岐元アドレス+1)
と、変更サイズレジスタ407に予め設定されているサ
イズ情報(例えば、従来プログラムの2命令を変更する
場合には、2−1=1)とが加算器408で加算され、
その加算結果がプログラムカウンタ101に格納されて
分岐し(ステップ503)、従来プログラムに復帰し再
び実行開始される(ステップ208)。以下の動作は、
第1の実施の形態と同様である。
Subsequently, the addition / change / reduction program is executed (step 205), and it is monitored whether or not the execution of the addition / change / reduction program at the branch destination is completed (step 206). 40
Address saved at 5 (branch source address + 1)
And size information preset in the change size register 407 (for example, 2-1 = 1 when two instructions of the conventional program are changed) are added by the adder 408,
The result of the addition is stored in the program counter 101 and branches (step 503), and the program returns to the conventional program and starts executing again (step 208). The following behavior
This is the same as in the first embodiment.

【0040】この実施の形態においても、追加/変更/
削減プログラムに分岐命令を付加しておく必要がないこ
とは明らかである。また、アドレス待避レジスタ405
に分岐元アドレス+1を待避する代わりに、分岐元アド
レスを待避することも可能であり、この場合には変更サ
イズレジスタ407には、変更されるべき元のプログラ
ムサイズを設定しておけばよい。
Also in this embodiment, addition / change /
Obviously, it is not necessary to add a branch instruction to the reduction program. Also, the address save register 405
Instead of saving the branch source address + 1, the branch source address can be saved. In this case, the original program size to be changed may be set in the change size register 407.

【0041】第1の実施の形態に比べ、この実施の形態
では、戻りアドレスの代わりに変更されるべきプログラ
ムのサイズをテーブルとして保持することになるが、一
般に、アドレスに比べて変更されるべきプログラムのサ
イズは小さいので、当該サイズ情報を保持すべき変更サ
イズレジスタ407の語長を小さく構成することができ
る。
Compared to the first embodiment, in this embodiment, the size of the program to be changed is stored as a table in place of the return address, but generally, the size of the program to be changed should be compared with the address. Since the size of the program is small, the word length of the change size register 407 that should hold the size information can be configured to be small.

【0042】例えば、64kバイトのプログラム空間を
有し、変更サイズを最大256バイトとすると、第1の
実施の形態では(16ビット×分岐元アドレスの最大本
数)分のレジスタが必要になるのに対し、第2の実施の
形態では、(8ビット×分岐元アドレスの最大本数)分
のレジスタを持てばよい。また、加算器408が増加し
ているように見えるが、一般の情報処理装置では、演算
処理用の加算器やアドレス計算用の加算器を元来有して
いるので、これらを利用することにより、回路量の増大
を回避することが可能である。
For example, if a program space of 64 Kbytes is provided and the change size is 256 bytes at the maximum, the first embodiment requires registers of (16 bits × the maximum number of branch source addresses). On the other hand, in the second embodiment, it is sufficient to have (8 bits × the maximum number of branch source addresses) registers. Although the number of the adders 408 seems to be increasing, a general information processing device originally has an adder for arithmetic processing and an adder for address calculation. It is possible to avoid an increase in the amount of circuits.

【0043】次に、本発明の第3の実施の形態について
説明する。図6は本発明になるプログラム変更装置の第
3の実施の形態の構成図を示す。同図中、図4と同一構
成部分には同一符号を付し、その説明を省略する。図6
に示すプログラム変更装置は、第2の実施の形態が有す
るアドレス待避レジスタ405と変更サイズレジスタ4
07の各内容を加算器408で加算する構成の代わり
に、分岐元レジスタ102の内容と変更サイズレジスタ
407の内容を加算器608で加算してプログラムカウ
ンタ101へ出力する構成とした点に特徴がある。
Next, a third embodiment of the present invention will be described. FIG. 6 shows a configuration diagram of a third embodiment of the program change apparatus according to the present invention. 4, the same components as those of FIG. 4 are denoted by the same reference numerals, and the description thereof will be omitted. FIG.
The program change device shown in FIG. 7 is composed of an address save register 405 and a change size register 4 provided in the second embodiment.
07 is added by the adder 408, and the content of the branch source register 102 and the content of the change size register 407 are added by the adder 608 and output to the program counter 101. is there.

【0044】第2の実施の形態でアドレス待避レジスタ
405に格納される元となった実行アドレスは、分岐元
アドレスと一致しているから、変更サイズレジスタ40
7に変更されるべき元のプログラムサイズ数を格納して
おくことにより、加算器608により分岐元アドレスレ
ジスタ102からの分岐元アドレスと、変更サイズレジ
スタ407からの変更されるべき元のプログラムサイズ
とを加算することで、第2の実施の形態の加算器408
の加算結果と同じ加算結果を生成することができる。
Since the original execution address stored in the address save register 405 in the second embodiment matches the branch source address, the change size register 40
7, the adder 608 stores the original program size number to be changed, the adder 608 stores the branch source address from the branch source address register 102, and the original program size to be changed from the change size register 407. Is added, the adder 408 according to the second embodiment is added.
Can be generated.

【0045】第3の実施の形態のその他の動作は第2の
実施の形態と同様なので、その説明は省略する。この第
3の実施の形態は、第2の実施の形態と同じ特長を有し
ながら、更にアドレス待避レジスタ405を削減できる
という特長がある。
The other operation of the third embodiment is the same as that of the second embodiment, and the description is omitted. The third embodiment has a feature that the address saving register 405 can be further reduced while having the same features as the second embodiment.

【0046】[0046]

【発明の効果】以上説明したように、本発明によれば、
追加/変更/削減プログラムの完了時に分岐命令を用い
ず、分岐元アドレスに対応した戻りアドレスをプログラ
ムカウンタに格納して分岐する戻りアドレス保持手段を
有し、あるいは、追加/変更/削減プログラムの完了時
に、アドレス待避手段の内容と変更サイズ保持手段の内
容とを加算手段で加算してプログラムカウンタに格納し
て分岐するか、あるいは、分岐元アドレス保持手段から
の分岐元アドレスと、変更サイズ保持手段からの変更さ
れるべき元のプログラムサイズとを加算手段で加算して
プログラムカウンタに格納して分岐することにより、分
岐命令を用いずに変更サイズに応じた戻りアドレスを生
成することができるため、分岐命令を付加することな
く、複数命令にまたがったプログラムの不具合を置き換
えることができ(追加/変更/削減プログラムに置き換
えることができ)、よって、追加/変更/削減プログラ
ムのうち、分岐命令に費やしていた実行時間を削減する
ことができるため、追加/変更/削減プログラムの実行
時間が延びないという特長がある。
As described above, according to the present invention,
A return address holding means for storing a return address corresponding to the branch source address in a program counter and branching without using a branch instruction when the addition / change / reduction program is completed, or completion of the addition / change / reduction program In some cases, the contents of the address saving means and the contents of the changed size holding means are added by the adding means and stored in the program counter for branching, or the branch source address from the branch source address holding means and the changed size holding means By adding the original program size to be changed from and the original program size to be stored in the program counter and branching, a return address according to the changed size can be generated without using a branch instruction. Without adding branch instructions, it is possible to replace program defects that span multiple instructions. / Change / reduction program), the execution time of the addition / change / reduction program spent on the branch instruction can be reduced, and the execution time of the addition / change / reduction program is extended. There is a feature that there is no.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明の第1の実施の形態の構成図である。FIG. 1 is a configuration diagram of a first embodiment of the present invention.

【図2】図1の動作説明用フローチャートである。FIG. 2 is a flowchart for explaining the operation of FIG. 1;

【図3】図1の命令の変更の様子を示す図である。FIG. 3 is a diagram showing how the instruction shown in FIG. 1 is changed;

【図4】本発明の第2の実施の形態の構成図である。FIG. 4 is a configuration diagram of a second embodiment of the present invention.

【図5】図4の動作説明用フローチャートである。FIG. 5 is a flowchart for explaining the operation of FIG. 4;

【図6】本発明の第2の実施の形態の構成図である。FIG. 6 is a configuration diagram of a second embodiment of the present invention.

【図7】従来の第1の例の構成図である。FIG. 7 is a configuration diagram of a first conventional example.

【図8】図7の動作説明用フローチャートである。FIG. 8 is a flowchart for explaining the operation of FIG. 7;

【図9】図8の命令の変更の様子を示す図である。FIG. 9 is a diagram showing how the instruction shown in FIG. 8 is changed.

【図10】従来の第2の例の構成図である。FIG. 10 is a configuration diagram of a second conventional example.

【図11】図10の動作説明用フローチャートである。FIG. 11 is a flowchart for explaining the operation of FIG. 10;

【図12】図10の命令の変更の様子を示す図である。FIG. 12 is a diagram showing how the instruction of FIG. 10 is changed.

【符号の説明】[Explanation of symbols]

101 プログラムカウンタ 102 分岐元アドレスレジスタ 103 アドレス比較器 104 分岐先アドレスレジスタ 106 戻りアドレスレジスタ 405 アドレス待避レジスタ 407 変更サイズレジスタ 408、608 加算器 Reference Signs List 101 Program counter 102 Branch source address register 103 Address comparator 104 Branch destination address register 106 Return address register 405 Address save register 407 Change size register 408, 608 Adder

Claims (5)

【特許請求の範囲】[Claims] 【請求項1】 実行中のプログラムアドレスを保持する
プログラムカウンタと、 従来プログラムの追加/変更/削減するアドレスを分岐
元アドレスとして保持する分岐元アドレス保持手段と、 前記分岐元アドレスに対応する追加/変更/削減プログ
ラムの先頭アドレスを分岐先アドレスとして保持する分
岐先アドレス保持手段と、 追加/変更/削減プログラムの完了時の前記分岐元アド
レスに対応する戻りアドレスを保持又は生成する戻りア
ドレス発生手段と、 イネーブル信号によりプログラムの追加/変更/削減が
許可された場合に、前記プログラムカウンタよりの実行
アドレスと前記分岐元アドレス保持手段からの前記分岐
元アドレスとを比較し一致したときに、一致した該分岐
元アドレスに対応する分岐先アドレスを前記分岐先アド
レス保持手段から出力して前記プログラムカウンタに格
納して追加/変更/削減プログラムに分岐させるアドレ
ス比較手段と、 前記追加/変更/削減プログラムの実行完了時に、前記
戻りアドレス発生手段よりの戻りアドレスを前記実行ア
ドレスとして前記プログラムカウンタに格納して前記従
来プログラムに分岐して該従来プログラムを実行する制
御手段とを有することを特徴とするプログラム変更装
置。
A program counter for holding a program address being executed; branch source address holding means for holding an address to be added / changed / reduced in a conventional program as a branch source address; Branch destination address holding means for holding the start address of the change / reduction program as a branch destination address, and return address generation means for holding or generating a return address corresponding to the branch source address when the addition / change / reduction program is completed When addition / change / reduction of a program is permitted by an enable signal, the execution address from the program counter is compared with the branch source address from the branch source address holding means. Adds the branch destination address corresponding to the branch source address to the branch destination address. Address comparison means for outputting from the storage means, storing the program address in the program counter and branching to the addition / change / reduction program, and when the execution of the addition / change / reduction program is completed, the return address from the return address generation means. Control means for storing the execution address in the program counter, branching to the conventional program, and executing the conventional program.
【請求項2】 前記分岐元アドレス保持手段は、前記分
岐元アドレスを複数テーブル状に配置して保持し、前記
分岐先アドレス保持手段は、該複数の分岐元アドレスに
それぞれ対応した複数の分岐先アドレスをテーブル状に
配置して保持することを特徴とする請求項1記載のプロ
グラム変更装置。
2. The branch source address holding means arranges and stores the branch source addresses in a plurality of tables, and the branch destination address holding means stores a plurality of branch destination addresses respectively corresponding to the plurality of branch source addresses. 2. The program change apparatus according to claim 1, wherein the addresses are arranged in a table and held.
【請求項3】 前記戻りアドレス発生手段は、前記戻り
アドレスをテーブル状に配置して複数発生し、前記制御
手段は、前記前記追加/変更/削減プログラムの実行完
了時に、該複数の戻りアドレスのうち前記一致した分岐
元アドレスに対応する戻りアドレスを選択して、前記プ
ログラムカウンタに格納して前記従来プログラムに分岐
して該従来プログラムを実行することを特徴とする請求
項1又は2記載のプログラム変更装置。
3. The return address generating means generates a plurality of return addresses by arranging the return addresses in a table, and the control means, when the execution of the addition / change / reduction program is completed, returns the plurality of return addresses. 3. The program according to claim 1, wherein a return address corresponding to the coincident branch source address is selected, stored in the program counter, branched to the conventional program, and the conventional program is executed. Change device.
【請求項4】 前記アドレス比較手段により前記実行ア
ドレスと前記分岐元アドレス保持手段からの前記分岐元
アドレスとの一致が判定されたときに、そのときの実行
アドレスに+1加算した値を保持するアドレス待避手段
と、前記分岐元アドレスに対応して変更されるべきプロ
グラムのサイズ情報に−1した値を保持する変更サイズ
保持手段と、前記アドレス待避手段が保持する内容と前
記変更サイズ保持手段が保持する内容とを加算する加算
手段とを前記戻りアドレス発生手段に代えて有し、前記
制御手段は前記追加/変更/削減プログラムの完了時
に、前記加算手段の出力アドレスを前記プログラムカウ
ンタに格納して前記従来プログラムに分岐して該従来プ
ログラムを実行することを特徴とする請求項1又は2記
載のプログラム変更装置。
4. An address for holding a value obtained by adding +1 to the execution address at that time when the address comparison means determines that the execution address matches the branch source address from the branch source address holding means. Save means, change size holding means for holding a value obtained by subtracting -1 from the size information of the program to be changed corresponding to the branch source address, contents held by the address save means and held by the change size holding means And an adder for adding the contents to be added to the program counter. The controller stores the output address of the adder in the program counter when the addition / change / reduction program is completed. 3. The program change apparatus according to claim 1, wherein the program is branched to execute the conventional program. Place.
【請求項5】 前記分岐元アドレスに対応して変更され
るべきプログラムのサイズ情報を保持する変更サイズ保
持手段と、分岐元アドレス保持手段の分岐元アドレスと
前記変更サイズ保持手段が保持する内容とを加算する加
算手段とを前記戻りアドレス発生手段に代えて有し、前
記制御手段は前記追加/変更/削減プログラムの完了時
に、前記加算手段から前記アドレス比較手段により前記
実行アドレスと前記分岐元アドレスとの一致が判定され
たときの該分岐元アドレスと前記変更サイズ保持手段が
保持する内容との加算結果を、前記プログラムカウンタ
に格納して前記従来プログラムに分岐して該従来プログ
ラムを実行することを特徴とする請求項1又は2記載の
プログラム変更装置。
5. A change size holding means for holding size information of a program to be changed corresponding to the branch source address, a branch source address of the branch source address holding means, and contents held by the change size storage means. The return address generating means in place of the return address generating means. When the addition / change / reduction program is completed, the control means controls the execution address and the branch source address by the address comparing means from the adding means. Storing the result of addition of the branch source address and the content held by the change size holding means when it is determined that the address matches with the program size, stores the result in the program counter, branches to the conventional program, and executes the conventional program. 3. The program change device according to claim 1, wherein
JP9036315A 1997-02-20 1997-02-20 Program changing device Pending JPH10232772A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP9036315A JPH10232772A (en) 1997-02-20 1997-02-20 Program changing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP9036315A JPH10232772A (en) 1997-02-20 1997-02-20 Program changing device

Publications (1)

Publication Number Publication Date
JPH10232772A true JPH10232772A (en) 1998-09-02

Family

ID=12466414

Family Applications (1)

Application Number Title Priority Date Filing Date
JP9036315A Pending JPH10232772A (en) 1997-02-20 1997-02-20 Program changing device

Country Status (1)

Country Link
JP (1) JPH10232772A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009193446A (en) * 2008-02-15 2009-08-27 Nec Computertechno Ltd Information processor, emulation method in information processor, and emulation program
JP2016507848A (en) * 2013-02-22 2016-03-10 マーベル ワールド トレード リミテッド Read-only memory boot code patch

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009193446A (en) * 2008-02-15 2009-08-27 Nec Computertechno Ltd Information processor, emulation method in information processor, and emulation program
JP2016507848A (en) * 2013-02-22 2016-03-10 マーベル ワールド トレード リミテッド Read-only memory boot code patch
US9880856B2 (en) 2013-02-22 2018-01-30 Marvell World Trade Ltd. Patching boot code of read-only memory

Similar Documents

Publication Publication Date Title
US20050223204A1 (en) Data processing apparatus adopting pipeline processing system and data processing method used in the same
JPH0679290B2 (en) Computer device
JPH10232772A (en) Program changing device
US5812837A (en) Data processing apparatus for controlling an interrupt process and its method
JP2005182538A (en) Data transfer device
JPS62151940A (en) Register saving/return system
JP3923010B2 (en) Memory control circuit
JP2927102B2 (en) Instruction string switching method and arithmetic processor using the same
JPH0667914A (en) Control storage read error correcting system
JPH11288371A (en) In-circuit emulator
JPH08194614A (en) Microcomputer
JP2573391B2 (en) Programmable controller
JP2710558B2 (en) Information processing device
JP2001195257A (en) Device on which program is loaded
JP2008015792A (en) Rom patch processing method and rom patch device
JP2004118669A (en) Control device, control method, and control software
JPH1124939A (en) Program conversion method
JPS63276629A (en) Sorting system for record in file
JPH09160786A (en) Microprocessor
JPH10333903A (en) Microprogram control device
JPS59189407A (en) Sequence control device
JP2000187592A (en) Microcontroller
JPH05204641A (en) Microprocessor
JPH0675757A (en) Link system for virtual space resident program
JPH03228140A (en) Microprogram controller