JPH04130541A - Basic interpreter - Google Patents

Basic interpreter

Info

Publication number
JPH04130541A
JPH04130541A JP25153590A JP25153590A JPH04130541A JP H04130541 A JPH04130541 A JP H04130541A JP 25153590 A JP25153590 A JP 25153590A JP 25153590 A JP25153590 A JP 25153590A JP H04130541 A JPH04130541 A JP H04130541A
Authority
JP
Japan
Prior art keywords
program
converted
code
storage device
execution
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
JP25153590A
Other languages
Japanese (ja)
Inventor
Shigeki Sugiyama
茂樹 杉山
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.)
Fujikura Ltd
Original Assignee
Fujikura 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 Fujikura Ltd filed Critical Fujikura Ltd
Priority to JP25153590A priority Critical patent/JPH04130541A/en
Publication of JPH04130541A publication Critical patent/JPH04130541A/en
Pending legal-status Critical Current

Links

Landscapes

  • Devices For Executing Special Programs (AREA)

Abstract

PURPOSE:To improve the utilization efficiency for a memory by designating compression at the time of loading only for the execution of a program and eliminating space unnecessary for the execution of the comment and the program out of the program. CONSTITUTION:In the case of the compression of the program, when the program is converted into an ASCII code, the elimination of the comment in the program is performed at first, and the conversion into the internal code is performed, then the elimination of the space unnecessary for the execution of the program is performed to store it to the text area of a main storage device. On the other hand, when the program is converted into the internal code, the eliminated of the unnecessary space is performed to store it in the text area of the main storage device after the elimination of the comment. Thus, the text area of the main storage device can be saved and the money utilization efficiency can be improved by designating the compression when the program is loaded so as to be only executed.

Description

【発明の詳細な説明】 「産業上の利用分野」 この発明は、パーソナルコンピュータに用いて好適なR
AS I Cインタプリタに関する。
DETAILED DESCRIPTION OF THE INVENTION "Field of Industrial Application" The present invention provides an R
Relating to an ASIC interpreter.

「従来の技術」 従来より、RAS I Cはプログラムを犀実行できる
インタプリタ言語であるため、非常に手軽であり、プロ
グラムの1発効率が良いという利点を有している。この
ためほとんどのパーソナルコンピュータに採用されてい
る。
"Prior Art" Conventionally, RAS I C is an interpreted language that can execute programs, so it is very easy to use and has the advantage of being efficient in one program run. For this reason, it is used in most personal computers.

第3wは従来のRAS I Cインタプリタの動作の一
例を説明するための概念図である。RAS ICインタ
プリタは、LOAD命令を受けると、外部記憶装置に記
憶されたプログラムをRAM(ランダムアクセスメモリ
)のテキストエリアにロードする。この場合、該プログ
ラムがASCII(アスキー)コードで外部記憶装置に
セーブされていれば、RAS T Cインタプリタはこ
れを内部コードに変換した後、テキストエリアにロード
する。
The third w is a conceptual diagram for explaining an example of the operation of a conventional RAS I C interpreter. Upon receiving the LOAD command, the RAS IC interpreter loads the program stored in the external storage device into the text area of RAM (Random Access Memory). In this case, if the program is saved in an external storage device in ASCII code, the RASTC interpreter converts this into internal code and then loads it into the text area.

一方、該プログラムが予め内部コードに変換されて外f
lf=E慣装置にセーブされていれば、そのままRAM
のテキストエリアにロードする。
On the other hand, the program is converted into internal code in advance and external
lf=E If it is saved in the inertia device, it will be saved in RAM as it is.
Load it into the text area.

「売可が脛決しようとする課題」 ところで、RAS T Cを使用してプログラムを作成
する際には、プログラムを容易に作成できるようにする
ことと、作成後のメンテナンスを容易にするためにプロ
グラム中にコメント(プログラムの注釈)を挿入する場
合が多い。しかし、コメントの多用はテキストエリアの
無駄を生じさせ、さらに実行速度を低下させるなど、メ
モリ使雇妨率の面から問題があった。
``Issues that will determine sales'' By the way, when creating a program using RAS T C, there are a number of things that must be done to make the program easy to create and to facilitate maintenance after creation. Comments (program notes) are often inserted into programs. However, there were problems in terms of memory usage rate, such as excessive use of comments, which led to waste of text area and reduced execution speed.

この発虹はこのような事情に鑑みてなされたもので、メ
モリの使用効率の向上を図ることができるRAS I 
Cインタプリタを提供することを「的としている。
This development was made in view of these circumstances, and RAS I, which can improve memory usage efficiency.
The aim is to provide a C interpreter.

「課題をW決するための手段」 この発明のBAS I Cインタプリタは、外部記憶装
置に記憶されているプログラムがASCIIコードに変
換されたものであれば、内部コートニ変換しながら主記
憶装置の特定番地に格納し、方、該プログラムが内部コ
ードに変換されたものであれば、そのまま前記主記憶装
置の特定番地に格納するLOAD命令を有するBAS 
T Cインタプリタにおいて、前記LOAD命令を受け
ると前記プログラムの圧縮を行うか否かを指定するパラ
メータを参照し、プログラムの圧縮を行う場合は、該プ
ログラムがASCIIコードに変換されているか内部コ
ードに変換されているかを判断し、ASCIIコードに
変換されていれば該プログラムからコメントを削除し、
次いで内部コードに変換し、さらにプログラムの実行に
不必要なスペースを削除し、一方、内部コードに変換さ
れていれば該プログラムからコメントを削除し、そして
プログラムの実行に不必要なスペースの削除を行うこと
を特徴とする。
"Means for resolving problems" The BASIC interpreter of the present invention is capable of converting a program stored in an external storage device into an ASCII code by converting it to a specific address in the main storage device while performing internal Courtney conversion. However, if the program has been converted to internal code, a BAS having a LOAD command that stores it as is at a specific address in the main storage device.
When the T C interpreter receives the LOAD command, it refers to a parameter that specifies whether or not to compress the program, and if the program is to be compressed, determines whether the program has been converted to ASCII code or converted to internal code. If it has been converted to ASCII code, delete the comment from the program,
Next, convert it to internal code, and delete spaces unnecessary for program execution, while removing comments from the program if it has been converted to internal code, and delete spaces unnecessary for program execution. It is characterized by doing.

「作用 」 上述したIHAS T Cインタプリタによれば、LO
AD命令にプログラムを圧縮するか否かを指定するパラ
メータを設け、該プログラムを圧縮する場合は、該プロ
グラムからコメントおよびプログラムのに行に不必要な
スペースの削除が行なわれる。また、該プログラムがA
SCMコードに変換されていれば、内部コードに変換さ
れる。
"Action" According to the IHAS T C interpreter mentioned above, LO
When the AD instruction is provided with a parameter specifying whether or not to compress a program, and the program is compressed, comments and unnecessary spaces are deleted from the lines of the program. Also, if the program is A
If it has been converted to an SCM code, it will be converted to an internal code.

したがって、主記憶装置のテキストエリアの節約ができ
、大容量のプログラムを1度にロードすることができる
。また、ロードしたプログラムの実行時には、RAS 
I Cインタプリタがコメントを読飛ばす処理が無くな
り、実行速度が向上する。
Therefore, the text area of the main memory can be saved and a large capacity program can be loaded at one time. Also, when executing the loaded program, the RAS
There is no need for the IC interpreter to skip over comments, improving execution speed.

「実施例」 以下、【百を参照してこの売可の実施釘について説明す
る。
``Example'' Hereinafter, this commercial nail will be explained with reference to [100].

第1mはこの発明の一実施例であるRAS I Cイン
タプリタの動作を説明するための概念図である。このR
AS I Cインタプリタは、プログラムを圧縮する機
能を有している点が従来のRAS ICインタプリタと
異なる点である。すなわち、このBASICインタプリ
タのr、OAD命令にはプログラムを圧縮するか否かの
選択を行うパラメータが設定されており、このパラメー
タを01”に設定すると、プログラムの圧縮を行い、“
0”に設定すると、プログラムの圧縮を行なわず、従来
通りの機能を行う。
1m is a conceptual diagram for explaining the operation of a RAS IC interpreter which is an embodiment of the present invention. This R
The ASIC interpreter differs from the conventional RAS IC interpreter in that it has a function to compress programs. That is, the r and OAD instructions of this BASIC interpreter have a parameter set to select whether or not to compress the program, and if this parameter is set to 01, the program will be compressed and
If set to 0'', the program will not be compressed and will function as before.

次に、プログラム圧路の概略について第1図に示す概念
図を参照して説明する。
Next, the outline of the program pressure path will be explained with reference to the conceptual diagram shown in FIG.

さて、RAS I CインタプリタはLOAD命令を受
けると、パラメータを参照し、プログラムの圧縮を行う
か否かの判断を行う。この判断結果において、プログラ
ムの圧縮を行う場合には、次に外部E憶装置に記憶され
ているプログラムがASCIIコードに変換されている
か否かの判断を行う。この場合、ASCIIコードに変
換されていれば、まずプログラム内のコメントの削除を
行い、次いで内」コートに変換する。そして、内部コー
ドに変換した後、プログラムの実行に不必要なスペース
のw1丁除を行う。以上の処理を終えた後、プログラム
を主記憶装置のテキストエリアに格納する。一方、外部
記憶装置に記憶されているプログラムが内部コードに変
換されている場合には、コメントの削除を行った後、不
必要なスペースの削除を行う。そして、上記同様に主記
憶装置のテキストエリアに格納する。なお、ソースプロ
グラムの圧縮を行わない場合には、従来と同様の処理を
行う。
Now, when the RAS I C interpreter receives the LOAD command, it refers to the parameters and determines whether or not to compress the program. Based on the result of this determination, if the program is to be compressed, it is then determined whether the program stored in the external E storage device has been converted into ASCII code. In this case, if the code has been converted to ASCII code, comments in the program are first deleted, and then converted to ASCII code. After converting to internal code, the space unnecessary for program execution is removed by w1. After completing the above processing, the program is stored in the text area of the main storage device. On the other hand, if the program stored in the external storage device has been converted into internal code, comments are deleted and then unnecessary spaces are deleted. Then, it is stored in the text area of the main storage device in the same manner as above. Note that if the source program is not compressed, the same processing as the conventional one is performed.

このように、LOAD命令にプログラムの圧縮を行うか
否かの指定を行うパラメータを設定し、このパラメータ
の設定値が“loの場合にはプログラムの圧縮を行い、
“θ″の場合にはプログラムのEelは行なわない。そ
して、プログラムを実行するだけの目的でロードする場
合(完成したプログラム)は、圧縮指定を行えばテキス
トエリアの節約ができ、大容量のソースプログラムを1
度にロードすることができる。また、ロードしたプログ
ラムにはコメントが削除されているので、実行時にこれ
を読展ぼす処理が無くなり、実行速度が向上する。
In this way, a parameter is set in the LOAD command to specify whether or not to compress the program, and if the setting value of this parameter is "lo", the program is compressed,
In the case of "θ", the EEL of the program is not performed. If you are loading a program for the sole purpose of executing it (completed program), you can save text area by specifying compression, and you can load a large source program into one file.
Can be loaded at once. Furthermore, since comments have been deleted from the loaded program, there is no need to read and unload comments during execution, improving execution speed.

なお、参考として第2図に上記実施例のフローチャート
を示す。
For reference, a flowchart of the above embodiment is shown in FIG.

「発明の効果」 以上説明したようにこの発明のBAS I Cインタプ
リタによれば、LOAD命令にプログラムの圧縮−を行
うか否かの指定を行うパラメータを設定し、このパラメ
ータの設定値に基づいてプログラムの圧縮を行う場合に
はコメントおよびプログラムの実行に不必要なスペース
の削除を行うようにしたので、プログラムを実行するだ
けの目的でロードする場合は圧縮指定を行うことにより
、主記憶装置のテキストエリアの節約ができる。したが
って、大容量のプログラムを1度にロードすることがで
きる。また、LOADしたプログラムの実行時にはRA
S I Cインタプリタがコメントを読飛ばす処理が無
くなるので、実行速度が向上する。
"Effects of the Invention" As explained above, according to the BASIC interpreter of the present invention, a parameter is set in the LOAD command to specify whether or not to compress the program, and the program is compressed based on the setting value of this parameter. When compressing a program, comments and spaces unnecessary for program execution are deleted, so if the program is loaded for the sole purpose of executing it, by specifying compression, you can free up main storage space. You can save text area. Therefore, a large capacity program can be loaded at once. Also, when executing a LOADed program, the RA
Since the SIC interpreter no longer has to skip over comments, execution speed is improved.

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

第1閃はこの発明の一実施何であるRAS I Cイン
タプリタの動作概念を示す図、第2図は同実施例の動作
を説明するためのフローチャート、第3図は従来のRA
S I Cインタプリタの動作概念を示す図である。
The first flash is a diagram showing the operational concept of the RAS IC interpreter which is an embodiment of the present invention, FIG. 2 is a flowchart for explaining the operation of the same embodiment, and FIG.
FIG. 2 is a diagram illustrating the operational concept of the SIC interpreter.

Claims (1)

【特許請求の範囲】 外部記憶装置に記憶されているプログラムがASCII
コードに変換されたものであれば、内部コードに変換し
ながら主記憶装置の特定番地に格納し、一方、該プログ
ラムが内部コードに変換されたものであれば、そのまま
前記主記憶装置の特定番地に格納するLOAD命令を有
するBASICインタプリタにおいて、 前記LOAD命令を受けると前記プログラムの圧縮を行
うか否かを指定するパラメータを参照し、プログラムの
圧縮を行う場合は、該プログラムがASCIIコードに
変換されているか内部コードに変換されているかを判断
し、ASCIIコードに変換されていれば該プログラム
からコメントを削除し、次いで内部コードに変換し、さ
らにプログラムの実行に不必要なスペースを削除し、一
方、内部コードに変換されていれば該プログラムからコ
メントを削除し、そしてプログラムの実行に不必要なス
ペースの削除を行うことを特徴とするBASICインタ
プリタ。
[Claims] The program stored in the external storage device is an ASCII
If the program has been converted into a code, it is stored at a specific address in the main memory while being converted into an internal code; on the other hand, if the program has been converted into an internal code, it is stored at a specific address in the main memory as it is. In a BASIC interpreter that has a LOAD command stored in the ASCII code, when the LOAD command is received, a parameter specifying whether or not to compress the program is referred to, and if the program is to be compressed, the program is converted to ASCII code. If the program is converted to ASCII code, the comments are removed from the program, and if the code is converted to internal code, the program is converted to internal code, and spaces unnecessary for program execution are deleted. , deletes comments from the program if it has been converted into internal code, and deletes spaces unnecessary for program execution.
JP25153590A 1990-09-20 1990-09-20 Basic interpreter Pending JPH04130541A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP25153590A JPH04130541A (en) 1990-09-20 1990-09-20 Basic interpreter

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP25153590A JPH04130541A (en) 1990-09-20 1990-09-20 Basic interpreter

Publications (1)

Publication Number Publication Date
JPH04130541A true JPH04130541A (en) 1992-05-01

Family

ID=17224260

Family Applications (1)

Application Number Title Priority Date Filing Date
JP25153590A Pending JPH04130541A (en) 1990-09-20 1990-09-20 Basic interpreter

Country Status (1)

Country Link
JP (1) JPH04130541A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1115207A4 (en) * 1999-07-13 2001-10-17 Sony Corp Method of generating distribution content, method and apparatus for content distribution, and method of code conversion
WO2006082878A1 (en) * 2005-02-03 2006-08-10 Mitsubishi Denki Kabushiki Kaisha Program code generation support device and method, program execution device and method, program code compression device and method, program for the same
US8448158B2 (en) 2005-02-03 2013-05-21 Mitsubishi Electric Corporation Program code generation support device and method, program execution device and method, and program code compression processing device and method and program thereof

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1115207A4 (en) * 1999-07-13 2001-10-17 Sony Corp Method of generating distribution content, method and apparatus for content distribution, and method of code conversion
US7308508B1 (en) 1999-07-13 2007-12-11 Sony Corporation Distribution contents forming method, contents distributing method and apparatus, and code converting method
US7653752B2 (en) 1999-07-13 2010-01-26 Sony Corporation Distribution contents forming method, contents distributing method and apparatus, and code converting method
WO2006082878A1 (en) * 2005-02-03 2006-08-10 Mitsubishi Denki Kabushiki Kaisha Program code generation support device and method, program execution device and method, program code compression device and method, program for the same
US8448158B2 (en) 2005-02-03 2013-05-21 Mitsubishi Electric Corporation Program code generation support device and method, program execution device and method, and program code compression processing device and method and program thereof
US8527967B2 (en) 2005-02-03 2013-09-03 Mitsubishi Electric Corporation Program code compression processing device and method and program thereof
US8572557B2 (en) 2005-02-03 2013-10-29 Mitsubishi Electric Corporation Program code generation support device and method, program execution device and method, and program code compression processing device and method and program thereof

Similar Documents

Publication Publication Date Title
JP4562918B2 (en) Compiling program generation for an interpretive runtime environment
US7213237B2 (en) Intermediate code preprocessing apparatus, intermediate code execution apparatus, intermediate code execution system, and computer program product for preprocessing or executing intermediate code
JP2002529849A (en) Data compression method for intermediate object code program executable in embedded system supplied with data processing resources, and embedded system corresponding to this method and having multiple applications
CN110543338A (en) dynamic loading method and device for files
JPH04130541A (en) Basic interpreter
CN112783558A (en) Method for accelerating self-decompression stage of Linux kernel starting
JPH118547A (en) Reconfigurable arithmetic unit
JPH04105129A (en) Program executing system
JPH05274198A (en) Information processor
JPS59218574A (en) Command processing system
JPS61271552A (en) Program loading system
JPS63276629A (en) Sorting system for record in file
JPH0293948A (en) Computer system
JPH0319024A (en) Loading system for load module
JP2669148B2 (en) Job control language creation method
JPS63156255A (en) Overlaying method by interpreter
JP2003140908A (en) Code conversion device and code conversion program
JPS6258334A (en) Control system for additional load of input and output control program
JPH0415823A (en) Setting method for system operation environment
CN116204196A (en) Programming language conversion method, device, electronic equipment and storage medium
JPH0635711A (en) Dynamic link device
JPH04143832A (en) Firmware loading mechanism
JPS62221058A (en) Additional load control system for input/output control program
JPH03240836A (en) Logical simulation method for large capacity storage
JPH02280228A (en) System for converting input data