[go: up one dir, main page]

JPS63273135A - central processing unit - Google Patents

central processing unit

Info

Publication number
JPS63273135A
JPS63273135A JP10720687A JP10720687A JPS63273135A JP S63273135 A JPS63273135 A JP S63273135A JP 10720687 A JP10720687 A JP 10720687A JP 10720687 A JP10720687 A JP 10720687A JP S63273135 A JPS63273135 A JP S63273135A
Authority
JP
Japan
Prior art keywords
instruction
address
macro
program counter
macro 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
Application number
JP10720687A
Other languages
Japanese (ja)
Inventor
Yasushi Nagano
長野 靖
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP10720687A priority Critical patent/JPS63273135A/en
Publication of JPS63273135A publication Critical patent/JPS63273135A/en
Pending legal-status Critical Current

Links

Landscapes

  • Executing Machine-Instructions (AREA)

Abstract

PURPOSE:To attain high speed operation by providing a 2nd program counter and an instruction decoder at least for the entire machine language instruction switch-to-macro instruction and next instruction to define and execute a macro instruction. CONSTITUTION:When a switch-to-macro instruction is decoded by an instruction decoder 18, a central processing unit (CPU) jumps to am start address of a macro instruction commanded by the 2nd program counter an executes sequentially plural machine language instructions constituting the macro instruction. When a next instruction is decoded by the instruction decoder 18, the processing of the CPU jumps to the content of the address commanded by the 2nd program counter 16 to execute the macro instruction, and sets the start address of the macro instruction to be executed next in the 2nd program counter 16. Thus, the definition and execution of the macro instruction are made possible and it is not required to jump to the routine at each execution of each macro instruction, and high speed operation is attained.

Description

【発明の詳細な説明】 〔概要〕 本発明は中央処理装置であって、第2プログラムカウン
タと少なくともスイッチ・ツー・マクロ命令及びネクス
ト命令を含む全機械語命令の命令デコーダを有すること
によりマクロ命令の定義及び実行が可能で、高速動作及
びプログラムのバイト数削減を可能とする。
Detailed Description of the Invention [Summary] The present invention is a central processing unit that has a second program counter and an instruction decoder for all machine language instructions including at least switch-to-macro instructions and next instructions. can be defined and executed, enabling high-speed operation and reducing the number of program bytes.

(産業上の利用分野) 本発明は中央処理装置に関し、オブジェクト・プログラ
ムの各機械語命令を順次実行する中央処理装置に関する
(Field of Industrial Application) The present invention relates to a central processing unit, and more particularly, to a central processing unit that sequentially executes each machine language instruction of an object program.

中央処理装置!(CPU)はレジスタ間のデータ転送、
メモリのアクセス、桁ずらし、シフト等の基本的な動作
の組合ゼにより処理を実行している。
Central processing unit! (CPU) transfers data between registers,
Processing is executed by a combination of basic operations such as memory access, digit shifting, and shifting.

一般にCPUは機械語命令しか解読できず、CPUが実
行するオブジェクト・プログラムは上記の基本的な動作
夫々を指示する機械語命令で構成されている。
Generally, a CPU can only decode machine language instructions, and the object program executed by the CPU is composed of machine language instructions that instruct each of the above-mentioned basic operations.

〔従来の技術〕[Conventional technology]

一般に、CPUにおいては、まとまった手続きを繰り返
し実行しようとするとき、このまとまった手続をサブル
ーチンとして定義する。CPUはメインルーチン実行中
にサブルーチン・コールがあると、そのサブルーチンに
ジャンプしてサブルーチンを実行し、終了後メインルー
チンに戻り、メインルーチンを実行する。
Generally, when a CPU wants to repeatedly execute a set of procedures, the set of procedures is defined as a subroutine. When a subroutine is called while the CPU is executing a main routine, the CPU jumps to that subroutine, executes the subroutine, returns to the main routine after completion, and executes the main routine.

異なるサブルーチンを連続して実行する場合、オブジェ
クト・プログラムは第4図に示す如ぎ構成である。第4
図において、メインルーチンのアドレスnには例えば1
バイトのジャンプ・サブルーチン(JSR)命令が書か
れ、次のアドレスn+1にサブルーチンの開始アドレス
Sが2バイト書かれている。
When different subroutines are executed successively, the object program has a structure as shown in FIG. Fourth
In the figure, the address n of the main routine is 1, for example.
A byte jump subroutine (JSR) instruction is written, and the subroutine start address S of 2 bytes is written at the next address n+1.

CPUはJSR命令を読み込んでデコードすると、その
ときプログラムカウンタが指示するアドレスn+3をス
タックした後アドレスSにジャンプして、このアドレス
Sから順に書かれているサブルーチンを実行する。各サ
ブルーチンの最後にはリターン(RETURN)命令が
占かれており、CPLJはRE T tJ RN命令を
実行すると、スタックからアドレスポインタにアドレス
を戻しアドレスn+aに戻る。
When the CPU reads and decodes the JSR instruction, it stacks the address n+3 indicated by the program counter at that time, jumps to address S, and executes the subroutines written in order from address S. A RETURN instruction is assigned at the end of each subroutine, and when CPLJ executes the RE T tJ RN instruction, it returns the address from the stack to the address pointer and returns to address n+a.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

第4図に示す如く、異なるサブルーチンを連続する場合
、各サブルーチンについてCPUはメインルーチンから
サブルーチンにジャンプし、サブルーチン実行終了後再
びメインルーチンにジャンプするので高速動作ができず
、またJSR命令とサブルーチンの開始アドレスとの3
バイトで各サブルーチンを実行するため、オブジェクト
・プログラムのメインルーチンのバイト数が多くなると
いう問題点があった。
As shown in Figure 4, when different subroutines are executed consecutively, the CPU jumps from the main routine to the subroutine for each subroutine, and then jumps back to the main routine after the subroutine has finished executing, making high-speed operation impossible. 3 with starting address
Since each subroutine is executed using bytes, there is a problem in that the main routine of the object program requires a large number of bytes.

また、FORTHの如きマクロ・アセンブリ言語では、
マクロ命令WARDとして上記サブルーチンと同様の手
続きを定義することも可能であるが、この場合にはCP
U内部にインタプリタを設けなければならず、高速動作
ができないとう問題点があった。
Also, in macro assembly languages such as FORTH,
It is also possible to define a procedure similar to the above subroutine as the macro instruction WARD, but in this case, the CP
There was a problem in that an interpreter had to be provided inside the U, and high-speed operation was not possible.

本発明は上記の点に鑑みてなされたものであり、マクロ
命令を定義して実行でき、高速動作が可能で、かつオブ
ジェクト・プログラムのバイト数が少なくて済む中央処
理装置を提供することを目的とする。
The present invention has been made in view of the above points, and an object of the present invention is to provide a central processing unit that can define and execute macro instructions, can operate at high speed, and can reduce the number of bytes of an object program. shall be.

〔問題点を解決するための手段〕[Means for solving problems]

本発明の中央処理装置はマクロ命令実行モードで次に実
行するマクロ命令の開始アドレスが格納されたアドレス
を指示する第2プログラムカウンタ(16)と、 マクロ命令実行モードの開始及び第210グラムカウン
タ(16)のアドレスの設定を指示するスイッチ・ツー
・マクロ命令と次のマクロ命令の実行及び第2プログラ
ムカウンタ(16)のアドレスの再設定を指示するネク
スト命令とを少なくとも含む全機械語命令のデコードを
行なう命令デコーダ(18)とを有し、 複数の機械語命令の集合により定義されたマクロ命令を
実行する。
The central processing unit of the present invention includes a second program counter (16) that indicates the address storing the start address of the next macro instruction to be executed in the macro instruction execution mode, and a 210th program counter (16) that indicates the start address of the macro instruction to be executed next in the macro instruction execution mode. Decoding of all machine language instructions including at least a switch-to-macro instruction that instructs to set the address of the second program counter (16) and a next instruction that instructs the execution of the next macro instruction and the resetting of the address of the second program counter (16). and an instruction decoder (18) for executing macro instructions defined by a set of a plurality of machine language instructions.

(作用) 本発明においては、命令デコーダ(18)でスイッチ・
ツー・マクロ命令がデコードされると、CPUはマクロ
命令実行モードとなり、次に実行するマクロ命令の11
n始アドレスの格納され、々アドレスが第2プログラム
カウンタ(16)に設定され、CPUは第2プログラム
カウンタの指示するアドレスの内容、即ちマクロ命令の
開始アドレスにジャンプし、マクロ命令を構成する複数
の機械語命令を順次実行する。
(Operation) In the present invention, the instruction decoder (18)
When the second macro instruction is decoded, the CPU enters the macro instruction execution mode and decodes the next macro instruction to be executed.
The n start address is stored, and the n address is set in the second program counter (16), and the CPU jumps to the content of the address indicated by the second program counter, that is, the start address of the macro instruction, and executes the multiple instructions constituting the macro instruction. Executes machine language instructions sequentially.

また、命令デコーダ(18)でネクスト命令がデコード
されると、CPUは第2プログラムカウンタ(16)の
指示するアドレスの内容にジャンプしてマクロ命令を実
行し、かつ第2プログラムカウンタ(16)に次に実行
するべきマクロ命令の開始アドレスを設定する。
Furthermore, when the next instruction is decoded by the instruction decoder (18), the CPU jumps to the contents of the address indicated by the second program counter (16), executes the macro instruction, and Sets the start address of the macro instruction to be executed next.

これによってマクロ命令の定義及び実行が可能となる。This allows the definition and execution of macro instructions.

また第2プログラムカウンタ(16)で次のマクロ命令
の開始アドレスが格納されたアドレスを指示するために
マクロ命令を連続して実行するとき各マクロ命令の実行
毎にメインルーチンにジャンプする必要がなく高速動作
が可能となる。
In addition, since the second program counter (16) indicates the address where the start address of the next macro instruction is stored, there is no need to jump to the main routine each time the macro instructions are executed. High-speed operation is possible.

〔実施例〕〔Example〕

第1図は本発明の中央処理装置(CPU)の一実施例の
ブロック系統図を示す。
FIG. 1 shows a block system diagram of an embodiment of a central processing unit (CPU) of the present invention.

同図中、10は内部データバスであり、端子11を介し
て外部データバスに接続されている。
In the figure, 10 is an internal data bus, which is connected to an external data bus via a terminal 11.

レジスタ・アレイ12は内部データバス10より供給さ
れる値を格納する各種レジスタが配列されており、この
中には通常のCPUと同様に、スタックポインタ14.
プログラムカウンタ15が設けられると共に、第2プロ
グラムカウンタ16が設けられている。このレジスタ・
アレイ12より出力されるアドレスは端子17よりアド
レスバスに送出される。
The register array 12 is arranged with various registers that store values supplied from the internal data bus 10, and includes a stack pointer 14.
A program counter 15 is provided as well as a second program counter 16. This register
The address output from array 12 is sent from terminal 17 to the address bus.

命令デコーダ18は内部バス10より供給される命令を
デコードし、デコード結果をタイミング及びコントロー
ル回路19に供給する。命令デコーダ18はデータ転送
命令、演免命令等の通常の機械語命令の他に、後述する
マクロ用命令のデコードが可能である。
The instruction decoder 18 decodes the instruction supplied from the internal bus 10 and supplies the decoded result to the timing and control circuit 19. The instruction decoder 18 is capable of decoding macro instructions, which will be described later, in addition to normal machine language instructions such as data transfer instructions and performance/discharge instructions.

アキュムレータ20及びレジスタ21夫々は内部データ
バス10よりのデータを格納すると共に、既に格納して
いるデータを内部データバス10に送出する。粋術論理
回路(ALLJ)22は上記アキュムレータ20及びレ
ジスタ21より供給されるデータの演篩を行なって、演
篩結果データを内部データバス10に送出する。
The accumulator 20 and the register 21 each store data from the internal data bus 10 and send out already stored data to the internal data bus 10. The smart logic circuit (ALLJ) 22 performs a sieve on the data supplied from the accumulator 20 and the register 21, and sends the sieve result data to the internal data bus 10.

タイミング及びコントローラ19は命令デコーダ18よ
り命令のデコード結果を供給されると共に、外部より端
子23を介してクロック信号及び割込等のコントロール
信号を供給されており、デコード結果に応じたタイミン
グ信号及びコントロール信号を生成して、CPU内部の
レジスタ・アレイ12.命令デコーダ18.アキュムレ
ータ20、レジスタ21.ALLJ22等に供給し、ま
た端子24よりメモリ等の外部回路に供給する。
The timing and controller 19 is supplied with the decoding results of instructions from the instruction decoder 18, and is also supplied with control signals such as clock signals and interrupts from the outside via the terminal 23, and outputs timing signals and control signals according to the decoding results. Generates signals to register array 12 within the CPU. Instruction decoder 18. Accumulator 20, register 21. It is supplied to ALLJ22 and the like, and also supplied to external circuits such as memory from the terminal 24.

マクロ用命令は、スイッチ・ツー・マクロ(STM)命
令、ネクスト(NEXT)命令、コール・マクロ(CA
LLM)命令、リターンマクロ(RETM)命令が用意
されている。
Macro instructions include switch-to-macro (STM) instructions, next (NEXT) instructions, and call macros (CA).
LLM) instruction and return macro (RETM) instruction are provided.

87M命令は、それ自体が機械語命令であり、プログラ
ムカウンタ15の値を第2プログラムカウンタ16に格
納し、第2プログラムカウンタ16の指示するアドレス
の内容をプログラムカウンタ15に格納してこのプログ
ラムカウンタ15の指示するアドレスにジャンプし、次
に第2プログラムカウンタ16の値を[2]だけインク
リメンI・することを指示する。
The 87M instruction itself is a machine language instruction, stores the value of the program counter 15 in the second program counter 16, stores the contents of the address indicated by the second program counter 16 in the program counter 15, and writes the value of the program counter 15 to the second program counter 16. 15, and then instructs to increment the value of the second program counter 16 by [2].

オブジェクトプログラムには87M命令に続いて実行す
るべきマクロ命令の開始アドレスが格納されており、上
記87M命令によって、CPUは第2プログラムカウン
タ16に実行するべきマクロ命令の開始アドレスが格納
されたアドレスを設定し、更に機械語命令実行モードか
らマクロ命令実行モードに切換ねる。そしてマクロ命令
を実行して、第2プログラムカウンタ16に次に実行す
るべきマクロ命令の開始アドレスが格納されたアドレス
を設定する。
The object program stores the start address of the macro instruction to be executed following the 87M instruction, and the 87M instruction causes the CPU to set the address where the start address of the macro instruction to be executed is stored in the second program counter 16. setting, and then switch from machine language instruction execution mode to macro instruction execution mode. Then, the macro instruction is executed, and the address storing the start address of the macro instruction to be executed next is set in the second program counter 16.

なお、アドレスは2バイトであり、プログラムカウンタ
15等はバイト単位でカウントするものとする。
Note that the address is 2 bytes, and the program counter 15 and the like count in units of bytes.

NEXT命令はそれ自体が機械語命令であり、第2プロ
グラムカウンタ16の指示するアドレスの内容をプログ
ラムカウンタ15に格納してこのプログラムカウンタ1
5の指示するアドレスにジャンプし次に第2プログラム
カウンタ16の値を「2」だけサインクリメントするこ
とを指示する。
The NEXT instruction itself is a machine language instruction, and the contents of the address indicated by the second program counter 16 are stored in the program counter 15 and the contents of the address indicated by the second program counter 16 are stored in the program counter 15.
5 and instructs to increment the value of the second program counter 16 by "2".

これによってCPUは次のマクロ命令を実行し、第2プ
ログラムカウンタ16に次に実行するべきマクロ命令の
開始アドレスが格納されたアドレスを設定する。
As a result, the CPU executes the next macro instruction and sets the second program counter 16 to the address storing the start address of the macro instruction to be executed next.

CA11M命令はそれ自体は機械語命令であり、第2プ
ログラムカウンタ16の値をスタックポインタ14で示
すスタックに待避し、その後プログラムカウンタ15の
値を第2プログラムカウンタ16に格納し、第2ブ0グ
ラムカウンタ16の指示するアドレスの内容をプログラ
ムカウンタ15に格納してこのプログラムカウンタ15
の指示するアドレスにジャンプし、次に第2プログラム
カウンタ16の値を「2」だけインクリメントすること
を指示する。これによって、マクロ命令実行モード時に
マクロ命令のサブルーチンを呼ぶことができる。
The CA11M instruction itself is a machine language instruction, which saves the value of the second program counter 16 to the stack indicated by the stack pointer 14, then stores the value of the program counter 15 in the second program counter 16, and saves the value of the second program counter 16 to the stack indicated by the stack pointer 14, and then stores the value of the program counter 15 in the second program counter 16, and The contents of the address indicated by the gram counter 16 are stored in the program counter 15, and the program counter 15
The program jumps to the address indicated by , and then instructs to increment the value of the second program counter 16 by "2". This allows the subroutine of the macro instruction to be called in the macro instruction execution mode.

RETM命令はそれ自体がマクロ命令の開始アドレスで
あり、リターンマクロ命令本体ではスタックポインタ1
4で示すスタックの値を第2プログラムカウンタ16に
戻し、この第2プログラムカウンタ16の指示するアド
レスの内amをプログラムカウンタ15に格納してその
値が示すアドレスにジャンプし、次に第2プログラムカ
ウンタ16の値を「2」だけインクリメントする。これ
によって、CPUはマクロ命令のサブルーチンからマク
ロ命令実行モードに復帰する。
The RETM instruction itself is the start address of the macro instruction, and the stack pointer 1 in the return macro instruction body.
The stack value indicated by 4 is returned to the second program counter 16, am of the addresses indicated by the second program counter 16 is stored in the program counter 15, jumps to the address indicated by the value, and then the second program The value of the counter 16 is incremented by "2". As a result, the CPU returns to the macro instruction execution mode from the macro instruction subroutine.

次に第2図を用いて本発明の中央処理装置で実行される
オブジェクト・プログラムの進行を説明する。第2図示
のオブジェクト・プログラムは第1図のCPUと接続さ
れたメモリ上に記憶されている。
Next, the progress of the object program executed by the central processing unit of the present invention will be explained using FIG. The object program shown in FIG. 2 is stored on a memory connected to the CPU shown in FIG.

第2図において、CPUはアドレス八からアドレスBま
での機械語命令夫々を実行する毎にプログラムカウンタ
15の値を「1」ずつインクリメントする。
In FIG. 2, the CPU increments the value of the program counter 15 by "1" each time it executes each machine language instruction from address 8 to address B.

アドレスB+1のSTM命令が実行されてCPUはマク
ロ命令実行モードとなる。アドレスB+2〜アドレスC
には図中、マクロ・アドレスと表示するマクロ命令の開
始アドレスが記憶されている。
The STM instruction at address B+1 is executed and the CPU enters macro instruction execution mode. Address B+2 ~ Address C
In the figure, the macro address and the start address of the macro instruction to be displayed are stored.

アドレスB+1のマクロ命令の開始アドレス(E)の値
はアドレスEであり、CPUはアドレスEにジャンプし
てマクロ命令(E)を構成するアドレスEからアドレス
Fの機械語命令を順に実行する。
The value of the start address (E) of the macro instruction at address B+1 is address E, and the CPU jumps to address E and sequentially executes the machine language instructions from address E to address F that constitute the macro instruction (E).

アドレスFのNEXT命令の実行により、CPUはアド
レスB+4の内容であるマクロ命令の開始アドレス(G
)の指示するアドレスGに直接ジャンプしてCALLM
命令が実行され、アドレスG+1のマクロ命令の開始ア
ドレス(M)によりCPUはアドレスMにジャンプして
、アドレスMからアドレスNの機械語命令を順に実行す
る。同様にしてアドレスG+1以降に開始アドレスが格
納されているマクロ命令が実行される。
By executing the NEXT instruction at address F, the CPU executes the start address (G
) and directly jump to the address G indicated by CALLM.
The instruction is executed, and the CPU jumps to address M based on the start address (M) of the macro instruction at address G+1, and executes machine language instructions from address M to address N in order. Similarly, macro instructions whose start addresses are stored after address G+1 are executed.

アドレスHのマクロ命令の開始アドレス(R)はアドレ
スRのRETM命令を指示しており、アドレスRのリタ
ーンマクロ命令本体の機械語命令が実行されると、CP
UはアドレスIにジャンプしてマクロ命令の開始アドレ
ス(I)で指示される機械語命令を実行する。
The start address (R) of the macro instruction at address H indicates the RETM instruction at address R, and when the machine language instruction in the body of the return macro instruction at address R is executed, the CP
U jumps to address I and executes the machine language instruction indicated by the start address (I) of the macro instruction.

以下、同様にして、アドレスCのマクロ命令の開始アド
レス(J)を構成する最後の機械語命令であるアドレス
にのNEXT命令が実行されると、CPUはアドレスC
+1にジャンプする。アドレスC+1には機械語命令モ
ードの戻りアドレスを指示するアドレス(C+2)が格
納されており、CPUはアドレスC+2の機械語命令及
びそれ以降の機械語命令を順に実行する。
Similarly, when the NEXT instruction to the address that is the last machine language instruction that constitutes the start address (J) of the macro instruction at address C is executed, the CPU executes the NEXT instruction at address C.
Jump to +1. An address (C+2) indicating a return address in the machine language instruction mode is stored at address C+1, and the CPU sequentially executes the machine language instruction at address C+2 and subsequent machine language instructions.

ところでマクロ命令がブロック転送を行なうものである
とき、このマク[1命令は例えば第3図に示す構成であ
る。同図中、アドレスJのマクロ命令(BTFR)は、
ブロック転送を行なうマクロ命令本体の開始アドレスB
 T F Rを指示する。これに続いて転送元のアドレ
ス8000.転送先のアドレスAOOO,転送バイト数
0010がバラ′メータとして書かれており、マクロ命
令本体の機械語命令が実行されて、上記転送元のアドレ
ス。
By the way, when the macro instruction is for block transfer, this macro[1 instruction has the configuration shown in FIG. 3, for example. In the figure, the macro instruction (BTFR) at address J is:
Start address B of the macro instruction body that performs block transfer
Instruct TFR. This is followed by the transfer source address 8000. The transfer destination address AOOO and the number of transfer bytes 0010 are written as parameters, and the machine language instruction in the main body of the macro instruction is executed to transfer the transfer source address.

転送先のアドレス、転送バイト数がマクロ命令本体に読
み取られブロック転送が実行される。
The transfer destination address and number of transfer bytes are read into the macro instruction body and block transfer is executed.

このようにして従来のサブルーチンとは独立に、一連の
手続ぎ(ルーチン)をマクロ命令として定義し、これを
実行できる。
In this way, a series of procedures (routines) can be defined as macro instructions and executed independently of conventional subroutines.

マクロ命令が連続して実行されるとき、cpuは前のマ
クロ命令が終了したときメインルーチンに戻ることなく
、直接法のマクロ命令の開始アドレスにジャンプするの
でサブルーチンを連続して実行するのに比して高速動作
が可能であり、またメインルーチンにはマクロ命令の開
始アドレスのみが順に書かれているので、各サブルーチ
ンについてJSR命令のコードが必要なのに対してオブ
ジェクト会プログラムのバイト数を削減できる。
When macro instructions are executed consecutively, the CPU jumps to the start address of the macro instruction in the direct method without returning to the main routine when the previous macro instruction ends, which is faster than when subroutines are executed continuously. Since only the start addresses of the macro instructions are sequentially written in the main routine, the number of bytes of the object program can be reduced, whereas JSR instruction codes are required for each subroutine.

また、マクロ命令の実行のためにCPLJ内部にインタ
プクタを設ける必要はなく、インタプクタの解読時間が
不要なためにFORTH言語のマクロ命令WORDも高
速に実行できる。
Further, there is no need to provide an interceptor inside the CPLJ to execute macro instructions, and since no time is required to decode the interceptor, the macro instruction WORD of the FORTH language can also be executed at high speed.

なお、スタックに複数のマクロ命令を積み上げておき、
CA11M命令と同様の命令でマクロ命令のサブルーチ
ンを実行することもできる。この場合、サブルーチンは
スタックのマクロ命令を順次取り出して実行をする。つ
まりスタックするマクロ命令を可変することによりサブ
ルーチンの実行する内容を可変できる。また各マクロ命
令は複数の機械語命令に展開されるため、スタックの段
数が数段でも多くの手続きをスタックしてサブルーチン
に渡すことができる。
Note that by stacking multiple macro instructions on the stack,
It is also possible to execute a subroutine of a macro instruction using an instruction similar to the CA11M instruction. In this case, the subroutine sequentially fetches macro instructions from the stack and executes them. In other words, by varying the stacked macro instructions, the content executed by the subroutine can be varied. Furthermore, since each macro instruction is expanded into multiple machine language instructions, many procedures can be stacked and passed to subroutines even if the stack has several levels.

〔発明の効果〕〔Effect of the invention〕

上述の如く、本発明の中央処理装置によれば、サブルー
チンとは独立にマクロ命令を定義して実行でき、高速動
作が可能で、かつオブジェクト・プログラムのバイト数
が少なくて汎み、実用上きわめて有用である。
As mentioned above, according to the central processing unit of the present invention, macro instructions can be defined and executed independently of subroutines, high-speed operation is possible, and the number of bytes of an object program is small, making it versatile, and extremely practical. Useful.

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

第1図は本発明の中央処理装置の一実施例のブロック系
統図、 第2図は本発明の中央処理装置で実行されるオブジェク
ト・プログラムの進行を説明するための図、 第3図はブロック転送マクロ命令を説明するための図、 第4図は従来のサブルーチンを用いたオブジェクト・プ
ログラムの進行を説明するだめの図である。 図面中、 12はレジスタφアレイ、 15はプログラムカウンタ、 16は第2プログラムカウンタ、 18は命令デコーダである。 −kenのマイクログロセッ・リーのプロ、77FJt
m第を図 第2図
FIG. 1 is a block system diagram of an embodiment of the central processing unit of the present invention, FIG. 2 is a diagram for explaining the progress of an object program executed by the central processing unit of the present invention, and FIG. 3 is a block diagram of an embodiment of the central processing unit of the present invention. FIG. 4 is a diagram for explaining the transfer macro instruction. FIG. 4 is a diagram for explaining the progress of an object program using conventional subroutines. In the drawing, 12 is a register φ array, 15 is a program counter, 16 is a second program counter, and 18 is an instruction decoder. -Ken's Microgrocery Pro, 77FJt
Figure m Figure 2

Claims (1)

【特許請求の範囲】 プログラムカウンタ(15)の指示するアドレスの機械
語命令を順次読み出してデコードし、該機械語命令を実
行する中央処理装置において、マクロ命令実行モードで
次に実行するマクロ命令の開始アドレスが格納されたア
ドレスを指示する第2プログラムカウンタ(16)と、 該マクロ命令実行モードの開始及び該第2プログラムカ
ウンタ(16)のアドレスの設定を指示するスイッチ・
ツー・マクロ命令と次のマクロ命令の実行及び該第2プ
ログラムカウンタ(16)のアドレスの設定を指示する
ネクスト命令とを少なくとも含む全機械語命令のデコー
ドを行なう命令デコーダ(18)とを有し、 複数の機械語命令の集合により定義されたマクロ命令を
実行することを特徴とする中央処理装置。
[Scope of Claims] In a central processing unit that sequentially reads and decodes machine language instructions at addresses indicated by a program counter (15) and executes the machine language instructions, a macro instruction to be executed next in a macro instruction execution mode is executed. a second program counter (16) that indicates the address where the start address is stored; and a switch that indicates the start of the macro instruction execution mode and the setting of the address of the second program counter (16).
and an instruction decoder (18) that decodes all machine language instructions including at least a second macro instruction and a next instruction that instructs execution of the next macro instruction and setting of the address of the second program counter (16). , A central processing unit characterized by executing macro instructions defined by a set of multiple machine language instructions.
JP10720687A 1987-04-30 1987-04-30 central processing unit Pending JPS63273135A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10720687A JPS63273135A (en) 1987-04-30 1987-04-30 central processing unit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10720687A JPS63273135A (en) 1987-04-30 1987-04-30 central processing unit

Publications (1)

Publication Number Publication Date
JPS63273135A true JPS63273135A (en) 1988-11-10

Family

ID=14453171

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10720687A Pending JPS63273135A (en) 1987-04-30 1987-04-30 central processing unit

Country Status (1)

Country Link
JP (1) JPS63273135A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02299030A (en) * 1989-05-15 1990-12-11 Fujitsu Ltd Interrupt handling method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH02299030A (en) * 1989-05-15 1990-12-11 Fujitsu Ltd Interrupt handling method

Similar Documents

Publication Publication Date Title
US4970642A (en) An apparatus for accessing a memory
US4833640A (en) Register bank change including register to register transfer in a data processing system
US5146581A (en) Subprogram executing data processing system having bank switching control storing in the same address area in each of memory banks
US6915413B2 (en) Micro-controller for reading out compressed instruction code and program memory for compressing instruction code and storing therein
JPH1185512A (en) Data processing device having instruction compression storage and instruction restoration functions
JPH08221353A (en) Method for multi-dimensional transfer of data in data-processing system
US4821183A (en) A microsequencer circuit with plural microprogrom instruction counters
EP1770519A2 (en) Information processing apparatus and its data processing method capable of forming descriptor queue
JPH09231071A (en) Computer system
JPS63273135A (en) central processing unit
US20050033938A1 (en) Network processing system, core language processor and method of executing a sequence of instructions in a stored program
JPH06103225A (en) Chain type DMA system and DMA controller therefor
US5677859A (en) Central processing unit and an arithmetic operation processing unit
JP2918570B2 (en) Central processing unit
US5632042A (en) Data flow processor and data flow process changing system
JP2506874B2 (en) Micro program controller
JP2556083B2 (en) Complex arithmetic pipeline circuit
JPH02263256A (en) Microcomputer and controller
KR950006585B1 (en) Micro program control apparatus and control method thereof
JP2583614B2 (en) Vector arithmetic unit
JPS61282932A (en) Address counter control method
JPH07325805A (en) Vector processor
JPS63141131A (en) Pipeline control system
JPH01121937A (en) Microcomputer
JPS59117606A (en) Programmable controller