Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JPH0640312B2 - Program interface method - Google Patents
[go: Go Back, main page]

JPH0640312B2 - Program interface method - Google Patents

Program interface method

Info

Publication number
JPH0640312B2
JPH0640312B2 JP60146120A JP14612085A JPH0640312B2 JP H0640312 B2 JPH0640312 B2 JP H0640312B2 JP 60146120 A JP60146120 A JP 60146120A JP 14612085 A JP14612085 A JP 14612085A JP H0640312 B2 JPH0640312 B2 JP H0640312B2
Authority
JP
Japan
Prior art keywords
procedure
instruction set
instruction
address
calling
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.)
Expired - Lifetime
Application number
JP60146120A
Other languages
Japanese (ja)
Other versions
JPS626331A (en
Inventor
正人 牧下
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.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP60146120A priority Critical patent/JPH0640312B2/en
Publication of JPS626331A publication Critical patent/JPS626331A/en
Publication of JPH0640312B2 publication Critical patent/JPH0640312B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Executing Machine-Instructions (AREA)

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、コンピュータシステムにおける実行プログラ
ム手順間の呼び出し方式に関し、特に、異なる命令セッ
トからなる手順間のプログラムインタフェース方式に関
する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a calling method between execution program procedures in a computer system, and more particularly to a program interface method between procedures having different instruction sets.

〔概要〕〔Overview〕

本発明は、コンピュータシステムにおける異なる命令セ
ットからなる手順間のプログラムインタフェース方式に
おいて、 一つの手順から他の手順を呼び出す場合は、命令セット
を他の命令セットに変換した後他の手順を呼び出し、他
の手順からもとの手順に制御を戻す場合も命令セットを
変換した後、制御を戻すようにすることにより、 異なる命令セットからなる手順間の呼び出し処理を少な
いオーバヘッドで高い自由度でもって実行できるように
したものである。
According to the present invention, in a program interface method between procedures having different instruction sets in a computer system, when one procedure calls another procedure, after converting the instruction set to another instruction set, another procedure is called, Even if control is returned from the procedure of step 1, the control processing is performed after converting the instruction set, so that the calling process between procedures of different instruction sets can be executed with a small overhead and a high degree of freedom. It was done like this.

〔従来の技術〕[Conventional technology]

従来、この種の二種類あるいはそれ以上の命令セットを
備えたコンピュータシステムでは、第3図に示すよう
に、同じ命令セットの手順301、303の間で呼び出し手段3
02による呼び出しと、戻り手段304による制御の戻りが
行われていた。さらに、第4図に示すように、異なる命
令セット406、407を持つ手順401、404の間では、呼び出し
側の手順401の割り込み402によってシステムプログラム
403を呼び出して呼び出され側の手順404を起動してもら
い、手順404の終了も割り込み405によってシステムプロ
グラム403に知らせ、手順401を再開するようになってい
た。
Conventionally, in a computer system having two or more instruction sets of this kind, as shown in FIG. 3, the calling means 3 is used between the steps 301 and 303 of the same instruction set.
The call by 02 and the return of the control by the return means 304 were performed. Further, as shown in FIG. 4, between the steps 401 and 404 having different instruction sets 406 and 407, the system program is executed by the interrupt 402 of the calling side procedure 401.
403 is called and the called procedure 404 is activated, and the termination of the procedure 404 is notified to the system program 403 by the interrupt 405, and the procedure 401 is restarted.

〔発明が解決しようとする問題点〕[Problems to be solved by the invention]

上述した従来のコンピュータシステムにおけるプログラ
ムインタフェース方式では、システムプログラムの介入
なしでは異なる命令セットを持つ手順間の呼び出しはで
きず、システムプログラムのオーバヘッドが大きかった
り、パラメータの引き渡し方法の自由度が限られる欠点
があった。
In the above-mentioned program interface method in the computer system, it is impossible to call between procedures having different instruction sets without intervention of the system program, so that the overhead of the system program is large and the degree of freedom of parameter passing method is limited. was there.

本発明の目的は、上記の欠点を除去することにより、異
なる命令セットからなる手順間の呼出処理を少ないオー
バヘッドで、かつ高い自由度をもたせて実行でき、ユー
ザプログラムで命令セットの切り換えが可能となり、全
システムをそのまま実行できるだけでなく、ユーザプロ
グラムを部分的に実行できるプログラムインタフェース
方式を提供することにある。
The object of the present invention is to eliminate the above-mentioned drawbacks, so that the calling process between procedures having different instruction sets can be executed with a small overhead and a high degree of freedom, and the instruction set can be switched by the user program. , It is to provide a program interface method that can not only execute the entire system as it is, but also partially execute a user program.

〔問題点を解決するための手段〕[Means for solving problems]

本発明は、第1の手順からこの第1の手順とは異なるア
ドレス形式の命令セットの他の第2の手順を呼び出し、
呼び出された上記第2の手順から呼び出した上記第1の
手順に制御を戻すコンピュータシステムにおけるプログ
ラムインタフェース方式において、上記第1の手順の命
令セットおよび上記第2の手順のそれぞれの命令セット
を備え、上記第1の手順の呼出し手段および上記第2の
手順の戻し手段によりその処理の実行が開始されるイン
タフェース手段を設け、このインタフェース手段は、上
記第1の手順の命令セットのアドレス長から上記第2の
手順のアドレス長へ切り換える第1の命令セット切り換
え手段と、この第1の命令セット切り換え手段で切り換
えられた第2の手順の命令セットで上記第2の手順を呼
び出す呼出し手段と、上記第2の手順の命令セットのア
ドレス長から上記第1の手順のアドレス長の命令セット
に切り換える第2の命令セット切り換え手段と、この第
2の命令セット切り換え手段で切り換えられた第1の手
順の命令セットで制御を上記第1の手順に戻す戻し手段
とを含むことを特徴とする。
The present invention calls from the first procedure another second procedure of an instruction set having an address format different from the first procedure,
In a program interface method in a computer system for returning control from the called second procedure to the first procedure called, the instruction set of the first procedure and the instruction set of the second procedure are provided, There is provided interface means for starting the execution of the processing by the calling means of the first procedure and the returning means of the second procedure, which interface means is based on the address length of the instruction set of the first procedure. First instruction set switching means for switching to the address length of the second procedure; calling means for calling the second procedure with the instruction set of the second procedure switched by the first instruction set switching means; Second, the address length of the instruction set of the second procedure is switched to the instruction set of the address length of the first procedure And instruction sets switching means, characterized in that the control by the instruction set of the second first procedure is switched by the instruction set switching means includes a return means returning to the first step.

〔作用〕[Action]

本発明は、一つの手順から異なる命令セットの他の手順
を呼び出す場合、命令セットを他の命令セットに変換し
た後に他の手順を呼び出し、他の手順から呼び出し側の
他の手順に制御を戻す場合には命令セットをもとの命令
セットに変換した後にもとの手順に制御を戻すことがで
きる。従って従来のようにシステムプログラムを必要と
せずに異なる命令セットからなる手順間の呼び出し処理
が可能となる。
According to the present invention, when one procedure calls another procedure of a different instruction set, after converting the instruction set to another instruction set, the other procedure is called, and control is returned from the other procedure to another procedure of the calling side. In some cases, control may be returned to the original procedure after converting the instruction set to the original instruction set. Therefore, unlike the prior art, it is possible to perform a calling process between procedures having different instruction sets without requiring a system program.

〔実施例〕〔Example〕

次に、本発明の実施例について図面を参照して説明す
る。
Next, embodiments of the present invention will be described with reference to the drawings.

第1図は本発明の一実施例を示す構成図である。命令セ
ット101 からなる第1の手順102は、呼び出し手段103によってイ
ンタフェース手段104を呼び出す。第1の手順102から見
たインタフェース手段104は、同じ命令セット101からな
る手順である。インタフェース手段104は命令セット切
り換え手段105によって実行中のものとは異なる命令セ
ット106(⇒で命令の続きを示す。)に切り換える。命
令セット切り換え手段105実行後の命令の取り出しは、
命令セット切り換え手段105の次の番地から行われる。
次に、インタフェース手段104は呼び出し手段107によっ
て第2の手順108を呼び出す。第2の手順108から見たイ
ンタフェース手段104は、同じ命令セット106からなる手
順である。第2の手順108は、処理を終了すると戻り手
段109によってインタフェース手段104に制御を戻す。イ
ンタフェース手段104は、命令セット切り換え手段110に
よって命令セット101に切り換えてから戻り手段111によ
って第1の手順102に制御を戻す。ここで、命令セット
切り換え手段105は命令セット101に属し、命令セット切
り換え手段110は命令セット106に属し、各々逆方向の機
能を持っている。以上の処理によると、第1の手順102
は、呼び出し手段103によって、異なる命令セットから
なる第2の手順108を呼び出したのと同じと考えること
ができる。
FIG. 1 is a block diagram showing an embodiment of the present invention. Instruction set 101 A first procedure 102 consisting of calling the interface means 104 by the calling means 103. The interface means 104 seen from the first procedure 102 is a procedure consisting of the same instruction set 101. The interface means 104 switches by the instruction set switching means 105 to an instruction set 106 (⇒ indicates the continuation of the instruction) different from the one being executed. Instruction fetch after execution of instruction set switching means 105
It is performed from the next address of the instruction set switching means 105.
Next, the interface means 104 calls the second procedure 108 by the calling means 107. The interface means 104 seen from the second procedure 108 is a procedure consisting of the same instruction set 106. In the second procedure 108, when the processing is completed, the return means 109 returns the control to the interface means 104. The interface means 104 switches to the instruction set 101 by the instruction set switching means 110 and then returns the control to the first procedure 102 by the returning means 111. Here, the instruction set switching means 105 belongs to the instruction set 101, and the instruction set switching means 110 belongs to the instruction set 106, and each has a reverse function. According to the above processing, the first procedure 102
Can be considered to be the same as the second procedure 108 consisting of different instruction sets being called by the calling means 103.

本発明の特徴は、第1図において、インタフェース手段
104により、異なる命令セットを相手先の命令セットに
変換した後に、呼び出しおよび制御の戻しを行うように
したことにある。
The feature of the present invention is that the interface means in FIG.
According to 104, after the different instruction set is converted into the destination instruction set, the calling and the control are returned.

第2図(a)、(b)は、異なるアドレス形式を持つ命令セッ
トにおける第1図の命令セット切り換え手段の一例を示
す説明図である。アドレス空間A204を持つ命令セット
に属する命令セット切り換え手段206によって、アドレ
ス空間B205を持つ命令セットに切り換えたとする。命
令セット切り換え手段206の次の命令207は、第2図(a)
に示すように、アドレス空間A204上では、A′201′の
アドレスを持ち、アドレス空間B205上ではB′202′の
アドレスを持つ。ここでアドレス空間A204上のアドレ
ス空間B205の位置をC′203′とすると、A′201′は
B′202′とC′203′を加えたものになり、同図(b)に
示すように、C′203′の値を調整することによって、
アドレス形式を同図(b)に示すように、A201とB202お
よびC203のような関係にすることができる。従って、
命令セット切り換え手段206で、A201からB202を求め
ることは容易に行うことが可能であり、その処理によっ
て異なるアドレス形式を持つ命令セット間でも命令セッ
トの切り換えを行うことができる。アドレス空間B205
の命令セットからアドレス空間A204の命令セットに切
り換える場合は、B202にあらかじめ定められたC203を
加えることによって、A201を求める。ここで、少なく
とも命令セット切り換え手段206と次の命令207は、アド
レス空間A204とアドレス空間B205の両方になければな
らない。
FIGS. 2A and 2B are explanatory views showing an example of the instruction set switching means of FIG. 1 in the instruction sets having different address formats. It is assumed that the instruction set switching means 206 belonging to the instruction set having the address space A204 has switched to the instruction set having the address space B205. The next instruction 207 of the instruction set switching means 206 is shown in FIG.
As shown in, the address space A204 has an address of A'201 ', and the address space B205 has an address of B'202'. Assuming that the position of the address space B205 on the address space A204 is C'203 ', A'201' is a combination of B'202 'and C'203', as shown in FIG. , By adjusting the value of C'203 ',
The address format can have a relationship such as A201, B202 and C203 as shown in FIG. Therefore,
It is possible to easily obtain A202 from B201 by the instruction set switching means 206, and it is possible to switch the instruction sets between the instruction sets having different address formats by the processing. Address space B205
When switching from the instruction set of A to the instruction set of the address space A204, A201 is obtained by adding a predetermined C203 to B202. Here, at least the instruction set switching means 206 and the next instruction 207 must be in both the address space A204 and the address space B205.

ここでは、命令セットAと命令セットBとは、第5図
(a)に示すようにアドレスを示すオペランドの長さが異
なる命令となっている。このような命令セットを切り換
えるには、命令セット切り換え手段105、110の命令によ
り、メモリから読み出された命令のアドレス長を切り換
えて最終的な実行アドレスを求める。この実行アドレス
を求めるには命令セット切り換え命令により、アドレス
長を切り換える命令セット切り換え装置を制御すればよ
い。このときの命令セット切り換え装置による実行アド
レスを求める構成例を第5図(b)に示す。このときメモ
リ上の命令の長さが例えば24ビットであるか32ビットで
あるかを判定している。
Here, the instruction set A and the instruction set B are shown in FIG.
As shown in (a), the instructions have different lengths of operands indicating addresses. In order to switch such an instruction set, the address length of the instruction read from the memory is switched by the instruction of the instruction set switching means 105, 110 to obtain the final execution address. To obtain the execution address, the instruction set switching device for switching the address length may be controlled by the instruction set switching instruction. FIG. 5 (b) shows an example of the configuration for obtaining the execution address by the instruction set switching device at this time. At this time, it is determined whether the length of the instruction on the memory is, for example, 24 bits or 32 bits.

〔発明の効果〕〔The invention's effect〕

以上説明したように本発明は、命令セット切り換えを行
うプログラムインタフェースの手順を提供することによ
り、異なる命令セットからなる手順間の呼び出し処理を
少ないオーバヘッドで高い自由度を持たせて実行させる
ことのできる効果がある。
As described above, according to the present invention, by providing the procedure of the program interface for switching the instruction set, it is possible to execute the calling process between the procedures having different instruction sets with a small overhead and a high degree of freedom. effective.

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

第1図は本発明の一実施例を示す構成図。 第2図(a)、(b)は第1図の命令セット切り換え手段の一
例の説明図。 第3図は第1の従来例を示す構成図。 第4図は第2の従来例を示す構成図。 第5図は本発明の実施例の命令セット切り換え例を説明
する図。 101、106……各命令セットの命令の続き、102……第1の
手順、103、107……呼び出し手段、104……インタフェー
ス手段、105、110……命令セット切り換え手段、108……
第2の手順、109、111……戻り手段、201、201′……アド
レスA、A′、202、202′……アドレスB、B′、203、2
03′……アドレスC、C′、204……アドレス空間A、2
05……アドレス空間B、206……命令セット切り換え手
段、207……次の命令、301、303、401、404……手順、302
……呼び出し手段、304……戻り手段、402……呼び出し
の割り込み、403……システムプログラム、405……戻り
の割り込み、406、407……命令の続き。
FIG. 1 is a block diagram showing an embodiment of the present invention. 2 (a) and 2 (b) are explanatory views of an example of the instruction set switching means of FIG. FIG. 3 is a block diagram showing a first conventional example. FIG. 4 is a block diagram showing a second conventional example. FIG. 5 is a diagram for explaining an example of instruction set switching according to the embodiment of the present invention. 101, 106 ... Continuation of instructions of each instruction set, 102 ... First procedure, 103, 107 ... Calling means, 104 ... Interface means, 105, 110 ... Instruction set switching means, 108 ...
Second procedure, 109, 111 ... Returning means, 201, 201 '... Address A, A', 202, 202 '... Address B, B', 203, 2
03 '... address C, C', 204 ... address space A, 2
05 ... address space B, 206 ... instruction set switching means, 207 ... next instruction, 301, 303, 401, 404 ... procedure, 302
...... Calling means, 304 ...... Returning means, 402 …… Call interruption, 403 …… System program, 405 …… Return interruption, 406, 407 …… Continuation of instructions.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】第1の手順からこの第1の手順とは異なる
アドレス形式の命令セットの他の第2の手順を呼び出
し、呼び出された上記第2の手順から呼び出した上記第
1の手順に制御を戻すコンピュータシステムにおけるプ
ログラムインタフェース方式において、 上記第1の手順の命令セットおよび上記第2の手順のそ
れぞれの命令セットを備え、上記第1の手順の呼出し手
段および上記第2の手順の戻し手段によりその処理の実
行が開始されるインタフェース手段を設け、 このインタフェース手段は、 上記第1の手順の命令セットのアドレス長から上記第2
の手順のアドレス長へ切り換える第1の命令セット切り
換え手段と、 この第1の命令セット切り換え手段で切り換えられた第
2の手順の命令セットで上記第2の手順を呼び出す呼出
し手段と、 上記第2の手順の命令セットのアドレス長から上記第1
の手順のアドレス長の命令セットに切り換える第2の命
令セット切り換え手段と、 この第2の命令セット切り換え手段で切り換えられた第
1の手順の命令セットで制御を上記第1の手順に戻す戻
し手段と を含むことを特徴とするプログラムインタフェース方
式。
1. The first procedure calls another second procedure of an instruction set having an address format different from that of the first procedure, and the second procedure called from the second procedure called to the first procedure called. A program interface method in a computer system for returning control, comprising an instruction set of the first procedure and an instruction set of each of the second procedure, and calling means of the first procedure and returning means of the second procedure. Interface means for starting the execution of the processing by means of the interface means.
First instruction set switching means for switching to the address length of the second procedure, calling means for calling the second procedure with the instruction set of the second procedure switched by the first instruction set switching means, and the second instruction set switching means. From the address length of the instruction set of the procedure
Second instruction set switching means for switching to the instruction set having the address length of the procedure of 1. and returning means for returning the control to the first procedure by the instruction set of the first procedure switched by the second instruction set switching means. A program interface method characterized by including and.
JP60146120A 1985-07-03 1985-07-03 Program interface method Expired - Lifetime JPH0640312B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP60146120A JPH0640312B2 (en) 1985-07-03 1985-07-03 Program interface method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP60146120A JPH0640312B2 (en) 1985-07-03 1985-07-03 Program interface method

Publications (2)

Publication Number Publication Date
JPS626331A JPS626331A (en) 1987-01-13
JPH0640312B2 true JPH0640312B2 (en) 1994-05-25

Family

ID=15400605

Family Applications (1)

Application Number Title Priority Date Filing Date
JP60146120A Expired - Lifetime JPH0640312B2 (en) 1985-07-03 1985-07-03 Program interface method

Country Status (1)

Country Link
JP (1) JPH0640312B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH01283636A (en) * 1988-05-11 1989-11-15 Hitachi Ltd Control system for procedure execution environment

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5057348A (en) * 1973-09-19 1975-05-19
JPS54129846A (en) * 1978-03-31 1979-10-08 Hitachi Ltd Emulator system
JPS5748141A (en) * 1980-09-03 1982-03-19 Hitachi Ltd Address conversion system
JPS61272825A (en) * 1985-05-29 1986-12-03 Nec Corp Information store and forward switching system

Also Published As

Publication number Publication date
JPS626331A (en) 1987-01-13

Similar Documents

Publication Publication Date Title
JPH0640312B2 (en) Program interface method
JP2710151B2 (en) How the automation device works
JP2003202999A (en) Virtual computer system
JPH02128250A (en) Access control circuit for information processor
JPH05134960A (en) Local processing system
JPH0452975B2 (en)
JPS615361A (en) Communication interface circuit
JPH11327921A (en) Thread priority control device and thread priority control method in computer system
JP3452656B2 (en) DMA controller
JP2507791B2 (en) Data processing device
JPH02176832A (en) Microcomputer
JPH04127260A (en) Exclusive control circuit for multiprocessor system
JPH04335455A (en) Communication system between computers of different code systems
JPH08106432A (en) DMA control circuit
JPH05108376A (en) Computer system
JPS61118836A (en) Microprogram controller
JPH0437928A (en) Data processing method
JPH0497435A (en) Control system for exceptional treatment
JPH047742A (en) Controlling system for application program
JPH103463A (en) Communication method between processors
JPS63180164A (en) Program control system
JPS61127058A (en) Multiplex processor system
JPH03266057A (en) Communication processing securing method for electronic computer system
JPH07302221A (en) Digital circuit
JPS6378255A (en) Execution system for program