JPH05341981A - Patch area securing device - Google Patents
Patch area securing deviceInfo
- Publication number
- JPH05341981A JPH05341981A JP17751092A JP17751092A JPH05341981A JP H05341981 A JPH05341981 A JP H05341981A JP 17751092 A JP17751092 A JP 17751092A JP 17751092 A JP17751092 A JP 17751092A JP H05341981 A JPH05341981 A JP H05341981A
- Authority
- JP
- Japan
- Prior art keywords
- program
- source program
- patch area
- cobol
- system subroutine
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 230000004048 modification Effects 0.000 claims description 2
- 238000000034 method Methods 0.000 description 5
- 238000010586 diagram Methods 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- HEFNNWSXXWATRW-UHFFFAOYSA-N Ibuprofen Chemical compound CC(C)CC1=CC=C(C(C)C(O)=O)C=C1 HEFNNWSXXWATRW-UHFFFAOYSA-N 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000012805 post-processing Methods 0.000 description 1
Landscapes
- Stored Programmes (AREA)
Abstract
Description
【0001】[0001]
【技術分野】本発明はパッチ領域確保装置に関し、特に
COBOL言語などの高級プログラム言語でプログラム
開発を行う際のコード部におけるパッチ領域の確保方法
に関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a patch area securing device, and more particularly to a method of securing a patch area in a code portion when a program is developed in a high-level programming language such as COBOL language.
【0002】[0002]
【従来技術】一般に、プログラム開発におけるプログラ
ムの修正方法としては、ソースプログラムから修正して
コンパイルリンクを行い、実行可能形式のロードモジュ
ールを作成し直す方法と、ソースプログラムを修正せず
に、ロードモジュールの一部を直接書き直す方法とがあ
る。2. Description of the Related Art Generally, as a method of modifying a program in program development, a method of modifying a source program and compiling and linking to recreate an executable load module, and a method of modifying a load module without modifying the source program There is a method of directly rewriting a part of.
【0003】COBOL言語などの高級プログラム言語
のプログラム開発においては、プログラムの不具合発生
時にソースプログラムを修正することで、その不具合に
対処するようになっている。In the program development of a high-level programming language such as the COBOL language, the problem is dealt with by correcting the source program when a problem occurs in the program.
【0004】このCOBOL言語のような高級プログラ
ム言語にはデータ部にデータ領域を確保する命令はある
が、コード部にパッチ領域として領域を確保するだけで
何も動作をしないような命令は存在しない。このため、
データ部のパッチ領域を予め確保することはできるが、
コード部のパッチ領域を確保することはできないという
問題がある。Although a high-level programming language such as the COBOL language has an instruction to secure a data area in the data portion, there is no instruction that secures an area in the code portion as a patch area and does nothing. .. For this reason,
It is possible to secure the patch area of the data part in advance,
There is a problem that the patch area of the code part cannot be secured.
【0005】データ部に確保したパッチ領域をコード部
がコードとして使用することはできないため、COBO
L言語のような高級プログラム言語で作成したプログラ
ムで不具合が発生した場合、ソースプログラムを修正し
てコンパイルリンクを行うこととなり、パッチによるプ
ログラム修正ができないという問題がある。Since the code part cannot use the patch area secured in the data part as a code, COBO
When a problem occurs in a program created in a high-level programming language such as the L language, the source program is modified and the compile link is performed, which causes a problem that the program cannot be modified by a patch.
【0006】[0006]
【発明の目的】本発明は上記のような従来のものの問題
点を除去すべくなされたもので、コード部にパッチ領域
を確保することができ、プログラムをソースプログラム
から修正できないような場合にもプログラムの修正を行
うことができるパッチ領域確保装置の提供を目的とす
る。SUMMARY OF THE INVENTION The present invention has been made in order to eliminate the above-mentioned problems of the conventional one, and it is possible to secure a patch area in the code portion and to correct the program even if it cannot be modified from the source program. An object of the present invention is to provide a patch area securing device capable of modifying a program.
【0007】[0007]
【発明の構成】本発明によるパッチ領域確保装置は、高
級プログラム言語で作成されたソースプログラムを修正
する修正プログラムを格納するパッチ領域を確保するた
めのシステムサブルーチンと、前記ソースプログラム内
に設けられ、前記システムサブルーチンを読出す読出し
命令と、前記ソースプログラムのコンパイル結果と前記
システムサブルーチンのコンパイル結果とをリンクする
リンク手段とを有することを特徴とする。A patch area reserving apparatus according to the present invention is provided in the source program, and a system subroutine for reserving a patch area for storing a correction program for correcting a source program created in a high-level programming language. It is characterized by having a read instruction for reading the system subroutine, and link means for linking the compile result of the source program and the compile result of the system subroutine.
【0008】[0008]
【実施例】次に、本発明の一実施例について図面を参照
して説明する。An embodiment of the present invention will be described with reference to the drawings.
【0009】図1は本発明の一実施例の構成を示すブロ
ック図である。図において、システムサブルーチン1は
COBOL言語で作成されたプログラムの実行可能形式
のロードモジュールのコード部の中にパッチ領域を確保
するために作成されたものである。FIG. 1 is a block diagram showing the configuration of an embodiment of the present invention. In the figure, a system subroutine 1 is created to secure a patch area in the code part of the load module of the executable format of the program created in the COBOL language.
【0010】すなわち、システムサブルーチン1はコー
ド部からなっており、パッチ領域として利用するのに十
分な大きさが確保されている。また、システムサブルー
チン1の内容としては、実行しても何も動作を起こさな
いノーオペレーション命令で埋められている。That is, the system subroutine 1 is composed of a code portion, and has a sufficient size to be used as a patch area. Also, the contents of the system subroutine 1 are filled with no-operation instructions that cause no operation even when executed.
【0011】但し、COBOL言語ではこのような命令
が存在しないため、本実施例のシステムサブルーチン1
はアセンブラ命令で組まれたソースプログラムとする。
つまり、システムサブルーチン1はアセンブラ言語のノ
ーオペレーション命令で埋め尽くされたソースプログラ
ムとする。However, since such an instruction does not exist in the COBOL language, the system subroutine 1 of this embodiment is used.
Is a source program composed of assembler instructions.
That is, the system subroutine 1 is a source program filled with no-operation instructions in assembler language.
【0012】システムサブルーチン1は予めコンパイル
されたものであり、そのコンパイル結果がコンパイルユ
ニット4である。したがって、コンパイルユニット4に
はオブジェクトコードのみが存在している。ここで、通
常、アセンブラで組まれたプログラムはアセンブルと表
現するが、本実施例では便宜上コンパイルと表現してい
る。The system subroutine 1 is previously compiled, and the compilation result is the compilation unit 4. Therefore, only the object code exists in the compilation unit 4. Here, a program assembled by an assembler is usually expressed as an assemble, but in this embodiment, it is expressed as a compile for convenience.
【0013】COBOL言語ソースプログラム2はCO
BOL言語で作成されたソースプログラムであり、シス
テムサブルーチン1を読出すCALL文が含まれてい
る。スキップフラグ3はCOBOL言語ソースプログラ
ム2内に設けられており、COBOL言語ソースプログ
ラム2内の上記のCALL文が通常のプログラムの流れ
の中で実行されることがないよう制御するために設けら
れている。The COBOL language source program 2 is CO
It is a source program created in the BOL language and includes a CALL statement for reading the system subroutine 1. The skip flag 3 is provided in the COBOL language source program 2 and is provided to control so that the CALL statement in the COBOL language source program 2 is not executed in the normal program flow. There is.
【0014】すなわち、COBOL言語ソースプログラ
ム2はそのコード部にシステムサブルーチン1を読出す
コール命令をいれておくが、実際にはシステムサブルー
チン1が実行されることがないような条件式の中にいれ
ておく。That is, the COBOL language source program 2 has a call instruction for reading the system subroutine 1 in its code part. However, it is put in a conditional expression such that the system subroutine 1 is not actually executed. Keep it.
【0015】本実施例では、スキップフラグ3の値を条
件の真理値に使い、条件式が真となって満たされたとき
にコール命令でシステムサブルーチン1が読み出される
ようにプログラムする。つまり、スキップフラグ3に条
件式が真とならないような値をセットすることによっ
て、このシステムサブルーチン1が実際には呼び出され
ないようにしておく。In the present embodiment, the value of the skip flag 3 is used as the truth value of the condition, and the system subroutine 1 is programmed by the call instruction when the conditional expression becomes true and is satisfied. That is, by setting the skip flag 3 to a value such that the conditional expression is not true, the system subroutine 1 is not actually called.
【0016】COBOLコンパイルユニット5はCOB
OL言語ソースプログラム2のコンパイル結果であり、
通常オブジェクトデータ部51とオブジェクトコード部
52とからなっている。The COBOL compilation unit 5 is a COB
It is a compilation result of the OL language source program 2,
It is usually composed of an object data section 51 and an object code section 52.
【0017】リンカ7はコンパイルユニット4とCOB
OLコンパイルユニット5とをリンクして最終的なロー
ドモジュール6を作成する。すなわち、リンカ7がCO
BOLコンパイルユニット5のオブジェクトコード部5
2とアセンブラソースモジュールのオブジェクトコード
部のみからなるコンパイルユニット4とをリンクするこ
とで、ロードモジュール6にはシステムサブルーチン1
で確保された領域の分だけコード部のパッチ領域61が
確保される。The linker 7 is a compile unit 4 and a COB.
The final load module 6 is created by linking with the OL compilation unit 5. That is, the linker 7 is CO
Object code part 5 of BOL compilation unit 5
2 is linked to the compile unit 4 consisting only of the object code part of the assembler source module, so that the load module 6 has the system subroutine 1
The patch area 61 of the code portion is secured for the area secured in step 4.
【0018】図2は図1のパッチ領域61にパッチデー
タが存在するときの動作を示すフローチャートである。
これら図1および図2を用いて本発明の一実施例によっ
て確保されたパッチ領域61にパッチデータが存在する
ときの動作について以下説明する。FIG. 2 is a flow chart showing the operation when patch data exists in the patch area 61 of FIG.
The operation when patch data exists in the patch area 61 secured by the embodiment of the present invention will be described below with reference to FIGS. 1 and 2.
【0019】COBOL言語ソースプログラム2に書か
れた命令が実行されていくときに(図2ステップ2
0)、通常の動作、つまりパッチ領域61のパッチデー
タを使用する必要のない命令であれば、システムサブル
ーチン1を含む条件式を実行する前の適当なところでス
キップフラグ3に‘YES’をセットする(図2ステッ
プ21)。When the instructions written in the COBOL language source program 2 are executed (step 2 in FIG. 2).
0) Normal operation, that is, if the instruction does not require the use of patch data in the patch area 61, the skip flag 3 is set to “YES” at an appropriate position before the conditional expression including the system subroutine 1 is executed. (FIG. 2, step 21).
【0020】システムサブルーチン1を読出すコール命
令を含む条件判断分の命令が実行されると(図2ステッ
プ22)、スキップフラグ3の値=‘NO’の条件式が
真となるか否かの判断が行われる。When an instruction for the condition determination including the call instruction for reading the system subroutine 1 is executed (step 22 in FIG. 2), whether the conditional expression of the value of the skip flag 3 = 'NO' is true or not is determined. Judgment is made.
【0021】この場合、スキップフラグ3には‘YE
S’がセットされているので、スキップフラグ3の値=
‘NO’の条件式が真とはならない(図2ステップ2
3)。よって、システムサブルーチン1を読出すコール
命令が実行されることなく、次のCOBOL言語命令の
実行が行われる(図2ステップ24)。In this case, the skip flag 3 is set to'YE
Since S'is set, the value of skip flag 3 =
Conditional expression of'NO 'is not true (Fig. 2, Step 2)
3). Therefore, the next COBOL language instruction is executed without executing the call instruction for reading the system subroutine 1 (step 24 in FIG. 2).
【0022】COBOL言語命令が実行されていってパ
ッチがあたった箇所にくると、その箇所にはシステムサ
ブルーチン1が展開されているアドレス、つまりパッチ
領域61のアドレスに飛ぶようなアセンブラ命令が書か
れているので、該アセンブラ命令が実行される(図2ス
テップ25)。When the COBOL language command is executed and the patch is reached, an assembler command that jumps to the address where the system subroutine 1 is expanded, that is, the address of the patch area 61 is written at that position. Therefore, the assembler instruction is executed (step 25 in FIG. 2).
【0023】該アセンブラ命令の実行によってパッチ領
域61のアドレスに飛ぶと、パッチ領域61に書かれて
いるアセンブラ命令が実行され(図2ステップ26)、
パッチ領域61で必要な処理が行われる。このパッチ領
域61で必要な処理を行った後に、元のCOBOL言語
で書かれた命令を実行できるような後処理を行い、パッ
チ領域61のアセンブラ命令からCOBOL言語の命令
の実行に戻る(図2ステップ27)。When the address of the patch area 61 is jumped by executing the assembler instruction, the assembler instruction written in the patch area 61 is executed (step 26 in FIG. 2).
Necessary processing is performed in the patch area 61. After performing the necessary processing in the patch area 61, post-processing is performed so that the original instruction written in the COBOL language can be executed, and the assembler instruction in the patch area 61 returns to the execution of the COBOL instruction (see FIG. 2). Step 27).
【0024】このように、アセンブラ言語などでパッチ
領域を確保するように組まれたシステムサブルーチン1
を提供し、このシステムサブルーチン1をコールするよ
うCOBOL言語ソースプログラム2を作成することに
よって、COBOLコンパイルユニット5のリンクを行
うときにCOBOLコンパイルユニット5のオブジェク
トコード部51にコンパイルユニット4をリンクするこ
とで、コード部にパッチ領域を確保することができる。
よって、プログラムをCOBOL言語ソースプログラム
2から修正できないような場合にも、上記パッチ領域を
使用することで、プログラムの修正を行うことができ
る。As described above, the system subroutine 1 is constructed so as to secure the patch area in the assembler language or the like.
By linking the compile unit 4 to the object code portion 51 of the COBOL compile unit 5 when the COBOL compile unit 5 is linked by creating the COBOL language source program 2 to call the system subroutine 1. Thus, a patch area can be secured in the code section.
Therefore, even when the program cannot be modified from the COBOL language source program 2, the patch area can be used to modify the program.
【0025】尚、本発明の一実施例ではCOBOL言語
で作成されたソースプログラムについて述べたが、他の
高級プログラム言語にも適用することができ、これに限
定されない。Although the source program created in the COBOL language has been described in the embodiment of the present invention, the present invention can be applied to other high-level programming languages and is not limited to this.
【0026】[0026]
【発明の効果】以上説明したように本発明によれば、高
級プログラム言語で作成されたソースプログラムを修正
する修正プログラムを格納するパッチ領域を確保するた
めのシステムサブルーチンを提供し、このシステムサブ
ルーチンを読出す読出し命令をソースプログラム内に設
け、ソースプログラムのコンパイル結果とシステムサブ
ルーチンのコンパイル結果とをリンクすることによっ
て、コード部にパッチ領域を確保することができ、プロ
グラムをソースプログラムから修正できないような場合
にもプログラムの修正を行うことができるという効果が
ある。As described above, according to the present invention, there is provided a system subroutine for securing a patch area for storing a modification program for modifying a source program created in a high-level programming language, and this system subroutine is executed. By providing a read instruction to be read in the source program and linking the compile result of the source program with the compile result of the system subroutine, a patch area can be secured in the code part and the program cannot be modified from the source program. In this case, there is an effect that the program can be modified.
【図1】本発明の一実施例の構成を示すブロック図であ
る。FIG. 1 is a block diagram showing a configuration of an exemplary embodiment of the present invention.
【図2】図1のパッチ領域にパッチデータが存在すると
きの動作を示すフローチャートである。2 is a flowchart showing an operation when patch data exists in the patch area of FIG. 1. FIG.
1 システムサブルーチン 2 COBOL言語ソースプログラム 3 スキップフラグ 4 コンパイルユニット 5 COBOLコンパイルユニット 6 ロードモジュール 7 リンカ 51 オブジェクトデータ部 52 オブジェクトコード部 61 パッチ領域 1 System Subroutine 2 COBOL Language Source Program 3 Skip Flag 4 Compile Unit 5 COBOL Compile Unit 6 Load Module 7 Linker 51 Object Data Part 52 Object Code Part 61 Patch Area
Claims (3)
プログラムを修正する修正プログラムを格納するパッチ
領域を確保するためのシステムサブルーチンと、前記ソ
ースプログラム内に設けられ、前記システムサブルーチ
ンを読出す読出し命令と、前記ソースプログラムのコン
パイル結果と前記システムサブルーチンのコンパイル結
果とをリンクするリンク手段とを有することを特徴とす
るパッチ領域確保装置。1. A system subroutine for securing a patch area for storing a modification program for modifying a source program created in a high-level programming language, and a read instruction provided in the source program for reading the system subroutine. A patch area securing device having link means for linking a compilation result of the source program and a compilation result of the system subroutine.
たスキップフラグと、前記スキップフラグの内容に応じ
て前記読出し命令の実行を制御する手段とを設けたこと
を特徴とする請求項1記載のパッチ領域確保装置。2. The patch according to claim 1, further comprising a skip flag provided in advance in the source program, and means for controlling execution of the read instruction according to the content of the skip flag. Area securing device.
何も動作を起こさないノーオペレーション命令で構成し
たことを特徴とする請求項1または請求項2記載のパッ
チ領域確保装置。3. The patch area reserving apparatus according to claim 1, wherein the system subroutine is constituted by a no-operation instruction that causes no operation at the time of execution.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP17751092A JPH05341981A (en) | 1992-06-11 | 1992-06-11 | Patch area securing device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP17751092A JPH05341981A (en) | 1992-06-11 | 1992-06-11 | Patch area securing device |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH05341981A true JPH05341981A (en) | 1993-12-24 |
Family
ID=16032169
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP17751092A Pending JPH05341981A (en) | 1992-06-11 | 1992-06-11 | Patch area securing device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH05341981A (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2000293207A (en) * | 1999-03-15 | 2000-10-20 | Fisher Rosemount Syst Inc | A method for modifying the operation of a function block entity, a process control system, a modifier function block, and a basic function block. |
-
1992
- 1992-06-11 JP JP17751092A patent/JPH05341981A/en active Pending
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2000293207A (en) * | 1999-03-15 | 2000-10-20 | Fisher Rosemount Syst Inc | A method for modifying the operation of a function block entity, a process control system, a modifier function block, and a basic function block. |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US7171649B1 (en) | Optimizing safe downcasting in an object-oriented programming language | |
| US5832273A (en) | System for deleting redundant instructions from high level language source code containing in-line assembly instructions | |
| US6113651A (en) | Compile method, a compiler, an exception handler, and a program recording medium | |
| JPH0760390B2 (en) | Method and apparatus for performing subprogram calls and compiler apparatus | |
| JPH05341981A (en) | Patch area securing device | |
| JPH09128267A (en) | Data processor and data processing method | |
| JP2001296996A (en) | Automatic generating device of component and expressing method | |
| JPH05241812A (en) | Patch area ensuring device | |
| JP2003076558A (en) | Method and program for controlling program execution | |
| JPH08123679A (en) | ROM device and compiler | |
| JPH11110224A (en) | Language processing device, its method and information storage medium | |
| JP3424596B2 (en) | Method and apparatus for caching symbol reference information | |
| JPH04251341A (en) | Emulator for microcomputer | |
| JPH03100730A (en) | Method for emergency correction data generation processing with high grade language | |
| JP2003122592A (en) | Hardware inspection system | |
| JP2007080207A (en) | Program development support system and linker | |
| JPH03229323A (en) | Data processor | |
| Meinicke et al. | Tool Support for Product-Line Maintenance | |
| JPH05257672A (en) | Patch processing system for compiled code object | |
| JPS58169637A (en) | Compile processing system | |
| JPH04321135A (en) | Instruction system for object correction of compiler | |
| JPH05334052A (en) | Module management system | |
| JPH1124939A (en) | Program conversion method | |
| JPH0264731A (en) | Data area initializing and processing system | |
| JPH0744372A (en) | Patch processing system for compiled code object |