JPH05313916A - Interrupt processing method in electronic computer and electronic computer - Google Patents
Interrupt processing method in electronic computer and electronic computerInfo
- Publication number
- JPH05313916A JPH05313916A JP11638192A JP11638192A JPH05313916A JP H05313916 A JPH05313916 A JP H05313916A JP 11638192 A JP11638192 A JP 11638192A JP 11638192 A JP11638192 A JP 11638192A JP H05313916 A JPH05313916 A JP H05313916A
- Authority
- JP
- Japan
- Prior art keywords
- interrupt
- interrupt processing
- processing program
- saved
- contents
- 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
Links
Abstract
(57)【要約】
【目的】どのような割込みレベルの割込み要求が連続し
て発生したとしても、割込み要求の有無のチェック後、
直ちに、後の割込み要求に対応する割込み処理プログラ
ムを実行できるようにする。
【構成】割込み要求に基づいて、割込み処理プログラム
を実行した場合、その終了後、RAMに退避させている
CPUのレジスタの内容のうち、割込みレベル情報のみ
を復帰させる。
(57) [Summary] [Purpose] Even if interrupt requests of any interrupt level occur continuously, after checking for the existence of an interrupt request,
Immediately, the interrupt processing program corresponding to the subsequent interrupt request can be executed. When an interrupt processing program is executed based on an interrupt request, only the interrupt level information of the contents of the CPU register saved in the RAM is restored after the execution.
Description
【0001】[0001]
【産業上の利用分野】本発明は、電子計算機における割
込み処理方法(以下、単に割込み処理方法という)及び
電子計算機に関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an interrupt processing method (hereinafter simply referred to as an interrupt processing method) in an electronic computer and an electronic computer.
【0002】[0002]
【従来の技術】従来、電子計算機、例えば、マイクロコ
ンピュータとして、図4にその要部を示すようなものが
知られている。2. Description of the Related Art Conventionally, as an electronic computer, for example, a microcomputer, a computer whose main part is shown in FIG. 4 is known.
【0003】図中、1はチップ本体、2は命令の実行を
行うCPU、3はデータの格納に使用されるRAM、4
はプログラム(主処理プログラム、割込み処理プログラ
ム)を格納するROM、5はバス、6は割込み処理ユニ
ット、7、8はリソースである。In the figure, 1 is a chip body, 2 is a CPU for executing instructions, 3 is a RAM used for storing data, 4
Is a ROM for storing programs (main processing program, interrupt processing program), 5 is a bus, 6 is an interrupt processing unit, and 7 and 8 are resources.
【0004】また、CPU2において、9はレジスタ群
であり、特に、10はCPU2の動作を制御する制御フ
ラグを集めたレジスタ、いわゆるプロセッサ・ステータ
ス(PS)、11はプログラムの中の命令のアドレスを
示すレジスタ、いわゆるプログラム・カウンタ(P
C)、12はRAM3内のスタックと呼ばれる領域を示
すレジスタ、いわゆるスタック・ポインタ(SP)であ
る。Further, in the CPU 2, 9 is a register group, particularly 10 is a register collecting control flags for controlling the operation of the CPU 2, so-called processor status (PS), and 11 is an address of an instruction in a program. The register shown, the so-called program counter (P
C) and 12 are registers indicating an area called a stack in the RAM 3, so-called stack pointer (SP).
【0005】従来、かかるマイクロコンピュータにおい
ては、割込み処理は、例えば、図5に示すように行われ
ていた。即ち、割込み処理ユニット6を介して割込み要
求があると、主処理プログラムの実行は中断され、CP
U2のレジスタ群9の内容がRAM3に退避される。Conventionally, in such a microcomputer, interrupt processing has been performed, for example, as shown in FIG. That is, when an interrupt request is issued via the interrupt processing unit 6, the execution of the main processing program is interrupted and the CP
The contents of the U2 register group 9 are saved in the RAM 3.
【0006】次に、割込み要求に対応する割込み処理プ
ログラムが実行され、それが終了すると、RAM3に退
避されていたCPU2のレジスタ群9の内容が割込み復
帰命令によってレジスタ群9に復帰される。Next, the interrupt processing program corresponding to the interrupt request is executed, and when the interrupt processing program is completed, the contents of the register group 9 of the CPU 2 saved in the RAM 3 are restored to the register group 9 by the interrupt restoration instruction.
【0007】次に、割込み要求の有無がチェックされ、
割込み要求がある場合は、CPU2のレジスタ群9の内
容が再びRAM3に退避された後、対応する割込み処理
プログラムが実行され、割込み要求がない場合は、中断
されていた主処理プログラムに復帰し、これが実行され
る。Next, the presence or absence of an interrupt request is checked,
If there is an interrupt request, the contents of the register group 9 of the CPU 2 are saved in the RAM 3 again, then the corresponding interrupt processing program is executed, and if there is no interrupt request, the interrupted main processing program is restored, This is done.
【0008】この割込み処理方法においては、割込み要
求に対応する割込み処理プログラムが終了するたびに、
RAM3に退避させたCPU2のレジスタ群9の内容を
復帰させるようにしているので、割込み要求が連続して
起こった場合、レジスタ群9の内容を再びRAM3に退
避させなければならず、その分、割込み処理プログラム
の着手が遅くなってしまうという問題点があった。In this interrupt processing method, each time the interrupt processing program corresponding to the interrupt request is completed,
Since the contents of the register group 9 of the CPU 2 saved in the RAM 3 are restored, if the interrupt requests occur successively, the contents of the register group 9 must be saved in the RAM 3 again. There was a problem that the start of the interrupt processing program was delayed.
【0009】そこで、また、従来、図6に示すような割
込み処理方法が提案されている。この方法においては、
割込み処理ユニット6を介して割込み要求があると、主
処理プログラムの実行は中断され、CPU2のレジスタ
群9の内容がRAM3に退避される。Therefore, conventionally, an interrupt processing method as shown in FIG. 6 has been proposed. In this way,
When an interrupt request is issued via the interrupt processing unit 6, the execution of the main processing program is interrupted and the contents of the register group 9 of the CPU 2 are saved in the RAM 3.
【0010】次に、割込み要求に対応する割込み処理プ
ログラムが実行され、それが終了すると、割込み要求の
有無がチェックされ、割込み要求がある場合は、そのま
ま連続して、対応する割込み処理プログラムが実行さ
れ、割込み要求がない場合は、RAM3に退避させてい
たCPU2のレジスタ群9の内容が復帰され、中断され
ていた主処理プログラムに復帰し、これが実行される。Next, the interrupt processing program corresponding to the interrupt request is executed, and when it finishes, the presence or absence of the interrupt request is checked. If there is an interrupt request, the corresponding interrupt processing program is continuously executed. If there is no interrupt request, the contents of the register group 9 of the CPU 2 saved in the RAM 3 are restored, the interrupted main processing program is restored, and this is executed.
【0011】この割込み処理方法によれば、割込み要求
に対応する割込み処理プログラムが終了した後、RAM
3に退避させているレジスタ群9の内容を復帰させず、
割込み要求の有無をチェックし、割込み要求がある場合
は、そのまま連続して、対応する割込み処理プログラム
を実行するようにしているので、遅延なく、直ちに、後
の割込み処理を行うことができる。According to this interrupt processing method, the RAM is processed after the interrupt processing program corresponding to the interrupt request is completed.
The contents of the register group 9 saved in 3 are not restored,
The presence or absence of an interrupt request is checked, and if there is an interrupt request, the corresponding interrupt processing program is continuously executed as it is, so that the subsequent interrupt processing can be performed immediately without delay.
【0012】[0012]
【発明が解決しようとする課題】しかし、CPU2のプ
ロセッサ・ステータス10には処理モードとして割込み
レベルが書き込まれるので、図6に示す割込み処理方法
においては、優先度の高い、即ち、割込みレベルの高い
割込み要求に連続して割込みレベルの低い割込み要求が
発生した場合、このままでは、この割込みレベルの低い
割込み要求を受け付けることができないという問題点が
あった。However, since the interrupt level is written as the processing mode in the processor status 10 of the CPU 2, the interrupt processing method shown in FIG. 6 has a high priority, that is, a high interrupt level. When an interrupt request with a low interrupt level is generated consecutively to the interrupt request, there is a problem that the interrupt request with a low interrupt level cannot be accepted as it is.
【0013】本発明は、かかる点に鑑み、どのような割
込みレベルの割込み要求が連続して発生したとしても、
割込み要求の有無のチェック後、直ちに、連続する割込
み要求に対応する割込み処理プログラムを実行できるよ
うにした割込み処理方法及び電子計算機を提供すること
を目的とする。In view of the above point, the present invention makes it possible to continuously generate interrupt requests of any interrupt level.
An object of the present invention is to provide an interrupt processing method and an electronic computer capable of executing an interrupt processing program corresponding to consecutive interrupt requests immediately after checking the presence or absence of an interrupt request.
【0014】[0014]
【課題を解決するための手段】本発明による割込み処理
方法の第1例は、割込み要求に基づいて、対応する割込
み処理プログラムを実行した場合、その終了後、退避さ
せている命令実行部のレジスタの内容のうち、割込みレ
ベル情報のみを復帰させるというものである。A first example of an interrupt processing method according to the present invention is such that, when a corresponding interrupt processing program is executed on the basis of an interrupt request, the register of the instruction execution unit saved after the execution of the interrupt processing program. Of the contents of, only the interrupt level information is restored.
【0015】本発明による電子計算機の第1例は、本発
明による割込み処理方法の第1例を実施するためのもの
であり、割込み処理終了後、退避させている命令実行部
のレジスタの内容のうち、割込みレベル情報のみを復帰
させる手段を設けて構成される。The first example of the electronic computer according to the present invention is for carrying out the first example of the interrupt processing method according to the present invention. After the interrupt processing is completed, the contents of the register of the instruction execution unit saved are saved. Of these, a means for returning only the interrupt level information is provided.
【0016】本発明による割込み処理方法の第2例は、
割込み要求に基づいて、対応する割込み処理プログラム
を実行した場合において、その終了後、連続して割込み
処理を行う場合、退避させている命令実行部のレジスタ
の内容を後の割込み処理で使用する場合には、先の割込
み処理プログラムの実行終了後、退避させている命令実
行部のレジスタの内容を復帰させるというものである。A second example of the interrupt processing method according to the present invention is as follows:
When the corresponding interrupt processing program is executed based on an interrupt request and the interrupt processing is continuously performed after the execution, when the saved contents of the register of the instruction execution unit is used in the subsequent interrupt processing Is to restore the saved contents of the register of the instruction execution unit after the execution of the interrupt processing program.
【0017】本発明による電子計算機の第2例は、本発
明による割込み処理方法の第2例を実施するためのもの
であり、割込み処理終了後、連続して割込み処理を行う
場合、退避させている命令実行部のレジスタの内容を後
の割込み処理で使用する場合には、先の割込み処理プロ
グラムの実行終了後、前記退避させている命令実行部の
レジスタの内容を復帰させる手段を設けて構成される。A second example of the electronic computer according to the present invention is for carrying out the second example of the interrupt processing method according to the present invention. When interrupt processing is continuously performed after completion of interrupt processing, save it. When the content of the register of the instruction execution unit is used in the subsequent interrupt processing, a means is provided for restoring the saved content of the register of the instruction execution unit after the execution of the interrupt processing program is completed. To be done.
【0018】[0018]
【作用】本発明による割込み処理方法の第1例において
は、割込み処理プログラムの実行終了後、退避させてい
る命令実行部のレジスタの内容を全て復帰させるように
はしていないが、少なくとも、割込みレベル情報を復帰
させるようにしているので、割込みレベルの高い割込み
要求に連続して割込みレベルの低い割込み要求が発生し
たとしても、この割込みレベルの低い割込み要求を受け
付けることができる。In the first example of the interrupt processing method according to the present invention, after the completion of the execution of the interrupt processing program, all the contents of the saved registers of the instruction execution unit are not restored. Since the level information is restored, even if an interrupt request with a low interrupt level occurs successively with an interrupt request with a high interrupt level, the interrupt request with a low interrupt level can be accepted.
【0019】また、この第1例の割込み処理方法におい
ては、このように、割込み要求に基づいて、対応する割
込み処理プログラムを実行した場合、その終了後、退避
させている命令実行部のレジスタの内容を全て復帰させ
るようにはしていないので、連続して割込み要求があっ
た場合には、命令実行部のレジスタの内容を全て再び退
避させるという手順を必要としない。Further, in the interrupt processing method of the first example, when the corresponding interrupt processing program is executed on the basis of the interrupt request as described above, after the completion of the interrupt processing program, the register of the instruction execution unit saved is saved. Since all the contents are not restored, it is not necessary to save all the contents of the register of the instruction execution unit again when there are consecutive interrupt requests.
【0020】即ち、この第1例の割込み処理方法によれ
ば、どのような割込みレベルの割込み要求が連続して発
生したとしても、割込み要求の有無のチェック後、直ち
に、連続する割込み要求に対応する割込み処理プログラ
ムを実行することができる。That is, according to the interrupt processing method of the first example, no matter what interrupt level interrupt request occurs continuously, immediately after the presence or absence of the interrupt request is checked, continuous interrupt requests are dealt with. It is possible to execute the interrupt processing program.
【0021】また、本発明による割込み処理方法の第2
例においては、割込み要求に基づいて、対応する割込み
処理プログラムを実行した場合において、その終了後、
連続して割込み処理を行う場合、退避させている命令実
行部のレジスタの内容を後の割込み処理で使用する場合
には、先の割込み処理プログラムの実行終了後、退避さ
せている命令実行部のレジスタの内容を復帰させるとし
ているので、割込みレベル情報も復帰されることにな
り、この結果、割込みレベルの高い割込み要求に連続し
て割込みレベルの低い割込み要求が発生したとしても、
この割込みレベルの低い割込み要求を受け付けることが
できる。The second aspect of the interrupt processing method according to the present invention
In the example, when the corresponding interrupt processing program is executed based on the interrupt request,
If you want to use the saved register contents of the instruction execution unit for subsequent interrupt processing when performing interrupt processing consecutively, after executing the previous interrupt processing program, save the saved instruction execution unit Since the contents of the register are supposed to be restored, the interrupt level information will also be restored, and as a result, even if an interrupt request with a low interrupt level occurs consecutively with an interrupt request with a high interrupt level,
This interrupt request with a low interrupt level can be accepted.
【0022】また、この第2例の割込み処理方法におい
ては、このように、割込み要求に基づいて、対応する割
込み処理プログラムを実行した場合において、その終了
後、連続して割込み処理を行う場合、退避させている命
令実行部のレジスタの内容を後の割込み処理で使用する
場合には、先の割込み処理プログラムの実行終了後、退
避させている命令実行部のレジスタの内容を復帰させる
としているので、連続して割込み要求があった場合にお
いて、特に、後の割込み処理で、退避させているレジス
タの内容を使用する場合には、割込み要求の有無のチェ
ック後、直ちに、後の割込み要求に対応する割込み処理
プログラムを実行することができる。Further, in the interrupt processing method of the second example, when the corresponding interrupt processing program is executed on the basis of the interrupt request as described above, and when the interrupt processing is continuously performed after the completion, When the contents of the saved instruction execution unit registers are used in subsequent interrupt processing, the saved contents of the instruction execution unit registers will be restored after the execution of the previous interrupt processing program. , When there are consecutive interrupt requests, especially when using the contents of the saved registers in the subsequent interrupt processing, immediately check for the interrupt request and immediately respond to the subsequent interrupt request. It is possible to execute the interrupt processing program.
【0023】即ち、この第1例の割込み処理方法によれ
ば、連続する割込み要求を処理する場合において、特
に、後の割込み処理で、退避させているレジスタの内容
を使用する場合には、後の割込み要求が、どのような割
込みレベルの割込み要求であったとしても、割込み要求
の有無のチェック後、直ちに、後の割込み要求に対応す
る割込み処理プログラムを実行することができる。That is, according to the interrupt processing method of the first example, in the case of processing consecutive interrupt requests, especially when the contents of the saved register are used in the subsequent interrupt processing, No matter what interrupt level the interrupt request is, the interrupt processing program corresponding to the subsequent interrupt request can be executed immediately after checking the presence or absence of the interrupt request.
【0024】[0024]
【実施例】以下、図1〜図4を参照して、本発明の第1
実施例〜第3実施例について説明する。DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS The first embodiment of the present invention will be described below with reference to FIGS.
Examples to third examples will be described.
【0025】第1実施例・・図1 図1は本発明の第1実施例を示すフローチャートであ
り、本発明による割込み処理方法の第1例の一実施例
を、主要部を図4に示すように構成されるマイクロコン
ピュータにおいて割込み処理を行う場合を例にして示し
ている。First Embodiment FIG. 1 is a flow chart showing a first embodiment of the present invention. FIG. 4 shows an essential part of the first embodiment of the interrupt processing method according to the present invention in FIG. An example is shown in which a microcomputer configured as described above performs an interrupt process.
【0026】この第1実施例においては、割込み処理ユ
ニット6を介して割込み要求があると、主処理プログラ
ムの実行は中断され、CPU2のレジスタ群9の内容が
RAM3に退避される。In the first embodiment, when an interrupt request is issued via the interrupt processing unit 6, the execution of the main processing program is interrupted and the contents of the register group 9 of the CPU 2 are saved in the RAM 3.
【0027】次に、割込み要求に対応する割込み処理プ
ログラムが実行され、それが終了すると、RAM3に退
避されているCPU2のレジスタ群9の内容のうち、割
込みレベル情報のみが割込み復帰命令により復帰され
る。Next, the interrupt processing program corresponding to the interrupt request is executed, and when it is completed, only the interrupt level information of the contents of the register group 9 of the CPU 2 saved in the RAM 3 is restored by the interrupt restoration instruction. It
【0028】次に、割込み要求の有無がチェックされ、
割込み要求がある場合は、対応する割込み処理プログラ
ムが実行され、割込み要求がない場合は、RAM3に退
避させているCPU2のレジスタ群9の内容のうち、割
込みレベル情報以外の内容が復帰され、スタック・ポイ
ンタ12が更新された後、中断されていた主処理プログ
ラムに復帰し、これが実行される。Next, the presence or absence of an interrupt request is checked,
When there is an interrupt request, the corresponding interrupt processing program is executed, and when there is no interrupt request, the contents of the register group 9 of the CPU 2 saved in the RAM 3 other than the interrupt level information are restored, and the stack After the pointer 12 is updated, the interrupted main processing program is returned to and executed.
【0029】この第1実施例においては、割込み要求に
基づいて、対応する割込み処理プログラムを実行した場
合、その終了後、RAM3に退避させているCPU2の
レジスタ群9の内容を全て退避させるようにはしていな
いが、割込みレベル情報を復帰させるようにしているの
で、割込みレベルの高い割込み要求に連続して割込みレ
ベルの低い割込み要求が発生したとしても、この割込み
レベルの低い割込み要求を受け付けることができる。In the first embodiment, when the corresponding interrupt processing program is executed based on the interrupt request, all contents of the register group 9 of the CPU 2 saved in the RAM 3 are saved after the execution. However, since the interrupt level information is restored, even if an interrupt request with a low interrupt level occurs consecutively with an interrupt request with a high interrupt level, this interrupt request with a low interrupt level is accepted. You can
【0030】また、この第1実施例においては、割込み
要求に基づいて、対応する割込み処理プログラムを実行
した場合、その終了後、RAM3に退避させているCP
U2のレジスタ群9の内容を全て復帰させず、割込みレ
ベル情報のみを復帰させるようにしているので、連続し
て割込み要求があった場合には、CPU2のレジスタ群
9の内容を再び退避させるという手順を必要としない。Further, in the first embodiment, when the corresponding interrupt processing program is executed on the basis of the interrupt request, the CP saved in the RAM 3 after the execution is completed.
Since all the contents of the U2 register group 9 are not restored but only the interrupt level information is restored, the contents of the register group 9 of the CPU 2 are saved again when there are consecutive interrupt requests. No steps required.
【0031】即ち、この第1実施例によれば、連続する
割込み要求を処理する場合において、後の割込み処理
で、RAM3に退避させているCPU2のレジスタ群9
の内容を使用しない場合に、後の割込み要求がどのよう
な割込みレベルの割込み要求であったとしても、割込み
要求の有無のチェック後、直ちに、後の割込み要求に対
応する割込み処理プログラムを実行することができる。That is, according to the first embodiment, when processing consecutive interrupt requests, the register group 9 of the CPU 2 saved in the RAM 3 in the subsequent interrupt processing.
When the contents of the above are not used, no matter what the interrupt level of the subsequent interrupt request is, the interrupt processing program corresponding to the subsequent interrupt request is executed immediately after checking the existence of the interrupt request. be able to.
【0032】第2実施例・・図2 図2は本発明の第2実施例を示すフローチャートであ
り、本発明による割込み処理方法の第2例の一実施例
を、主要部を図4に示すように構成されるマイクロコン
ピュータにおいて割込み処理を行う場合を例にして示し
ている。Second Embodiment FIG. 2 is a flow chart showing a second embodiment of the present invention. FIG. 4 shows an essential part of a second embodiment of the interrupt processing method according to the present invention in FIG. An example is shown in which a microcomputer configured as described above performs an interrupt process.
【0033】この第2実施例においては、割込み処理ユ
ニット6を介して割込み要求があると、主処理プログラ
ムの実行は中断され、CPU2のレジスタ群9の内容が
RAM3に退避される。In the second embodiment, when an interrupt request is issued via the interrupt processing unit 6, the execution of the main processing program is interrupted and the contents of the register group 9 of the CPU 2 are saved in the RAM 3.
【0034】次に、割込み要求に対応する割込み処理プ
ログラムが実行され、それが終了すると、RAM3に退
避されているCPU2のレジスタ群9の内容が割込み復
帰命令によりレジスタ群9に復帰される。但し、この場
合、スタックポインタ12の内容は復帰させないように
する。Next, the interrupt processing program corresponding to the interrupt request is executed, and when it is completed, the contents of the register group 9 of the CPU 2 saved in the RAM 3 are restored to the register group 9 by the interrupt restoration instruction. However, in this case, the contents of the stack pointer 12 are not restored.
【0035】次に、割込み要求の有無がチェックされ、
割込み要求がある場合は、割込み処理プログラムが実行
され、割込み要求がない場合は、スタック・ポインタ1
2が更新され、中断されていた主処理プログラムに復帰
し、これが実行される。Next, it is checked whether or not there is an interrupt request,
If there is an interrupt request, the interrupt processing program is executed. If there is no interrupt request, stack pointer 1
2 is updated, the interrupted main processing program is restored, and this is executed.
【0036】この第2実施例においては、割込み要求に
基づいて、対応する割込み処理プログラムを実行した場
合、その終了後、RAM3に退避されているCPU2の
レジスタ群9の内容を復帰させるようにしているので、
割込みレベル情報も復帰されることになり、この結果、
割込みレベルの高い割込み要求に連続して割込みレベル
の低い割込み要求が発生したとしても、この割込みレベ
ルの低い割込み要求を受け付けることができる。In the second embodiment, when the corresponding interrupt processing program is executed on the basis of the interrupt request, the contents of the register group 9 of the CPU 2 saved in the RAM 3 are restored after the execution. Because
The interrupt level information will also be restored, and as a result,
Even if an interrupt request with a low interrupt level occurs successively with an interrupt request with a high interrupt level, the interrupt request with a low interrupt level can be accepted.
【0037】また、この第2実施例においては、割込み
要求に基づいて、対応する割込み処理プログラムを実行
した場合、その終了後、RAM3に退避されているCP
U2のレジスタ群9の内容を復帰させるとしているの
で、連続して割込み要求があった場合において、後の割
込み処理で、RAM3に退避されているCPU2のレジ
スタ群9の内容を使用する場合には、割込み要求の有無
のチェック後、直ちに、後の割込み要求に対応する割込
み処理プログラムを実行することができる。Further, in the second embodiment, when the corresponding interrupt processing program is executed on the basis of the interrupt request, the CP saved in the RAM 3 after the execution is completed.
Since the contents of the register group 9 of U2 are to be restored, when there are consecutive interrupt requests, when the contents of the register group 9 of the CPU2 saved in the RAM3 are used in the subsequent interrupt processing, After the presence or absence of an interrupt request is checked, the interrupt processing program corresponding to the subsequent interrupt request can be executed immediately.
【0038】即ち、この第2実施例によれば、連続する
割込み要求を処理する場合において、特に、後の割込み
処理で、RAM3に退避されているCPU2のレジスタ
群9の内容を使用する場合には、後の割込み要求が、ど
のような割込みレベルの割込み要求であったとしても、
割込み要求の有無のチェック後、直ちに、後の割込み要
求に対応する割込み処理プログラムを実行することがで
きる。That is, according to the second embodiment, in the case of processing consecutive interrupt requests, especially when the contents of the register group 9 of the CPU 2 saved in the RAM 3 are used in the subsequent interrupt processing. , No matter what interrupt level the subsequent interrupt request is,
Immediately after checking the presence or absence of an interrupt request, the interrupt processing program corresponding to the subsequent interrupt request can be executed.
【0039】第3実施例・・図3 図3は本発明の第3実施例を示すブロック図であり、第
1実施例の割込み処理方法、第2実施例の割込み処理方
法及び図5に示す従来の割込み処理方法を実行するよう
に構成されたマイクロコンピュータの一例の要部を示し
ている。Third Embodiment FIG. 3 FIG. 3 is a block diagram showing a third embodiment of the present invention. The interrupt handling method of the first embodiment, the interrupt handling method of the second embodiment and FIG. 5 are shown. 1 illustrates a main part of an example of a microcomputer configured to execute a conventional interrupt processing method.
【0040】この第3実施例は、CPU2のマイクロR
OM13の中に、第1実施例の割込み処理方法を指示す
る命令RET−IQ1、第2実施例の割込み処理方法を
指示する命令RET−IQ2及び図5に示す従来の割込
み処理方法RET−Iを格納しておくことで、これら第
1実施例の割込み処理方法、第2実施例の割込み処理方
法及び図5に示す従来の割込み処理方法を実行しようと
するものである。In the third embodiment, the micro R of the CPU 2 is used.
In the OM 13, an instruction RET-IQ1 for instructing the interrupt processing method of the first embodiment, an instruction RET-IQ2 for instructing the interrupt processing method of the second embodiment, and a conventional interrupt processing method RET-I shown in FIG. 5 are provided. By storing them, the interrupt processing method of the first embodiment, the interrupt processing method of the second embodiment, and the conventional interrupt processing method shown in FIG. 5 are executed.
【0041】そこで、また、この第3実施例では、RO
M4に格納される割込み処理プログラムの最後には、第
1実施例の割込み処理方法を指示する命令RET−IQ
1、第2実施例の割込み処理方法を指示する命令RET
−IQ2又は図5に示す従来の割込み処理方法を指示す
る命令RET−Iのいずれの命令による処理に飛ぶ(移
行する)のかを指示する命令が格納される。Therefore, in this third embodiment, RO
At the end of the interrupt processing program stored in M4, an instruction RET-IQ for instructing the interrupt processing method of the first embodiment is provided.
1. An instruction RET instructing the interrupt processing method of the second embodiment
An instruction for instructing which of the instruction RET-I for instructing the IQ2 or the conventional interrupt processing method shown in FIG.
【0042】なお、14はバス制御回路、15はインス
トラクションレジスタ、16はアドレス発生回路、17
は命令デコーダ、18は演算部、19はCPU2の内部
バスである。Reference numeral 14 is a bus control circuit, 15 is an instruction register, 16 is an address generating circuit, and 17 is an address generating circuit.
Is an instruction decoder, 18 is an arithmetic unit, and 19 is an internal bus of the CPU 2.
【0043】[0043]
【発明の効果】本発明による割込み処理方法の第1例
(請求項1記載の割込み処理方法)によれば、割込み要
求に基づいて、対応する割込み処理プログラムを実行し
た場合、その終了後、退避させている命令実行部のレジ
スタの内容のうち、割込みレベル情報のみを復帰させる
としているので、どのような割込みレベルの割込み要求
が連続して発生したとしても、割込み要求の有無のチェ
ック後、直ちに、連続する割込み要求に対応する割込み
処理プログラムを実行することができる。According to the first example of the interrupt processing method according to the present invention (the interrupt processing method according to claim 1), when the corresponding interrupt processing program is executed based on the interrupt request, it is saved after the end. Only the interrupt level information is restored from the contents of the register of the instruction execution unit that is being executed, so even if interrupt requests of any interrupt level occur continuously, immediately after checking whether there is an interrupt request, , An interrupt processing program corresponding to continuous interrupt requests can be executed.
【0044】本発明による電子計算機の第1例(請求項
2記載の電子計算機)によれば、本発明による割込み処
理方法の第1例を実施することができる。According to the first example of the electronic computer of the present invention (the electronic computer according to claim 2), the first example of the interrupt processing method of the present invention can be implemented.
【0045】本発明による割込み処理方法の第2例(請
求項3記載の割込み処理方法)によれば、割込み要求に
基づいて、対応する割込み処理プログラムを実行した場
合において、その終了後、連続して割込み処理を行う場
合、退避させている命令実行部のレジスタの内容を後の
割込み処理で使用する場合には、先の割込み処理プログ
ラムの実行終了後、退避させている命令実行部のレジス
タの内容を復帰させるとしているので、連続する割込み
要求を処理する場合において、特に、後の割込み処理
で、退避させているレジスタの内容を使用する場合に
は、後の割込み要求が、どのような割込みレベルの割込
み要求であったとしても、割込み要求の有無のチェック
後、直ちに、後の割込み要求に対応する割込み処理プロ
グラムを実行することができる。According to the second example of the interrupt processing method according to the present invention (the interrupt processing method according to claim 3), when the corresponding interrupt processing program is executed based on the interrupt request, the interrupt processing program continues after the end. If the contents of the saved instruction execution unit registers are to be used for subsequent interrupt processing, the saved instruction execution unit registers after the previous interrupt processing program has finished executing. Since the contents are to be restored, when processing the consecutive interrupt requests, especially when the saved register contents are used in the subsequent interrupt processing, the subsequent interrupt request may Even if it is a level interrupt request, immediately after checking whether there is an interrupt request, execute the interrupt processing program corresponding to the subsequent interrupt request. It can be.
【0046】本発明による電子計算機の第2例(請求項
4記載の電子計算機)によれば、本発明による割込み処
理方法の第2例を実施することができる。According to the second example of the electronic computer of the present invention (the electronic computer according to claim 4), the second example of the interrupt processing method of the present invention can be implemented.
【図1】本発明の第1実施例を示すフローチャートであ
る。FIG. 1 is a flowchart showing a first embodiment of the present invention.
【図2】本発明の第2実施例を示すフローチャートであ
る。FIG. 2 is a flowchart showing a second embodiment of the present invention.
【図3】本発明の第3実施例を示すブロック図である。FIG. 3 is a block diagram showing a third embodiment of the present invention.
【図4】マイクロコンピュータの要部を示すブロック図
である。FIG. 4 is a block diagram showing a main part of a microcomputer.
【図5】従来の割込み処理方法の一例を示すフローチャ
ートである。FIG. 5 is a flowchart showing an example of a conventional interrupt processing method.
【図6】従来の割込み処理方法の他の例を示すフローチ
ャートである。FIG. 6 is a flowchart showing another example of a conventional interrupt processing method.
1 チップ本体 2 CPU 3 RAM 4 ROM 5 バス 6 割込み処理ユニット 1 chip body 2 CPU 3 RAM 4 ROM 5 bus 6 interrupt processing unit
Claims (4)
理プログラムを実行した場合、その終了後、退避させて
いる命令実行部のレジスタの内容のうち、割込みレベル
情報のみを復帰させることを特徴とする電子計算機にお
ける割込み処理方法。1. When a corresponding interrupt processing program is executed on the basis of an interrupt request, only the interrupt level information of the saved contents of the register of the instruction execution unit is restored after the execution. Interrupt handling method for electronic computer.
行部のレジスタの内容のうち、割込みレベル情報のみを
復帰させる手段を有していることを特徴とする電子計算
機。2. An electronic computer comprising means for restoring only the interrupt level information among the contents of the saved register of the instruction execution unit after the interrupt processing is completed.
理プログラムを実行した場合において、その終了後、連
続して割込み処理を行う場合、退避させている命令実行
部のレジスタの内容を後の割込み処理で使用する場合に
は、先の割込み処理プログラムの実行終了後、前記退避
させている命令実行部のレジスタの内容を復帰させるこ
とを特徴とする電子計算機における割込み処理方法。3. When a corresponding interrupt processing program is executed on the basis of an interrupt request and the interrupt processing is continuously performed after the completion of the interrupt processing program, the saved contents of the register of the instruction executing unit are interrupted later. When used in processing, the interrupt processing method in an electronic computer is characterized in that after the execution of the interrupt processing program, the contents of the saved register of the instruction execution unit are restored.
行う場合、退避させている命令実行部のレジスタの内容
を後の割込み処理で使用する場合には、先の割込み処理
プログラムの実行終了後、前記退避させている命令実行
部のレジスタの内容を復帰させる手段を設けて構成され
ていることを特徴とする電子計算機。4. When the interrupt processing is continuously performed after the interrupt processing is completed, when the saved contents of the register of the instruction execution unit is used in the subsequent interrupt processing, the execution of the interrupt processing program is completed. An electronic computer, further comprising means for restoring the saved contents of the register of the instruction execution unit.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP11638192A JPH05313916A (en) | 1992-05-08 | 1992-05-08 | Interrupt processing method in electronic computer and electronic computer |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP11638192A JPH05313916A (en) | 1992-05-08 | 1992-05-08 | Interrupt processing method in electronic computer and electronic computer |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH05313916A true JPH05313916A (en) | 1993-11-26 |
Family
ID=14685599
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP11638192A Pending JPH05313916A (en) | 1992-05-08 | 1992-05-08 | Interrupt processing method in electronic computer and electronic computer |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH05313916A (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| EP0764906A3 (en) * | 1995-09-25 | 1999-07-21 | Siemens Aktiengesellschaft | Method of operating a real time computer system controlled by a real time operating system |
-
1992
- 1992-05-08 JP JP11638192A patent/JPH05313916A/en active Pending
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| EP0764906A3 (en) * | 1995-09-25 | 1999-07-21 | Siemens Aktiengesellschaft | Method of operating a real time computer system controlled by a real time operating system |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| EP2442227A1 (en) | Two-level interrupt service routine | |
| JPH07120338B2 (en) | Method for a data processor to coordinate the execution of instructions by a coprocessor and the data processor | |
| US20240201890A1 (en) | Data processing method and apparatus | |
| JPH04373026A (en) | Program interrupting method | |
| JPH10326205A (en) | System call issuing method | |
| JP2002099435A (en) | Multitask control method and information processing apparatus | |
| CN112231072A (en) | Processor and kernel switching processing method | |
| JPH0895798A (en) | Data processing device | |
| JPH04288625A (en) | Microcomputer | |
| JPH074669Y2 (en) | Interrupt request processing circuit | |
| JP3008890B2 (en) | Processing control unit | |
| JP3093714B2 (en) | Multitasking execution priority determination system | |
| JP2001166956A (en) | Job scheduling method in complex system | |
| JPH06324861A (en) | System and method for controlling cpu | |
| JPH0784786A (en) | Program execution control method | |
| JP2575761B2 (en) | Job management method | |
| JPS62113238A (en) | Correction system for program of electronic computer system | |
| JPH04106652A (en) | Exceptional treatment system | |
| JP3729250B2 (en) | Information processing apparatus and electronic apparatus | |
| JPH08286950A (en) | Information processor and trace information storage method | |
| JPH03257634A (en) | Method and device for parallelly processing program | |
| JP2615921B2 (en) | Input / output control method in operating system | |
| JPS63132340A (en) | Execution control system in logical type language | |
| JPH11272516A (en) | Dump output control system | |
| JPH05224941A (en) | Application program control system |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20000711 |