JPH02287624A - Data processor - Google Patents
Data processorInfo
- Publication number
- JPH02287624A JPH02287624A JP10871189A JP10871189A JPH02287624A JP H02287624 A JPH02287624 A JP H02287624A JP 10871189 A JP10871189 A JP 10871189A JP 10871189 A JP10871189 A JP 10871189A JP H02287624 A JPH02287624 A JP H02287624A
- Authority
- JP
- Japan
- Prior art keywords
- register
- case
- address
- condition
- instruction
- 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
- 238000012545 processing Methods 0.000 claims abstract description 22
- 238000000034 method Methods 0.000 description 16
- 238000010586 diagram Methods 0.000 description 3
- 210000000988 bone and bone Anatomy 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
Landscapes
- Executing Machine-Instructions (AREA)
Abstract
Description
【発明の詳細な説明】
[発明の目的]
(産業上の利用分野)
この発明は、CASE文を多用する高級言語命令を処理
するデータ処理装置に関する。DETAILED DESCRIPTION OF THE INVENTION [Object of the Invention] (Industrial Application Field) The present invention relates to a data processing device that processes high-level language instructions that frequently use CASE statements.
(従来の技術)
従来、第2図に示すような高級言語の
CASE文を処理するデータ処理装置では、CASE文
の実行は第3図のフローチャートで示されるように行わ
れていた。即ち従来は、まずCASE文で多方向分岐と
なる(条件Nの値0.1・・・nに対応する)それぞれ
の処理aO。(Prior Art) Conventionally, in a data processing device that processes a CASE statement in a high-level language as shown in FIG. 2, the CASE statement is executed as shown in the flowchart of FIG. That is, conventionally, first, each process aO that becomes a multi-directional branch (corresponding to the value of condition N 0.1...n) in a CASE statement.
al・・・anの先頭アドレス(飛び先アドレス)xO
,xl・・・xnを、主メモリのアドレスAから始まる
連続領域に、間隔dで格納する(ステップSl)。また
CASE文の条件(多方向分岐条件)であるNを生成す
る(ステップS2)。モしてCASE命令を次のように
実行する。まずステップS2で生成されたNの値を用い
て
X−A+ (Nod)
の演算を行い、アドレスXを生成する(ステップS3)
。次に、ステップS3で生成されたアドレスXの内容X
N(CASE文で選択される処理aNの先頭アドレス)
を読出してロケーションカウンタにセットしくステップ
S3)、選択された処理aNに制御を移す。al...an's start address (jump destination address) xO
, xl...xn are stored at intervals of d in a continuous area starting from address A of the main memory (step Sl). Also, N, which is a condition for a CASE statement (multidirectional branch condition), is generated (step S2). Then execute the CASE instruction as follows. First, the value of N generated in step S2 is used to calculate X-A+ (Nod) to generate address X (step S3).
. Next, the content X of the address X generated in step S3
N (start address of process aN selected by CASE statement)
is read out and set in the location counter (step S3), and control is transferred to the selected process aN.
(発明が解決し、ようとする課題)
上記したように従来は、CASE文での選択対象となる
処理の先頭アドレス(飛び先アドレス)の群が主メモリ
上に置かれるため、CASE文の条件であるNの値を用
いて対応する処理の先頭アドレスが置かれている主メモ
リのアドレスを生成し、この生成したアドレスを用いて
主メモリから目的とする先頭アドレスを読み、しかる後
にロケーションカウンタにセットしていたため、分岐完
了までの処理(CASE命令の処理)に多大な時間を要
するという問題があった。(Problems to be Solved and Attempted by the Invention) As mentioned above, conventionally, the group of start addresses (jump destination addresses) of processes to be selected by the CASE statement are placed in the main memory, so the conditions for the CASE statement are The value of N is used to generate the main memory address where the start address of the corresponding process is located, the generated address is used to read the target start address from the main memory, and then the location counter is Since the flag was set, there was a problem in that it took a lot of time to complete the branch (processing of the CASE instruction).
したがってこの発明の解決すべき課題は、CASE文の
処理におけるCASE命令の実行が高速に行えるように
することである。Therefore, the problem to be solved by the present invention is to enable high-speed execution of the CASE instruction in the processing of the CASE statement.
[発明の構)戊]
(課題を解決するための手段)
この発明は、CASE文で選択され得る各処理の先頭ア
ドレスを保持するための複数の第11ノジスタと、CA
SE文の条件を保持するための第2レジスタと、この第
2レジスタに保持されている条件に応じて上記複数の第
1のレジスタの1つを選択する第1選択手段とを設け、
ロケーションカウンタに設定するアドレスを選択するた
めの第2選択手段を、CASE命令実行時には上記第1
選択手段の出力を選択するように構成したことを特徴と
するものである。[Structure of the Invention] (Means for Solving the Problems) This invention includes a plurality of eleventh noisters for holding the start addresses of each process that can be selected by a CASE statement, and a CASE statement.
A second register for holding a condition of the SE statement, and a first selection means for selecting one of the plurality of first registers according to the condition held in the second register,
The second selection means for selecting the address to be set in the location counter is set to the first selection means when executing the CASE instruction.
The present invention is characterized in that it is configured to select the output of the selection means.
(作用)
上記の構成によれば、CASE文の実行に際し1、CA
SE文で条件Nの値に対応して選択され得る各処理の(
主メモリ上の)先頭アドレスを、それぞれ対応する第1
レジスタに格納し、またCASE文の条件であるNを生
成して第2レジスタに格納しておくと、複数の第1レジ
スタのうち、第2レジスタに格納されている条件Nに対
応する第1レジスタが第1選択手段によって選択され、
この状態でCAS E命令を実行すると、第1選択手段
によって選択された第1レジスタの内容、即ち第2レジ
スタの示す条件Nの直に対応した処理の先頭アドレスが
第2選択手段によって直ちに選択されてロケ−シランカ
ウンタに設定されるので、CASE文の処理の際の多方
向分岐が高速に行える。(Operation) According to the above configuration, when executing a CASE statement, 1, CA
For each process that can be selected according to the value of condition N in the SE statement
(on the main memory) to the corresponding first address.
If N, which is the condition of the CASE statement, is generated and stored in the second register, the first register corresponding to the condition N stored in the second register among the plurality of first registers the register is selected by the first selection means;
When the CAS E instruction is executed in this state, the content of the first register selected by the first selection means, that is, the start address of the process directly corresponding to the condition N indicated by the second register is immediately selected by the second selection means. Since this is set in the location run counter, multi-directional branching can be performed at high speed when processing a CASE statement.
(実施例)
第1図はこの発明の一実施例に係るデータ処理v装置の
ブロック構成図である。第1図のデータ処理装置は、主
メモリ(図示せず)に格納されている命令群を順次読出
して命令を実行する逐次処理型の装置である。(Embodiment) FIG. 1 is a block diagram of a data processing device according to an embodiment of the present invention. The data processing device shown in FIG. 1 is a sequential processing type device that sequentially reads out a group of instructions stored in a main memory (not shown) and executes the instructions.
第1図において、11は実行すべき命令の主メモリ上の
アドレス(ロケーション)を格納するためのレジスタ(
以下、ロケーションカウンタと称する)、12はロケー
ションカウンタ11の示すアトし・スをカウントアツプ
して現在実行されている命令の次の命令のアドレスを生
成するカウントアツプ部である。13はロケーションカ
ウンタ11への初期設定値として入力される入力信号、
14は条件分岐成立時の分岐先アドレスXを格納するた
めのレジスタである。15−0.15−1・・・15−
口は、CAS E文で選択され得る(CASE文の条件
Nのとり得る値0,1・・・nに対応する)それぞれの
処理aQ。In FIG. 1, 11 is a register (
12 is a count-up unit that counts up the address indicated by the location counter 11 to generate the address of the instruction next to the currently executed instruction. 13 is an input signal input as an initial setting value to the location counter 11;
14 is a register for storing the branch destination address X when the conditional branch is established. 15-0.15-1...15-
Each process aQ that can be selected by the CASE statement (corresponding to possible values 0, 1...n of the condition N of the CASE statement).
al・・・anの先頭アドレス(飛び先アドレス、多方
向分岐先アドレス)xO,xi・・・xnを格納するた
めのレジスタ、16はCASE文の条件(多方向分岐の
条件)N(0≦Nun)を格納するためのレジスタであ
る。17はレジスタ15−θ〜15−〇の1つをレジス
タ16の示す条件Nに応じて選択するセレクタ、18は
次にロケーションカウンタ11に設定するためのアドレ
スを選択する入力制御部である。al...A register for storing the start address (jump destination address, multidirectional branch destination address) xO, xi...xn of an, 16 is the condition of the CASE statement (condition of multidirectional branch) N (0≦ This is a register for storing (Nun). 17 is a selector that selects one of the registers 15-θ to 15-0 according to the condition N indicated by register 16; 18 is an input control unit that selects the address to be set in the location counter 11 next.
この入力制御部18は、CASE命令実行時にはセレク
タL7の出力を選択するように構成されている。This input control unit 18 is configured to select the output of the selector L7 when executing the CASE instruction.
次に、第1図の構成の動作を説明する。Next, the operation of the configuration shown in FIG. 1 will be explained.
まず入力制御部18は、入力信号13が与えられると同
化骨13を選択し、ロケーションカウンタ11への初期
設定値として同カウンタ11に設定する。First, when input signal 13 is given, input control section 18 selects assimilated bone 13 and sets it in location counter 11 as an initial setting value.
これにより、ロケーションカウンタ11の設定内容(初
期設定値)の指定する主メモリ上の命令が読出されて実
行される。次に入力制御部18は、通常状態においては
、ロケーションカウンタ11の示す値をカウントアツプ
部12がカウントアツプすることによって生成された次
の命令のロケーションを選択し、ロケーションカウンタ
11に設定する。以上の動作の繰返しにより、ロケーシ
ョンカウンタllに設定されるロケーションを順次カウ
ントアツプしていくことにより、命令群が1命令ずつ実
行される。この命令処理の過程で条件分岐が成立した際
には、入力制御部18は条件分岐成立時用のレジスタ1
4を選択し、同レジスタ14に格納されている分岐先ア
ドレスXをロケーションカウンタ11に設定する。この
結果、分岐が実行される。As a result, the command on the main memory specified by the setting contents (initial setting value) of the location counter 11 is read out and executed. Next, in the normal state, the input control section 18 selects the location of the next instruction generated by the count up section 12 counting up the value indicated by the location counter 11, and sets it in the location counter 11. By repeating the above operations, the locations set in the location counter ll are sequentially counted up, and the instruction group is executed one instruction at a time. When a conditional branch is established in the process of this instruction processing, the input control unit 18 inputs a register 1 for use when the conditional branch is established.
4 is selected, and the branch destination address X stored in the same register 14 is set in the location counter 11. As a result, a branch is executed.
さて、本発明に直接関係するCASE文の実行の際には
、まずCASE文で多方向分岐となる(CASE文の条
件Nのとり得る値0.1・・・nに対応する)それぞれ
の処理aO,al・・・inの先頭アドレスxO,xl
・・・xnをレジスタ15−0゜15−1・・・l 5
−nに格納する(第3図のステップSlに対応する)動
作が行われる。また、CASE文の条件(多方向分岐条
件)N(0≦N≦n)を生成し、レジスタ16に格納す
る(第3図のステップS2に対応する)動作が行われる
。レジスタ16に条件Nが格納されると、セレクタ17
はこのNの値に対応するレジスタ15−N (0≦N≦
n)を選択する。したがって、レジスタ16に格納され
ているNの値が0であればレジスタ15−0が、1であ
ればレジスタ15−1が、nであればレジスタ15−n
が選択される。Now, when executing a CASE statement that is directly related to the present invention, first, each process that causes a multi-way branch in the CASE statement (corresponding to the possible values 0.1...n of the condition N of the CASE statement) Start address xO, xl of aO, al...in
...xn in register 15-0゜15-1...l 5
-n (corresponding to step Sl in FIG. 3) is performed. Further, an operation is performed to generate a condition (multidirectional branch condition) N (0≦N≦n) for a CASE statement and store it in the register 16 (corresponding to step S2 in FIG. 3). When condition N is stored in register 16, selector 17
is the register 15-N corresponding to the value of N (0≦N≦
Select n). Therefore, if the value of N stored in the register 16 is 0, the register 15-0 is stored, if it is 1, the register 15-1 is stored, and if the value is n, the register 15-n is stored.
is selected.
以上の状態においてCASE命令が実行されると、入力
制御部18はセレクタ17の出力、即ちセレクタ17に
よって選択されたレジスタl 5−Nに格納されている
先頭アドレス(多方向分岐先アドレス)XNを選択し、
ロケーションカウンタ11に設定する。これにより、ロ
ケーションカウンタ11に設定されたXNを先頭アドレ
スとする処理aN(XN−xoであれば処理ao 、X
N mxnであれば処理an)に制御が移り、CAS
E文での多方向分岐が完了する。上記のCASE命令の
実行動作は第3図のステップS5に相当するもので、従
来と比較すると、第3図のステップS3.S4に相当す
る処理が不要となっており、その分だけCASE命令の
実行速度が高速となる。When the CASE instruction is executed in the above state, the input control unit 18 outputs the output of the selector 17, that is, the start address (multidirectional branch destination address) XN stored in the register l5-N selected by the selector 17. choose,
The location counter 11 is set. As a result, a process aN whose start address is XN set in the location counter 11 (if XN-xo, a process ao,
If N mxn, control is transferred to processing an) and CAS
The multi-way branch in the E statement is completed. The execution operation of the above CASE instruction corresponds to step S5 in FIG. 3, and compared to the conventional case, step S3 in FIG. Processing corresponding to S4 is no longer necessary, and the execution speed of the CASE instruction is increased accordingly.
[発明の効果]
以上詳述したようにこの発明によれば、CASE命令が
実行された場合、CASE文の条件に対応した処理の先
頭アドレスを直ちに選択してロケーションカウンタに設
定することができるので、CASE文の処理の際の多方
向分岐が高速に行える。[Effects of the Invention] As detailed above, according to the present invention, when a CASE instruction is executed, the start address of the process corresponding to the condition of the CASE statement can be immediately selected and set in the location counter. , multi-directional branching can be performed at high speed when processing a CASE statement.
第1図はこの発明の一実施例に係るデータ処理装置のブ
ロック構成図、第2図はCASE文の構造を示す図、第
3図は従来のCASE文の処理を説明するためのフロー
チャートである。
11・・・ロケーションカウンタ、15−0〜15−n
・・・レジスタ(第2レジスタ)、1B・・・レジスタ
(第2レジスタ)、17・・・セレクタ(第1選択手段
)、18・・・入力制御部(第2選択手段)。
出願人代理人 弁理士 鈴江武彦FIG. 1 is a block diagram of a data processing device according to an embodiment of the present invention, FIG. 2 is a diagram showing the structure of a CASE statement, and FIG. 3 is a flowchart for explaining conventional CASE statement processing. . 11... Location counter, 15-0 to 15-n
...Register (second register), 1B...Register (second register), 17...Selector (first selection means), 18...Input control section (second selection means). Applicant's agent Patent attorney Takehiko Suzue
Claims (1)
実行する逐次処理型のデータ処理装置において、 CASE文で選択され得る各処理の先頭アドレスを保持
するための複数の第1レジスタと、上記CASE文の条
件を保持するための第2レジスタと、この第2レジスタ
に保持されている条件に応じて上記複数の第1のレジス
タの1つを選択する第1選択手段と、実行すべき命令の
アドレスを保持するためのロケーションカウンタと、こ
のロケーションカウンタに設定するためのアドレスを選
択する第2選択手段とを具備し、 上記第2選択手段は、CASE命令実行時には、上記第
1選択手段によって選択されている上記第1レジスタの
内容を選択するように構成されていることを特徴とする
データ処理装置。[Claims] In a sequential processing type data processing device that sequentially reads a group of instructions stored in a main memory and executes the instructions, a plurality of a first register, a second register for holding the conditions of the CASE statement, and a first selection means for selecting one of the plurality of first registers according to the conditions held in the second register. a location counter for holding an address of an instruction to be executed, and a second selection means for selecting an address to be set in the location counter, and the second selection means is configured to: A data processing device characterized in that the data processing device is configured to select the contents of the first register selected by the first selection means.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP10871189A JPH02287624A (en) | 1989-04-27 | 1989-04-27 | Data processor |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP10871189A JPH02287624A (en) | 1989-04-27 | 1989-04-27 | Data processor |
Publications (1)
Publication Number | Publication Date |
---|---|
JPH02287624A true JPH02287624A (en) | 1990-11-27 |
Family
ID=14491657
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP10871189A Pending JPH02287624A (en) | 1989-04-27 | 1989-04-27 | Data processor |
Country Status (1)
Country | Link |
---|---|
JP (1) | JPH02287624A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2024084809A1 (en) * | 2022-10-21 | 2024-04-25 | たけおかラボ株式会社 | Processor that implements indirect addressing-style conditional jump instructions, program recording medium, and method |
-
1989
- 1989-04-27 JP JP10871189A patent/JPH02287624A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2024084809A1 (en) * | 2022-10-21 | 2024-04-25 | たけおかラボ株式会社 | Processor that implements indirect addressing-style conditional jump instructions, program recording medium, and method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR0138468B1 (en) | Microcomputer | |
US4833640A (en) | Register bank change including register to register transfer in a data processing system | |
JPH02287624A (en) | Data processor | |
JP2003058381A (en) | Processor realizing exception processing setting by program | |
JPH0224721A (en) | Program controller | |
JPH06309349A (en) | Program-controlled processor | |
JP2760649B2 (en) | Information processing device | |
JPS6116334A (en) | Data processor | |
JPS6398735A (en) | Microcontroller | |
JPH04280325A (en) | Pipeline-type processor | |
JPH08129487A (en) | Program sequence control circuit | |
JPH0248770A (en) | Information processing device | |
JP2982129B2 (en) | Micro program controller | |
JPS6227830A (en) | Interruption control system | |
JPH0353322A (en) | Information processor | |
JPH03282625A (en) | Data processor | |
JPS63268032A (en) | Loop control circuit | |
JPS61182135A (en) | Process selecting system | |
JPH02110739A (en) | Central processing unit for multi-task | |
JPH08297583A (en) | Processor and method for interruption processing | |
JPH01200483A (en) | Image processor | |
JPH0340075A (en) | Microcomputer | |
JPS63245526A (en) | Information processor | |
JPH0895781A (en) | Arithmetic and logic unit of processor | |
JPH0319570B2 (en) |