JPS5846439A - Program editing method of computer - Google Patents

Program editing method of computer

Info

Publication number
JPS5846439A
JPS5846439A JP56143882A JP14388281A JPS5846439A JP S5846439 A JPS5846439 A JP S5846439A JP 56143882 A JP56143882 A JP 56143882A JP 14388281 A JP14388281 A JP 14388281A JP S5846439 A JPS5846439 A JP S5846439A
Authority
JP
Japan
Prior art keywords
program
address
instruction
computer
editing
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.)
Granted
Application number
JP56143882A
Other languages
Japanese (ja)
Other versions
JPS6126692B2 (en
Inventor
Tomokatsu Sato
佐藤 朝勝
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.)
Hitachi Ltd
Original Assignee
Hitachi 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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP56143882A priority Critical patent/JPS5846439A/en
Publication of JPS5846439A publication Critical patent/JPS5846439A/en
Publication of JPS6126692B2 publication Critical patent/JPS6126692B2/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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

PURPOSE:To improve the editing efficiency of a program by interpreting nonoperation instruction given a specific number as a breakpoint of the program, and limiting the movement range of the program by an editing command. CONSTITUTION:In the 1st step, an instruction (a) is interpreted to calculate the number (n) of words of a program to be moved. In the 2nd step, memory contents are read out successively to know the address (x) of a nonoperation instruction given a number appearing first. In the 3rd step, the program is shifted back, word by word, from said address (x) until a next program appears, thereby calculating the number N of space words. In the 4th step, when the result N-n is zero or a positive integer, (n) words of the program are moved only in sections NOP1-NOP2. Thus, the movement of the program is completed. When the result N-n is negative, on the other hand, spaces are deficient, so the movement of the program is not performed, giving an alarm.

Description

【発明の詳細な説明】 本発明け、計算機のプログラム編集方法に関し、計算機
がプログラムの編集機能を実行する場合のみ、特定の番
号を付した無演算命令をプログラムの区切りと解釈させ
ることにより、編集指令によるプログラムの移動範囲を
限定し、プログラムの変更部を制限させ、プログラムの
編集効率を向上させようとするものである。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to a program editing method for a computer, and only when the computer executes a program editing function, edits can be made by interpreting a no-operation instruction with a specific number as a program break. The purpose is to limit the range of movement of the program by commands, limit the parts of the program that can be changed, and improve the editing efficiency of the program.

計算機はマイクロプロセッサの出現により、デジタル制
御の分野に積極的に応用され始めており、これを扱うオ
ペレータの層も拡大されている。これに伴い制御システ
ムへの要求は、従来の機能重視から操作および保守性の
容易さを重視する方向にある。さらに計算機は専門のオ
ペレータが扱うのではなく、一般の制御機器のオペレー
タが扱える必要があり、プログラムの作成、変更が容易
に、効率よく行える機能が要求されてきている。次にこ
の事例を述べる。
With the advent of microprocessors, computers have begun to be actively applied to the field of digital control, and the number of operators who handle them has also expanded. Along with this, demands on control systems are shifting from the conventional emphasis on functionality to emphasis on ease of operation and maintainability. Furthermore, computers need to be handled not by specialized operators but by general control equipment operators, and there is a growing demand for functions that allow programs to be created and changed easily and efficiently. This example will be described next.

第1図は計算機システムによる制御シーケンスを示す。FIG. 1 shows the control sequence by the computer system.

このシーケンスけ、A、B、C,Dの4入力が演算され
て出力Eが出力されることを示している。このようなシ
ーケンスは、シばしば制御対象の制御条件の変更等によ
り変更が必要となる。
This sequence shows that four inputs A, B, C, and D are operated and output E is output. Such a sequence often needs to be changed due to changes in the control conditions of the controlled object.

仮に第10に示すシーケンスを第2図に示すシーケンス
に変更しなければならなくなったとする。
Suppose that it becomes necessary to change the sequence shown in FIG. 10 to the sequence shown in FIG.

このシーケンスは第1図のシーケンスに対し、入力条件
Fが加えられたものである。この変更はプログラムの追
加が必要となる。第1図のシーケンスに対応するメモリ
マツプを7.31¥1に示す。第1図のシーケンスは第
3[ン1に示すプログラムAに含まれているものとし、
BおよびCけ他のシーケンスに対応するプログラムとす
る。プログラムAに、追加命令aが仙人されプログラム
A′ に変ったものとすると、プログラムB、Cも移動
し、第4図に示すメモリマツプになる。これによりプロ
グラムの変更は終了したことになるが、実はここに大き
な問題が残る。それは、記憶装置に格納されているプロ
グラムの変更は容易であるが、プログラムに対応する我
々が直接扱う図面(シーケンス)の変更が、変更したい
部分の他に、第4図によれば、プログラムのアドレスが
変るだめ、プログラムBおよびCの部分までも変更しな
ければならなくなるということである。
This sequence is obtained by adding input condition F to the sequence shown in FIG. This change requires an additional program. A memory map corresponding to the sequence shown in FIG. 1 is shown at 7.31 yen. It is assumed that the sequence in FIG. 1 is included in program A shown in section 3.
Let B and C be programs corresponding to other sequences. Assuming that additional instruction a is added to program A and the program is changed to program A', programs B and C are also moved, resulting in the memory map shown in FIG. This means that the program changes have been completed, but a big problem still remains. It is easy to change a program stored in a storage device, but when we change the drawings (sequences) that we directly handle that correspond to the program, in addition to the part we want to change, according to Figure 4, the program Since the address changes, parts of programs B and C also have to be changed.

本発明の目的は以上説明した、プログラムの一部変更が
、多くの図面変更を招くという従来方式の欠点をなくシ
、能率的なプログラム編集方法を提供することにある。
SUMMARY OF THE INVENTION An object of the present invention is to provide an efficient program editing method that eliminates the drawback of the conventional method in that a partial change in a program causes many drawing changes.

本発明の要旨は、計算機の保有する無演算命令に特定の
プログラム番号を付し、計算機が編集以外のプログラム
を実行する場合は、無演算命令に付された番号は区別せ
ず、無演算命令として実行し、計算機が、変更、挿入、
削除の編集指令を実行する場合は、無演算命令の特定の
番号を付したものをプログラムの区切りと解釈し、プロ
グラムの変更、挿入、削除によるプログラムの移動を最
小限にしようとするものである。
The gist of the present invention is to attach a specific program number to a no-operation instruction held by a computer, and when the computer executes a program other than editing, the number attached to the no-operation instruction is not distinguished. and the calculator changes, inserts,
When executing a deletion edit command, the no-operation instructions with specific numbers are interpreted as program breaks, and the attempt is made to minimize program movement due to program changes, insertions, and deletions. .

以下本発明を図面により詳細に説明する。The present invention will be explained in detail below with reference to the drawings.

命令は第5図に示すように、一般的に、命令の指令を示
すオペコードと、制御対象を示すオペランドから俗成さ
れている。第6図は命令の具体例を示したもので、LO
■10Oけ、オペコードが1で、入出力番地0の内容を
取り込む命令を示している。AND  l101け、オ
ペコードが2で、入出力番地0の内容と、入出力1番地
の内容をANDを実行することを示す。OUT  Il
o】0け、演算結果を入出力番地10に出力することを
意味する。またNOPは、オペコードが0で、無演算を
示す。N0PIけ本発明の命令形式で、オペコードけ0
で無演算を示すことけ、NOP命令と同一である。但し
オペコードにプログラム番号に相当する数値1があるた
め、計算機はN O’PとN0PIを区別することが可
能である。次に1NOPI〜3を使用したプログラム例
を第7図に示す。N0PIの次にプログラムAが配置さ
れ、スペースを取ってN0P2が配置される。以下同様
にプログラムB、Cが配置されているものとする。この
状態でプログラムAに命令aが挿入されたものとすると
第8図に示すようにメモリマツプが変更されることにな
る。即ちプログラムAに、命令aが挿入され、プログラ
ムの移動が起るが、これけあらかじめ設けておいたスペ
ースが命令aに相当分縮小するだけで、プログラムB、
Cけ移動しない。これはプログラムAがN0PIとN0
P2の区切りの中にあるためである。次にこの機能を実
現するだめの手段を第9図により説明する。
As shown in FIG. 5, an instruction is generally composed of an operation code indicating the command of the instruction and an operand indicating the object to be controlled. Figure 6 shows a specific example of the command, LO
■10O, the opcode is 1, indicating an instruction to import the contents of input/output address 0. AND 1101, the operation code is 2, indicates that the contents of input/output address 0 and the contents of input/output address 1 are to be ANDed. OUT Il
o] 0 means that the calculation result is output to input/output address 10. Further, NOP has an operation code of 0, indicating no operation. N0PI is the instruction format of the present invention, and the operation code is 0.
It is the same as the NOP instruction except that it indicates no operation. However, since the opcode includes the number 1, which corresponds to the program number, the computer can distinguish between N0'P and N0PI. Next, an example of a program using 1NOPI to 3 is shown in FIG. Program A is placed next to N0PI, and N0P2 is placed taking up space. It is assumed that programs B and C are arranged in the same manner below. If instruction a is inserted into program A in this state, the memory map will be changed as shown in FIG. That is, instruction a is inserted into program A, and the program is moved, but the space provided in advance is only reduced by the amount corresponding to instruction a, and program B,
C does not move. This shows that program A is N0PI and N0
This is because it is within the P2 section. Next, the means for realizing this function will be explained with reference to FIG.

まず、計算機が第8図に示すように、命令aの挿入指令
を受けたものとする。計算機はこの時点からプログラム
の挿入動作を開始する。第1ステツプとして命令aを解
釈して、プログラムの移動語数nを算出する。第2ステ
ツプとして、メモリ内容を順次読み出して、最初にあら
れれた番号の付された無演算命令(第7図の例でけN0
P2)の番地Xを知る。第3ステツプとしてこの番地X
から1語づつ戻り、次にプログラムがあられれるまで繰
り返し、スペースの語数Nを算出する。第4ステツプと
して、スペースの語数Nから、プログラムの移動語数n
を差し引きとのN −nの結果が零まだは正数であれば
、プログラムが移動可能であることを示すからN0PI
〜N0P2の区間に限り、プログラム1語を移動し、プ
ログラムの移動を終了する。また、前記N−nの結果が
負の場合はスペースが不足していることを示すため、プ
ログラムの移@け実行せず、警報を発する。このように
処理することにより、プログラムの変更、挿入、削除の
場合のみ、NOPにプログラム番号を付したものを、プ
ログラムの区切りと解釈させてプログラムの変更、挿入
、削除によるプログラムの移動を変更部に限定でき、プ
ログラム変更に伴う図面変更を極小にすることができる
First, it is assumed that the computer receives an instruction to insert instruction a, as shown in FIG. The computer starts inserting the program from this point. As a first step, instruction a is interpreted to calculate the number of words n to be moved in the program. As a second step, the memory contents are read out sequentially and the no-operation instruction with the first number (N0 in the example in Figure 7) is read out.
Know the address X of P2). As the third step, this address
Go back one word at a time and repeat until the program runs out again to calculate the number of words in the space, N. As the fourth step, from the number of words in the space N to the number of words to move in the program n
If the result of subtracting N - n is zero or a positive number, it indicates that the program can be moved, so N0PI
Only in the section from ~N0P2, one program word is moved, and the program movement ends. Furthermore, if the result of N-n is negative, it indicates that there is insufficient space, so a warning is issued without executing the program transfer. By processing in this way, only when changing, inserting, or deleting a program, the NOP with a program number attached is interpreted as a program delimiter, and the movement of the program due to program changing, inserting, or deleting is performed in the changing section. It is possible to limit drawing changes due to program changes to a minimum.

以上説明したように、本発明を適用した計算機は、プロ
グラム変更が容易で、且つ図面変更も、プログラム変更
部に対応した部分に限定でき、計算機を自在に活用でき
る効果を有する。
As described above, the computer to which the present invention is applied has the advantage that program changes can be easily made, and drawing changes can be limited to the parts corresponding to the program change section, allowing the computer to be used freely.

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

第1図は制御シーケンス例を示す図、第2図は第1図に
示すシーケンスの変更倒置、第3図は変更前のメモリマ
ツプ図、第4図は変更後のメモリマツプ図、第5図は命
令フォーマット図、第6図はプログラム装置、第7図は
本発明を応用したメモリマツプ図、第8図は本発明を応
用したプログラム変更後のメモリマツプ図、第9図は本
発明の処理フロー図を示す。 ’I−t  図 第3 図      第4 図 箒5 図 イ欠コーr゛     才ヤラ:/ド rl 図 yda り′フA   不へas−1−イ”e5’il
−”17図      第8 図  2 M
Figure 1 is a diagram showing an example of a control sequence, Figure 2 is a modified inversion of the sequence shown in Figure 1, Figure 3 is a memory map diagram before modification, Figure 4 is a memory map diagram after modification, and Figure 5 is an instruction A format diagram, FIG. 6 shows a program device, FIG. 7 shows a memory map to which the present invention is applied, FIG. 8 shows a memory map after program change to which the present invention is applied, and FIG. 9 shows a processing flow diagram of the present invention. . 'I-t Figure 3 Figure 4 Figure broom 5 Figure missing call r
-”Figure 17 Figure 8 2 M

Claims (1)

【特許請求の範囲】[Claims] 1、記憶されている複数のプログラムを順次実行する機
能と、該プログラムσ)編集(変更、挿入、削除)を実
行する機能とを有する計算機の前記プログラム編集方法
において、無演算命令にプログラム番号を付したものを
前記機数のプログラムの先頭番地に記憶すると供に、前
記編集に必要なエリアを前記各プログラム毎に設けてお
き、プログラム実行指令に対しては前記各プログラムの
無演算命令をそのま\実行後続くプログラムを実行し、
プログラムの編集指令に対しては、前記無演算命令に編
集すべきプログラム番号を付したものが記憶されている
番地と、次の前記無演算命令にプログラム番号を付した
ものが記憶されている番地の1つ前の番地を検索し、そ
れら2つの番地間のデータのみデータ変更を可能にし、
編集すべき前記プログラムの編集を実行するようにした
ことを特徴とする計算機のプログラム編集方法。
1. In the program editing method for a computer having the function of sequentially executing a plurality of stored programs and the function of editing (change, insert, delete) the program σ, a program number is assigned to a no-operation instruction. At the same time, an area necessary for the editing is provided for each program, and in response to a program execution command, the no-operation instructions of each program are stored in the starting address of the programs of the number of machines. Execute the program that follows after execution,
For program editing commands, the address where the no-operation instruction with the program number to be edited is stored, and the address where the next no-operation instruction with the program number attached is stored. Search for the previous address and enable data changes only between those two addresses,
A computer program editing method, characterized in that the program to be edited is edited.
JP56143882A 1981-09-14 1981-09-14 Program editing method of computer Granted JPS5846439A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP56143882A JPS5846439A (en) 1981-09-14 1981-09-14 Program editing method of computer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP56143882A JPS5846439A (en) 1981-09-14 1981-09-14 Program editing method of computer

Publications (2)

Publication Number Publication Date
JPS5846439A true JPS5846439A (en) 1983-03-17
JPS6126692B2 JPS6126692B2 (en) 1986-06-21

Family

ID=15349209

Family Applications (1)

Application Number Title Priority Date Filing Date
JP56143882A Granted JPS5846439A (en) 1981-09-14 1981-09-14 Program editing method of computer

Country Status (1)

Country Link
JP (1) JPS5846439A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS60117337A (en) * 1983-11-30 1985-06-24 Mitsubishi Electric Corp Program changing method
JPS62157948A (en) * 1985-12-28 1987-07-13 Yamatake Honeywell Co Ltd Controller

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS60117337A (en) * 1983-11-30 1985-06-24 Mitsubishi Electric Corp Program changing method
JPS62157948A (en) * 1985-12-28 1987-07-13 Yamatake Honeywell Co Ltd Controller

Also Published As

Publication number Publication date
JPS6126692B2 (en) 1986-06-21

Similar Documents

Publication Publication Date Title
JPH02217926A (en) Compiler
JPS6081641A (en) Tracing device of register
JPS5846439A (en) Program editing method of computer
JPS6355636A (en) Data processing system
JPS60108973A (en) Method for finding the minimum value of array elements and element number of the minimum element
JP3240647B2 (en) Computer language structured processing
JPH03282841A (en) Direct input/output processing system for variable length record
JPS63762A (en) Text restoration processing system
JPS63318605A (en) Nc part program generating device
JP3079825B2 (en) Electronic computer equipment
JPS6344240A (en) Program processing control system
JPS62237525A (en) Command converting method
JPH0690669B2 (en) Character string manipulation instruction compilation processing method
JPH08123982A (en) Analytic data input and output device
JPH0334029A (en) Designating system for input/output of index
JPH0535497A (en) Realization system for logical language
JPS6367693B2 (en)
JPS63132335A (en) Executing system for computer language processing system
JPH06175862A (en) Electronic computer
JPS61206041A (en) Extension method for program language
JPH05127894A (en) Instruction executing system
JPS6162141A (en) Logic-type information processing device
JPS6116111B2 (en)
JPH03214322A (en) Computer system
JPH03108067A (en) Data path circuit designing system