JPS61206039A - Programming executing method for computer - Google Patents

Programming executing method for computer

Info

Publication number
JPS61206039A
JPS61206039A JP4781085A JP4781085A JPS61206039A JP S61206039 A JPS61206039 A JP S61206039A JP 4781085 A JP4781085 A JP 4781085A JP 4781085 A JP4781085 A JP 4781085A JP S61206039 A JPS61206039 A JP S61206039A
Authority
JP
Japan
Prior art keywords
program
recorded
magnetic disk
object program
source program
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
JP4781085A
Other languages
Japanese (ja)
Inventor
Naoya Suzuki
直也 鈴木
Sadanobu Maruyama
丸山 定信
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.)
Sony Corp
Original Assignee
Sony 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 Sony Corp filed Critical Sony Corp
Priority to JP4781085A priority Critical patent/JPS61206039A/en
Priority to CA000503426A priority patent/CA1259138A/en
Priority to AU54364/86A priority patent/AU5436486A/en
Priority to EP86301648A priority patent/EP0194822A3/en
Publication of JPS61206039A publication Critical patent/JPS61206039A/en
Pending legal-status Critical Current

Links

Landscapes

  • Devices For Executing Special Programs (AREA)

Abstract

PURPOSE:To save selectively a source program and an object program by the command and to execute easily the program correction by storing the source program and the object program onto the same memory. CONSTITUTION:When a source program SP is recorded in a magnetic disk 5, a SAVE command is used. When an object program (ObjP) is recorded in a magnetic disk 5, a GENERATE command is used. When an SP is recorded in the magnetic disk 5, the SP is read from a magnetic disk 5 by a command LOAD and by a compiler 1, translated and executed, the correction change of the SP is easily executed. When the ObjP is recorded to the magnetic disk 5, the execution is directly executed by the ObjP. Consequently, the program can not be corrected and changed, and the processing time is short.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 この発明は、コンピュータのプログラミング実行方法に
関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a computer programming execution method.

〔発明の概要〕[Summary of the invention]

この発明は、コンピュータのプログラミング実行方法に
おいて同一のメモリ上にソースプログラムとオブジェク
トプログラムを格納し、磁気記憶手段に選択的にセーブ
することにより用途に応じたプログラムをセーブできる
ようにうしたものである。
This invention is a computer programming execution method in which a source program and an object program are stored in the same memory, and by selectively saving them to a magnetic storage means, it is possible to save programs according to the purpose. .

〔従来の技術〕[Conventional technology]

プログラミングの処理方式には、インタプリタ方式とコ
ンパイラ方式とがある。インタプリタ方式は、高級言語
例えばRAS I Cで書かれたソースプログラムを一
行毎に解釈し、順次実行してい(ものである、このよう
に、ソースプログラムを解釈しながら実行するものであ
るから、インタプリタ方式は、対話型機能を必要とする
ものに適している。インタプリタ方式では、プログラミ
ングに誤りがあると、実行の途中で誤りの行番号と工ラ
ーコードが表示され、実行が中止される。この誤りの部
分を対話的に修正すれば、再実行させることができる。
Programming processing methods include an interpreter method and a compiler method. The interpreter method interprets a source program written in a high-level language such as RAS I C line by line and executes it sequentially. This method is suitable for applications that require interactive functionality.In the interpreted method, if there is a programming error, the erroneous line number and error code will be displayed during execution, and execution will be aborted. If you correct the error part interactively, you can run it again.

しかしながら、−行毎の解釈の時間が必要であり、処理
時間が長い。
However, - time is required for line-by-line interpretation, and processing time is long.

コンパイラ方式は、ソースプログラムを一度機械語の実
行形式のオブジェクトプログラムに翻訳し、このオブジ
ェクトプログラムにより実行させるものである9例えば
、テキストエディタでディスク上にソースプログラムを
作成し、コンパイラでこのソースプログラムをリロケー
タブルオブジェクトプログラムに変換し、ランタイムル
ーチン。
In the compiler method, a source program is translated into an executable object program in machine language, and then executed by this object program.9 For example, a source program is created on a disk using a text editor, and this source program is translated using a compiler. Convert runtime routines into relocatable object programs.

とこのリロケータブルオブジェクトプログラムを、リン
カ−で結合編集し、実行形式のオブジェクトプログラム
を生成し、この実行形式のオブジェクトプログラムによ
り実行させる。
This relocatable object program is combined and edited by a linker to generate an executable object program, and is executed by this executable object program.

コンパイラ方式では、機械語のオブジェクトプログラム
を直接実行するものであるから、処理速度が速い。しか
し、コンパイラ方式は、例えば特開昭59−22140
号公報に示されるように対話型の機能を持たせることが
難しい、コンパイラ方式では、プログラミングに誤りが
あると、コンパイラ及びリンカ−の夫々から誤りが全て
表示され、プログラムの実行は行われない。
Since the compiler method directly executes a machine language object program, the processing speed is fast. However, the compiler method, for example,
As shown in the above publication, in the compiler system, where it is difficult to provide an interactive function, if there is a programming error, the compiler and linker will display all the errors and the program will not be executed.

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

インクプリタ一方式では、高級言語で書かれたプログラ
ムを順次解釈しながら実行するので、処理速度の向上は
望めない。コンパイラ方式では、プログラムをオブジェ
クトプログラムでディスク上に記録してしまうと、もは
やソースブロク゛う”との対応ができな(なり、プログ
ラムの修正が困難である。
In the ink printer type, a program written in a high-level language is executed while being interpreted sequentially, so it cannot be expected to improve processing speed. In the compiler system, once a program is recorded on a disk as an object program, it is no longer possible to deal with the source block (this makes it difficult to modify the program).

従って、この発明の目的は、実行速度が速く、プログラ
ムの修正を容易に行うことができるコンピータのプログ
ラミング実行方法を提供することにある。
SUMMARY OF THE INVENTION Accordingly, an object of the present invention is to provide a computer programming execution method that is fast in execution speed and allows programs to be easily modified.

一個のディスクに複数のプログラムを記録する場合、各
プログラムに共有のルーチンがあっても・個々のプログ
ラムを全て記録するのでは、記録効率が悪い。
When recording multiple programs on one disc, even if each program has a shared routine, recording all the individual programs is inefficient.

従って、この発明の他の目的は、プログラム記録効率の
よいコンピータのプログラミング実行方法を提供するこ
とにある。
Therefore, another object of the present invention is to provide a computer programming execution method that is efficient in program recording.

(問題点を解決するための手段〕 この発明は、所定単位毎に高級言語で記述されたソース
プログラムを機械語で記述されたオブジェクトプログラ
ムにコンパイルし、ソースプログラム及びコンパイルさ
れたオブジェクトプログラムを共通のメモリに格納し、
メモリに設けられた変数に関する領域に変数及び該変数
に関する情報を格納し、オブジェクトプログラムと変数
を結合して実行せしめるようにしたコンピュータのプロ
グラミング実行方法であって、ソースプログラムとオブ
ジェクトプログラムをコマンドにより選択的に磁気記憶
手段にセーブするようにしたことを特徴とするコンピュ
ータのプログラミング実行方法である。
(Means for solving the problem) The present invention compiles a source program written in a high-level language into an object program written in machine language for each predetermined unit, and combines the source program and the compiled object program into a common program. store in memory,
A computer programming execution method in which variables and information regarding the variables are stored in a variable-related area provided in memory, and an object program and variables are combined and executed, and the source program and the object program are selected by a command. This is a computer programming execution method characterized in that the data is saved in a magnetic storage means.

〔作用〕[Effect]

同一のメモリ上にソースプログラムとオブジェクトプロ
グラムを格納し、コマンドによりこのソースプログラム
とオブジェクトプログラムを選択的にセーブする。゛ 〔実施例〕 以下、この発明の一実施例について、図面を参照して説
明する。第1図において、1がコンパイラ、2がキーボ
ード、3がCRTディスプレイ、4がメモリ□である。
A source program and an object program are stored in the same memory, and the source program and object program are selectively saved by a command. [Embodiment] Hereinafter, an embodiment of the present invention will be described with reference to the drawings. In FIG. 1, 1 is a compiler, 2 is a keyboard, 3 is a CRT display, and 4 is a memory □.

コンパイラ1は、インクリメンタリ−型のコンパイラで
、所定の単位例えばソースプログラムの一行毎に順次コ
ンパイルを行う。
The compiler 1 is an incremental type compiler that sequentially compiles a predetermined unit, for example, one line of a source program.

コンパイラ1は、コンパイル機能のみならず、エディツ
ト機能も有している。コンパイラ1とメモI74とは、
双方向に結ばれている。
The compiler 1 has not only a compiling function but also an editing function. Compiler 1 and Memo I74 are
It is connected in both directions.

キーボード2からコンパイラ1にソースプログラムが与
えられる。ソースプログラムの言語としては、例えばB
AS I Cが用いられる。入力されたソースプログラ
ムは、コンパイラ1で順次オブジェクトプログラムにコ
ンパイルされる。ソースプログラムは、メモリ4上のメ
モリ領域4Aに順次格納される。コンパイルされたオブ
ジェクトプログラムは、実行順に編集され、メモリ4上
のメモリ領域4Bに順次格納される。
A source program is given to the compiler 1 from the keyboard 2. For example, the language of the source program is B.
ASIC is used. The input source program is sequentially compiled into an object program by a compiler 1. The source programs are sequentially stored in a memory area 4A on the memory 4. The compiled object programs are edited in the order of execution and sequentially stored in the memory area 4B on the memory 4.

メモリ4上には、変数とその変数に関する情報のシンボ
ルテーブルを形成するためのメモリ領域4Cが設けられ
ている。変数に関するシンボルテーブルに記録する情報
は、変数の使われている行番号、変数の型(整数、実数
、倍精度実数、文字配列の何れか)、配列の場合にはそ
の次元数と要素数、アドレス参照番号等である。変数の
値の内。
A memory area 4C is provided on the memory 4 for forming a symbol table of variables and information regarding the variables. Information recorded in the symbol table regarding variables includes the line number where the variable is used, the type of the variable (integer, real number, double-precision real number, or character array), the number of dimensions and number of elements in the case of an array, Address reference number, etc. within the value of the variable.

部表現としては、数値については2進表現が用いられて
いる。
As for part representation, binary representation is used for numerical values.

プログラムの修正、変更は、対話的に行える。Modifications and changes to programs can be made interactively.

つまり、ソースプログラムの一部が変更されたときには
、コンパイラ1で変更を受けたソースプログラムが翻訳
し直され、オブジェクトプログラムが書換られる。従っ
て、ソースプログラム全体を修正し直すことなく、オブ
ジェクトプログラムを修正できる。
That is, when a part of the source program is changed, the changed source program is retranslated by the compiler 1, and the object program is rewritten. Therefore, the object program can be modified without modifying the entire source program.

実行時に変数のシンボルテーブルの変数に関する情報を
基に、変数がリンクされ、オブジェクトプログラムによ
り実行がなされる。
During execution, variables are linked based on information about variables in the variable symbol table, and execution is performed by the object program.

実行は、メモリ領域4Bに格納されているオブジェクト
プログラムにより行われるので、インタプリタ方式に比
べて処理速度が速い。
Since the execution is performed by the object program stored in the memory area 4B, the processing speed is faster than the interpreter method.

ソースプログラムとオブジェクトプログラムとは、共通
なメモリ4上に格納されている。このため、第2図に示
すように、ソースプログラムとオブジェクトプログラム
とを選択的に磁気ディスク5に記録できる。
The source program and object program are stored on a common memory 4. Therefore, as shown in FIG. 2, the source program and the object program can be selectively recorded on the magnetic disk 5.

ソースプログラムを磁気ディスク5に記録する場合には
、”5AVE”コマンドが用いられる。
When recording the source program on the magnetic disk 5, the "5AVE" command is used.

’ 5AVE”コマンドが与えられると、メモリ4に記
録されていたソースプログラムが磁気ディスク5に記録
される。
When the '5AVE' command is given, the source program recorded in the memory 4 is recorded on the magnetic disk 5.

オブジェクトプログラムを磁気ディスク5に記録する場
合には、“GENERATE”コマンドが用いられる。
When recording an object program on the magnetic disk 5, a "GENERATE" command is used.

”GENERATE“コマンドが与えられると、メモリ
4に記録されていたオブジェクトプログラムが磁気ディ
スク5に記録される。
When the "GENERATE" command is given, the object program recorded in the memory 4 is recorded on the magnetic disk 5.

ソースプログラムを磁気ディスク5に記録した場合には
、コマンド“LOAD″により、磁気ディスク5からソ
ースプログラムが読出され、コンパイラ1でオブジェク
トプログラムに翻訳されて実行される。この場合には、
ソースプログラムの修正、変更が容易である。
When a source program is recorded on the magnetic disk 5, the source program is read out from the magnetic disk 5 by the command "LOAD", translated into an object program by the compiler 1, and executed. In this case,
It is easy to modify and change the source program.

オブジェクトプログラムを磁気ディスク5に記録した場
合には、実行がこのオブジェクトプログラムにより直接
行われる。従って、この場合には、プログラムの修正、
変更を行うことは出来ないが、処理時間が短い。また、
例えばプログラムを販売する場合には、このようにオブ
ジェクトプログラムで記録しておけば、容易に複製でき
ない、ユーザーは、その用途に応じて、ソースプログラ
ムとオブジェクトプログラムとを選択的に磁気ディスク
5に記録する。
When an object program is recorded on the magnetic disk 5, execution is performed directly by this object program. Therefore, in this case, modifying the program,
Although changes cannot be made, the processing time is short. Also,
For example, when selling a program, if it is recorded as an object program in this way, it cannot be easily copied.The user can selectively record the source program and the object program on the magnetic disk 5 according to the purpose of the program. do.

″GENERATE’コマンドを用いてオブジェクトプ
ログラムを格納する際、ランタイムルーチンを含ませる
場合とランクイムルーチンを含ませない場合とが選択で
きる。ランタイムルーチンは、共通に使えるので、1つ
のディスク上に複数プログラムをセーブする場合、プロ
グラムの各々にランタイムルーチンを含ませてセーブし
たのでは、ディスクが効率的に使用できない、このよう
な場合、ディスク上の1つのプログラムがランタイムル
ーチンを含んで記録されていれば、他のプログラムはラ
ンタイムルーチンを含まずに記録できる。
When storing an object program using the ``GENERATE'' command, you can choose whether to include runtime routines or not include runtime routines.Since runtime routines can be used in common, multiple programs can be stored on one disk. If you save a program by including a runtime routine in each program, the disk will not be used efficiently.In such a case, if one program on the disk is recorded including a runtime routine, , other programs can be recorded without including runtime routines.

この一実施例ではプログラム言語としてBASICを用
いたが他の言語例えばFORTRANやPASCALで
も同様に適用できる。
Although BASIC is used as the programming language in this embodiment, other languages such as FORTRAN and PASCAL can be used in the same manner.

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

この発明に依れば、共通のメモリ上にソースプログラム
とオブジェクトプログラムが格納されている。従って、
ソースプログラムとオブジェクトプログラムがコマンド
により選択的にセーブできる。このため、プログラムの
修正が容易なプログラムと実行速度が速いプログラムと
を用途に応じて選択的にセーブできる。また、ランタイ
ムルーチンを含まないでセーブすることができるので、
ディスクの記録効率がよい。
According to this invention, a source program and an object program are stored on a common memory. Therefore,
Source programs and object programs can be selectively saved using commands. Therefore, programs that are easy to modify and programs that execute quickly can be selectively saved depending on the purpose. Also, you can save without including runtime routines, so
Disc recording efficiency is good.

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

第1図はこの発明の一実施例の構成図、第2図はこの発
明の一実施例の動作説明図である。 図面における主要な符号の説明 I:コンパイラ、  2:キーボード、4:メモリ 代理人    弁理士 杉 浦 正 知説明図 112図
FIG. 1 is a block diagram of an embodiment of the present invention, and FIG. 2 is an explanatory diagram of the operation of the embodiment of the invention. Explanation of main symbols in the drawings I: Compiler, 2: Keyboard, 4: Memory agent Patent attorney Tadashi Sugiura Explanation diagram 112

Claims (1)

【特許請求の範囲】[Claims] 所定単位毎に高級言語で記述されたソースプログラムを
機械語で記述されたオブジェクトプログラムにコンパイ
ルし、上記ソースプログラム及びコンパイルされた上記
オブジェクトプログラムを共通のメモリに格納し、上記
メモリに設けられた変数に関する領域に変数及び該変数
に関する情報を格納し、上記オブジェクトプログラムと
上記変数を結合して実行せしめるようにしたコンピュー
タのプログラミング実行方法であって、上記ソースプロ
グラムと上記オブジェクトプログラムをコマンドにより
選択的に磁気記憶手段にセーブするようにしたことを特
徴とするコンピュータのプログラミング実行方法。
A source program written in a high-level language is compiled into an object program written in machine language for each predetermined unit, the source program and the compiled object program are stored in a common memory, and variables set in the memory are A computer programming execution method in which a variable and information regarding the variable are stored in a region related to the variable, and the object program and the variable are combined and executed, the source program and the object program being selectively executed by a command. A computer programming execution method characterized by saving data in a magnetic storage means.
JP4781085A 1985-03-11 1985-03-11 Programming executing method for computer Pending JPS61206039A (en)

Priority Applications (4)

Application Number Priority Date Filing Date Title
JP4781085A JPS61206039A (en) 1985-03-11 1985-03-11 Programming executing method for computer
CA000503426A CA1259138A (en) 1985-03-11 1986-03-06 Method of compiling high level language statements into low level language instruction sets
AU54364/86A AU5436486A (en) 1985-03-11 1986-03-06 Compiling high-level lanuage statements into lower-level language instruction sets
EP86301648A EP0194822A3 (en) 1985-03-11 1986-03-07 Methods of and apparatus for compiling high-level language statements into low-level language instruction sets

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4781085A JPS61206039A (en) 1985-03-11 1985-03-11 Programming executing method for computer

Publications (1)

Publication Number Publication Date
JPS61206039A true JPS61206039A (en) 1986-09-12

Family

ID=12785717

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4781085A Pending JPS61206039A (en) 1985-03-11 1985-03-11 Programming executing method for computer

Country Status (1)

Country Link
JP (1) JPS61206039A (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6073745A (en) * 1983-09-27 1985-04-25 マ−チン,ジ−,レイフイン Computer with real time compile

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6073745A (en) * 1983-09-27 1985-04-25 マ−チン,ジ−,レイフイン Computer with real time compile

Similar Documents

Publication Publication Date Title
CA1290067C (en) System for generating program object modules
US6314564B1 (en) Method for resolving arbitrarily complex expressions at link-time
KR0125605B1 (en) Method and device for verifying operation of machine language program
JPS61206039A (en) Programming executing method for computer
JP3461185B2 (en) Method and apparatus for registering source code line number to load module
JPS61206040A (en) Programming method for computer
JPS61206038A (en) Programming executing method for computer
CA1259138A (en) Method of compiling high level language statements into low level language instruction sets
Pierce Source language debugging on a small computer
JPH03135630A (en) Instruction scheduling system
Ashby et al. Design of an interactive debugger for FORTRAN: MANTIS
Hamlet et al. Transportable image-processing software
Pitz Building a programming language for a small computer: Reinventing the wheel
JP3494350B2 (en) Programmable controller
Grafton et al. Six Basics
KR100229567B1 (en) Coordination and text value generation method
Mattsson Implementation of concurrent Pascal on LSI—11
JPS63318605A (en) Nc part program generating device
Friesland et al. A pascal compiler bootstrapped on a DEC-System 10
JPS61206049A (en) Programming method for computer
JPS61206041A (en) Extension method for program language
Rutter Using a high level language as a cross assembler
JPS58169637A (en) Compile processing system
Lakshminarayana et al. Tool—A New Language for Real Time Control Applications
JPH03235128A (en) In-line development processing method for taking over working directory