[go: up one dir, main page]

JP2576899B2 - Information processing device - Google Patents

Information processing device

Info

Publication number
JP2576899B2
JP2576899B2 JP1106432A JP10643289A JP2576899B2 JP 2576899 B2 JP2576899 B2 JP 2576899B2 JP 1106432 A JP1106432 A JP 1106432A JP 10643289 A JP10643289 A JP 10643289A JP 2576899 B2 JP2576899 B2 JP 2576899B2
Authority
JP
Japan
Prior art keywords
memory
interrupt
processing
instruction
signal
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
JP1106432A
Other languages
Japanese (ja)
Other versions
JPH0214328A (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.)
Seiko Epson Corp
Original Assignee
Seiko Epson 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 Seiko Epson Corp filed Critical Seiko Epson Corp
Priority to JP1106432A priority Critical patent/JP2576899B2/en
Publication of JPH0214328A publication Critical patent/JPH0214328A/en
Application granted granted Critical
Publication of JP2576899B2 publication Critical patent/JP2576899B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Description

【発明の詳細な説明】 [産業上の利用分野] 本発明は、所定の割込み処理が発生したときに、処理
の同一性を保持する情報処理装置に関する。
Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an information processing apparatus that retains the same processing when a predetermined interrupt processing occurs.

[従来の技術] 従来、既存のマイクロプロセッサとオブジェクト・コ
ードでの互換性を保ち、異なるマイクロプロセッサ間の
互換性をできるだけ維持しようとするものが知られてい
る。また、こうしたマイクロプロセッサを用いた情報処
理装置として、最近では、オペレーティングシステムと
アプリケーションプログラムの役割分担を明確にし、プ
ロセッサを含むハードウェアの非互換性を解消しようと
する試みもなされている。即ち、互換性を確保しにくい
ハードウェアのアクセス部分をオペレーティングシステ
ムに一括して任せ、その処理の開始アドレスをメモリに
記憶し、このメモリのアドレスを同一にすることで、ア
プリケーションプログラムから見た場合のシステムの同
一性を確保しようとするのである。割込が発生した場合
の処理についても、同様に割込処理の開始アドレスを書
き込んだメモリを用意することで、割込要求に対する処
理の互換性を保つことが試みられている。
2. Description of the Related Art Conventionally, there has been known a technique for maintaining compatibility between an existing microprocessor and an object code and maintaining compatibility between different microprocessors as much as possible. In addition, recently, as an information processing apparatus using such a microprocessor, attempts have been made to clarify the roles of an operating system and an application program and to eliminate incompatibilities of hardware including a processor. That is, the access part of the hardware that is difficult to ensure compatibility is entrusted to the operating system in a lump, the start address of the processing is stored in the memory, and the address of this memory is made the same, so that it can be seen from the application program. They try to ensure the identity of their systems. Regarding the processing when an interrupt occurs, it is attempted to maintain the compatibility of the processing for the interrupt request by preparing a memory in which the start address of the interrupt processing is similarly written.

[発明が解決しようとする課題] しかし、オブジェクトコードの互換性を有するマイク
ロプロセッサの一方を用いた場合、他方のマイクロプロ
セッサ用に書かれたアプリケーションプログラムを実行
すると、割り込み処理のリターンアドレスの発生方法の
違いにより、同じソフトウェアで異なった動作を起こす
という問題があった。
[Problems to be Solved by the Invention] However, when one of the microprocessors having object code compatibility is used, when an application program written for the other microprocessor is executed, a method of generating a return address of interrupt processing is performed. There was a problem that the same software caused different operations due to the differences.

本発明は従来のこの問題点を解決するために、特定の
割込みが発生した場合、マイクロプロセッサ等の周辺の
非互換性を解消して、同じ動作をさせることを目的とす
る。
An object of the present invention is to solve the conventional problem by eliminating the incompatibility around a microprocessor or the like and causing the same operation when a specific interrupt occurs.

[課題を解決するための手段] 上記問題点を解決するために、本発明の情報処理装置
は、 割り込み処理を行ないつつ情報を処理する情報処理装
置であって、 所定の割込み処理における第1のマイロプロセッサに
対する第2のマイクロプロセッサの非互換性を解消する
処理を記憶する記憶手段と、 前記第2のマイクロプロセッサの使用に対応して、起
動時に、前記所定の割込み処理でアクセスされるアクセ
ス先を、前記第1のマイクロプロセッサでアクセスされ
る第1の所定エリアから、前記非互換性を解消する処理
の前記記憶手段における記憶位置を記憶する第2の所定
エリアに予め切り換えておく切換手段と、 前記所定の割り込み処理の発生を検知する検知手段
と、 該検知手段で前記所定の割込み処理の発生が検知され
たとき、前記切換手段で切り換えられた前記第2の所定
エリアをアクセスして、前記非互換性を解消する処理を
実行する非互換性解消処理実行手段と、 前記非互換性解消処理実行手段による処理の実行後、
前記所定の割込み処理を実行する割込み処理実行手段と を備えたことを特徴とする。
[Means for Solving the Problems] In order to solve the above problems, an information processing apparatus of the present invention is an information processing apparatus that processes information while performing interrupt processing, and comprises: Storage means for storing a process for resolving incompatibility of the second microprocessor with the myroprocessor; and an access destination accessed by the predetermined interrupt process upon activation in response to use of the second microprocessor. Switching means for previously switching from a first predetermined area accessed by the first microprocessor to a second predetermined area for storing a storage position in the storage means of the processing for eliminating the incompatibility. Detecting means for detecting the occurrence of the predetermined interrupt processing; and detecting the occurrence of the predetermined interrupt processing by the detecting means. Accessing said second predetermined area switched by means, said Incompatibility resolution processing executing means for executing a process to eliminate the incompatibility, the after execution of processing by the incompatibility resolution processing execution means,
Interrupt processing executing means for executing the predetermined interrupt processing.

[作用] 上記のように構成された情報処理装置では、第2のマ
イクロプロセッサが使用されるときには、起動時に、所
定の割込み処理でアクセスされるアクセス先が、切換手
段により第1の所定エリアから第2の所定エリアに予め
切り換えられており、検知手段により所定の割込み処置
が検知されると、その第2の所定エリアをアクセスする
ことにより、記憶手段上の非互換性を解消する処理が実
行され、その後、その所定の割込み処理が実行される。
このため、第2のマイクロプロセッサの使用時におい
て、所定の割込み処理の実行に際して、互換性を維持す
ることが可能となる。
[Operation] In the information processing apparatus configured as described above, when the second microprocessor is used, at the time of startup, the access destination accessed by the predetermined interrupt processing is switched from the first predetermined area by the switching means. When the predetermined interruption processing is detected by the detection means, the processing is canceled by accessing the second predetermined area, and the incompatibility in the storage means is executed. After that, the predetermined interruption process is executed.
Therefore, when the second microprocessor is used, it is possible to maintain compatibility when executing a predetermined interrupt process.

なお、本発明において、次のような構成を付加するよ
うにしても良い。
In the present invention, the following configuration may be added.

既存のマイクロプロセッサを割り込み処理のリターン
アドレス発生方法の違う割り込みのベクタが書かれてい
るメモリに対して、リード・ライト動作を制御し、第1
図のようにライト時には、そのメモリに書き込まれ(デ
ータの流れ3、6)リード時には、メモリが切り換えら
れて他方のメモリが読み出され(データの流れ4、5)
る機能をもつ回路又は、ライト時に、第2図のようにメ
モリに切り換えて他のメモリに書き込み、リード時に
は、そのメモリが読み出せる機能を持つ回路と、その回
路を制御し、リターンアドレスを修正する機能を設ける
ようにする。
An existing microprocessor controls a read / write operation for a memory in which an interrupt vector having a different return address generation method for interrupt processing is written, and
As shown in the figure, at the time of writing, the data is written to the memory (data flows 3, 6). At the time of reading, the memory is switched and the other memory is read (data flows 4, 5).
Or a circuit having a function to switch to a memory and write to another memory as shown in FIG. 2 at the time of writing, and a circuit having a function to read the memory at the time of reading, and to control the circuit and modify the return address. Function to perform

[実 施 例] 以下に本発明の実施例を示す。実施例の情報処理装置
は、周知のCPU,ROM,RAM,入出力装置など(図示せず)を
備えたものであり、割込の要求を受け付けて、所定の処
理を実行する機能を有する。第3図は、本発明を実現す
るための実施例としてのメモリ制御回路の実施例であ
る。第3図において、1は、特別割り込みベクタ用アド
レステコード回路であり、特別割り込みベクタのアドレ
スが選択された時に、信号35に0を出力し、それ以外の
アドレスが選択された時、1を出力する。2は、メモリ
セレクト回路であり、ソフトウエアからのセレクト信号
(図示せず)により、BANK信号30を決定する。特別割り
込みベクタとは、既存のマイクロプロセッサと、割り込
み処理からのリターンアドレスの発生方法の違う割り込
みの割り込みベクタである。
[Example] An example of the present invention will be described below. The information processing apparatus according to the embodiment includes a well-known CPU, ROM, RAM, an input / output device (not shown), and has a function of receiving an interrupt request and executing a predetermined process. FIG. 3 is an embodiment of a memory control circuit as an embodiment for realizing the present invention. In FIG. 3, reference numeral 1 denotes a special interrupt vector address code circuit, which outputs 0 to the signal 35 when the address of the special interrupt vector is selected, and outputs 1 when any other address is selected. Output. Reference numeral 2 denotes a memory select circuit, which determines a BANK signal 30 according to a select signal (not shown) from software. The special interrupt vector is an interrupt vector of an existing microprocessor and an interrupt that differs in a method of generating a return address from interrupt processing.

第4図に、メモリマップを示す。この図で、メモリ20
は、特別割り込みベクタ、メモリ21はメモリ20の特別割
り込みベクタと同一のアドレスに割り当てられ他のバン
ク上のメモリである。また、MRN(アクティブHigh)
は、CPU側からのメモリ・リード信号であり、MWN(アク
ティブHigh)は、CPU側からのメモリ・ライト信号、MR0
\(符号「\」は、信号がアクティブLowであることを
示す。なお、負論理は、図においては信号名の上にライ
ンを引いて示す。以下同じ)は、メインメモリ25に対す
るメモリ・リード信号、MR1\(アクティブLow)は、メ
モリ21に対するメモリ・リード信号、MW0\(アクティ
ブLow)は、メモリ25に対するメモリーライト信号、MW1
\(アクティブLow)はメモリ21に対するメモリ・ライ
ト信号である。
FIG. 4 shows a memory map. In this figure, the memory 20
Is a special interrupt vector, and the memory 21 is a memory allocated to the same address as the special interrupt vector of the memory 20 and on another bank. Also, MRN (active high)
Is a memory read signal from the CPU, and MWN (active High) is a memory write signal from the CPU, MR0
\ (Symbol “\” indicates that the signal is active low; negative logic is indicated by drawing a line above the signal name in the figure. The same applies hereinafter) indicates memory read from the main memory 25. Signal, MR1\ (active low) is a memory read signal to the memory 21, MW0\ (active low) is a memory write signal to the memory 25, MW1
\ (Active low) is a memory write signal to the memory 21.

この回路は、BANK信号30が0(Low)のとき信号31は
1(High)となり、信号36は信号35と等しくなる。そし
て、信号35が0のときには、ゲート42とゲート43が開
き、信号35が1のときには、ゲート41とゲート43が開
く。またBANK信号30が1のとき、信号36は1となり、信
号31は信号35と等しくなる。この場合には、信号35が0
のとき、ゲート41とゲート44が開き、信号35が1のと
き、ゲート41とゲート43が開く。これにより、特別割り
込みベクタが選択されたとき、BANK信号30が0ならば、
メモリ21が読み出され、メモリ20に書き込むことがで
き、BANK信号30が1ならば、メモリ20が読み出され、メ
モリ21に書き込むことができる。また、特別割り込みベ
クタが選択されないときは、読み書きは、メインメモリ
25に対して行なわれる。
In this circuit, when the BANK signal 30 is 0 (Low), the signal 31 becomes 1 (High), and the signal 36 becomes equal to the signal 35. When the signal 35 is 0, the gate 42 and the gate 43 are opened, and when the signal 35 is 1, the gate 41 and the gate 43 are opened. When the BANK signal 30 is 1, the signal 36 becomes 1 and the signal 31 becomes equal to the signal 35. In this case, the signal 35 becomes 0
At this time, the gate 41 and the gate 44 are opened, and when the signal 35 is 1, the gate 41 and the gate 43 are opened. Thus, when the special interrupt vector is selected, if the BANK signal 30 is 0,
The memory 21 can be read and written to the memory 20, and if the BANK signal 30 is 1, the memory 20 can be read and written to the memory 21. When the special interrupt vector is not selected, reading and writing is performed in the main memory.
Performed on 25.

既存のプロセッサをプロセッサ0とし、このプロセッ
サ0とオブジェクトコード上で互換性があり、割り込み
処理からのリターンアドレスの発生方の異なるプロセッ
サを、プロセッサ1とする。
An existing processor is referred to as a processor 0, and a processor which is compatible with the processor 0 in object code and generates a return address from interrupt processing differently is referred to as a processor 1.

第5図に示すように、プロセッサ0では、命令51にお
いて特別割り込みが発生した時、その処理からのリター
ンアドレスとしては、次の命令52のアドレスがセットさ
れ、プロセッサ1では、命令51において発生した特別割
り込みによる処理からのリターンアドレスとして命令51
自体のアドレスがセットされる。この場合、プロセッサ
0では正常に動作したプロセッサが、プロセッサ1で
は、命令51においてループしてしまい、プロセッサ0と
まったく違う動作になってしまう。そこで、命令51にお
いて発生した割り込みの、割り込みベクタを、ベクタ53
のようにリターンアドレス処理ルーチンにしておき、リ
ターンアドレス処理ルーチン内において、割り込み処理
からのリターンアドレスを命令52に修正を行ない、本来
の割り込み処理ルーチンに処理を移せば(矢印54)、処
理後のリターンアドレスは命令52になるので、プロセッ
サ0とプロセッサ1は見かけ上同じ動作をしたことにな
る。そこで、第3図に示した回路を用いたシステムにお
いて、オペレーティングシステムの起動時にBANK信号35
を一旦1にし、メモリ21にリターンアドレス修正ルーチ
ンの先頭アドレスを書き込み、その後BANK信号35を0と
してから、アプリケーションプログラムが実行されるも
のとする(第6図ステップ100)。このようにしておく
と、その後、アプリケーションプログラムから見たと
き、特別割り込みベクタは、リード時には、リターンア
ドレス修正ルーチンの先頭アドレスがメモリ21から読み
出され、ライト時には、メモリ20にデータが書き込まれ
る。
As shown in FIG. 5, in the processor 0, when a special interrupt is generated in the instruction 51, the address of the next instruction 52 is set as the return address from the processing, and in the processor 1, the address is generated in the instruction 51. Instruction 51 as return address from processing by special interrupt
Its own address is set. In this case, the processor that operates normally in the processor 0 loops at the instruction 51 in the processor 1, and the operation is completely different from that of the processor 0. Therefore, the interrupt vector of the interrupt generated in the instruction 51 is replaced with the vector 53.
In the return address processing routine, the return address from the interrupt processing is corrected to the instruction 52 in the return address processing routine, and the processing is shifted to the original interrupt processing routine (arrow 54). Since the return address is the instruction 52, the processors 0 and 1 have apparently performed the same operation. Therefore, in a system using the circuit shown in FIG.
Is temporarily set to 1, the start address of the return address correction routine is written to the memory 21, and then the BANK signal 35 is set to 0, and then the application program is executed (step 100 in FIG. 6). By doing so, when the special interrupt vector is read from the application program thereafter, the head address of the return address correction routine is read from the memory 21 at the time of reading, and data is written to the memory 20 at the time of writing.

そこで、アプリケーション・プログラム等を実行する
(ステップ101)。実行中に、特別割り込みが発生する
と、特別割り込みベクタが参照されるが、この時読み出
されるのは、メモリ21であり(ステップ102)、リター
ンアドレス修正ルーチンの先頭アドレスを指しているの
で、特別割り込みの処理ルーチンではなくて、リターン
アドレス修正ルーチンに制御が移される(ステップ10
3)。
Then, an application program or the like is executed (step 101). If a special interrupt occurs during execution, the special interrupt vector is referred to. At this time, what is read is the memory 21 (step 102), which points to the start address of the return address correction routine. Is transferred to the return address correction routine instead of the processing routine (step 10).
3).

リターンアドレス修正ルーチンにおいては、リターン
アドレスが、プロセッサ0での動作と等しくなるよう
に、リターンアドレスを書き替える。続けて、BANK信号
35を1にして、メモリ20を読み出す(ステップ104)。
これにより、アプリケーションプログラムが用意した本
来の割り込み処理の先頭アドレスを得ることができる。
そしてBANK信号を0にし(ステップ104)、本来の割り
込み処理ルーチンに制御を移す(ステップ105,106)。
これにより、見かけ上同じ動作をされることが可能にな
る。すなわち、割り込み処理からのリターンアドレスの
発生方法の違いによる非互換性は解消される。
In the return address correction routine, the return address is rewritten so that the return address becomes equal to the operation in the processor 0. Continue, BANK signal
With 35 set to 1, the memory 20 is read (step 104).
As a result, the start address of the original interrupt processing prepared by the application program can be obtained.
Then, the BANK signal is set to 0 (step 104), and control is transferred to the original interrupt processing routine (steps 105 and 106).
Thus, the same operation can be apparently performed. That is, the incompatibility due to the difference in the method of generating the return address from the interrupt processing is eliminated.

次に、インテル社製のマイクロプロセッサ80286CPUと
8086CPUの場合を具体例として説明する。80286CPUは、8
086CPUとオブジェクトコード上では互換性があるが、0
(ゼロ)除算割り込み処理のリターンアドレスの発生法
が違うマイクロプロセッサである。そのため0除算割り
込みが発生した場合、その割り込み処理、リターンアド
レスが異なることによる非互換性が発生している。
Next, Intel microprocessor 80286 CPU
The case of the 8086 CPU will be described as a specific example. 80286 CPU is 8
086CPU and object code compatible, but 0
(Zero) A microprocessor with a different method of generating a return address for division interrupt processing. Therefore, when a divide-by-zero interrupt occurs, incompatibility occurs due to different interrupt processing and different return addresses.

この非互換性を解消するために、第7図のような回路
を用いる。この回路は、アドレスバスAB2〜AB23がすべ
て0の時に信号35に0を出力し、それ以外の時は、信号
35に1を出力する。0除算割り込みベクタは、メモリア
ドレスの0H〜3Hに格納されているので、0除算割り込み
ベクタが選択された時には、信号35に0が出力され、そ
れ以外のアドレスが選択された時には、信号35に1が出
力される。
In order to eliminate this incompatibility, a circuit as shown in FIG. 7 is used. This circuit outputs 0 to the signal 35 when the address buses AB2 to AB23 are all 0, and outputs the signal otherwise.
Output 1 to 35. Since the divide-by-zero interrupt vector is stored in the memory addresses 0H to 3H, 0 is output to the signal 35 when the divide-by-zero interrupt vector is selected, and the signal 35 is output when any other address is selected. 1 is output.

また、メモリセレクト回路では、アドレスバスAB0〜A
B3がすべて1で、アドレスAB4〜AB7がすべて0の時で、
IOW信号が0から1になる時のDB0がBANK信号30として出
力される。すなわち、I/OポートOFHに0を出力するとBA
NK信号30には0が出力され、I/OポートOFHに1を出力す
るとBANK信号30に1が出力される。
In the memory select circuit, address buses AB0 to A
When B3 is all 1 and addresses AB4 to AB7 are all 0,
DB0 when the IOW signal changes from 0 to 1 is output as the BANK signal 30. That is, when 0 is output to the I / O port OFH, BA
When 0 is output to the NK signal 30 and 1 is output to the I / O port OFH, 1 is output to the BANK signal 30.

第8図に、この時のメモリマップを示す。この図で、
メモリ61は80286CPUのメインメモリ、メモリ62は、メイ
ンメモリ61上にある0除算割り込みベクタの書かれるメ
モリ、メモリ63は、メモリ61に対応した動作上問題のな
いバンクメモリである。また、第7図において、MR0\
は、メインメモリ61に対するメモリ・リード信号、MR1
\はバンクメモリ63に対するメモリ・リード信号、MW0
\は、メインメモリ61に対するメモリ・ライト信号、MW
1\は、バンクメモリ63に対するメモリ・ライト信号で
ある。いずれも、アクティブLowの信号である。
FIG. 8 shows a memory map at this time. In this figure,
The memory 61 is a main memory of the 80286 CPU, the memory 62 is a memory on the main memory 61 in which a divide-by-zero interrupt vector is written, and the memory 63 is a bank memory corresponding to the memory 61 and having no problem in operation. In FIG. 7, MR0\
Is a memory read signal for the main memory 61, MR1
\ Is a memory read signal for bank memory 63, MW0
\ Is a memory write signal for the main memory 61, MW
1\ is a memory write signal for the bank memory 63. Both are active low signals.

前述したように、第7図の回路では、0除算割り込み
ベクタが選択された時、BANK信号30が0の時は、メモリ
・リードに関しては、バンクメモリ63の内容が読み出さ
れ、メモリ・ライトに関しては、メインメモリ61の0除
算割り込みベクタ62に書き込まれる。また、BANK信号30
が1の時は、メモリリードに関しては、メインメモリ61
の0除算割り込みベクタ62の内容が読み出され、メモリ
・ライト関しては、バンクメモリ63に書き込まれる。仮
に、 DIV DX、BX という命令において、BX=0であったとすると、8028
6CPU、8086CPU共に0除算割り込みを発生するが、その
処理ルーチンからのリターンアドレスは、80286CPUは割
り込みを起こした命令を指しているが、8086CPUでは、
割り込みを起こした命令の次の命令を指している。従っ
て、8086CPU用に、リターンアドレスそのものに戻るよ
うに書かれたプログラムを80286CPU上で実行すると、BX
=0で除算を実行すると、80286CPUでは、再び0除算割
り込みを発生し、プログラムがストップしてしまう。と
ころが、8086CPUにおいては、処理は割り込みを起こし
た命令の次の命令に移っているのでその後の処理を続行
する、というような非互換性が発生する。
As described above, in the circuit of FIG. 7, when the divide-by-zero interrupt vector is selected and the BANK signal 30 is 0, the contents of the bank memory 63 are read with respect to the memory read, and the memory write is performed. Is written into the divide-by-zero interrupt vector 62 of the main memory 61. In addition, BANK signal 30
Is 1 when the main memory 61
The contents of the divide-by-zero interrupt vector 62 are read out, and the memory write is written to the bank memory 63. Assuming that BX = 0 in the instruction DIV DX, BX, 8028
The 6CPU and 8086CPU both generate a divide-by-zero interrupt. The return address from the processing routine indicates the instruction that caused the interrupt in the 80286CPU, but in the 8086CPU,
It points to the instruction following the instruction that caused the interrupt. Therefore, when a program written to return to the return address itself for the 8086 CPU is executed on the 80286 CPU, BX
When division is performed with = 0, the 80286 CPU again generates a division-by-zero interrupt, and the program stops. However, in the 8086 CPU, an incompatibility occurs in that processing is shifted to the instruction next to the instruction that caused the interrupt, so that subsequent processing is continued.

80286CPU上で0除算割り込みが発生すると、他の割り
込みの発生時と同様、割り込み処理用のベクタとして0
除算割り込みベクタを読み出し、そのベクタの示すアド
レスに制御を移す。そこで、システムブート時に、I/O
ポートOFHに0を出力しておけば、80286CPUが読み出す
0除算割り込みベクタは、バンクメモリ63の値にするこ
とができる。
When a divide-by-zero interrupt occurs on the 80286 CPU, 0 is used as an interrupt processing vector, just as when other interrupts occur.
The division interrupt vector is read, and control is transferred to the address indicated by the vector. Therefore, at the time of system boot, I / O
If 0 is output to the port OFH, the divide-by-zero interrupt vector read by the 80286 CPU can be set to the value of the bank memory 63.

次に、リターンアドレス修正ルーチンの実例を説明す
る。このルーチンのリストを第1表に示す。以下の説明
において()内に示す3桁の数字は、表1内の処理に付
けた番号に対応している。
Next, an actual example of the return address correction routine will be described. A list of this routine is shown in Table 1. In the following description, the three-digit numbers shown in parentheses correspond to the numbers given to the processes in Table 1.

このリターンアドレス修正ルーチンは、割り込みが入
ってくると、まず、アプリケーションプログラムの0除
算割り込み処理ルーチンへの分岐用に、スタックエリア
を4バイト確保する(201) 次に、各レジスタの退避を行なう(202)。
In this return address correction routine, when an interrupt is received, first, 4 bytes of a stack area are secured for branching to the division by 0 interrupt processing routine of the application program (201). Then, each register is saved ( 202).

そして、エラーを起こした命令と先頭アドレスは、割
り込み処理のリターンアドレスになっているので、その
アドレスのセグメントをDSレジスタに入れ、アドレスの
オフセットをSILレジスタに入れる(203)。
Since the instruction causing the error and the start address are the return addresses of the interrupt processing, the segment of the address is stored in the DS register, and the address offset is stored in the SIL register (203).

そして命令コードのプリフィックス部分をスキップさ
せるサブルーチンをコールする(204)。プリフィック
ス部分は、2進コードでは、001××110bとなっている
のでこの部分だけスキップさせる(205)。
Then, a subroutine for skipping the prefix part of the instruction code is called (204). Since the prefix part is 001xx110b in the binary code, this part is skipped (205).

次に、割り込みを起こした命令が、除算命令がどうか
を確認する。この場合は、0除算命令は、2進コードで
00×××110bとなっているので割り込みを起こした命令
がこうなっているかを確認する(206)。もし、0除算
命令でなければ、例えばINT0命令ならば、リターンアド
レスを修正しないまま、アプリケーションの割り込み処
理ルーチンに、制御をわたす(207)。除算命令であれ
ば、その命令長を求めるサブルーチンをコールする(20
2)。このサブルーチンでは、まず、命令の2バイト目
を見て、コードが2進コードで、00×××110bとなって
いれば、メモリオペランド命令であるのでこの場合は4
バイト命令、第7,6ビット目が11又は00の場合は2バイ
ト命令、第7,6ビット目が01なら3バイト命令、第7,6ビ
ット目が10なら4バイト命令なので、このことにより、
割り込みを起こした命令の次の命令の先頭アドレスがわ
かる(208)。これを、リターンアドレスが書き込まれ
ているエリアに書き込んで(209)、リターンアドレス
を修正した後、サブルーチンコールから戻る(221)。
Next, it is checked whether the instruction that caused the interrupt is a division instruction. In this case, the divide-by-zero instruction is a binary code
Since it is 00xxx110b, it is checked whether the instruction which caused the interrupt is as follows (206). If the instruction is not a divide-by-zero instruction, for example, if it is an INT0 instruction, control is passed to the interrupt processing routine of the application without modifying the return address (207). If the instruction is a division instruction, call the subroutine to determine the instruction length (20
2). In this subroutine, first, looking at the second byte of the instruction, if the code is a binary code and is 00 ××× 110b, it is a memory operand instruction.
If the 7th and 6th bits are 11 or 00, it is a 2-byte instruction, if the 7th and 6th bits are 01, it is a 3-byte instruction, and if the 7th and 6th bits are 10, it is a 4-byte instruction. ,
The start address of the instruction following the instruction that caused the interrupt is known (208). This is written in the area where the return address is written (209), the return address is corrected, and the routine returns from the subroutine call (221).

そして、戻り番地をセットするサブルーチンをコール
する(230)。このサブルーチンでは、メインメモリア
クセスモードにセットした後(231,232)、メインメモ
リ61の0除算割り込みベクタ62に書き込まれているアプ
リケーションの0除算割り込み処理ルーチンのスタート
アドレスをスタックエリアに分岐用に確保したエリアに
セットする(233)。その後、バンクメモリアクセスモ
ードに切り替え(210,241)、レジスタを戻す(211)。
以上の処理の後、リターン命令を実行すると、アプリケ
ーションの0除算割り込み処理ルーチンに処理を移すこ
とができる。そして、そのルーチンからのリターンアド
レスは、0除算割り込みを起こした命令を次の命令に変
更されており、80286CPUで8086CPUと同様な動作をさせ
ることが可能になる。
Then, a subroutine for setting a return address is called (230). In this subroutine, after setting the main memory access mode (231, 232), an area in which the start address of the application division by zero interrupt processing routine written in the division by zero interrupt vector 62 of the main memory 61 is reserved in the stack area for branching (233). Thereafter, the mode is switched to the bank memory access mode (210, 241), and the register is returned (211).
After the above processing, when a return instruction is executed, the processing can be shifted to a division by 0 interrupt processing routine of the application. Then, the return address from the routine is changed from the instruction that caused the divide-by-zero interrupt to the next instruction, so that the 80286 CPU can perform the same operation as the 8086 CPU.

これまで説明した例では、別メモリとして、バンクメ
モリを用いた例を示したが、別メモリとしては、EMSな
ど動作上問題のないメインメモリ上のメモリ等、どのよ
うなメモリを用いてもよい。
In the example described so far, an example in which a bank memory is used as another memory is shown. However, any other memory such as a memory on a main memory having no operational problem such as EMS may be used as another memory. .

また、80286CPUにあって、8086CPUにない割り込み、
例えば、セグメントオーバランエラー割り込みについ
て、この割り込みは、 MOV AX:[BX] というような、メモリアクセス命令においてBX=OFFF
FHとなるような、セグメントを超えて、メモリアクセス
しようとした場合、80286CPUで発生する割り込みであ
る。この割り込みは、8086CPUでは発生しない。そこ
で、この場合にも、本発明を用いリターンアドレス修正
ルーチン内で8086CPUと同様な処理を行ない、リターン
アドレスを割り込みを起こした命令の次にして、リター
ンすることにより、80286CPUで、8086CPUと同様な動作
をさせることが可能になり、この割り込みによる非互換
性は、この発明を用いることにより解消できる。
In addition, the interrupt which is in 80286CPU but not in 8086CPU,
For example, for a segment overrun error interrupt, this interrupt can be written in a memory access instruction, such as MOV AX: [BX], where BX = OFFF
This is an interrupt generated by the 80286 CPU when trying to access memory beyond the segment, such as FH. This interrupt does not occur in the 8086 CPU. Therefore, in this case, the same processing as that of the 8086 CPU is performed in the return address correction routine using the present invention, and the return address is returned after the instruction that caused the interrupt. The operation can be performed, and the incompatibility due to the interrupt can be eliminated by using the present invention.

更に、オペレーティングシステムが、古いBIOSと役割
が同一で機能を高めた新たなBIOSプログラムなどを用意
したとき、新たに付加されたBIOSのファンクションコー
ルを、互換性の観点から、古いBIOSと同一のファンクシ
ョンコール(開始アドレス)に割り当てたい場合が存在
する。しかし、そのまま置き換えてしまうと、古いアプ
リケーションプログラムによっては、新たなBIOSの機能
に対応できず、処理を誤ってしまう場合も存在する。こ
の場合、古いBIOSのファンクションコールに新たなBIOS
を割り当てておき、新たなBIOSに対応したアプリケーシ
ョンか否かを判別するものとすれば、上記実施例と同様
に、アプリケーションプログラムがBIOSをコールしたと
き、見かけ上は同一の処理を実施させながら、実際の処
理を異ならせて、誤動作の発生を回避することができ
る。即ち、アプリケーションプログラムが用意したジャ
ンプテーブルを用いて処理を行なおうとすると、実際に
はオペレーティングシステムが用意したジャンプテーブ
ルを参照して処理が開始され、新しいBIOSの機能に対応
していないと判断したときには、古いBIOS(新しいBIOS
とは異なるアドレスに割り当てられている)を呼ぶもの
とするのである。この結果、アプリケーションプログラ
ムを変更しなくとも、BIOSの非互換性を越えて、新たな
機能を利用することが可能となる。
In addition, when the operating system prepares a new BIOS program with the same role as the old BIOS and enhanced functions, the newly added BIOS function call is replaced with the same function as the old BIOS from the viewpoint of compatibility. There are cases where you want to assign to a call (start address). However, if replaced as it is, some old application programs may not be able to cope with the new BIOS function, and may cause erroneous processing. In this case, the new BIOS is replaced with the old BIOS function call.
If it is assumed that it is determined whether or not the application is compatible with the new BIOS, similar to the above embodiment, when the application program calls the BIOS, while apparently performing the same processing, By making the actual processing different, the occurrence of a malfunction can be avoided. In other words, when trying to perform processing using the jump table prepared by the application program, the processing is actually started by referring to the jump table prepared by the operating system, and it is determined that the new BIOS function is not supported. Sometimes the old BIOS (new BIOS
(Assigned to an address different from the address). As a result, new functions can be used beyond the incompatibility of the BIOS without changing the application program.

[発明の効果] 本発明によれば、割込み処理の異なるプロセッサ間の
互換性が実現される。そのため、従来は、割り込み処理
の違いのため動かなかったプロセッサA用のソフトウエ
アがプロセッサBにおいても動作するようになり、ユー
ザの使い勝手が大幅に向上する。
[Effects of the Invention] According to the present invention, compatibility between processors having different interrupt processes is realized. For this reason, the software for the processor A, which has not been operated conventionally due to the difference in the interrupt processing, now operates also in the processor B, and the usability for the user is greatly improved.

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

第1図、第2図は、メモリ・リード・ライト制御回路の
動作概念図。 第3図は、本発明を実施する回路の一例を示す回路図。 第4図は、その時のメモリマップを示す図。 第5図は、割り込み動作の動作図。 第6図は、上記実施例のフローチャート。 第7図な、本発明を実施する具体的な回路図。 第8図は、その時のメモリマップを示す図。 第9図は、第7図の回路のタイミングチャートを示す
図。 20……メモリ、21……メモリ 25……メインメモリ、30……BANK信号 35……BANK信号、61……メインメモリ 62……メモリ、63……バンクメモリ
1 and 2 are conceptual diagrams of the operation of a memory read / write control circuit. FIG. 3 is a circuit diagram showing an example of a circuit for implementing the present invention. FIG. 4 is a diagram showing a memory map at that time. FIG. 5 is an operation diagram of an interrupt operation. FIG. 6 is a flowchart of the above embodiment. FIG. 7 is a specific circuit diagram for implementing the present invention. FIG. 8 is a diagram showing a memory map at that time. FIG. 9 is a diagram showing a timing chart of the circuit of FIG. 7; 20: Memory, 21: Memory 25: Main memory, 30: BANK signal 35: BANK signal, 61: Main memory 62: Memory, 63: Bank memory

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】割り込み処理を行ないつつ情報を処理する
情報処理装置であって、 所定の割込み処理における第1のマイクロプロセッサに
対する第2のマイクロプロセッサの非互換性を解消する
処理を記憶する記憶手段と、 前記第2のマイクロプロセッサの使用に対応して、起動
時に、前記所定の割込み処理でアクセスされるアクセス
先を、前記第1のマイクロプロセッサでアクセスされる
第1の所定エリアから、前記非互換性を解消する処理の
前記記憶手段における記憶位置を記憶する第2の所定エ
リアに予め切り換えておく切換手段と、 前記所定の割り込み処理の発生を検知する検知手段と、 該検知手段で前記所定の割込み処理の発生が検知された
とき、前記切換手段で切り換えられた前記第2の所定エ
リアをアクセスして、前記非互換性を解消する処理を実
行する非互換性解消処理実行手段と、 前記非互換性解消処理実行手段による処理の実行後、前
記所定の割込み処理を実行する割込み処理実行手段と を備えた情報処理装置。
1. An information processing apparatus for processing information while performing an interrupt process, wherein said storage device stores a process for eliminating incompatibility of a second microprocessor with a first microprocessor in a predetermined interrupt process. In response to the use of the second microprocessor, at the time of activation, an access destination accessed by the predetermined interrupt processing is changed from a first predetermined area accessed by the first microprocessor to the non- Switching means for previously switching to a second predetermined area for storing a storage position in the storage means of the processing for canceling compatibility; detection means for detecting occurrence of the predetermined interrupt processing; When the occurrence of the interrupt processing is detected, the second predetermined area switched by the switching means is accessed and the incompatible An information processing apparatus comprising: an incompatibility eliminating process executing unit that executes a process for eliminating interoperability; and an interrupt process executing unit that executes the predetermined interrupt process after execution of the process by the incompatibility eliminating process executing unit. .
JP1106432A 1989-04-26 1989-04-26 Information processing device Expired - Lifetime JP2576899B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1106432A JP2576899B2 (en) 1989-04-26 1989-04-26 Information processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1106432A JP2576899B2 (en) 1989-04-26 1989-04-26 Information processing device

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP9676087A Division JPS63233438A (en) 1986-10-03 1987-04-20 information processing equipment

Publications (2)

Publication Number Publication Date
JPH0214328A JPH0214328A (en) 1990-01-18
JP2576899B2 true JP2576899B2 (en) 1997-01-29

Family

ID=14433496

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1106432A Expired - Lifetime JP2576899B2 (en) 1989-04-26 1989-04-26 Information processing device

Country Status (1)

Country Link
JP (1) JP2576899B2 (en)

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6261149A (en) * 1985-09-11 1987-03-17 Panafacom Ltd Interruption control system
JPH0772874B2 (en) * 1986-06-27 1995-08-02 日本電気株式会社 Interrupt receiving device

Also Published As

Publication number Publication date
JPH0214328A (en) 1990-01-18

Similar Documents

Publication Publication Date Title
US5701493A (en) Exception handling method and apparatus in data processing systems
US4156910A (en) Nested data structures in a data driven digital data processor
US5255382A (en) Program memory expander for 8051-based microcontrolled system
KR930016880A (en) Electronic device and its fixing information
US5600807A (en) Programmable controller capable of updating a user program during operation by switching between user program memories
JP2003515805A (en) Processor system
JP2576899B2 (en) Information processing device
US4985826A (en) Method and device to execute two instruction sequences in an order determined in advance
IE61306B1 (en) Method and device to execute two instruction sequences in an order determined in advance
US6108761A (en) Method of and apparatus for saving time performing certain transfer instructions
JP3055999B2 (en) Microprogram control device group
JP2569801B2 (en) Information processing device
US5201052A (en) System for transferring first and second ring information from program status word register and store buffer
JPH0241771B2 (en)
JP2552738B2 (en) Data processing device
JP2003177934A (en) Digital signal processor
JP3616649B2 (en) Method and apparatus for enabling address lines to access upper memory areas
EP0382529B1 (en) Microprocessor having store buffer
JPH0555895B2 (en)
JP3130798B2 (en) Bus transfer device
JP2506591B2 (en) Auxiliary processor
JPH0833825B2 (en) Microprocessor
JPH0954692A (en) Microprogram control system
JPH04332045A (en) Arithmetic processor
JPS61118836A (en) Microprogram controller

Legal Events

Date Code Title Description
EXPY Cancellation because of completion of term
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20071107

Year of fee payment: 11