JP3517579B2 - Microprocessor - Google Patents

Microprocessor

Info

Publication number
JP3517579B2
JP3517579B2 JP03074998A JP3074998A JP3517579B2 JP 3517579 B2 JP3517579 B2 JP 3517579B2 JP 03074998 A JP03074998 A JP 03074998A JP 3074998 A JP3074998 A JP 3074998A JP 3517579 B2 JP3517579 B2 JP 3517579B2
Authority
JP
Japan
Prior art keywords
instruction
page
register
microprocessor
accumulator
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 - Fee Related
Application number
JP03074998A
Other languages
Japanese (ja)
Other versions
JPH11232099A (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.)
Kawasaki Microelectronics Inc
Original Assignee
Kawasaki Microelectronics Inc
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 Kawasaki Microelectronics Inc filed Critical Kawasaki Microelectronics Inc
Priority to JP03074998A priority Critical patent/JP3517579B2/en
Publication of JPH11232099A publication Critical patent/JPH11232099A/en
Application granted granted Critical
Publication of JP3517579B2 publication Critical patent/JP3517579B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Executing Machine-Instructions (AREA)

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】本発明は、命令が格納されて
いるメモリから命令を読み出して実行するマイクロプロ
セッサに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a microprocessor for reading and executing an instruction from a memory in which the instruction is stored.

【0002】[0002]

【従来の技術】近年のLSI技術の発達によって、メモ
リの大容量化が進んでおり、それに伴って、広いアドレ
ス空間を取り扱うことができる新型のマイクロプロセッ
サが開発されている。この開発の際には、狭いアドレス
空間を取り扱うことしかできない旧型のマイクロプロセ
ッサをベースに用い、広いアドレス空間を表すアドレス
データの上位桁用のレジスタを新たに設けて、狭いアド
レス空間を拡張することが一般的に行われている。
2. Description of the Related Art With the recent development of LSI technology, the capacity of memory has been increasing, and along with it, a new type of microprocessor capable of handling a wide address space has been developed. At the time of this development, an old microprocessor that can only handle a narrow address space is used as a base, and a new register for the upper digit of address data representing a wide address space is newly provided to expand the narrow address space. Is generally done.

【0003】図1は、旧型のマイクロプロセッサに備え
られているレジスタセット(A)、および新型マイクロ
プロセッサに備えられているレジスタセット(B)の一
例を示す図である。旧型のマイクロプロセッサには、プ
ログラムカウンタ11、汎用DEレジスタ12、汎用H
Lレジスタ13およびスタックポインタ14といったレ
ジスタが備えられている。これらのレジスタそれぞれは
16ビットのビット幅を有しており、この旧型のマイク
ロプロセッサが取り扱うことができるアドレスは16進
数表示で0000h番地からFFFFh番地までのアド
レスである。以下、最後に「h」が付された数字は16
進数表示であるものとする。
FIG. 1 is a diagram showing an example of a register set (A) provided in an old microprocessor and a register set (B) provided in a new microprocessor. The old microprocessor includes a program counter 11, a general-purpose DE register 12, and a general-purpose H.
Registers such as the L register 13 and the stack pointer 14 are provided. Each of these registers has a bit width of 16 bits, and the addresses that this old microprocessor can handle are addresses from 0000h to FFFFh in hexadecimal notation. Below, the number with the last "h" is 16
It is assumed to be in decimal notation.

【0004】新型のマイクロプロセッサにも、それぞれ
16ビットのビット幅を有するプログラムカウンタ1
5、汎用DEレジスタ16、汎用HLレジスタ17およ
びスタックポインタ18が備えられており、更に、それ
ぞれ8ビットのビット幅を有するPPCレジスタ19、
ZPレジスタ20およびXPレジスタ21が備えられて
いる。PPCレジスタ19およびプログラムカウンタ1
5は、両者が組み合わされた1つのレジスタとして用い
られる。また、ZPレジスタ20およびXPレジスタ2
1のうちのいずれか一方が選択されて、汎用DEレジス
タ16、汎用HLレジスタ17およびスタックポインタ
18それぞれと組み合わされて用いられる。これによっ
て、新型のマイクロプロセッサが取り扱うことができる
アドレスは、000000h番地からFFFFFFh番
地までのアドレスとなり、旧型のマイクロプロセッサが
取り扱うことができるアドレス空間を1ページと考える
と、新型のマイクロプロセッサが取り扱うことができる
アドレス空間は、256ページ分のアドレス空間となっ
ている。以下では、アドレス空間およびメモリがそのよ
うなページを有するものとして説明する。ZPレジスタ
20等は、アドレス空間およびメモリが有するページを
示すデータが格納されるページレジスタとして用いられ
る。
Even newer microprocessors have a program counter 1 with a bit width of 16 bits each.
5, a general-purpose DE register 16, a general-purpose HL register 17, and a stack pointer 18, and a PPC register 19 each having a bit width of 8 bits,
A ZP register 20 and an XP register 21 are provided. PPC register 19 and program counter 1
5 is used as one register in which both are combined. In addition, ZP register 20 and XP register 2
Any one of 1 is selected and used in combination with the general-purpose DE register 16, the general-purpose HL register 17, and the stack pointer 18, respectively. As a result, the new microprocessor can handle addresses from address 000000h to FFFFFFh. Considering the address space that the old microprocessor can handle as one page, the new microprocessor can handle it. The address space that can be used is an address space for 256 pages. In the following, the address space and memory will be described as having such pages. The ZP register 20 and the like are used as a page register that stores data indicating a page included in the address space and the memory.

【0005】[0005]

【発明が解決しようとする課題】ところで、旧型のマイ
クロプロセッサ用に作成されたソフトウェアの蓄積は大
きく、このため、アドレス空間が拡張された新型のマイ
クロプロセッサが、これらのソフトウェアをそのまま利
用することができる、いわゆる互換性を有するマイクロ
プロセッサであることが望ましい。新型のマイクロプロ
セッサがこのような互換性を有するためには、アセンブ
ラ言語の文字列や機械語の命令コードといった、旧型の
マイクロプロセッサ上で使用されている命令表記が、新
型のマイクロプロセッサ上でそのまま使用されるととも
に、新型のマイクロプロセッサ上でそれらの命令表記に
応じて実行される命令内容が、旧型のマイクロプロセッ
サ上でそれらの命令表記に応じて実行されている命令内
容と矛盾しないことが必要である。
By the way, there is a large accumulation of software created for old microprocessors, so that new microprocessors with expanded address spaces can use these software as they are. It is desirable that the microprocessor be capable of so-called compatibility. In order for the new microprocessor to have such compatibility, the instruction notation used on the old microprocessor such as the assembler language character string and the machine instruction code remains unchanged on the new microprocessor. The instruction contents that are used and executed according to their instruction notation on the newer microprocessor must be consistent with the instruction contents that are executed according to those instruction notation on the older microprocessor Is.

【0006】従来より、このような互換性を有する新型
のマイクロプロセッサとして、旧型のマイクロプロセッ
サ上で使用されている命令表記および命令内容をそのま
ま使用するとともに、ページレジスタに格納されるデー
タを直接指定するための命令表記および命令内容が新た
に用意された第1のマイクロプロセッサが知られてい
る。このマイクロプロセッサでは、新たな命令表記とし
て、例えば、「LD ZP,A」という文字列およびそ
の文字列に対応する命令コードが用意され、その命令表
記が、「アキュムレータに格納されているデータと同じ
データをZPレジスタに格納する」という命令内容を表
すものとして実行される。
Conventionally, as a new type of microprocessor having such compatibility, the instruction notation and instruction contents used in the old type microprocessor are used as they are, and the data stored in the page register is directly specified. There is known a first microprocessor that is newly prepared with an instruction notation and instruction content for executing. In this microprocessor, for example, a character string "LD ZP, A" and an instruction code corresponding to the character string are prepared as a new instruction notation, and the instruction notation is the same as "the data stored in the accumulator. The data is stored in the ZP register. "

【0007】しかし、このような新たな命令表記として
用意される機械語の命令コードは、短いバイトを有する
命令コードが、旧型のマイクロプロセッサ用の命令表記
としてほとんど使用済みであるために、長いバイト長を
有する命令コードとなる。その結果、機械語のプログラ
ムの大きさが大きくなりがちで、実効速度が低下しがち
であるという問題がある。プログラム内では、一般に、
演算結果を用いてページを指定することがしばしば行わ
れるが、この場合には、長いバイト長を有する命令コー
ドの使用頻度が増加して、この問題点が特に顕著にな
る。また、この第1のマイクロプロセッサでは、用意さ
れる新たな命令コードの数が多く、命令コードをデコー
ドするための回路が大きくなるという問題もある。
However, a machine language instruction code prepared as such a new instruction notation has a long byte because an instruction code having a short byte has been almost used as an instruction notation for an old microprocessor. The instruction code has a length. As a result, there is a problem in that the size of a program in machine language tends to be large and the effective speed tends to be low. Within the program,
The page is often specified by using the operation result, but in this case, this problem becomes particularly noticeable because the frequency of use of the instruction code having a long byte length increases. Further, this first microprocessor has a problem that the number of new instruction codes prepared is large and the circuit for decoding the instruction code becomes large.

【0008】新型のマイクロプロセッサとして、旧型の
マイクロプロセッサ上で使用されている命令表記をその
まま使用し、「LD A,A」等といった、旧型のマイ
クロプロセッサにおいて、命令の実行前後で内部状態が
維持される無意味命令を表す命令表記として用いられて
いる命令表記を、例えば「ZPレジスタに格納されてい
るデータを、アクセス可能なページを指定するデータと
して用いる」等という、有意な命令を表す命令表記とし
て用いる第2のマイクロプロセッサも知られている。
As the new microprocessor, the instruction notation used on the old microprocessor is used as it is, and the internal state is maintained before and after the execution of the instruction in the old microprocessor such as "LD A, A". The instruction notation used as the instruction notation indicating the meaningless instruction is an instruction indicating a significant instruction such as “using the data stored in the ZP register as data designating an accessible page”. A second microprocessor used as a notation is also known.

【0009】しかし、この第2のマイクロプロセッサで
は、旧型のマイクロプロセッサ用に作成されたプログラ
ムをサブルーチンとして用いた場合に、このプログラム
の作成時には、無意味命令として実行されることが期待
されていた命令が有意な命令として実行されてしまって
動作異常を生じるおそれがあるという問題がある。本発
明は、上記事情に鑑み、旧型のマイクロプロセッサのア
ドレス空間が拡張された広いアドレス空間を有し、旧型
のマイクロプロセッサ用のソフトウェアがそのまま利用
できるマイクロプロセッサを提供することを目的とす
る。
However, in the second microprocessor, when a program created for an old microprocessor is used as a subroutine, it was expected that it would be executed as a meaningless instruction when the program was created. There is a problem that an instruction may be executed as a significant instruction and an abnormal operation may occur. In view of the above circumstances, an object of the present invention is to provide a microprocessor that has a wide address space in which the address space of the old-type microprocessor is expanded and that software for the old-type microprocessor can be used as it is.

【0010】[0010]

【課題を解決するための手段】上記目的を達成する本発
明のマイクロプロセッサは、複数の命令が格納されるメ
モリから命令を読み出して実行するマイクロプロセッサ
において、上記メモリのページをあらわすデータが格納
される、各所定の命令に対応して備えられた1つ以上の
ページレジスタと、ページレジスタに対応付けられた各
所定の命令とは異なる所定の命令が対応付けられてなる
アキュムレータと、上記1つ以上のページレジスタおよ
びアキュムレータのうちのいずれか1つを選択し、選択
したページレジスタに格納されているデータ、もしくは
選択したアキュムレータの、ページレジスタのビット幅
と同一ビット幅を有する全域若しくは一部領域に格納さ
れているデータを、上記メモリの、アクセス可能なペー
ジを指定するデータとして出力するページ指定回路と、
実行しようとする命令を解釈する命令解釈部とを備え、
命令解釈部が、命令解釈部で解釈した命令が上記1つ以
上のページレジスタのうちのいずれか、あるいはアキュ
ムレータに対応付けられた命令であったときに、ページ
指定回路に、その解釈した命令に対応付けられているペ
ージレジスタ、あるいはアキュムレータを選択させるも
のであることを特徴とする。
According to another aspect of the present invention, there is provided a microprocessor for reading out instructions from a memory in which a plurality of instructions are stored and executing the instructions, in which data representing a page of the memory is stored. One or more page registers provided corresponding to each predetermined instruction, and an accumulator in which a predetermined instruction different from each predetermined instruction associated with the page register is associated; Either one of the above page register and accumulator is selected, and the data stored in the selected page register or the entire or partial area of the selected accumulator having the same bit width as the page register bit width The data stored in is stored in the data that specifies the accessible page of the above memory. And page designation circuit to output as,
An instruction interpretation unit that interprets an instruction to be executed,
When the instruction interpreting unit interprets the instruction interpreted by the instruction interpreting unit as one of the one or more page registers or the instruction associated with the accumulator, the instruction interpreting unit notifies the page designating circuit of the interpreted instruction. It is characterized in that the page register or accumulator associated therewith is selected.

【0011】本発明のマイクロプロセッサは、上記メモ
リの、実行しようとする命令が格納されているアドレス
が所定の領域内のアドレスであるか否かを判定する判定
回路を備え、上記命令解釈部が、上記判定回路によっ
て、上記所定の領域外のアドレスであると判定され、か
つ、命令解釈部によって解釈した命令が上記アキュムレ
ータに対応付けられた命令である場合に、上記ページ指
定回路にアキュムレータを選択させるものであることが
望ましい。
The microprocessor of the present invention comprises a judgment circuit for judging whether or not the address of the memory in which the instruction to be executed is stored is an address within a predetermined area. If the determination circuit determines that the address is outside the predetermined area and the instruction interpreted by the instruction interpreter is an instruction associated with the accumulator, the accumulator is selected in the page designation circuit. It is desirable that it be something that can be done.

【0012】[0012]

【発明の実施の形態】以下、本発明の実施形態について
説明する。図2は、本発明のマイクロプロセッサの一実
施例を示す図である。このマイクロプロセッサ100
は、命令が格納されるメモリ110に、外部バス112
を介して接続されており、このメモリ110は、旧型の
マイクロプロセッサ用に作成されたプログラムが格納さ
れる、000000h番地から00FFFFh番地まで
の2の16乗ビットの互換領域111を含む、2の24
乗ビットのアドレス空間を有する。
BEST MODE FOR CARRYING OUT THE INVENTION Embodiments of the present invention will be described below. FIG. 2 is a diagram showing an embodiment of the microprocessor of the present invention. This microprocessor 100
Is an external bus 112 in a memory 110 in which instructions are stored.
This memory 110 is connected to the memory 110, and the memory 110 includes a compatible area 111 of 2 16-bits from address 000000h to address 00FFFFh in which a program created for an old microprocessor is stored.
It has an address space of raised bits.

【0013】また、図2に示すマイクロプロセッサ10
0には、それぞれ16ビットのビット幅を有するプログ
ラムカウンタ121、汎用DEレジスタ122、汎用H
Lレジスタ123およびスタックポインタ124が備え
られており、バス130を介してデータがこれらのレジ
スタに格納され、これらのレジスタから取出される。ま
た、このマイクロプロセッサ100には、それぞれ8ビ
ットのビット幅を有するアキュムレータ125、PPC
レジスタ126、ZPレジスタ127およびXPレジス
タ128が備えられており、これらのレジスタのデータ
も、バス130を介して格納され取出される。PPCレ
ジスタ126は、プログラムカウンタ121とともに用
いられるレジスタであり、メモリ110の、実行しよう
とする命令が格納されているページを示すデータが格納
される。ZPレジスタ127は汎用DEレジスタ12
2、汎用HLレジスタ123およびスタックポインタ1
24それぞれとともに用いられるページレジスタであ
り、メモリ110のページを示すデータが格納される。
XPレジスタ128は、ZPレジスタ127と同様のペ
ージレジスタである。
Further, the microprocessor 10 shown in FIG.
0 includes a program counter 121, a general-purpose DE register 122, and a general-purpose H each having a bit width of 16 bits.
An L register 123 and a stack pointer 124 are provided, and data is stored in these registers via the bus 130 and is taken out from these registers. The microprocessor 100 also includes an accumulator 125 and a PPC each having a bit width of 8 bits.
A register 126, a ZP register 127, and an XP register 128 are provided, and the data in these registers are also stored and retrieved via the bus 130. The PPC register 126 is a register used together with the program counter 121, and stores data indicating a page of the memory 110 in which an instruction to be executed is stored. The ZP register 127 is a general-purpose DE register 12
2, general-purpose HL register 123 and stack pointer 1
24 is a page register used together with each, and stores data indicating a page of the memory 110.
The XP register 128 is a page register similar to the ZP register 127.

【0014】また、このマイクロプロセッサ100に
は、命令解釈実行回路140と、アクセス回路170が
備えられており、命令解釈実行回路140によって、メ
モリ110の、PPCレジスタ126およびプログラム
カウンタ121に格納されているデータが示すアドレス
に格納されている命令が、アクセス回路170及び外部
バス112を介して読み込まれ、読み込まれた命令が解
釈され実行されて、外部バス112等を介したメモリ1
10のアクセスや、バス130を介した各種データの格
納・取出・演算が行われる。この命令解釈実行回路14
0が解釈することができる命令表記は、旧型のマイクロ
プロセッサにおいて用いられている命令表記であり、こ
れらの命令表記には、短いバイト長を有する命令コード
が対応する。また、「LD D,D」という命令表記で
表される命令に対してZPレジスタ127が対応付けら
れており、「LD E,E」という命令表記で表される
命令に対してXPレジスタ128が対応付けられてお
り、「LD A,A」という命令表記で表される命令に
対してアキュムレータ125が対応付けられている。命
令解釈実行回路140において、「LD D,D」等と
いう命令表記で表される命令が実行されると、それらの
命令に対応付けられているページレジスタあるいはアキ
ュムレータを示す信号が生成される。
The microprocessor 100 is also provided with an instruction interpretation execution circuit 140 and an access circuit 170, which are stored in the PPC register 126 and the program counter 121 of the memory 110 by the instruction interpretation execution circuit 140. The instruction stored at the address indicated by the stored data is read via the access circuit 170 and the external bus 112, the read instruction is interpreted and executed, and the memory 1 via the external bus 112 or the like is read.
10 is accessed, and various data is stored / retrieved / calculated via the bus 130. This instruction interpretation execution circuit 14
The instruction notations that 0 can interpret are the instruction notations used in older microprocessors, and these instruction notations correspond to instruction codes that have a short byte length. Further, the ZP register 127 is associated with the instruction represented by the instruction notation “LD D, D”, and the XP register 128 is associated with the instruction represented by the instruction notation “LD E, E”. They are associated with each other, and the accumulator 125 is associated with the instruction represented by the instruction notation “LD A, A”. When an instruction represented by an instruction notation such as "LD D, D" is executed in the instruction interpretation and execution circuit 140, a signal indicating a page register or an accumulator associated with the instruction is generated.

【0015】また、このマイクロプロセッサ100に
は、判定回路150が備えられており、判定回路150
によって、PPCレジスタ126に格納されているデー
タの値が「00h」であるか否かが判定され、これによ
って、命令解釈実行回路140がメモリ110から読み
込んだ命令が格納されていたアドレスが互換領域内のア
ドレスであるか否かが判定される。この判定結果は、命
令解釈実行回路140に入力される。
Further, the microprocessor 100 is provided with a judging circuit 150, and the judging circuit 150 is provided.
It is determined whether or not the value of the data stored in the PPC register 126 is "00h", and the address where the instruction read by the instruction interpretation and execution circuit 140 from the memory 110 is stored in the compatible area. It is determined whether the address is within the address. This determination result is input to the instruction interpretation execution circuit 140.

【0016】また、このマイクロプロセッサ100に
は、本発明にいうページ指定回路に相当するマルチプレ
クサ160が備えられており、このマルチプレクサ16
0には、判定回路150によって、メモリ110から読
み込んだ命令が格納されていたアドレスが互換領域外の
アドレスであると判定された場合に、命令解釈実行回路
140によって生成された、ページレジスタあるいはア
キュムレータを示す信号が入力される。また、このマル
チプレクサ160には、ZPレジスタ127、XPレジ
スタ128およびアキュムレータ125が接続されてお
り、マルチプレクサ160は、命令解釈実行回路140
によって生成された信号に従って、ZPレジスタ12
7、XPレジスタ128およびアキュムレータ125の
うちのいずれか1つを選択し、選択したページレジスタ
若しくはアキュムレータに格納されているデータを、ア
クセス回路170および外部バス112を介してメモリ
110のアドレス線の上位8ビット分に出力する。これ
によって、メモリ110の、命令解釈実行回路140に
よるアクセスが可能なページが指定されることとなる。
Further, the microprocessor 100 is provided with a multiplexer 160 corresponding to the page designating circuit according to the present invention.
In the case of 0, the page register or accumulator generated by the instruction interpretation execution circuit 140 when the determination circuit 150 determines that the address where the instruction read from the memory 110 is stored is outside the compatible area. Is input. Further, a ZP register 127, an XP register 128 and an accumulator 125 are connected to the multiplexer 160, and the multiplexer 160 includes an instruction interpretation execution circuit 140.
According to the signal generated by the ZP register 12
7. Any one of the XP register 128 and the accumulator 125 is selected, and the data stored in the selected page register or accumulator is transferred to the upper side of the address line of the memory 110 via the access circuit 170 and the external bus 112. Output for 8 bits. As a result, a page of the memory 110 that can be accessed by the instruction interpretation and execution circuit 140 is designated.

【0017】図3は、本実施形態において命令が実行さ
れる様子を示す図である。図3には、図2に示すメモリ
110が有するアドレス空間が示されており、上述した
ように、000000h番地から00FFFFh番地ま
でが互換領域111である。この互換領域111内に
は、旧型のマイクロプロセッサ用に作成されたサブルー
チンプログラム「_SUB」が格納されており、互換領
域111を除くアドレス空間には、サブルーチンプログ
ラム「_SUB」を利用する、新たに作成されたプログ
ラムが格納されている。これらのプログラムを構成して
いる各命令の命令表記は、全て、旧型のマイクロプロセ
ッサにおいて用いられている命令表記であり、これらの
命令表記に対応する命令コードは、短いバイト長を有す
る命令コードである。
FIG. 3 is a diagram showing how an instruction is executed in this embodiment. FIG. 3 shows the address space of the memory 110 shown in FIG. 2. As described above, the compatible area 111 is from address 000000h to address 00FFFFh. A subroutine program “_SUB” created for an old microprocessor is stored in the compatible area 111, and a newly created subroutine program “_SUB” is used in the address space excluding the compatible area 111. The stored program is stored. The instruction notation of each instruction that constitutes these programs is all the instruction notation used in the old-type microprocessor, and the instruction code corresponding to these instruction notation is an instruction code having a short byte length. is there.

【0018】「LD D,D」なる表記で表される命令
201から実行が開始され、この命令201は互換領域
111外に格納されているので、図2に示すマルチプレ
クサ160によって、ZPレジスタが選択される。次
に、「LD ZP,01h」なる表記で表される命令2
02が実行されてZPレジスタに値「01h」が格納さ
れることにより、図2に示すメモリ110のアドレス線
の上位8ビット分に値「01h」が出力され、値「01
h」が示すページが、アクセス可能なページとして指定
される。
Execution starts from an instruction 201 represented by the notation "LD D, D", and since this instruction 201 is stored outside the compatible area 111, the ZP register is selected by the multiplexer 160 shown in FIG. To be done. Next, the instruction 2 represented by the notation "LD ZP, 01h"
When 02 is executed and the value “01h” is stored in the ZP register, the value “01h” is output to the upper 8 bits of the address line of the memory 110 shown in FIG. 2 and the value “01h” is output.
The page indicated by “h” is designated as an accessible page.

【0019】次に、「LD HL,8000h」なる表
記で表される命令203が実行されて汎用HLレジスタ
に値「8000h」が格納され、「CALL _SU
B」なる表記で表される命令204が実行されて、プロ
グラムの流れが、互換領域111内に格納されているサ
ブルーチンプログラム「_SUB」に移り、「LD
A,A」なる表記で表される命令205が実行される。
この命令205は、互換領域111内に格納されている
ので、命令205は無意味命令として実行され、図2に
示すマルチプレクサ160によるZPレジスタの選択お
よびページ指定は維持される。
Next, the instruction 203 represented by the notation "LD HL, 8000h" is executed, the value "8000h" is stored in the general-purpose HL register, and "CALL--SU".
The instruction 204 represented by the notation “B” is executed, the flow of the program moves to the subroutine program “_SUB” stored in the compatible area 111, and “LD
The instruction 205 represented by the notation “A, A” is executed.
Since this instruction 205 is stored in the compatible area 111, the instruction 205 is executed as a meaningless instruction, and the selection of the ZP register and the page designation by the multiplexer 160 shown in FIG. 2 are maintained.

【0020】その後、「RET」なる表記で表される命
令206が実行されてプログラムの流れがリターンし、
「JP(HL)」なる表記で表される命令207が実行
される。命令201および命令202が実行されて指定
されたページは、サブルーチンの実行を経た後も維持さ
れており、命令207が実行されると、ZPレジスタお
よび汎用HLレジスタに格納されている値が示す018
000番地にプログラムの流れがジャンプする。このよ
うに、本実施形態のマイクロプロセッサによれば、旧型
のマイクロプロセッサ用に作成されたプログラムをサブ
ルーチンとして有効に利用することができる。
Thereafter, the instruction 206 represented by "RET" is executed and the flow of the program returns,
The instruction 207 represented by the notation “JP (HL)” is executed. The page specified by executing the instruction 201 and the instruction 202 is maintained after the execution of the subroutine, and when the instruction 207 is executed, the page indicated by the value stored in the ZP register and the general-purpose HL register is indicated by 018.
The program flow jumps to address 000. As described above, according to the microprocessor of the present embodiment, it is possible to effectively use the program created for the old microprocessor as a subroutine.

【0021】次に、「LD DE,F000h」なる表
記で表される命令208が実行されて汎用DEレジスタ
に値「F000h」が格納され、「ADD HL,D
E」なる表記で表される命令209が実行されて、汎用
HLレジスタに格納されている値「8000h」に、汎
用DEレジスタに格納されている値「F000h」が足
され、その計算結果を示す値「7000h」が汎用HL
レジスタに格納される。次に「ADC A,10h」な
る表記で表される命令210が実行されて、命令209
によって生じたキャリーと値「10h」が足された値
「11h」がアキュムレータに格納される。
Next, the instruction 208 represented by the notation "LD DE, F000h" is executed to store the value "F000h" in the general-purpose DE register, and "ADD HL, D".
The instruction 209 represented by the notation "E" is executed, and the value "8000h" stored in the general-purpose HL register is added to the value "F000h" stored in the general-purpose DE register to show the calculation result. The value "7000h" is general-purpose HL
Stored in register. Next, the instruction 210 represented by the notation “ADC A, 10h” is executed, and the instruction 209 is executed.
The value "11h" obtained by adding the carry generated by and the value "10h" is stored in the accumulator.

【0022】次に、命令205の命令表記と同一の「L
D A,A」なる表記で表される命令211が実行され
る。この命令211は、互換領域111外に格納されて
いるので、図2に示すマルチプレクサ160によって、
アキュムレータが選択され、メモリ110のアドレス線
の上位8ビット分に、アキュムレータに格納されている
値「11h」が出力される。次に、命令207の命令表
記と同一の「JP(HL)」なる表記で表される命令2
12が実行され、ここでは、アキュムレータに格納され
ている値「11h」によってページが指定されているの
で、プログラムの流れは、117000h番地にジャン
プする。このように、本実施形態のマイクロプロセッサ
によれば、演算結果を用いてページを指定する場合であ
っても、短いバイト長を有する命令コードだけでページ
指定を行うことができる。
Next, "L" which is the same as the instruction notation of the instruction 205
The instruction 211 represented by the notation “DA, A” is executed. Since this instruction 211 is stored outside the compatible area 111, the multiplexer 160 shown in FIG.
The accumulator is selected, and the value “11h” stored in the accumulator is output to the upper 8 bits of the address line of the memory 110. Next, the instruction 2 represented by the notation “JP (HL)” which is the same as the instruction notation of the instruction 207.
12 is executed, and since the page is designated by the value “11h” stored in the accumulator, the program flow jumps to the address 117000h. As described above, according to the microprocessor of the present embodiment, even when a page is designated by using the operation result, the page can be designated only by the instruction code having the short byte length.

【0023】なお、本実施形態における互換領域は00
0000h番地から00FFFFh番地までの領域であ
るが、本発明にいう所定の領域は、アドレス空間上の他
の領域であっても良い。また、本実施形態では、マルチ
プレクサによって、ページレジスタ若しくはアキュムレ
ータが選択されるが、本発明にいうページ指定回路は、
HレジスタやLレジスタ等も含まれるレジスタ群からレ
ジスタを選択するものであっても良い。
The compatible area in this embodiment is 00.
Although it is an area from address 0000h to address 00FFFFh, the predetermined area in the present invention may be another area in the address space. Further, in the present embodiment, the page register or accumulator is selected by the multiplexer.
The register may be selected from a register group including an H register and an L register.

【0024】また、本実施形態では、アキュムレータの
ビット幅とページレジスタのビット幅とは同じビット幅
であるが、本発明にいうアキュムレータはページレジス
タのビット幅よりも大きいビット幅を有するものであっ
ても良く、この場合には、アキュムレータの一部の領域
に格納されているデータが、ページを指定するデータと
して用いられる。
Further, in the present embodiment, the bit width of the accumulator and the page register are the same, but the accumulator according to the present invention has a bit width larger than that of the page register. In this case, the data stored in a partial area of the accumulator is used as the data designating the page.

【0025】[0025]

【発明の効果】以上説明したように、本発明のマイクロ
プロセッサは、旧型のマイクロプロセッサのアドレス空
間が拡張された広いアドレス空間を有しており、本発明
のマイクロプロセッサによれば、旧型のマイクロプロセ
ッサ用のソフトウェアがそのまま利用できる。
As described above, the microprocessor of the present invention has a wide address space in which the address space of the old-type microprocessor is expanded. According to the microprocessor of the present invention, the old-type microprocessor is provided. The software for the processor can be used as it is.

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

【図1】旧型のマイクロプロセッサに備えられているレ
ジスタセット(A)、および新型マイクロプロセッサに
備えられているレジスタセット(B)の一例を示す図で
ある。
FIG. 1 is a diagram showing an example of a register set (A) provided in an old microprocessor and a register set (B) provided in a new microprocessor.

【図2】本発明のマイクロプロセッサの一実施例を示す
図である。
FIG. 2 is a diagram showing an embodiment of a microprocessor of the present invention.

【図3】本実施形態において命令が実行される様子を示
す図である。
FIG. 3 is a diagram showing how an instruction is executed in this embodiment.

【符号の説明】[Explanation of symbols]

100 マイクロプロセッサ 110 メモリ 111 互換領域 125 アキュムレータ 126 PPCレジスタ 127 ZPレジスタ 128 XPレジスタ 140 命令解釈実行回路 150 判定回路 160 マルチプレクサ 100 microprocessor 110 memory 111 compatible area 125 accumulator 126 PPC register 127 ZP register 128 XP register 140 instruction interpretation execution circuit 150 judgment circuit 160 multiplexer

───────────────────────────────────────────────────── フロントページの続き (56)参考文献 特開 昭61−290549(JP,A) (58)調査した分野(Int.Cl.7,DB名) G06F 9/30 - 9/36 G06F 9/40 - 9/42 ─────────────────────────────────────────────────── ─── Continuation of front page (56) References JP-A-61-290549 (JP, A) (58) Fields investigated (Int.Cl. 7 , DB name) G06F 9/30-9/36 G06F 9 / 40-9/42

Claims (2)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 複数の命令が格納されるメモリから命令
を読み出して実行するマイクロプロセッサにおいて、 前記メモリのページをあらわすデータが格納される、各
所定の命令に対応して備えられた1つ以上のページレジ
スタと、 前記ページレジスタに対応付けられた各所定の命令とは
異なる所定の命令が対応付けられてなるアキュムレータ
と、 前記1つ以上のページレジスタおよび前記アキュムレー
タのうちのいずれか1つを選択し、選択したページレジ
スタに格納されているデータ、もしくは選択したアキュ
ムレータの、前記ページレジスタのビット幅と同一ビッ
ト幅を有する全域若しくは一部領域に格納されているデ
ータを、前記メモリの、アクセス可能なページを指定す
るデータとして出力するページ指定回路と、 実行しようとする命令を解釈する命令解釈部とを備え、 前記命令解釈部が、該命令解釈部で解釈した命令が前記
1つ以上のページレジスタのうちのいずれか、あるいは
前記アキュムレータに対応付けられた命令であったとき
に、前記ページ指定回路に、該命令に対応付けられてい
るページレジスタ、あるいはアキュムレータを選択させ
るものであることを特徴とするマイクロプロセッサ。
1. A microprocessor for reading and executing an instruction from a memory in which a plurality of instructions are stored, and one or more provided corresponding to each predetermined instruction, in which data representing a page of the memory is stored. Of the page register, an accumulator in which a predetermined instruction different from each of the predetermined instructions associated with the page register is associated, and any one of the one or more page registers and the accumulator The data stored in the selected and selected page register or the data stored in the entire area or a partial area of the selected accumulator having the same bit width as that of the page register is accessed in the memory. A page design circuit that outputs as possible page designating data and an attempt to execute An instruction interpreting unit that interprets an instruction, wherein the instruction interpreting unit is an instruction associated with the accumulator, and the instruction interpreted by the instruction interpreting unit is one of the one or more page registers. A microprocessor characterized by causing the page designation circuit to select a page register or an accumulator associated with the instruction.
【請求項2】 前記メモリの、実行しようとする命令が
格納されているアドレスが所定の領域内のアドレスであ
るか否かを判定する判定回路を備え、 前記命令解釈部が、前記判定回路によって、前記所定の
領域外のアドレスであると判定され、かつ、該命令解釈
部によって解釈した命令が前記アキュムレータに対応付
けられた命令である場合に、前記ページ指定回路にアキ
ュムレータを選択させるものであることを特徴とする請
求項1記載のマイクロプロセッサ。
2. A determination circuit for determining whether or not an address of the memory in which an instruction to be executed is stored is an address within a predetermined area, wherein the instruction interpretation unit is configured to operate by the determination circuit. The page designating circuit selects an accumulator when it is determined that the address is outside the predetermined area and the instruction interpreted by the instruction interpreting unit is an instruction associated with the accumulator. The microprocessor according to claim 1, wherein:
JP03074998A 1998-02-13 1998-02-13 Microprocessor Expired - Fee Related JP3517579B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP03074998A JP3517579B2 (en) 1998-02-13 1998-02-13 Microprocessor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP03074998A JP3517579B2 (en) 1998-02-13 1998-02-13 Microprocessor

Publications (2)

Publication Number Publication Date
JPH11232099A JPH11232099A (en) 1999-08-27
JP3517579B2 true JP3517579B2 (en) 2004-04-12

Family

ID=12312346

Family Applications (1)

Application Number Title Priority Date Filing Date
JP03074998A Expired - Fee Related JP3517579B2 (en) 1998-02-13 1998-02-13 Microprocessor

Country Status (1)

Country Link
JP (1) JP3517579B2 (en)

Also Published As

Publication number Publication date
JPH11232099A (en) 1999-08-27

Similar Documents

Publication Publication Date Title
JP4608484B2 (en) Invalidate storage, clear buffer entries
US5826057A (en) Method for managing virtual address space at improved space utilization efficiency
EP0213843A2 (en) Digital processor control
US4937738A (en) Data processing system which selectively bypasses a cache memory in fetching information based upon bit information of an instruction
EP0465248B1 (en) Pseudo-linear bank switching memory expansion
US5666510A (en) Data processing device having an expandable address space
EP1143333B1 (en) Microprocessor for supporting reduction of program codes in size
CN112631657A (en) Byte comparison method and instruction processing device for character string processing
KR19990036893A (en) Processor Architecture for Execution of Multiple Addressing Modes and Its Design Method
US6467037B1 (en) Utilizing a program counter with one or more data counters for executing instructions
KR19990037573A (en) Processor architecture and instruction set to maximize available opcodes and execute various addressing modes
JPH07239780A (en) One-clock variable length instruction execution process type instruction read computer
JP3432532B2 (en) Data processing device
JP3517579B2 (en) Microprocessor
KR19990037571A (en) A data pointer for outputting an indirect addressing mode address in a single period and a method of providing the same
JP3583918B2 (en) Microprocessor
US7370159B2 (en) Microprocessor having an extended addressable space
JP2715967B2 (en) Microcomputer
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
JPH09505428A (en) Microcontroller with page address mode
US20030079105A1 (en) Single cycle linear address calculation for relative branch addressing
KR100897857B1 (en) Microcontroller instruction set
US20040098568A1 (en) Processor having a unified register file with multipurpose registers for storing address and data register values, and associated register mapping method
JP2637770B2 (en) Microcomputer
JPH0666052B2 (en) A computer that automatically maps memory contents to machine registers

Legal Events

Date Code Title Description
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20040120

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20040126

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20080130

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20090130

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100130

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110130

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110130

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120130

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120130

Year of fee payment: 8

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130130

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130130

Year of fee payment: 9

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140130

Year of fee payment: 10

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R360 Written notification for declining of transfer of rights

Free format text: JAPANESE INTERMEDIATE CODE: R360

R360 Written notification for declining of transfer of rights

Free format text: JAPANESE INTERMEDIATE CODE: R360

R371 Transfer withdrawn

Free format text: JAPANESE INTERMEDIATE CODE: R371

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313111

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees