JPS6168643A - Extension system for interpreter type language function - Google Patents
Extension system for interpreter type language functionInfo
- Publication number
- JPS6168643A JPS6168643A JP19131784A JP19131784A JPS6168643A JP S6168643 A JPS6168643 A JP S6168643A JP 19131784 A JP19131784 A JP 19131784A JP 19131784 A JP19131784 A JP 19131784A JP S6168643 A JPS6168643 A JP S6168643A
- Authority
- JP
- Japan
- Prior art keywords
- procedure
- function
- extended
- interpreter
- extended function
- 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
Links
Landscapes
- Devices For Executing Special Programs (AREA)
Abstract
Description
【発明の詳細な説明】
技術分野
本発明はインタプリタ方式言語機能の拡張方式に関し、
特に固定化されたく例えばROM化された)インタプリ
タ方式言語処理プロセッサにおける言語機能の拡張(新
規命令及び関数の設定あるいは命令及び関数の機能強化
)の方式に関する。DETAILED DESCRIPTION OF THE INVENTION Technical Field The present invention relates to a method for expanding the functions of an interpreted language.
In particular, the present invention relates to a method for expanding the language functions (setting of new instructions and functions, or enhancement of the functions of instructions and functions) in an interpreter-type language processing processor that is fixed (for example, stored in a ROM).
更未盈I
従来のインタプリタ方式言語処理プロセッサに対°する
言語機能の拡張(新規命令/関数の設定)の方式は、次
の如く行われている。Modification I The language function expansion (setting of new instructions/functions) for the conventional interpreter type language processing processor is carried out as follows.
(1)予め拡張命令/関数用の予約言語を1つ決めてお
く。(1) Decide in advance one reserved language for extended instructions/functions.
(2)インタプリタ本体には、プログラムの実行時に当
該予約言語を発見したら拡張命令/関数処理手続きに制
御を移行すべく、所定の記憶領域の内容でインタプリタ
メモリアドレス空間から飛び出すようなしくみを予め用
意しておく。(2) The interpreter itself has a mechanism that jumps out of the interpreter memory address space with the contents of a predetermined storage area in order to transfer control to the extended instruction/function processing procedure when the reserved language is discovered during program execution. I'll keep it.
(3)拡張命令/関数処理手続きはインタプリタ本体と
は別のアドレス空間に対して拡張設定され、(1)で述
べた予約言語のうしろに続く名前により具体的な拡張機
能を認識して所定の機能を実行する。(3) Extension instructions/function processing procedures are extended to an address space separate from the interpreter main body, and specific extension functions are recognized and specified by the name following the reserved language mentioned in (1). perform the functions of
(4)上記(2)で述べた所定の記憶領域に拡張命令/
関数処理手続き部のアドレスを設定するのは、利用者プ
ログラムの責任である。すなわち、利用者は拡張命令/
関数を使用する前に所定の記憶領域に自ら拡張命令/関
数処理手続き部のアドレスを設定しなければならない。(4) Extended instructions /
It is the responsibility of the user program to set the address of the function processing procedure section. In other words, the user can
Before using a function, the address of the extended instruction/function processing procedure section must be set in a predetermined storage area.
かかる方式は以下のごとき欠点を有する。Such a method has the following drawbacks.
拡張命令/関数は予め定められた予約言語で始まらなけ
ればならず、また拡張命令/関数処理手続きの入口アド
レスを利用者が意識していなければならない。更に、拡
張命令/関数処理手続きへの制御移行用の記憶領域が唯
一であるので、異種拡張機能の同一プログラム上での混
在使用が不可能である。The extension instruction/function must begin with a predetermined reserved language, and the user must be aware of the entry address of the extension instruction/function processing procedure. Furthermore, since there is only one storage area for transferring control to extended instructions/function processing procedures, it is impossible to use different types of extended functions in a mixed manner on the same program.
発明の目的
本発明の目的は、拡張命令/関数を認識するための予約
言語を規定する必要がなくまた、インタプリタ本体と拡
張機能手続きの結合が自動的になされるインタプリタ方
式言語機能の拡張方式を提供することである。OBJECTS OF THE INVENTION It is an object of the present invention to provide an interpreter-based language function extension method that eliminates the need to specify a reserved language for recognizing extended instructions/functions, and that automatically connects the interpreter main body and extended function procedures. It is to provide.
本発明の他の目的は、異種拡張機能が同一プログラム内
で混在使用可能なインタプリタ方式言語機能の拡張方式
を提供することである。Another object of the present invention is to provide an interpretive language function extension method that allows different types of extension functions to be mixedly used within the same program.
発明の構成
本発明によるインタプリタ方式言語機能拡張方式は、拡
張機能手続きの実装状態の有無を外部より指定してこれ
を記憶する指定手段と、複数の拡張機能手続きが夫々設
定されるべくこれ等拡張殿熊手続きに夫々対応して複数
に分割されたアドレス空間を有する拡張機能手続き記憶
手段と、指定手段により指定された拡張機能手続きの処
理実行手順を規定するための制御テーブルを記憶する手
段とを設け、当該制御テーブルを参照しつつ指定手段に
より指定された実装拡張機能手続きの処理実行をなすよ
うにしたことを特徴とする。Structure of the Invention The interpreter-based language function expansion method according to the present invention includes a specifying means for externally specifying and storing the implementation status of an extended function procedure, and a specification means for externally specifying and storing the implementation status of an extended function procedure, and a designation means for specifying and storing the implementation state of an extended function procedure, and a specification means for specifying and storing the implementation status of an extended function procedure. Extended function procedure storage means having an address space divided into a plurality of areas corresponding to each of the Tonkuma procedures, and means for storing a control table for defining a process execution procedure of the extended function procedure specified by the specifying means. The implementation extended function procedure specified by the specifying means is executed while referring to the control table.
実施例 以下に、図面を用いて本発明の詳細な説明する。Example The present invention will be described in detail below using the drawings.
第1図に示す様に拡張機能手続き用のアドレス空間が記
憶領域内に設定されており、例えば全体で32にバイト
として4にバイト単位に夫々分割され、8種類の拡張機
能手続きが4にバイトの各アドレス空間に夫々設定可能
であるが、この数値例に限定されることはない。そして
、各アドレス空間に拡張機能手続きが実装されているか
否かを示すために、第2図のような拡張機能手続き実装
状態記憶領域が別に設けられており、第1図のアドレス
空間1〜8に夫々対応して各実装状態指定領11〜8が
設けられる。各領域は対応する拡張機能手続きが実装さ
れていればオンであり、そうでなければオフとなってお
り、このオンオフは外部から利用者の手によって設定さ
れるものであり、インタプリタを起動する前に設定され
る。As shown in Figure 1, the address space for extended function procedures is set within the storage area.For example, the total number of extended function procedures is divided into 32 bytes and 4 bytes, and 8 types of extended function procedures are divided into 4 bytes. can be set in each address space, but is not limited to this numerical example. In order to indicate whether or not an extended function procedure is implemented in each address space, an extended function procedure implementation state storage area as shown in FIG. 2 is separately provided. Mounting state designation regions 11 to 8 are provided corresponding to the mounting state designation regions 11 to 8, respectively. Each area is turned on if the corresponding extension procedure is implemented, and turned off otherwise.This on/off setting is set by the user from outside, and is set before starting the interpreter. is set to
また、拡張機能手続きの処理実行順序を規定すべく第3
図に示すごとき拡張機能手続き制御テーブルが記憶領域
に設定されている。EIADDRi(i=2・・・・・
・8)にはi番目の拡張様熊手続きの直上に実装されて
いる拡張機能手続きの命令処理部のアドレスが格納され
る。EFADDRiには同じくi番目の拡張機能手続き
の直上に実装されている拡張橢熊手続きの関数処理部の
アドレスが格納される。EAFLAGiはE IADD
Ri及びEFADDRiが有効か、否かを示すフラグで
あり、i番目の上位に拡張機能手続きが存在しているか
否かを示すためのものである。In addition, the third
An extended function procedure control table as shown in the figure is set in the storage area. EIADDRi (i=2...
- 8) stores the address of the instruction processing unit of the extended function procedure implemented directly above the i-th extended-like bear procedure. Also stored in EFADDRi is the address of the function processing section of the extended Okuma procedure that is implemented directly above the i-th extended function procedure. EAFLAGi is E IADD
This is a flag indicating whether Ri and EFADDRi are valid or not, and is used to indicate whether an extended function procedure exists at the i-th higher level.
先ず、インタプリタ本体と拡張礪熊手続きとを結合する
ための初期化処理について説明する。インタプリタ本体
は第2図の拡張機能手続き実装状態を示す実装状態指定
領域を参照してこれに従い、拡張機能手続きに対してイ
ンタプリタ本体と拡張機能手続きとの間及び拡張機能手
続き同土間の結合を実施すべく、各拡張機能手続きの初
期化処理部を順次呼び出していく(インタプリタ本体は
各拡張曙熊手続きのアドレス空間の先頭に夫々の初期化
処理部が存在るものとする)。1個でも拡張機能手続き
が実装されていれば、拡張殿熊手続きが存在する旨を示
す内部フラグを設定する(図示せず)。First, the initialization process for linking the interpreter main body and the extended Kokuma procedure will be explained. The interpreter main body refers to the implementation state specification area that shows the extended function procedure implementation state in Figure 2, and according to this, performs the connection between the interpreter main body and the extended function procedure and between the extended function procedure and the same extension function procedure. In order to do so, the initialization processing section of each extended function procedure is sequentially called (assuming that the initialization processing section of the interpreter body exists at the beginning of the address space of each extended Akebono procedure). If even one extended function procedure is implemented, an internal flag indicating the existence of the extended Tonkuma procedure is set (not shown).
第4図に示す如く最下位に位置する拡張機能手続きの命
令処理部及び関数処理部が最初に実行されて順次上位の
拡張機能手続きへ向けて結合されていく様に、各拡張機
能手続き初期化処理部において最下位の拡張機能手続き
のアドレスが、インタプリタ本体側に予め用意されてい
る所定の記憶領域に設定されると共に第3図に示す制御
テーブルが作成されていくのである。As shown in Figure 4, each extension function procedure is initialized so that the instruction processing section and function processing section of the extension function procedure located at the lowest level are executed first and are sequentially connected to the upper extension function procedure. In the processing section, the address of the lowest extended function procedure is set in a predetermined storage area prepared in advance on the interpreter main body side, and the control table shown in FIG. 3 is created.
次に、第4図及び第5図を参照しつつ命令/関数の実行
制御方式につき説明する。尚、第4図は拡張曙熊手続き
6と8とが実装されている場合の例を示している。Next, an instruction/function execution control system will be explained with reference to FIGS. 4 and 5. Incidentally, FIG. 4 shows an example in which extended Akebono procedures 6 and 8 are implemented.
インタプリタ本体側は、命令/関数を処理する際に拡張
機能が存在する旨を示す内部フラグがオン状態の場合(
このフラグは前述した如くインタプリタ本体の初期化処
理時に設定されている)、命令/関数の処理には入らず
に所定の記憶領域の内容で拡張機能手続き側に飛び出す
。この所定の記憶領域には、前述したとおり、最下位に
位置する拡張機能手続きの命令/関数処理部のアドレス
が設定されている。最下位の拡張機能手続きにおいては
、拡張機能手続き制御テーブルの自エントリを参照し、
更に上位に拡張機能手続きが存在するか否かを調べる。When the interpreter itself processes an instruction/function, if an internal flag indicating the existence of an extended function is on (
As described above, this flag is set during the initialization process of the interpreter itself), and the program jumps to the extended function procedure side with the contents of a predetermined storage area without entering instruction/function processing. As described above, the address of the instruction/function processing section of the extended function procedure located at the lowest level is set in this predetermined storage area. The lowest extended function procedure refers to its own entry in the extended function procedure control table,
Furthermore, check whether there is an extended function procedure at a higher level.
これは拡張様熊手続き制御テーブルのEAFLAGで判
別される。上位に拡張機能手続きが存在しない場合、処
理対象命令が当該拡張機能であるかチェックする。換言
すれば、自分で処理すべきものであるか否かのチェック
をなすのである。自分で処理すべきものである場合には
、当該命令/関数の処理を実行し、実行済みのフラグを
たてて呼び出し側ヘリターンする。最下位の拡張機能手
続きの場合、リターンさきはインタプリタ本体となる。This is determined by EAFLAG in the extended procedure control table. If there is no extended function procedure in the upper level, it is checked whether the instruction to be processed is the corresponding extended function. In other words, it checks whether it is something that should be handled by itself. If it should be processed by itself, it executes the processing of the instruction/function, sets an executed flag, and returns to the caller. In the case of the lowest-level extension procedure, the main body of the interpreter comes after the return.
上位に更に拡張機能手続きが存在する場合は、拡張機能
手続き制御テーブルの自エントリの内容で上位の拡張機
能手続きへと制御が移行する。上位の拡張機能手続きに
おいても、同様な処理がなされる。If there is an extended function procedure at a higher level, control is transferred to the higher level extended function procedure based on the contents of its own entry in the extended function procedure control table. Similar processing is performed in the upper-level extended function procedure.
上位拡張機能手続きから制御がリターンされると、上位
のいずれかの拡張機能手続きにおいて当該命令/関数が
処理されたか否かチェックして(実行済みフラグのチェ
ック)、実行済みの場合そのまま呼び出しさきヘリター
ンする。実行済みでない場合自分で処理すべきか否かを
チェックする。移行の処理は上位に拡張機能手続きが存
在しない場合のそれと同様となる。When control is returned from a higher-level extension function procedure, it is checked whether the instruction/function has been processed in any higher-level extension function procedure (checking the executed flag), and if it has been executed, it returns to the previous call. do. If it has not been executed, check whether you should process it yourself. The migration process is the same as that when no extended function procedure exists at the upper level.
このようにして、最終的には拡張機能手続きからインタ
プリタ本体・命令/関数処理部へ制御が戻ることになる
。そこで、インタプリタ本体側では、当該命令/関数が
拡張機能手続き側のいずれかにおいて実行されたか否か
をチーニックする。すなわち、前述の実行済みフラグを
チェックして実行済みの場合は次の命令/関数の取出し
処理へと進む。実行済みでない場合(すなわちこれは拡
張命令/関数でなかったことを意味する)、基本命令/
関数として命令/関数処理へ入るのである。In this way, control is ultimately returned from the extended function procedure to the interpreter main body/instruction/function processing section. Therefore, the interpreter itself checks whether the instruction/function has been executed in any of the extended function procedures. That is, the above-mentioned executed flag is checked, and if the execution has been completed, the process proceeds to the next instruction/function retrieval process. If it has not been executed (meaning it was not an extended instruction/function), the basic instruction/
It enters instruction/function processing as a function.
l1夏l】
本発明によれば、拡張命令/関数を意味する予約言語を
規定する必要がなく、また拡張機能手続きとインタプリ
タ本体との結合が自動的に行われることになると共に異
種拡張機能手続き共存を可能とする効果がある。According to the present invention, there is no need to specify a reserved language that means extension instructions/functions, and the combination of extension function procedures and the interpreter body is automatically performed, and different extension function procedures can be combined. This has the effect of making coexistence possible.
第1図は拡張機能手続き様のアドレス空間を示す図、°
第2図は拡張機能手続き実装状態指定記憶領域を示す図
、第3図は拡張機能手続き制御テーブルを示す図、第4
図は拡張様熊手続き制御テーブルによる拡張機能手続き
の結合の例を示す図、第5図は命令/関数実行時のイン
タプリタ本体と拡張機能手続きとの間の処理のフローを
示す図である。Figure 1 shows the address space for extended function procedures, °
Figure 2 is a diagram showing the extended function procedure implementation state specification storage area, Figure 3 is a diagram showing the extended function procedure control table, and Figure 4 is a diagram showing the extended function procedure implementation state specification storage area.
The figure shows an example of the combination of extended function procedures using the extended procedure control table, and FIG. 5 is a diagram showing the flow of processing between the interpreter main body and the extended function procedures when an instruction/function is executed.
Claims (1)
の拡張方式であつて、拡張機能手続きの実装状態の有無
を外部より指定してこれを記憶する指定手段と、複数の
拡張機能手続きが夫々設定されるべくこれ等拡張機能手
続きに夫々対応して複数に分割されたアドレス空間を有
する拡張機能手続き記憶手段と、前記指定手段により指
定された前記拡張機能手続きの処理実行手順を規定する
ための制御テーブルを記憶する手段とを設け、前記制御
テーブルを参照しつつ前記指定手段により指定された実
装拡張機能手続きの処理実行をなすようにしたことを特
徴とするインタプリタ方式言語機能の拡張方式。This is a method for extending language functions in an interpreter-based language processing processor, which includes a specifying means for externally specifying and storing the implementation status of an extended function procedure, and a means for specifying the implementation status of an extended function procedure, and a means for specifying the presence or absence of an implementation state of an extended function procedure. Extended function procedure storage means having an address space divided into a plurality of areas corresponding to each extended function procedure, and means for storing a control table for defining a process execution procedure of the extended function procedure specified by the specifying means. An interpreter-based language function expansion method, characterized in that an implementation expansion function procedure designated by the designation means is executed while referring to the control table.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP19131784A JPS6168643A (en) | 1984-09-12 | 1984-09-12 | Extension system for interpreter type language function |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP19131784A JPS6168643A (en) | 1984-09-12 | 1984-09-12 | Extension system for interpreter type language function |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JPS6168643A true JPS6168643A (en) | 1986-04-09 |
| JPS6323587B2 JPS6323587B2 (en) | 1988-05-17 |
Family
ID=16272543
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP19131784A Granted JPS6168643A (en) | 1984-09-12 | 1984-09-12 | Extension system for interpreter type language function |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPS6168643A (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS648405A (en) * | 1987-07-01 | 1989-01-12 | Nec Corp | Numerical control method |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| KR102243472B1 (en) | 2018-12-17 | 2021-04-26 | 주식회사 경동원 | Sintering paste composition for bonding power semiconductor |
-
1984
- 1984-09-12 JP JP19131784A patent/JPS6168643A/en active Granted
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPS648405A (en) * | 1987-07-01 | 1989-01-12 | Nec Corp | Numerical control method |
Also Published As
| Publication number | Publication date |
|---|---|
| JPS6323587B2 (en) | 1988-05-17 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP2001510651A (en) | Reconfiguration method for run-time programmable components | |
| JPS63101931A (en) | Program control system | |
| JPS6168643A (en) | Extension system for interpreter type language function | |
| US20020078339A1 (en) | Booting system and booting method for an assistant operation system | |
| US5493727A (en) | Electronic equipment including means for controlling reading of control programs | |
| US6032173A (en) | Synchronization of a computer system having a plurality of processors | |
| JP2516915B2 (en) | Common area reference control method | |
| JP2585818B2 (en) | Program call processor | |
| JPH0246970B2 (en) | MEMORIKA KUCHOHOSHIKI | |
| JPS63120303A (en) | General-purpose controller | |
| KR0155868B1 (en) | Location data control method of multi-robot controller | |
| JPH07141189A (en) | Overlay linking system | |
| JP2573391B2 (en) | Programmable controller | |
| JPS5842486B2 (en) | Initial program load control method | |
| JPH08339303A (en) | Os switching device | |
| JP2663600B2 (en) | Control table relocation processing method | |
| JPS61216035A (en) | Method for processing overflow of address stack | |
| JP2507791B2 (en) | Data processing device | |
| JPS646487B2 (en) | ||
| JPS6261102A (en) | Executing method for program in programmable controller | |
| JPS61182163A (en) | Program expanding system | |
| JPS62297954A (en) | Memory control system | |
| JPS60201443A (en) | Data processing device | |
| JPH0393905U (en) | ||
| JPS61264444A (en) | Data processing system for central processing unit |