JPS60245049A - Data processor - Google Patents

Data processor

Info

Publication number
JPS60245049A
JPS60245049A JP10047984A JP10047984A JPS60245049A JP S60245049 A JPS60245049 A JP S60245049A JP 10047984 A JP10047984 A JP 10047984A JP 10047984 A JP10047984 A JP 10047984A JP S60245049 A JPS60245049 A JP S60245049A
Authority
JP
Japan
Prior art keywords
register
registers
contents
tag
saved
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
JP10047984A
Other languages
Japanese (ja)
Inventor
Kenzo Funatsu
舟津 健三
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.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
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 Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP10047984A priority Critical patent/JPS60245049A/en
Publication of JPS60245049A publication Critical patent/JPS60245049A/en
Pending legal-status Critical Current

Links

Landscapes

  • Executing Machine-Instructions (AREA)

Abstract

PURPOSE:To shorten an interruption reaction time without increasing the capacity of a ROM by setting a flag corresponding to a register to be saved by a user through a program, and minimising the number of cycles reqiured to reload the register. CONSTITUTION:The contents of a tag register TR are supplied from an instruction decoder ID to a sequence controller SC through gates g1-gn. A controller SC when an interruption is initiated outputs the contents of only registers corresponding to tab bits set to 1 to a bus BUS except registers corresponding to tag bits set to 0 according to priority predetermined on the basis of the contents of the register TR. Simultaneously, the contents of a stack pointer SP are decreased and data from the BUS are stored in address locations of the stack area in the RAM that the pointer SP indicates. The controller SC when receiving a return interrupt instruction reloads the contents of the stand-by registers in the RAM to the original registers successively.

Description

【発明の詳細な説明】 [技術分野] この発明は、データ処理技術に関し、例えばマイクロコ
ンピータシステムにおけるレジスタの退避方式に利用し
て有効な技術に関する。
DETAILED DESCRIPTION OF THE INVENTION [Technical Field] The present invention relates to data processing technology, and relates to a technology that is effective when used, for example, in a register saving method in a microcomputer system.

[背景技術] マイクロコンピュータシステムのようなデータ処理シス
テムにおいては、CPU (マイクロプロセッサ)に対
し割込みがかかると、実行中のプログラムを中断して割
込みルーチンヘジャンプし、割込み処理を実行する。そ
の場合、割込み処理が終了した時点で元の状態へ復帰さ
せる必要がある場合には、予め割込み処理へ移る前に、
プログラムカウンタ等のレジスタの内容をRAM (ラ
ンダム・アクセス・メモリ)等のスタックエリアに退避
させなければならない。
[Background Art] In a data processing system such as a microcomputer system, when a CPU (microprocessor) receives an interrupt, the program that is being executed is interrupted, jumps to an interrupt routine, and interrupt processing is executed. In that case, if it is necessary to return to the original state when the interrupt processing is finished, before proceeding to the interrupt processing,
The contents of registers such as a program counter must be saved to a stack area such as RAM (random access memory).

従来、上記のようなレジスタの退避は、例えば8ビツト
系のマイクロコンピュータでは、割込み発生時にユーザ
が関係する内蔵レジスタをすべてハード的にRAMのス
タックエリアに退避させるよう1こなっている(例えば
昭和55年5月1日にモトローラ・セミコンダクターズ
・ジャパン[株]が発行した「マイクロコンピュータの
基礎と6800J第171頁、180頁参照)。
Traditionally, register saving as described above has been done in 8-bit microcomputers, for example, by saving all built-in registers related to the user to the stack area of RAM by hardware when an interrupt occurs (for example, in the Showa era). "Microcomputer Basics and 6800J, pages 171 and 180, published by Motorola Semiconductors Japan Co., Ltd. on May 1, 1955).

従って、このようにハード的にすべてのレジスタの内容
を自動的に退避する方式では、退避する必要のないレジ
スタ(不使用中のレジスタ等)まで退避することになる
。そのため、割込み時におけるレジスタの退避およびそ
の復帰に要するサイクル数が多くなり、レジスタの数や
容量が大きくなるほど割込み反応時間が長くなるととも
に、システム全体のスループットも低下するという欠点
がある。
Therefore, in this method of automatically saving the contents of all registers using hardware, even registers that do not need to be saved (such as unused registers) are saved. Therefore, the number of cycles required to save and restore registers at the time of an interrupt increases, and as the number and capacity of registers increases, the interrupt response time becomes longer and the throughput of the entire system also decreases.

一方、4ビツトマイクロコンピユータにおいては、プロ
グラムによって、必要なレジスタの内容を一つずつRA
Mのスタックエリアに退避させるようになっている(昭
和58年9月に日立製作所[株]が発行した「日立4ビ
ツト1チツプマイクロコンピユータシステム・0MC3
40シリーズ・ユーザーズ・マニュアル」第33頁参照
)。
On the other hand, in a 4-bit microcomputer, the contents of the necessary registers are read one by one by a program.
It is designed to be evacuated to the stack area of M.
40 Series User's Manual, page 33).

従って、このようにソフト的にレジスタの退避、復帰を
行なう方式にあっては、必要なサイクル数は少なくなる
が、プログラムの負担が大きくなって、プログラムを格
納するROM容量が増大してしまうという不都合がある
Therefore, although this method of saving and restoring registers using software reduces the number of cycles required, it increases the burden on the program and increases the ROM capacity to store the program. It's inconvenient.

[発明の目的] この発明は、マイクロコンピュータシステムにおいて、
割込み発生時に実行されるレジスタの退避、復帰に要す
るサイクル数を最小にさせて、ROM容量を増大させる
ことなく割込み反応時間を短縮できるようにすることに
ある。
[Object of the invention] This invention provides a microcomputer system that
The purpose of the present invention is to minimize the number of cycles required for saving and restoring registers executed when an interrupt occurs, thereby shortening the interrupt reaction time without increasing the ROM capacity.

この発明の前記ならびにそのほかの目的と新規な特徴に
ついては、本明細書の記述および添附図面から明かにな
るであろう。
The above and other objects and novel features of the present invention will become apparent from the description of this specification and the accompanying drawings.

[発明の概要] 本願にお゛いて開示される発明のうち代表的なものの概
要を説明すれば、下記のとおりである。
[Summary of the Invention] Representative inventions disclosed in this application will be summarized as follows.

すなわち、マイクロコンピュータシステムにおいては、
使用中であっても必ずしもその内容が必要であるとは限
らないレジスタがあることに着目し、レジスタの内容が
退避を要するか否かをレジスタごとに示すタグピット(
フラグ)からなるタグ・レジスタと、このタグ・レジス
タの内容に基づいて対応するレジスタの退避、復帰の制
御信号を形成する順序回路とを設けておき、予めユーザ
がブーログラムによってタグ・レジスタ内の各タグピッ
トに退避を要するレジスタに対応してフラグを立ててお
くことができるようにすることによって1割込み発生時
にユーザによって指定されたレジスタのみが退避される
ようにし、これによって。
In other words, in a microcomputer system,
Focusing on the fact that there are registers whose contents are not necessarily needed even if they are in use, we created a tag pit (
A tag register consisting of a flag) and a sequential circuit that forms a control signal for saving and restoring the corresponding register based on the contents of this tag register are provided, and the user can program each register in the tag register in advance by using a boo program. By making it possible to set flags corresponding to registers that need to be saved in the tag pit, only the registers specified by the user are saved when one interrupt occurs.

すべてのレジスタを自動的に退避させる方式に比べて退
避、復帰に要するサイクル数を少なくして割込み反応時
間を短縮させるとともに、プログラムによって必要なレ
ジスタの内容を一つずつ退避させる方式に比べてプロ・
ダラムの命令数を少なくさせて、ROM容量を減少させ
るという上記目的を達成するものである。
Compared to a method that automatically saves all registers, the number of cycles required for saving and restoring is reduced and interrupt response time is shortened, and compared to a method that saves the contents of necessary registers one by one by a program, it is more efficient.・
This achieves the above object of reducing the ROM capacity by reducing the number of Durham instructions.

[実施例] 第1図には、本発明を4ビツト・シングルチップ・マイ
クロコンピュータに適用した場合の一実施例が示されて
いる。
[Embodiment] FIG. 1 shows an embodiment in which the present invention is applied to a 4-bit single-chip microcomputer.

図において、符号ROMで示されているのは、システム
を動作させるプログラムが格納されたロム(読出し専用
メモリ)で、このロムROMはプログラム・カウンタP
Cによってアクセスされて、プログラムを構成している
命令コードを1ワードずつ出力する。
In the figure, the symbol ROM is a ROM (read-only memory) in which programs for operating the system are stored, and this ROM is a program counter P.
It is accessed by C and outputs the instruction codes that make up the program word by word.

上記ロムROMから読み出された命令コードは、インス
トラクション・デコーダIDに供給されてデコードされ
、上記プログラム・カウンタPCや後述の各種レジスタ
類およびゲート等を制御するための各種コントロール信
号が形成されて出力されるようになっている。
The instruction code read from the ROM is supplied to the instruction decoder ID and decoded, and various control signals for controlling the program counter PC and the various registers and gates described later are formed and output. It is supposed to be done.

符号RAMで示されているのは、プログラムの実行に必
要なデータやプログラムの実行に声って得られたデータ
が記憶されるラム(M時読出し書込み可能なメモリ)で
ある。このラムRAMは。
RAM (RAM) is a RAM (memory that can be read and written at M times) in which data necessary for program execution and data obtained in response to program execution are stored. This RAM is.

内部バスBUSを介して、上記プログラム・カウンタP
Cおよびアドレスレジスタやデータレジスタ、アキュミ
ュレータ等の各種レジスタRE G 11RE G 2
r・・・・RE G nに接続されている。また内部バ
スBUSには、四則演算や論理演算等を行なう演算論理
ユニットALUが接続されている。
Through the internal bus BUS, the program counter P
C and various registers such as address registers, data registers, and accumulators RE G 11 RE G 2
r...RE G connected to n. Further, an arithmetic logic unit ALU that performs four arithmetic operations, logical operations, etc. is connected to the internal bus BUS.

なお、特に制限されないが、上記内部バスBUSは、各
種レジスタREGI〜RE G nに入力されるデータ
がのるバスと、レジスタREG、〜REGnから出力さ
れたデータがのるバスとに分かれており、アドレスレジ
スタやアキュミュレータ等のレジスタに対しては、必ず
演算論理ユニットALUの出力が内部バスを通して入力
されるようになっている。
Although not particularly limited, the internal bus BUS is divided into a bus on which data input to various registers REGI to REGn is carried, and a bus on which data output from registers REG to REGn is carried. , address registers, accumulators, and other registers, the output of the arithmetic logic unit ALU is always inputted through the internal bus.

上記レジスタREG、〜REGnおよび演算論理ユニッ
トALUは、インストラクション・デコーダIDから出
力されるコントロール信号によって開閉されるゲートG
i、Goを介してバスBUSに接続されており、コント
ロール信号によってゲートGiが開かれると、そのとき
バスBUSにのっているデータを内部に取り込み、また
ゲートGoが開かれるとバスBUS上にデータを吐き出
すようになっている。
The registers REG, ~REGn and the arithmetic logic unit ALU are connected to a gate G which is opened and closed by a control signal output from the instruction decoder ID.
It is connected to the bus BUS via i and Go, and when the gate Gi is opened by a control signal, the data on the bus BUS at that time is taken internally, and when the gate Go is opened, the data is transferred onto the bus BUS. It is designed to output data.

そして、この実施例では、上記レジスタREG′1〜R
EGnの他に、これらのレジスタに対応した数のタグビ
ットからなるタグ・レジスタTRが設けられている。こ
のタグ・レジスタTRを構成するタグビットBt、〜B
tnは、それぞれ上記各レジスタREGI〜RE G 
nに対応されており。
In this embodiment, the registers REG'1 to R
In addition to EGn, there is provided a tag register TR consisting of a number of tag bits corresponding to these registers. Tag bits Bt, ~B configuring this tag register TR
tn are each of the above registers REGI to REG.
It corresponds to n.

対応するレジスタの内容が割込み発生の際スタックエリ
アに退避すべきものか否かを示すようにされている。
It is designed to indicate whether the contents of the corresponding register should be saved to the stack area when an interrupt occurs.

特に制限されないが、例えばタグビットBtlに1”が
設定されていると、そのタグビットBt゛1に対応する
レジスタRE G 1の内容は退避を必要とすることを
表わし、ago”に設定されているとレジスタRE G
 1の内容は退避が不要であることを表わすようにされ
ている。
Although not particularly limited, for example, if the tag bit Btl is set to 1", this indicates that the contents of the register REG1 corresponding to the tag bit Bt1 need to be saved, and is set to "ago". Register RE G
The content of 1 is designed to indicate that saving is not necessary.

上記タグ・レジスタTRは、ゲートG、〜Gnを介して
上記バスBUSに接続されており、プログラムの命令に
よってバスBUSから適当なデータを取り込み、各タグ
ビットBtl〜Btnにそれぞれ1″またはIt 07
1を設定できるようにされている。
The tag register TR is connected to the bus BUS via gates G, ~Gn, and takes in appropriate data from the bus BUS according to program instructions, and sets each tag bit Btl ~ Btn to 1'' or It07.
1 can be set.

また、上記タグ・レジスタTRは、特に制限されないが
・、システムにリセットがかけられると、全タグビット
Btu〜Btnが1111jになるようにセットされ、
この状態のままではすべてのレジスタRE G 1〜R
EGnの内容が、スタック・ポインタSPの示すラムR
AM内のスタックエリアに退避されるようにされている
。従って、ユーザが退避しなくても良いレジスタがない
と判断して、そのようにプログラムを組んでおけば、従
来の8ビツトマイコンと同じように、すべてのレジスタ
の内容が自動的に退避されるようになる。
In addition, the above tag register TR is set so that all tag bits Btu to Btn are set to 1111j when the system is reset, although this is not particularly limited.
In this state, all registers RE G 1 to R
The contents of EGn are the RAM R indicated by stack pointer SP.
The data is saved in a stack area within the AM. Therefore, if the user determines that there are no registers that do not need to be saved and writes the program accordingly, the contents of all registers will be automatically saved, just like in conventional 8-bit microcontrollers. It becomes like this.

しかも、この実施例では、レジスタRE G 、〜RE
 G nの退避の要、不要を示すタグ・レジスタTR自
身の内容は、上記レジスタREG、〜REGnの退避後
に続いて退避されるようにされている。
Moreover, in this embodiment, the registers RE G , ~RE
The contents of the tag register TR itself, which indicates whether Gn needs to be saved or not, are saved after the registers REG to REGn are saved.

つまり、この実施例では、適当な論理ゲート回路を組み
合せて構成した順序回路からなるシーケンス・コントロ
ーラSCが設けられており、インストラクション・デコ
ーダIDからのコントロール信号によって開閉されるゲ
ートg1〜gnを介して上記タグ・レジスタTRの内容
がシーケンス・コントローラSCに供給される。シーケ
ンス・コントローラSCは1割込みが発生するとタグ・
レジスタTRの内容に基づいて予め決められた優先順位
の順番で、10′″に設定されているタグビットに対応
するレジスタをとばしながら、111 ?+が立ってい
るタグビットに対応するレジスタの内容のみをバスBU
Sへ出力させるとともに、スタック・ポインタSPをデ
クリメントさせて、そのときスタックポインタSPが示
すラムRAM内のスタックエリアのアドレス位置に、順
番にバスBUS上のデータを格納させるようなコントロ
ール信号を順次出力するように順序回路が構成されてい
る。
In other words, in this embodiment, a sequence controller SC consisting of a sequential circuit constructed by combining appropriate logic gate circuits is provided, and the sequence controller SC is configured by a sequential circuit composed of a combination of appropriate logic gate circuits. The contents of the tag register TR are supplied to the sequence controller SC. When the sequence controller SC generates one interrupt, the tag
In a predetermined priority order based on the contents of register TR, the contents of the register corresponding to the tag bit set to 111?+ are skipped, while skipping the register corresponding to the tag bit set to 10''. Only bus BU
Sequentially output control signals that cause the stack pointer SP to be decremented and the data on the bus BUS to be sequentially stored at the address position of the stack area in the RAM RAM indicated by the stack pointer SP. The sequential circuit is configured to do this.

また、シーケンス・コントローラSGは、割込み処理終
了後に実行されるリターンインタラブド命令により、ラ
ムRAM内のスタックエリアに退避されていたレジスタ
の内容を元のレジスタに順番に復帰させるように順序回
路が構成されている。
In addition, the sequence controller SG is configured with a sequential circuit so that the contents of the registers saved in the stack area in the RAM RAM are returned to the original registers in order by the return interleaved instruction executed after the interrupt processing is completed. has been done.

上記の場合、特に制限されないが、システムのリセット
によってスタック・ポインタSPは、ラムRAMの最下
位のアドレスにリセットされるようになっており、レジ
スタ退避の際には、シーケンス・コントローラSCによ
ってスタックポインタSPがデクリメントされ、レジス
タの内容が下から積み上げられて行くようにラムRAM
内に格納される。また、レジスタ復帰の際には、スタッ
ク・ポインタSPがシーケンス・コントローラSCによ
って、最後にスタック・ポインタSPが示したアドレス
から1つずつインクリメントされ、格納されたデータが
順番に読み出されて元のレジスタに復帰されるようにな
っている。
In the above case, although there is no particular restriction, the stack pointer SP is reset to the lowest address of the RAM RAM by system reset, and when registers are saved, the stack pointer SP is set by the sequence controller SC. SP is decremented and the contents of the register are stacked up from the bottom.
stored within. Also, when the register is restored, the stack pointer SP is incremented by one by the sequence controller SC from the address last indicated by the stack pointer SP, and the stored data is read out in order and returned to the original address. It is now returned to the register.

つまり、レジスタの内容は、FILO(ファーストイン
・ラーストアウト)方式、つまり最初に入ったものが最
後に出て来る方式でスタックエリアに格納される。その
ため、最後に格納されたタグ・レジスタTRの内容は、
レジスタ復帰の際に最初に読み出されて復帰され、以後
その内容に基づいてレジスタREGI〜REGnへの復
帰が行なわれる。
That is, the contents of the registers are stored in the stack area in a FILO (first-in, last-out) manner, ie, what goes in first comes out last. Therefore, the contents of the tag register TR stored last are:
When the register is restored, it is first read and restored, and thereafter, the registers REGI to REGn are restored based on the contents.

従って、上記実施例によれば、例えばプログラムによっ
て割込みの際に退避を必要とするレジスタに対応するタ
グビットに11”が立つように、予めタグ・レジスタT
Rの内容を設定しておいてやれば、以後、プログラム実
行中に割込みが発生すると、所望のレジスタについての
みスタックエリアへの退避を行なわせることができる。
Therefore, according to the above embodiment, the tag register T
By setting the contents of R, when an interrupt occurs during program execution, only desired registers can be saved to the stack area.

また、割込み処理終了後には、退避されていたデータの
数のサイクル数で正確に元のレジスタへの復帰が行なわ
れる。
Furthermore, after the interrupt processing is completed, the data is returned to the original register exactly in the number of cycles equal to the number of saved data.

これによって1割込み発生時のレジスタの退避およびそ
の復帰に要するサイクル数が、従来の8ビツトマイコン
のように全レジスタを自動退避する方式に比べて少なく
なり、割込み反応時間が短縮されるとともに1割込みの
多いプログラムではシステムのスループットが向上され
る。
This reduces the number of cycles required to save and restore registers when one interrupt occurs, compared to the method used in conventional 8-bit microcontrollers that automatically saves all registers, shortens interrupt response time, and System throughput is improved for programs with a large number of

また、上記実施例によれば、プログラムの始めにタグ・
レジスタを設定するだけでよいので、従来の4ビツトマ
イコンのように割込み発生時にプログラム・で一つずつ
レジスタの退避を行なう方式に比べて、プログラムの命
令数が少なくなくなるため、プログラムが短かくなりこ
れを格納するROMの容量を低減させることができる。
Also, according to the above embodiment, the tag and
Since it is only necessary to set the registers, the number of instructions in the program is less than that of conventional 4-bit microcontrollers, which saves registers one by one in the program when an interrupt occurs, resulting in shorter programs. The capacity of the ROM that stores this can be reduced.

しかも、上記実施例によると、プログラムの途中で、タ
グ・レジスタTRの内容を変えてやることにより退避す
べきレジスタの指定を自由に変更することができるため
、効率の良い割込み処理が可能となる。
Moreover, according to the above embodiment, by changing the contents of the tag register TR during the program, the designation of the register to be saved can be freely changed, which enables efficient interrupt processing. .

なお、上記実施例では、退避すべきレジスタを指定する
タグ・レジスタTRの内容は、必ず最後に退避させるよ
うに構成されているが、タグ・レジスタTR自身につい
てもその内容を退避すべきか否かを設定できるタグピッ
トを有するように構成してもよい。その場合、そのタグ
ピットについては、最初のリセット状態で、他のレジス
タRE01〜RE G nに対応するタグピットとは逆
に、退避不要を示す状態(”O”)にセットされるよう
にし、プログラムで退避要の状態(”1”)へ設定させ
るようにすることもできる。
In the above embodiment, the contents of the tag register TR specifying the register to be saved are always saved at the end, but it is not clear whether the contents of the tag register TR itself should also be saved. It may be configured to have a tag pit in which the tag can be set. In that case, in the first reset state, that tag pit is set to a state ("O") indicating that evacuation is not necessary, contrary to the tag pits corresponding to other registers RE01 to REGn, and the program It is also possible to set the evacuation required state (“1”).

また、同様にスタック・ポインタSPについても、その
内容の退避が必要か否かを設定できるタグピットを設け
るようにすることも可能である。
Similarly, it is also possible to provide a tag pit for the stack pointer SP, which can set whether or not its contents need to be saved.

なお、上記と同じような効果を得る方法として、例えば
上記と同じようなタグ・レジスタを設け、使用中のレジ
スタに対応するビットにはjl I IIを立てるよう
にするとともに、レジスタ退避の際にはこのタグ・レジ
スタの各ビットを1ビツトずつ参照して、NO”になっ
ているビットに対応するレジスタはとばしながらad 
111の立っているビットに対応するレジスタの内容の
みを退避させる方式も考えられる。このようにすれば、
上記実施例におけるシーケンス・コントローラは不要と
なる。
In addition, as a method to obtain the same effect as above, for example, provide a tag register similar to the above, set jl I II in the bit corresponding to the register in use, and set it when saving the register. refers to each bit of this tag register one by one, skipping the register corresponding to the bit that is set to "NO", and
A method of saving only the contents of the register corresponding to the bit with 111 set may also be considered. If you do this,
The sequence controller in the above embodiment becomes unnecessary.

しかしながら、プログラムもしくはユーザシステムの内
容によっては、使用中のレジスタの内容がすべて割込み
時に退避を要するとは限らない。
However, depending on the contents of the program or user system, not all the contents of registers in use need to be saved at the time of an interrupt.

つまり、あるレジスタにデータが入っていたとしても、
すでにそのデータは不要になっている状態で割込みが発
生することも考えられる。従って。
In other words, even if a certain register contains data,
It is also possible that an interrupt occurs when the data is no longer needed. Therefore.

そのようなレジスタの退避を行なうことは無駄である。Saving such registers is wasteful.

上記実施例によれば、そのような状態が分かっていれば
そのレジスタについては退避を行なわないように予め設
定しておくことができるので、無駄な退避が行なわれな
くなり、より効率的であるという利点がある。
According to the above embodiment, if such a state is known, the register can be set in advance not to be saved, which prevents unnecessary saving and is more efficient. There are advantages.

[効果] マイクロコンピュータシステムにおいて、レジスタの内
容が退避を要するか否かをレジスタごとに示すタグピッ
ト(フラグ)からなるタグ・レジスタと、このタグ・レ
ジスタの内容に基づいて対応するレジスタの退避、復帰
の制御信号を形成する順序回路とを設けてなるので、ユ
ーザがプログラムによってタグ・レジスタ内の各タグピ
ットに退避を要するレジスタに対応してフラグを立てて
おくことにより、割込み発生時にユーザによって指定さ
れたレジスタのみが退避されるようになるという作用に
よって、すべてのレジスタを自動的に退避させる方式に
比べて退避、復帰に要するサイクル数を少なくして割込
み反応時間を短縮させることができる。また、プログラ
ムによって必要なレジスタ内容を一つずつ退避させる方
式に比べてプログラムの命令数を少なくさ、せて、RO
M容量を減少させることができるという効果がある。
[Effect] In a microcomputer system, there is a tag register consisting of a tag pit (flag) that indicates whether the contents of the register need to be saved or not, and the saving and restoration of the corresponding register based on the contents of this tag register. A sequential circuit is provided to form a control signal for the interrupt, so the user can use a program to set a flag in each tag pit in the tag register corresponding to the register that needs to be saved, so that when an interrupt occurs, the signal specified by the user can be saved. Due to the effect that only the registered registers are saved, the number of cycles required for saving and restoring can be reduced and the interrupt response time can be shortened compared to a method in which all registers are automatically saved. In addition, compared to a method in which the contents of registers required by the program are saved one by one, the number of program instructions is reduced, and the RO
This has the effect of reducing M capacity.

以上本発明者によってなされた発明を実施例に基づき具
体的に説明したが、本発明は上記実施例に限定されるも
のではなく、その要旨を逸脱しない範囲で種々変更可能
であることはいうまでもない。例えば、上記実施例では
、割込み発生時に退避を必要とするレジスタに対応する
タグピットには1”を立て、それ以外のビットは# O
IIに設定するようにしているが、それとは逆に退避を
必要とするものには# OIIを設定し、不要とするも
のには1″1”を立てるようにしてもよい。
Although the invention made by the present inventor has been specifically explained above based on Examples, it goes without saying that the present invention is not limited to the above Examples and can be modified in various ways without departing from the gist thereof. Nor. For example, in the above embodiment, the tag pit corresponding to the register that needs to be saved when an interrupt occurs is set to 1", and the other bits are set to #O.
It is set to II, but on the contrary, #OII may be set for those that require evacuation, and 1"1" may be set for those that are unnecessary.

[利用分野] 以上の説明では主として本発明者によってなされた発明
を、その背景となった利用分野である4ビツト・シング
ルチップ・マイクロコンピュータに適用したものについ
て説明したが、それに限定されるものでなく、8ビツト
マイクロコンピユータや16ビツトマイクロコンピユー
タ等にも適用できるものである。
[Field of Application] In the above explanation, the invention made by the present inventor was mainly applied to a 4-bit single-chip microcomputer, which is the field of application that formed the background of the invention, but the invention is not limited to this. It can also be applied to 8-bit microcomputers, 16-bit microcomputers, etc.

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

第1図は、本発明を4ビツト・シングルチップ・マイク
ロコンピュータシステムに適用した場合の一実施例を示
す回路図である。 ROM・・・・ロム(読出し専用メモリ)、RAM・・
・・ラム(随時読出し書込み可能なメモリ)、PC・・
・・プログラム・カウンタ、ID・・・・インストラク
ション・デコーダ、SP・・・・スタック・ポインタ、
REG1〜RE G n・・・・レジスタ。 T R−・−タグ・レジスタ、Bt1〜B′tn、°°
°。 タグピット、SC・・・・コントロール回路(シーケン
ス・コントローラ)、SUB・・・・内部ハス、G i
、Go、Gz−Gn、gl−gn・・・・ゲート。
FIG. 1 is a circuit diagram showing an embodiment in which the present invention is applied to a 4-bit single-chip microcomputer system. ROM...ROM (read-only memory), RAM...
...RAM (memory that can be read and written at any time), PC...
...Program counter, ID...Instruction decoder, SP...Stack pointer,
REG1~REGn...Register. T R--Tag register, Bt1 to B'tn, °°
°. Tag pit, SC...control circuit (sequence controller), SUB...internal lotus, G i
, Go, Gz-Gn, gl-gn...gate.

Claims (1)

【特許請求の範囲】 1、複数個のレジスタを備え、割込み処理が可能に構成
されたデータ処理装置において、上記各レジスタにそれ
ぞれ対応されたタグピットからなりプログラムによっ゛
て各タグビット力ztrIHまたは0″に設定可能にさ
れたタグ・レジスタと、このタグ・レジスタの内容に基
づいて割込み発生時および終了時に、対応するレジスタ
の内容をスタックエリアに退避させ、もしくはスタック
エリアから元のレジスタに復帰させる制御信号を形成す
るコントロール回路とが設けられてなることを特徴とす
るデータ処理装置。 2、上記タグ・レジスタは、それ自身の内容が退避を要
するか否かを示すビットをも有していることを特徴とす
る特許請求の範囲第1項記載のデータ処理装置。 3、上記レジスタのうち特定のレジスタは、タグ・レジ
スタに関わりなく割込み発生時に自動的に退避、復帰が
行なわれるようにされてなることを特徴とする特許請求
の範囲第1項もしくは第2項記載のデータ処理装置。
[Scope of Claims] 1. In a data processing device equipped with a plurality of registers and configured to be capable of interrupt processing, the data processing device is composed of tag pits corresponding to each of the above registers, and each tag bit power is set to ztrIH or ztrIH or A tag register that can be set to 0'', and based on the contents of this tag register, the contents of the corresponding register are saved to the stack area or restored to the original register from the stack area when an interrupt occurs or ends. 2. The tag register also has a bit indicating whether or not its own contents require saving. 3. A data processing device according to claim 1, characterized in that a specific register among the registers is automatically saved and restored when an interrupt occurs, regardless of the tag register. A data processing device according to claim 1 or 2, characterized in that the data processing device is
JP10047984A 1984-05-21 1984-05-21 Data processor Pending JPS60245049A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10047984A JPS60245049A (en) 1984-05-21 1984-05-21 Data processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10047984A JPS60245049A (en) 1984-05-21 1984-05-21 Data processor

Publications (1)

Publication Number Publication Date
JPS60245049A true JPS60245049A (en) 1985-12-04

Family

ID=14275051

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10047984A Pending JPS60245049A (en) 1984-05-21 1984-05-21 Data processor

Country Status (1)

Country Link
JP (1) JPS60245049A (en)

Similar Documents

Publication Publication Date Title
US5682531A (en) Central processing unit
JPH0248931B2 (en)
US4446517A (en) Microprogram memory with page addressing and address decode in memory
JPS61170828A (en) Microprogram control device
EP2215544B1 (en) Enhanced microprocessor or microcontroller
JPS60245049A (en) Data processor
US6363469B1 (en) Address generation apparatus
US6321319B2 (en) Computer system for allowing a two word jump instruction to be executed in the same number of cycles as a single word jump instruction
US20050216708A1 (en) Processor for performing context switching, a method for performing context switching, a computer program for perform context switching
JPS6230455B2 (en)
JPH0315770B2 (en)
JPS6117474Y2 (en)
JPS6320631A (en) Register selecting system
JPS6031652A (en) Microcomputer incorporating read-only memory
JP2000105701A (en) Data processor
JP3091674B2 (en) Microcomputer
JPS62117041A (en) Microcomputer
JPH03257572A (en) Multiprocessor system
JPS62210541A (en) Register selecting system
JPH1139222A (en) Microcomputer
JPS61147333A (en) Register select circuit
JPH05334074A (en) Microprocessor
JPS6313214B2 (en)
JPS6329295B2 (en)
JPH01207825A (en) Microprocessor