JPH02231639A - Calling system for service program - Google Patents

Calling system for service program

Info

Publication number
JPH02231639A
JPH02231639A JP5241089A JP5241089A JPH02231639A JP H02231639 A JPH02231639 A JP H02231639A JP 5241089 A JP5241089 A JP 5241089A JP 5241089 A JP5241089 A JP 5241089A JP H02231639 A JPH02231639 A JP H02231639A
Authority
JP
Japan
Prior art keywords
service program
address
program
service
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.)
Pending
Application number
JP5241089A
Other languages
Japanese (ja)
Inventor
Norihei Nakada
徳平 中田
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 JP5241089A priority Critical patent/JPH02231639A/en
Publication of JPH02231639A publication Critical patent/JPH02231639A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To attain the execution of a service program that can be executed in a non-priviledge mode by performing a calling procedure which shifts the control to an inlet address of the service program stored in an entry table with a jump or call instruction. CONSTITUTION:The inlet addresses 11 - 13 of service programs 41 - 43 are stored in an entry table 1 set in an address space 5 where the reference is possible to an application program. When the service program 42 is called out of an application program 3 stored in the space 5, a calling procedure 2 substitutes the contents of the inlet address 12 in the table 1 storing the inlet address of the program 42 for a variable X. Then the control is shifted to an address shown by the variable X with a jump or call instruction. Thus the service programs which are executed by calls are processed in the non-priviledge mode.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は電子計算機においてデータ処理を行う際のプロ
グラム呼出しに関し、特にオペレーティングシステムが
用意しているサービスプログラムをアプリケーションプ
ログラムが利用する際の呼出し方式に関する. 〔従来の技術〕 従来、この種のサービスプログラムの呼出し方式には、
以下のような方式があった. (1)SVC命令等の特殊な命令により特権モードに移
行し、サービスプログラムを実行する.(2》コンパイ
ルユニットライブラリとしてアプリケーションと静的に
リンクされ、通常のサブルーチンとして呼出す. (3)2と同様に動的にリンクされ、通常のサブルーチ
ンとして呼出す. (4》コールゲートによりセグメント間ジャンプ又はコ
ール命令にて呼出す. 〔発明が解決しようとする課題〕 上述した従来のサービスプログラム呼出し方式には、以
下のような欠点がある. (1)特殊命令辷より特権モードに移行する方式では、
サービスプログラムの内容が非特権モードでも良い場合
でも特権モードで実行してしまうため、サービスプログ
ラムのプログラムシステムによるシステムダウンを招く
可能性があり、信頼性が低下する. (2)静的にリンクして通常のサブルーチンとして呼出
す方式では、アプリケーションプログラムが大きくなり
、又、サービスプログラムを更新する場合、再リンクが
必要となる。
[Detailed Description of the Invention] [Field of Industrial Application] The present invention relates to program calling when data processing is performed in an electronic computer, and in particular to a calling method when an application program uses a service program prepared by an operating system. Regarding. [Prior Art] Conventionally, this type of service program calling method includes:
There was a method as follows. (1) Shift to privileged mode using a special command such as an SVC command and execute the service program. (2) It is statically linked with the application as a compilation unit library and called as a normal subroutine. (3) It is dynamically linked in the same way as 2 and called as a normal subroutine. (4) Jump between segments or Calling with a call instruction. [Problems to be solved by the invention] The conventional service program calling method described above has the following drawbacks: (1) In the method of shifting to privileged mode by issuing a special command,
Even if the contents of the service program can be in non-privileged mode, it is executed in privileged mode, which may cause the service program's program system to go down, reducing reliability. (2) In the method of statically linking and calling as a normal subroutine, the application program becomes large and relinking is required when updating the service program.

(3)動的にリンクして通常のサブルーチンとして呼出
す方式では、ロード時又はリンク命令により静的リンク
と同様に、アドレス解決のためのリンク作業を行うため
、実行時にオーバーヘッドがかかる。
(3) In the method of dynamically linking and calling as a normal subroutine, the linking work for address resolution is performed at load time or by a link instruction, similar to static linking, so overhead is incurred during execution.

(4)コールゲートによるセグメント間ジャンプ又はコ
ール命令により呼出す方式では、CPUがそれらの機能
を有している必要があるため、一般的なシステムでは適
用できない. 〔課題を解決するための手段〕 本発明のサービスプログラム呼出し方式の構成は、オペ
レーティングシステムが用意しているサービスプログラ
ム中で、非特権モードで実行可能なサービスプログラム
の入口アドレスを格納し、かつアプリケーションプログ
ラムが参照可能なアドレス空間の特定の番地に配置した
エントリテーブルと、前記非特権モードで実行するサー
ビスプログラムを呼出すため、前記エントリーテーブル
内に格納されたサービスプログラムの入口アドレスへジ
ャンプ命令又はコール命令により制御を移す呼出し手続
きを含んで構成されることを特徴とする。
(4) The method of jumping between segments using a call gate or calling using a call instruction requires the CPU to have these functions, so it cannot be applied in general systems. [Means for Solving the Problems] The structure of the service program calling method of the present invention is such that the entrance address of a service program that can be executed in a non-privileged mode is stored in a service program prepared by an operating system, and an application An entry table placed at a specific address in an address space that can be referenced by a program, and a jump instruction or call instruction to the entry address of the service program stored in the entry table in order to call the service program executed in the non-privileged mode. It is characterized in that it includes a calling procedure that transfers control.

〔実施例〕〔Example〕

次に、本発明について図面を参照して説明する. 第1図は本発明の一実施例を説明するためのアドレス空
間を示す図、第2図は第1図のサービスプログラム呼出
し手続きのブロックフローチャートであり、1はエトリ
テーブル、2は呼出し手続き、3はアプリケーションプ
ログラム、5はアプリケーションプログラムが参照でき
る空間、41〜43はサービスプログラムである. アプリケーショプログラムが参照できるアドレス空間5
内のエントリテーブル1には、サービスプログラム41
〜43の入口アドレス11〜13が格納されている.こ
のアドレス空間5内のアプリケーションプログラム3か
らサービスプログラム42を呼出す場合、呼出し手続き
2は第2区のブロックフローチャートに従い、サービス
プログラム42の入口アドレスを格納しているエントリ
テーブル内の入口アドレス12の内容を変数Xに代入し
、次にその変数Xが示す番地へジャンプ命令、又はコー
ル命令を使って制御を移す.尚、この場合のジャンプ命
令、又はコール命令は、アプリケーション内のサブルー
チン呼出しの際に使用しているものと同じ命令であり、
特権モードは変化しない.通常アプリケーションプログ
ラムは非特権モードで実行するため、上記呼出しによっ
て実行されるサービスプログラムは非特権モードで処理
を行うことになる。
Next, the present invention will be explained with reference to the drawings. FIG. 1 is a diagram showing an address space for explaining one embodiment of the present invention, and FIG. 2 is a block flowchart of the service program calling procedure of FIG. 1, where 1 is an entry table, 2 is a calling procedure, and 3 is an application program, 5 is a space that can be referenced by the application program, and 41 to 43 are service programs. Address space 5 that can be referenced by application programs
Entry table 1 in the service program 41
-43 entrance addresses 11-13 are stored. When calling the service program 42 from the application program 3 in this address space 5, the calling procedure 2 follows the block flowchart of the second section and reads the contents of the entry address 12 in the entry table storing the entry address of the service program 42. Assign to variable X, then transfer control to the address indicated by variable X using a jump instruction or call instruction. Note that the jump instruction or call instruction in this case is the same instruction that is used when calling a subroutine within the application.
Privilege mode does not change. Since an application program is normally executed in a non-privileged mode, the service program executed by the above call will perform processing in a non-privileged mode.

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

以上説明したように本発明は、非特権モードで実行可能
なサービスプログラムを非特権モードで実行することが
でき、かつ、エントリテーブルを使用することにより、
サービスプログラムとアプリケーションプログラムのア
ドレス解決のための静的および動的リンクを行う必要が
なく、かつ、サービスプログラム呼出しのための特別な
CPUの機能を必要としないという効果がある.
As explained above, the present invention can execute a service program that can be executed in a non-privileged mode in a non-privileged mode, and by using an entry table,
This has the advantage that there is no need to perform static or dynamic linking for address resolution between the service program and the application program, and no special CPU function is required for calling the service program.

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

第1図は本発明の一実施例を説明するためのアドレス空
間を示す図、第2図は第1図のアプリケーションプログ
ラム呼出し手続きのブロックフローチャートである. 1・・・エントリテーブル、2・・・呼出し手続き、3
・・・アプリケーションプログラム、5・・・アプリケ
ーションプログラムが参照できるアドレス空間、11・
・・サービスプログラム41の入口アドレス、12・・
・サービスプログラム42の入口アドレス、3・・・サ
ービスプログラム43の入口アドレス、4 1〜4 3・・・サービスプログラム.
FIG. 1 is a diagram showing an address space for explaining one embodiment of the present invention, and FIG. 2 is a block flowchart of the application program calling procedure of FIG. 1... Entry table, 2... Calling procedure, 3
...Application program, 5.Address space that can be referenced by the application program, 11.
...Entrance address of service program 41, 12...
- Entrance address of service program 42, 3... Entrance address of service program 43, 4 1 to 4 3... Service program.

Claims (1)

【特許請求の範囲】[Claims] オペレーティングシステムが用意しているサービスプロ
グラム中で、非特権モードで実行可能なサービスプログ
ラムの入口アドレスを格納し、かつ、アプリケーション
プログラムが参照可能なアドレス空間の特定の番地に配
置したエントリテーブルと、前記非特権モードで実行す
るサービスプログラムを呼出すため、前記エントリーテ
ーブル内に格納されたサービスプログラムの入口アドレ
スへジャンプ命令又はコール命令により制御を移す呼出
し手続きを含むことを特徴とするサービスプログラム呼
出し方式。
an entry table that stores the entry address of a service program that can be executed in a non-privileged mode among service programs prepared by the operating system and is located at a specific address in an address space that can be referenced by an application program; A service program calling method comprising a calling procedure for transferring control to an entry address of the service program stored in the entry table by a jump instruction or a call instruction in order to call a service program executed in a non-privileged mode.
JP5241089A 1989-03-03 1989-03-03 Calling system for service program Pending JPH02231639A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5241089A JPH02231639A (en) 1989-03-03 1989-03-03 Calling system for service program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5241089A JPH02231639A (en) 1989-03-03 1989-03-03 Calling system for service program

Publications (1)

Publication Number Publication Date
JPH02231639A true JPH02231639A (en) 1990-09-13

Family

ID=12914017

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5241089A Pending JPH02231639A (en) 1989-03-03 1989-03-03 Calling system for service program

Country Status (1)

Country Link
JP (1) JPH02231639A (en)

Similar Documents

Publication Publication Date Title
US5369770A (en) Standardized protected-mode interrupt manager
JPH01154267A (en) Incorporating system for input/output device control program of operating system
JPH06110678A (en) Program execution system and dynamic change method for execution program
EP0417916B1 (en) Procedure state descriptor system for digital data processors
JPH02231639A (en) Calling system for service program
JP2555920B2 (en) Online real-time processor
JPH0619717A (en) Information processor
JPS60263238A (en) Information processor
JPH0221610B2 (en)
JPS6156816B2 (en)
JP3079228B2 (en) Basic program execution method
JP2507791B2 (en) Data processing device
JP2591818B2 (en) Auxiliary function selection control method
JPH06119190A (en) Task switching processing system
JPH04266126A (en) Control system for subroutine call
JP3019330B2 (en) Compiling device
JPH02253337A (en) Memory control system for internal table of linkage editor
JPH04178738A (en) Register allocation system
JPH04101220A (en) Program execution control transferring system
JPS60214046A (en) Control system for abnormal end processing
JPS63184136A (en) Optimization processing system
JPS6389962A (en) Method and device for assigning processor
JPH04155523A (en) Computer program operating environment setting control method
JPS638841A (en) Interruption accepting system
Bordbar Operating Systems and Networks