JPS6353649A - Interrupt control system - Google Patents
Interrupt control systemInfo
- Publication number
- JPS6353649A JPS6353649A JP19568186A JP19568186A JPS6353649A JP S6353649 A JPS6353649 A JP S6353649A JP 19568186 A JP19568186 A JP 19568186A JP 19568186 A JP19568186 A JP 19568186A JP S6353649 A JPS6353649 A JP S6353649A
- Authority
- JP
- Japan
- Prior art keywords
- address
- interrupt
- interruption
- vector table
- user
- 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
- 239000013598 vector Substances 0.000 claims abstract description 37
- 238000000034 method Methods 0.000 claims description 10
- 230000004913 activation Effects 0.000 claims description 5
- 238000010586 diagram Methods 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 230000009191 jumping Effects 0.000 description 2
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4812—Task transfer initiation or dispatching by interrupt, e.g. masked
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/06—Addressing a physical block of locations, e.g. base addressing, module addressing, memory dedication
- G06F12/0615—Address space extension
- G06F12/0623—Address space extension for memory modules
Abstract
Description
【発明の詳細な説明】
[産業上の利用分野]
本発明は割込み発生時、その割込みルーチンの開始アド
レスを割込みベクタテーブルを検索して決定する割込み
制御方式に関するものである。DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to an interrupt control method in which, when an interrupt occurs, the start address of the interrupt routine is determined by searching an interrupt vector table.
[従来の技術]
従来、割込みベクタテーブルはリセット時の割込みベク
タを含むことから一般にROMで構成され、その管理は
オペレーションシステム(OS)が行っていた。従って
、O8管理下のユーザタスクがユーザに開放されている
ベクタを利用するためには、前もってベクタテーブルの
所定の部分に目的のアドレスをセツトシておかなければ
ならなかった。しかし、ベクタテーブルの内容はROM
で構成されているため、−度設定したらそのシステムの
動作中は変更ができないので、普通はRAM上にジャン
プテーブルを設け、ベクタテーブルのアドレスをこのジ
ャンプテーブルに設定し、このテーブルに実際の例外処
理ルーチンへジャンプする命令をセットしておくといっ
た手法がとられていた。しかしこの方法では、O3が管
理するROM上の割込みベクタテーブルに、予めジャン
プテーブルのアドレスをセットしておかなければならな
いという煩しい操作が必要となっていた。[Prior Art] Conventionally, an interrupt vector table, which includes interrupt vectors at the time of reset, is generally composed of a ROM, and is managed by an operating system (OS). Therefore, in order for a user task under O8 management to use a vector open to the user, the target address must be set in a predetermined part of the vector table in advance. However, the contents of the vector table are in ROM
Once set, it cannot be changed while the system is running, so normally a jump table is provided in RAM, the address of the vector table is set in this jump table, and the actual exception is stored in this table. A method used was to set an instruction to jump to a processing routine. However, this method requires a troublesome operation in that the address of the jump table must be set in advance in the interrupt vector table on the ROM managed by the O3.
[発明が解決しようとする問題点]
本発明は上記従来例に鑑みなされたもので、O3の管理
する割込みベクタテーブルを変更することなく、ユーザ
に開放されている割込みベクタを利用できる割込み制御
方式を提供することを目的とする。[Problems to be Solved by the Invention] The present invention has been made in view of the above conventional example, and provides an interrupt control method that can utilize interrupt vectors available to users without changing the interrupt vector table managed by O3. The purpose is to provide
E問題点を解決するための手段]
上記目的を達成するために本発明の割込み制御方式は以
下の様な構成からなる。即ち、システム領域の割込みベ
クタテーブルをもとに割込要因に対応する割込み処理ル
ーチンに分岐する割込み制御方式であって、前記割込み
ベクタテーブルによりアドレスされ、割込み起動コマン
ドを格納する第1のテーブルと、前記割込み起動コマン
ドによる割込み時、前記割込み起動コマンドが格納され
ているアドレスをもとに前記割込要因を判別する判別手
段と、該判別手段の判別結果をもとに割込み処理ルーチ
ンの開始アドレスを指示する第2のテーブルとを備える
。Means for Solving Problem E] To achieve the above object, the interrupt control system of the present invention has the following configuration. That is, the interrupt control method branches to an interrupt processing routine corresponding to an interrupt factor based on an interrupt vector table in a system area, and includes a first table that is addressed by the interrupt vector table and stores an interrupt activation command; , a determining means for determining the cause of the interrupt based on the address where the interrupt starting command is stored, and a start address of the interrupt processing routine based on the determination result of the determining means when an interrupt is generated by the interrupt starting command; and a second table for instructing.
[作用]
以上の構成において、割込みベクタテーブルによりアド
レスされる第1のテーブルに、割込み起動コマンドを格
納しておくと、割込み時、割込み起動コマンドによる割
込みが発生する。これにより割込み起動コマンドが格納
されているアドレスを読出し、そのアドレスより割込要
因を判別し、その割込要因に基づき第2のテーブルによ
り割込み処理ルーチンの開始アドレスを決定するように
動作する。[Operation] In the above configuration, if an interrupt activation command is stored in the first table addressed by the interrupt vector table, an interrupt by the interrupt activation command occurs at the time of an interrupt. As a result, the address where the interrupt activation command is stored is read, the interrupt cause is determined from the address, and the start address of the interrupt processing routine is determined based on the second table based on the interrupt cause.
[実施例]
以下、添付図面を参照して本発明の実施例を詳細に説明
する。[Embodiments] Hereinafter, embodiments of the present invention will be described in detail with reference to the accompanying drawings.
[メモリ構成の説明 (第1図)]
第1図は本発明の一実施例のシステムのメモリマツプを
示す図である。[Description of Memory Configuration (FIG. 1)] FIG. 1 is a diagram showing a memory map of a system according to an embodiment of the present invention.
図中、1は例えばマイクロプロセッサ等のCPU、2は
CPUIのosやスタックエリア5、更にはユーザアプ
リケーションプログラム等を格納するメモリ8で、RO
MおよびRA、 Mによって構成されている。3はシス
テム領域で、ROMで構成さねたOSプログラム部30
、O8が管理する割込みベクタテーブル31、更にはユ
ーザ領域4のユーザベクタテーブル40を参照するため
の参照テーブル32等を含んでいる。4はユーザに開放
されている、通常RAMで構成されたユーザ領域で、各
種のアプリケーションプログラムやベクタテーブル40
等を含んでいる。In the figure, 1 is a CPU such as a microprocessor, 2 is a memory 8 that stores the OS of the CPUI, a stack area 5, and user application programs, etc.
It is composed of M, RA, and M. 3 is a system area, which is an OS program section 30 composed of ROM.
, an interrupt vector table 31 managed by O8, and a reference table 32 for referencing the user vector table 40 of the user area 4. Reference numeral 4 denotes a user area normally made up of RAM, which is open to the user and stores various application programs and a vector table 40.
Contains etc.
なお割込みベクタテーブル31の先頭アドレスは’A”
、参照テーブル32の先頭アドレスは”B”°、ユーザ
ベクタテーブル40の先頭アドレスなC°゛とし、O3
はユーザベクタテーブル40の先頭アドレスが°゛CC
パることを認知しているものとする。Note that the start address of the interrupt vector table 31 is 'A'.
, the start address of the reference table 32 is "B"°, the start address of the user vector table 40 is C°, and O3
The start address of the user vector table 40 is °゛CC
It is assumed that the user is aware that the
[動作説明 (第1図、第2図(A)(B)コ第2図(
A)(B)はO3が実行する例外処理のフローヂャート
である。以下このフローチャートをもとに本実施例の動
作を説明する。[Operation explanation (Fig. 1, Fig. 2 (A), (B)) Fig. 2 (
A) and (B) are flowcharts of exception handling executed by O3. The operation of this embodiment will be explained below based on this flowchart.
第2図(A)の動作はユーザに開放されているベクタn
の例外処理が発生して割込みが発生ずることにより開始
され、まずステップS1で、システム領域30割込みベ
クタテーブル31のベクタ番号” n ”に該当するA
+v (n)番地の内容をフェッチする。ステップS2
ではA+V (n)番地に書かれである実アドレスB+
r (n)番地にジャンプする。ここで、v、rはベク
タ番号” n ”を変数とする関数として表したもので
、メモリ2がバイト単位で構成され、各ベクタテーブル
が2バイトで構成されていればr(n)=2nあるいは
v (n)=2nであり、3バイトで構成されていれば
r (n) 、 v (n、) =3 nとなる。The operation in FIG. 2(A) is based on the vector n that is open to the user.
The process starts when an exception occurs and an interrupt is generated. First, in step S1, A corresponding to vector number "n" in the system area 30 interrupt vector table 31 is
+v (n) Fetch the contents of address. Step S2
Then, the real address B+ written at address A+V (n)
r Jump to address (n). Here, v and r are expressed as functions with vector number "n" as a variable, and if memory 2 is configured in byte units and each vector table is configured in 2 bytes, r(n) = 2n. Alternatively, v (n) = 2n, and if it is composed of 3 bytes, then r (n), v (n,) = 3 n.
ステップS3ではB+r (n)番地にジャンプをした
後、B+r (n)番地の命令コードを実効ずべくフェ
ッチしてステップS4に進む。ステップS4では、ステ
ップS3でフェッチされたB+r (n)番地の命令コ
ードをチェックして有効な命令コードかどうかをみる。In step S3, after jumping to address B+r(n), the instruction code at address B+r(n) is fetched for execution, and the process proceeds to step S4. In step S4, the instruction code at address B+r(n) fetched in step S3 is checked to see if it is a valid instruction code.
命令コードが有効の時はステップS5に進み、13+r
(n)番地の命令を実行して割込み処理ルーチンに移
行する。If the instruction code is valid, proceed to step S5 and select 13+r.
(n) Execute the instruction at address and proceed to the interrupt processing routine.
一方、ステップS4でB十r (n)番地の命令コード
が有効でない時はステップS6に進み、例外処理の割込
みを発生する。本実施例ではB+r(n)番地には未実
装命令33が格納されているため例外処理の割込みが発
生し、ステップS6に移行する。なおこの未実装命令3
3は、他の例えば不当命令等による例外処理割込みと区
別できる割込みを発生ずる命令コードである。On the other hand, if it is determined in step S4 that the instruction code at address B10r(n) is not valid, the process proceeds to step S6 and an interrupt for exception handling is generated. In this embodiment, since the unimplemented instruction 33 is stored at address B+r(n), an exception handling interrupt occurs, and the process moves to step S6. Note that this unimplemented instruction 3
3 is an instruction code that generates an interrupt that can be distinguished from other exception handling interrupts such as illegal instructions.
第2図(B)はステップS6における未実装命令33に
よる例外処理割込みルーチンのフローチャートである。FIG. 2(B) is a flowchart of the exception handling interrupt routine by the unimplemented instruction 33 in step S6.
ステップS6の例外処理の割込発生により、スタックエ
リア5には戻り番地としてアドレスB+r (n)がブ
ツシュされているため、ステップS7ではスタックポイ
ンタ1−1の指すスタックエリア5のアドレスより、未
実装命令33が格納されていた番地(B+r (n))
を取り出す。O8はステップS8で参照テーブル32の
先頭アドレス“B ”がわかっており、関数r (n)
も予め定められているため、B+r (n)番地をもと
にnを求める。次にステップS9で予め認識しているユ
ーザベクタテーブル40の先頭アドレス“°C゛と、テ
ーブル40のデータ構成、即ち関数■を基に、C+V
(n)番地を求める。Due to the occurrence of an interrupt during the exception handling in step S6, the address B+r (n) is bushed in the stack area 5 as a return address, so in step S7, the unimplemented Address where instruction 33 was stored (B+r (n))
Take out. O8 knows the start address "B" of the reference table 32 in step S8, and uses the function r (n)
Since B+r (n) is also predetermined, n is determined based on the address B+r (n). Next, in step S9, C+V
(n) Find the address.
ステップS10ではユーザベクタテーブル40のC+v
(n)番地の内容R(n)を読出す。ステップS11
では例外処理が都合2回発生したため、スタックポイン
タ1−1を修正する。続いてステップS12でR(n)
番地にジャンプし、割込要因“n ”の割込処理を行う
。これにより、R(n)番地にジャンプしたときには、
ステップS6における未実装命令の例外処理が起こらな
かったかのようにして、ステップS12以降の割込み処
理が実行される。In step S10, C+v of the user vector table 40
(n) Read the contents R(n) of address. Step S11
Now, since exception handling has occurred twice in total, stack pointer 1-1 is corrected. Then, in step S12, R(n)
Jump to address and perform interrupt processing for interrupt cause "n". As a result, when jumping to address R(n),
The interrupt processing from step S12 onward is executed as if the unimplemented instruction exception processing at step S6 had not occurred.
以上説明したように本実施例によれば、ユーザに開放さ
れている例外処理” n ”が発生したときに、目的の
処理ルーチンが起動できる。ユーザ側はO8管理下の割
込みベクタテーブル31及び参照テーブル32の内容を
書ぎ換える必要が無く、またユーザ固有のベクタテーブ
ル40の管理をO3とは独立に行えるという効果がある
。As described above, according to this embodiment, when the exception handling "n" open to the user occurs, the target processing routine can be activated. There is no need for the user to rewrite the contents of the interrupt vector table 31 and reference table 32 under O8 management, and the user can manage the user-specific vector table 40 independently of O3.
[発明の効果]
以上述べた如く本発明によれば、OS管理下の割込みベ
クタテーブルを変更することなしに、割込み処理の実効
アドレスを変更できるという効果がある。[Effects of the Invention] As described above, according to the present invention, there is an effect that the effective address for interrupt processing can be changed without changing the interrupt vector table under OS management.
第1図は本実施例のシステムのメモリXツブを示す図、
第2図(A)はO3による例外処理nの発生処理動作フ
ローチャート、
第2図(B)はOSによる未実装割込処理のフローチャ
ートである。
図中、】・・・CPU、1−1・・・スタックポインタ
、2・・・メモリ、3・・・システム領域、4・・・ユ
ーザ領域、5・・・スタックエリア、30・・・O3,
31・・・割込みベクタテーブル、32・・・参照テー
ブル、33・・・未実装命令、40・・・ユーザベクタ
テーブルである。
特許出願人 キャノン株式会社
第1図
第2図 (A)Figure 1 is a diagram showing the memory It is a flowchart. In the figure, ]... CPU, 1-1... stack pointer, 2... memory, 3... system area, 4... user area, 5... stack area, 30... O3 ,
31... Interrupt vector table, 32... Reference table, 33... Unimplemented instruction, 40... User vector table. Patent applicant: Canon Corporation Figure 1 Figure 2 (A)
Claims (1)
に対応する割込み処理ルーチンに分岐する割込み制御方
式であつて、前記割込みベクタテーブルによりアドレス
され、割込み起動コマンドを格納する第1のテーブルと
、前記割込み起動コマンドによる割込み時、前記割込み
起動コマンドが格納されているアドレスをもとに前記割
込要因を判別する判別手段と、該判別手段の判別結果を
もとに割込み処理ルーチンの開始アドレスを指示する第
2のテーブルとを備えたことを特徴とする割込み制御方
式。An interrupt control method that branches to an interrupt processing routine corresponding to an interrupt factor based on an interrupt vector table in a system area, the first table being addressed by the interrupt vector table and storing an interrupt activation command; At the time of an interrupt caused by an interrupt start command, a determination means for determining the cause of the interrupt based on the address where the interrupt start command is stored, and a start address of the interrupt processing routine based on the determination result of the determination means. and a second table for controlling an interrupt.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP19568186A JPS6353649A (en) | 1986-08-22 | 1986-08-22 | Interrupt control system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP19568186A JPS6353649A (en) | 1986-08-22 | 1986-08-22 | Interrupt control system |
Publications (1)
Publication Number | Publication Date |
---|---|
JPS6353649A true JPS6353649A (en) | 1988-03-07 |
Family
ID=16345232
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP19568186A Pending JPS6353649A (en) | 1986-08-22 | 1986-08-22 | Interrupt control system |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPS6353649A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH03104201U (en) * | 1990-02-09 | 1991-10-29 | ||
EP0854414A1 (en) * | 1997-01-21 | 1998-07-22 | International Business Machines Corporation | Method and apparatus for presenting a data range for user selection of a value within the range via a graphical user interface |
-
1986
- 1986-08-22 JP JP19568186A patent/JPS6353649A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH03104201U (en) * | 1990-02-09 | 1991-10-29 | ||
EP0854414A1 (en) * | 1997-01-21 | 1998-07-22 | International Business Machines Corporation | Method and apparatus for presenting a data range for user selection of a value within the range via a graphical user interface |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US5701493A (en) | Exception handling method and apparatus in data processing systems | |
JP5680679B2 (en) | Apparatus and method for handling exception events | |
EP0330226B1 (en) | Apparatus of and method for executing subprogram in bank switching data processing system | |
JPS645330B2 (en) | ||
JPH02153434A (en) | Data processing system | |
US4764869A (en) | Method and apparatus for controlling interruption in the course of instruction execution in a processor | |
EP1393183B1 (en) | Modified harvard architecture processor having data memory space mapped to program memory space with erroneous execution protection | |
JP2000322264A (en) | Electronic equipment | |
JPS6353649A (en) | Interrupt control system | |
JPS63296140A (en) | Interruption control system | |
JPS6341092B2 (en) | ||
KR0160681B1 (en) | Robot control method | |
JPS5842891B2 (en) | Meirei Seigiyohoushiki | |
US20020129229A1 (en) | Microinstruction sequencer stack | |
JP3190945B2 (en) | Micro program control circuit | |
KR100329780B1 (en) | Interrupt processing apparatus reducing interrupt response time | |
JPS6226485B2 (en) | ||
JPS62154145A (en) | Processing system for dynamic extension supervisor call interruption | |
JPS61184644A (en) | Control system of virtual computer system | |
JPH02133833A (en) | Controller for in-circuit emulator | |
JPH08249024A (en) | Programmable controller | |
JPH05181671A (en) | Emulation system for software instruction | |
JPS60214046A (en) | Control system for abnormal end processing | |
JPH04140881A (en) | Information processor | |
JPH0731596B2 (en) | Conditional subroutine call method |