JPH03185536A - Memory addressing system for microcomputer - Google Patents

Memory addressing system for microcomputer

Info

Publication number
JPH03185536A
JPH03185536A JP1325109A JP32510989A JPH03185536A JP H03185536 A JPH03185536 A JP H03185536A JP 1325109 A JP1325109 A JP 1325109A JP 32510989 A JP32510989 A JP 32510989A JP H03185536 A JPH03185536 A JP H03185536A
Authority
JP
Japan
Prior art keywords
register
memory
memory bank
indirect addressing
addressing
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.)
Granted
Application number
JP1325109A
Other languages
Japanese (ja)
Other versions
JP2874230B2 (en
Inventor
Kazutoshi Yoshizawa
吉澤 和俊
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.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP1325109A priority Critical patent/JP2874230B2/en
Publication of JPH03185536A publication Critical patent/JPH03185536A/en
Application granted granted Critical
Publication of JP2874230B2 publication Critical patent/JP2874230B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Memory System (AREA)

Abstract

PURPOSE:To eliminate the need for the frequently switching of memory bank specification at the time of executing exchanging, transfer or comparing operation of the data between different memory banks by providing the memory addressing system with a means for selecting accessible indirect addressing for a memory bank selected by a memory bank selecting register. CONSTITUTION:An exchange instruction between an accumulator and a memory for a memory bank selected by the memory bank selecting register 5 is issued with indirect addressing to an H/L register 1, and then the exchange instruction between the accumulator and the memory is issued by indirect addressing to a D/E register 2 without changing the contents of the register 5. Then the exchange instruction between the accumulator and memory is issued again by the indirect addressing to the H/L register 1. Consequently, the contents stored in the memory bank specified by the register 5 can be exchanged with the contents stored in a memory bank 0 and it is unnecessary to change the contents of the register 5 during the exchange.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はマイクロコンピュータのメモリアドレッシング
方式に関し、特に複数のメモリバンクによって構成され
たメモリ空間を有するマイクロコンピュータのメモリア
ドレッシング方式に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a memory addressing method for a microcomputer, and more particularly to a memory addressing method for a microcomputer having a memory space constituted by a plurality of memory banks.

〔従来の技術〕[Conventional technology]

従来のマイクロコンピュータ、例えば4ビツトシングル
チツプマイクロコンピユータにおいて、内蔵するデータ
メモリの所定の番地に対するデータのリード/ライト操
作の方法として、命令語で直接指定する直接アドレッシ
ングの他に、4ビツトのレジスタをベア、例えばHレジ
スタとLレジスタのベアとしてHLレジスタの内容8ビ
ツトをアドレスとするレジスタ間接アドレッシングがあ
る。この間接アドレッシングとして使用する8ビツトの
レジスタも複数組、例えばHLレジスタとDBレジスタ
を用意している場合が多い。
In conventional microcomputers, for example, 4-bit single-chip microcomputers, in addition to direct addressing, which is directly specified with an instruction word, there are two ways to read/write data to a predetermined address in the built-in data memory: a 4-bit register. There is register indirect addressing in which the 8-bit content of the HL register is used as a bare address, such as bare H and L registers. In many cases, multiple sets of 8-bit registers used for this indirect addressing, such as HL register and DB register, are prepared.

このようなレジスタ間接アドレッシングにおいて、デー
タメモリ容量が256番地の範囲以内であれば、4ビツ
トのレジスタをベアとした8ビツトの内容によりすべて
の番地を間接的にアドレッシングすることが可能である
が、前記256番地範囲を越えるデータメモリ容量を内
蔵しようとすると、従来のままでは全データメモリに対
してレジスタ間接アドレッシングができない、そこで、
二りに対処する方法として、従来のレジスタ間接アドレ
ッシングが可能なデータメモリ空間を構成要素とする複
数のデータメモリ空間(以下、メモリバンクと呼ぶ)に
全データメモリ空間を分割し、アドレッシングの際に目
的とするメモリバンクを選択するとともに、その選択さ
れたメモリバンク内のデータメモリ空間を前記ベアレジ
スタで間接アドレッシングする方法がある。
In such register indirect addressing, if the data memory capacity is within the range of 256 addresses, it is possible to indirectly address all addresses with 8-bit contents using 4-bit registers as bare. If you try to incorporate a data memory capacity that exceeds the 256 address range, register indirect addressing is not possible for all data memories as is, so,
As a method to deal with the second issue, the entire data memory space is divided into multiple data memory spaces (hereinafter referred to as memory banks) each consisting of data memory spaces that allow conventional register indirect addressing. There is a method of selecting a target memory bank and indirectly addressing the data memory space within the selected memory bank using the bare register.

例えば、0番地から1023023番地リ空間よりなる
データメモリを256番地ずつ4つのメモリバンクに分
割し、前記メモリバンクを選択するレジスタ、すなわち
4メモリバンクの場合には2ビ、ト構成のレジスタを設
けることにより、選択したメモリバンクに対して前記8
ビ、トのベアレジスタで間接アドレッシングするように
すれば良い。
For example, a data memory consisting of an address space of 0 to 1023023 is divided into 4 memory banks of 256 addresses each, and a register for selecting the memory bank, that is, a 2-bit register in the case of 4 memory banks, is provided. By doing so, the above 8
Indirect addressing can be done using bit bare registers.

記4つのメモリバンクをメモリバンク0からメモリバン
ク3としてメモリバンクlの所定番地の内容とメモリパ
ンク00所定番地の内容をレジスタ間接アドレッシング
により交換するよう々場合には、HLレジスタにメモリ
バンク1内の番地を指定する8ビツトデータを設定し、
またDEレジスタにメモリバンク0内の番地を指定する
8ビツトデータを設定する。まず、メモリバンクセレク
トレジスタにメモリバンク1を指定する2ビツトデータ
を書込み、メモリバンクlの所定番地の内容と7キユム
レータとをHLレジスタ間接アドレッシングにより交換
する。その後、メモリバンクセレクトレジスタにメモリ
バンク0を指定するデータを書込み、アキュムレータと
メモリバンク0内の所定番地の内容とをDEレジスタ間
接アドレ、シングにより交換する。更に、再びメ−t−
V /<ンク1を指定してアキュムレータと前記メモリ
バンクl内の所定番地内容とをHLレジスタ間接アドレ
、シングにより交換することにより、メモリバンク1内
のデータとメモリバンク0内のデータを交換することが
できる。
When changing the four memory banks from memory bank 0 to memory bank 3 and exchanging the contents of the specified address of memory bank l and the contents of the specified address of memory puncture 00 by register indirect addressing, write the contents of memory bank 1 in the HL register. Set 8-bit data that specifies the address of
Also, 8-bit data specifying an address in memory bank 0 is set in the DE register. First, 2-bit data specifying memory bank 1 is written into the memory bank select register, and the contents of a predetermined address in memory bank 1 and the 7 cumulator are exchanged by HL register indirect addressing. Thereafter, data specifying memory bank 0 is written to the memory bank select register, and the contents of the accumulator and the predetermined location in memory bank 0 are exchanged by DE register indirect addressing. Furthermore, mail again
The data in memory bank 1 and the data in memory bank 0 are exchanged by specifying V /< link 1 and exchanging the contents of the accumulator and the predetermined location in the memory bank l by HL register indirect addressing. be able to.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

上述した従来のマイクロコンピュータのメモリアドレッ
シング方式は、メモリバンク間でのデータの交換あるい
はデータの比較等の操作を頻繁に行う場合、メモリバン
クの切換も頻繁に必要であり、プログラムのステップ数
が増大することば避けられない、たとえ、ステップ数を
減らそうとしてサブルーチン化しても、前述した操作を
広範囲のアドレスに渡って何度も行ったりするときには
、メモリバンク切換操作のためにデータの処理時間が増
大するという欠点がある。
In the conventional microcomputer memory addressing method described above, when operations such as exchanging data or comparing data between memory banks are frequently performed, it is necessary to switch memory banks frequently, which increases the number of program steps. Even if you create a subroutine to reduce the number of steps, data processing time will increase due to memory bank switching operations when the above operations are performed many times over a wide range of addresses. There is a drawback that it does.

本発明の目的は、かかるプログラムのステップ数を減少
させるとともに、データの処理時間を減少させることの
できるマイクロコンピュータのメモリアドレッシング方
式を提供することにある。
SUMMARY OF THE INVENTION An object of the present invention is to provide a memory addressing system for a microcomputer that can reduce the number of program steps and data processing time.

〔課題を解決するための手段〕[Means to solve the problem]

本発明のマイクロコンピュータのメモリアドレッシング
方式は、メモリ空間を分割した複数のメモリバンクと、
前記メモリバンクのうち1つを指定するメモリバンクセ
レクトレジスタと、前記メモリバンク内のメモリアドレ
スを間接的に指定するアドレス指定手段とを有するマイ
クロコンピュータのメモリアドレッシング方式において
、複数の間接アドレッシング用レジスタと、前記複数の
間接アドレッシング用レジスタのうち1つを間接7ドレ
ツシング命令の命令コードにより指定してメモリアドレ
スの一部として出力する下位アドレス選択切換回路と、
前記メモリバンクセレクトレジスタにより指定したメモ
リバンクに対して有効となる間接アドレッシングを指定
する有効レジスタ選択レジスタと、前記有効レジスタ選
択レジスタの内容および前記間接アドレッシング命令の
種類に応じて前記メモリバンクセレクトレジスタの内容
を上位メモリアドレスとして出力するか否かを切換える
上位アドレス選択切換回路とを有して構成される。
The memory addressing method of the microcomputer of the present invention includes a plurality of memory banks in which the memory space is divided;
In a memory addressing system for a microcomputer, the microcomputer has a memory bank select register that specifies one of the memory banks, and addressing means that indirectly specifies a memory address within the memory bank. , a lower address selection switching circuit that specifies one of the plurality of indirect addressing registers using an instruction code of an indirect addressing instruction and outputs it as part of a memory address;
an effective register selection register that specifies indirect addressing that is valid for the memory bank specified by the memory bank select register; and an upper address selection switching circuit that switches whether or not to output the contents as an upper memory address.

〔実施例〕〔Example〕

次に、本発明の実施例について図面を参照して説明する
Next, embodiments of the present invention will be described with reference to the drawings.

第1図は本発明の第一の実施例を示すマイクロコンピュ
ータのメモリアドレッシング方式のブロック図である。
FIG. 1 is a block diagram of a memory addressing system of a microcomputer showing a first embodiment of the present invention.

第1図に示すように、本実施例は4ビツトのレジスタH
とレジスタLをペアとして形成される間接アドレッシン
グ用8ビツトHLレジスタ1と、4ビ、トのレジスタD
とレジスタEをペアとして形成される間接アドレッシン
グ用8ビツトDEレジスタ2と、4ビツトのレジスタB
とレジスタCをペアとして形成される間接アドレッシン
グ用8ビy)BCレジスタ3と、間接アドレッシング命
令の命令コード中で前記3つの8ビ、トレジスタのうち
1つを指定する2ピツ)rl、rOによりHLレジスタ
l又はDEレジスタ2又はBCレジスタ3の内容のうち
1つを選択し、メモリアドレスの下位8ピツ)MA7〜
MAOとして出力する下位アドレス選択切換回路4と、
複数あるメモリバンクのいずれか1つを指定するための
2ビツトのメモリバンクセレクトレジスタ5と、間接ア
ドレッシング命令を実行した場合にメモリバンクセレク
トレジスタ5で選択されたメモリバンクに対する間接ア
ドレッシングが有効になる間接アドレッシング用レジス
タを選択する有効レジスタ選択レジスタ6と、有効レジ
スタ選択レジスタ6の内容と間接アドレッシング命令中
の2ピツ)rl、rOの内容に応じメモリバンクセレク
トレジスタ5の内容を上位アドレスMA9.MA8とし
て出力するかてかをmqえる上位アドレス選択切換回路
7とから構成されている。
As shown in FIG. 1, this embodiment uses a 4-bit register H
and register L, an 8-bit HL register 1 for indirect addressing, and a 4-bit register D.
8-bit DE register 2 for indirect addressing formed as a pair of and register E, and 4-bit register B
8 bits for indirect addressing formed as a pair of y) BC register 3 and register C, and 2 bits) rl and rO that specify one of the three 8-bit registers in the instruction code of the indirect addressing instruction. Select one of the contents of HL register 1, DE register 2, or BC register 3, and select the lower 8 bits of the memory address) MA7~
a lower address selection switching circuit 4 outputting as MAO;
A 2-bit memory bank select register 5 is used to specify one of multiple memory banks, and when an indirect addressing instruction is executed, indirect addressing is enabled for the memory bank selected by the memory bank select register 5. An effective register selection register 6 selects a register for indirect addressing, and the contents of the memory bank select register 5 are set to an upper address MA9. It is composed of an upper address selection switching circuit 7 that selects the address to be outputted as MA8.

第2図は第1図における上位アドレス選択切換回路の構
成図であり、また第3図は第1図においてアクセス対象
となるデータメモリ構成図である。
2 is a block diagram of the upper address selection switching circuit in FIG. 1, and FIG. 3 is a block diagram of the data memory to be accessed in FIG. 1.

第2図に示すように、上位アドレス選択切換回路7は2
ピツ)rO,rlの内容と有効レジスタ選択レジスタ6
からのデータとの一致を判定する一致判定回路8と、こ
の一致判定回路8の出力とメモリバンクセレクトレジス
タ5のそれぞれの出力との論理積をとるANDゲート9
および10とを有している。
As shown in FIG.
Pitsu) Contents of rO, rl and valid register selection register 6
and an AND gate 9 which takes the logical product of the output of the match judgment circuit 8 and each output of the memory bank select register 5.
and 10.

また、第3図に示すように、データメモリ13は102
4X4ビツトの容量を有し、256X4ビツトを単位と
する4つのメモリバンク0〜4により構成されている。
Further, as shown in FIG. 3, the data memory 13 has 102
It has a capacity of 4×4 bits and is composed of four memory banks 0 to 4 in units of 256×4 bits.

次に、第牛図から第6図を用いてメモリアドレッシング
の動作を更に詳しく説明する。
Next, the memory addressing operation will be explained in more detail using Figures 6 to 6.

第4図は第1図における間接アドレッシング命令の命令
コードを示す図である。
FIG. 4 is a diagram showing the instruction code of the indirect addressing instruction in FIG. 1.

今、間接アドレッシング用命令としてマイクロコンピュ
ータの7キユムレータとメモリの交換命令を第4図に示
すような1バイトで構成された命令コードとする。すな
わち、下位2ピツ)r 1゜rOがOOのときBCレジ
スタ間接アドレッシングを示し、またrl、rOが01
のときDEレジスタ間接アドレッシングを示し、更にr
l、rOがlOのときHLレジスタ間接アドレ、シング
を示すものとする。従って、間接アドレッシング命令を
実行すると、第1図の下位アドレス選択切換回路4は、
命令コード中の2ピツ)rl、rO0値に応じてHLレ
ジスタl又はDEレジスタ2又はBCレジスタ3の中か
らいずれか1つを選択し、その内容をメモリアドレスの
下位8ビツトMAt〜MAoとして出力する。この命令
コード中の2ピツ)rl、roは更に上位アドレス選択
切換回路7にも入力される。
Assume that an instruction for exchanging memory with a microcomputer's 7 storage unit is an instruction code consisting of one byte as shown in FIG. 4 as an indirect addressing instruction. That is, when the lower 2 bits) r1°rO is OO, it indicates BC register indirect addressing, and when rl and rO are 01
indicates DE register indirect addressing, and r
When l and rO are lO, it is assumed that HL register indirect addressing is indicated. Therefore, when an indirect addressing instruction is executed, the lower address selection switching circuit 4 in FIG.
2 bits in the instruction code) Select one from HL register 1, DE register 2, or BC register 3 according to the rl and rO0 values, and output the contents as the lower 8 bits MAt to MAo of the memory address. do. The two bits (rl and ro) in this instruction code are further input to the upper address selection switching circuit 7.

一方、間接アドレッシング命令を実行する以前にあらか
じめ有効レジスタ選択レジスタ6及びメモリバンクセレ
クトレジスタ5に所定の値を設定しておく。上位アドレ
ス選択切換回路7の一致判定回路8は、前述したように
、有効レジスタ選択レジスタ6の内容と間接アドレッシ
ング命令コード中のrl、roの内容とを比較し、一致
したとき“1′ レベルの信号を出力する。例えば、有
効レジスタ選択レジスタ6の2ビツトに10が設定され
ている場合、HL間接アドレッシングを行うとrl、r
Oが10となるので、一致判定回路8は“1”を出力す
る。
On the other hand, before executing the indirect addressing instruction, predetermined values are set in the effective register selection register 6 and memory bank selection register 5 in advance. As mentioned above, the match determination circuit 8 of the upper address selection switching circuit 7 compares the contents of the effective register selection register 6 with the contents of rl and ro in the indirect addressing instruction code, and when they match, outputs a "1" level. For example, if 2 bits of the valid register selection register 6 are set to 10, when HL indirect addressing is performed, rl, r
Since O is 10, the match determination circuit 8 outputs "1".

第5図および第6図はそれぞれ第1図におけるメモリの
アドレッシングを説明するための図である。
FIGS. 5 and 6 are diagrams for explaining memory addressing in FIG. 1, respectively.

第5図に示すように、上述したメモリノくンクセレクト
レジスタ5の内容2ビツト出力はANDゲート9及び1
0を介してメモリアドレス上位ビットMA9.MA8と
して出力されるため、メモリバンクセレクトレジスタ5
で選択したメモリバンク内に対してHLレジスタlの内
容8ビツトMA7〜MAOで7ドレツシングすることが
できる。
As shown in FIG.
0 to the memory address upper bit MA9. Since it is output as MA8, memory bank select register 5
It is possible to perform 7 dressings in the memory bank selected by the 8-bit contents MA7 to MAO of the HL register 1.

一方、その後DE間接アドレッシングを行うと、2ビッ
トrl、roが01となるので、有効レジスタ選択レジ
スタ6の内容10と一致しないため、一致判定回路8は
°0°を出力する。
On the other hand, when DE indirect addressing is performed thereafter, the 2 bits rl and ro become 01, which does not match the content 10 of the valid register selection register 6, so the match determination circuit 8 outputs 0°.

すなわち、ANDゲート9及びlOは“0′を出力する
ため、第6図に示すように、上位ビットMA9及びMA
8は0,0となり、メモリバンク0内に対してDEレジ
スタ2の2の内容8ビツトで7ドレツシングすることが
できる。
That is, since the AND gates 9 and 1O output "0", the upper bits MA9 and MA
8 becomes 0, 0, and 7 dressings can be performed in memory bank 0 using the 8 bits of the contents of 2 in DE register 2.

従って、メモリバンクセレクトレジスタ5で選択したメ
モリバンクに対してHLレジスタ間接アドレッシングで
7キユムレータとメモリとの交換命令を行ったのち、メ
モリバンクセレクトレジスタ5の内容は変えずにそのま
まの状態でDBレジスタ間接アドレッシングによりアキ
ュ・ムレータとメモリの交換命令を行い、その後再びH
Lレジスタ間接アドレッシングでアキュムレータとメモ
リの交換命令を行えば、メモリバンクセレクトレジスタ
5で指定したメモリバンク内のメモリの内容と、メモリ
バンクO内のメモリの交換ができ、その間メモリバンク
セレクトレジスタ5の内容番家変える必要はない。
Therefore, after performing an instruction to exchange the memory with the 7 cumulator using HL register indirect addressing for the memory bank selected by the memory bank select register 5, the contents of the memory bank select register 5 are left unchanged and the DB register is Executes an instruction to exchange the accumulator and memory using indirect addressing, and then returns to H again.
If an accumulator and memory exchange instruction is executed using L register indirect addressing, the contents of the memory in the memory bank specified by the memory bank select register 5 can be exchanged with the memory in the memory bank O, and during this time the contents of the memory bank select register 5 can be exchanged. There is no need to change the content number.

また、前記状態において、BCレジスタ間接アドレッシ
ングを行った場合にも、一致判定回路8の出力が0°と
なり、やはりメモリノくンクO内をアクセスする。
Further, in the above state, even when BC register indirect addressing is performed, the output of the match determination circuit 8 becomes 0°, and the inside of the memory node O is still accessed.

更に、有効レジスタ選択レジスタ6の内容を01にして
おくと、DEレジスタ間接アドレッシングの場合に2ピ
ツ)rl、rOがOlとなるので、このときのみ一致判
定回路8はl”を出力シテメモリバンクセレクトレジス
タ5により選択したメモリバンクに7ドレツシングが可
能となる。
Furthermore, if the contents of the valid register selection register 6 are set to 01, in the case of DE register indirect addressing, 2 bits) rl and rO become Ol, so only in this case, the match judgment circuit 8 outputs l". 7 dressings can be performed on the memory bank selected by the select register 5.

また、HLレジスタ間接アドレッシング及びBCレジス
タ間接アドレッシングの場合はメモリノくンクOがアク
セスされる。
Furthermore, in the case of HL register indirect addressing and BC register indirect addressing, memory node O is accessed.

同様に、有効レジスタ選択レジスタ6の内容を00にし
ておくと、BCレジスタ間接アドレッシングの場合に2
ピツ)rl、rOが00になるので、このアドレッシン
グのときのみ選択したメモリバンクへのアクセスが可能
となる。
Similarly, if the contents of the valid register selection register 6 are set to 00, 2
Since rl and rO become 00, the selected memory bank can be accessed only during this addressing.

また、有効レジスタ選択レジスタ6の内容が11の場合
には、2ピツ)rl、roの内容にかかわらず、一致判
定回路8が“l′を出力するように構成することにより
、すべての間接アドレッシングにおいてメモリバンクセ
レクトレジスタ5で選択したメモリバンクに対しアドレ
ッシングすることができる。
Furthermore, when the content of the valid register selection register 6 is 11, all indirect addressing The memory bank selected by the memory bank select register 5 can be addressed.

尚、第1図には図示していないが、間接アドレッシング
以外の命令語中の8ビ、トデータにより直接メモリアド
レスを指定するような直接アドレッシングの場合には、
常にメモリバンクセレクトレジスタ5の内容が上位アド
レスMA9.MA8に出力するように構成すれば良い。
Although not shown in FIG. 1, in the case of direct addressing, in which a memory address is directly specified by 8-bit data in an instruction word other than indirect addressing,
The contents of the memory bank select register 5 are always the upper address MA9. It may be configured to output to MA8.

第7図は本発明の第二の実施例を説明するための上位ア
ドレス選択切換回路の構成図である。
FIG. 7 is a configuration diagram of an upper address selection switching circuit for explaining a second embodiment of the present invention.

第7図に示すように、本実施例は前述した第一の実施例
における上位アドレス選択切換回路7の構成な一部変更
したものである。すなわち、第2図のANDゲー)10
に代えてインバータ11及びORゲート12を用いたも
のである。これによリ、一致判定回路8の出力が0°の
場合に、第一の実施例では上位アドレスMA9.MA8
が0.0でメモリバンクOを選択していたが、本実施例
では上位アドレスMA9.MA8が0,1となり、メモ
リバンク1を選択するようにしている。
As shown in FIG. 7, this embodiment is a partial modification of the configuration of the upper address selection switching circuit 7 in the first embodiment described above. That is, the AND game in Figure 2) 10
In this example, an inverter 11 and an OR gate 12 are used instead. As a result, when the output of the match determination circuit 8 is 0°, in the first embodiment, the upper address MA9. MA8
was 0.0 to select memory bank O, but in this embodiment, the upper address MA9. MA8 becomes 0, 1, and memory bank 1 is selected.

従って、有効レジスタ選択レジスタ6で指定した間接ア
ドレッシング以外の間接アドレッシングでは、常にメモ
リバンク1にアクセスすることが可能となる。
Therefore, in indirect addressing other than the indirect addressing specified by the effective register selection register 6, it is always possible to access the memory bank 1.

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

以上説明したように、本発明のマイクロコンピュータの
メモリアドレッシング方式は、データメモリを複数のメ
モリバンクに分割した場合のレジスタ間接アドレッシン
グ、特に異なるレジスタによる間接アドレッシングのう
ち、メモリバンクセレクトレジスタで選択したメモリバ
ンクに対して、アクセスが有効となる間接アドレッシン
グな選択する手段を有することにより、メモリバンクセ
レクトレジスタで選択したメモリバンクと他のメモリバ
ンク間、すなわち異なるメモリバンク間でのデータの交
換、転送、比較という操作を行う際に、メモリバンク指
定を頻繁に切り換える必要がないため、プログラムのス
テップ数及びデータ処理時間を共に減少させることがで
きるという効果がある。特に、上記データの操作を多数
回繰り返して行う際にその効果は著しい。
As explained above, the memory addressing method of the microcomputer of the present invention is based on register indirect addressing when data memory is divided into a plurality of memory banks, and in particular indirect addressing using different registers. By having indirect addressing selection means for enabling bank access, it is possible to exchange and transfer data between the memory bank selected by the memory bank select register and other memory banks, that is, between different memory banks. When performing a comparison operation, there is no need to frequently switch the memory bank designation, so there is an effect that both the number of program steps and the data processing time can be reduced. In particular, the effect is remarkable when the above data manipulation is repeated many times.

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

第1図は本発明の第一の実施例を示すマイクロコンピュ
ータのメモリアドレッシング方式のブロック図、第2図
は第1図における上位アドレス選択切換回路の構成図、
第3図は第1図においてアクセス対象となるデータメモ
リ構成国、第4図は第1図における間接アドレッシング
命令の命令コードを示す図、第5図及び第6図はそれぞ
れ第1図におけるメモリの7ドレツシングを説明するた
めの図、第7図は本発明の第二の実施例を説明するため
の上位アドレス選択切換回路の構成図である。 l・・・・・・HLレジスタ、2・・・・・・DEレジ
スタ、3・・・・・・BCレジスタ、4・・・・・・下
位アドレス選択切換回路、5・・・・・・メモリバンク
セレクトレジスタ、6・・・・・・有効レジスタ選択レ
ジスタ、7・・・・・・上位アドレス選択切換回路、8
・・・・・・一致判定回路、9゜10・・・・・・AN
Dゲート、11・・・・・・インバータ、12・・・・
・・ORゲート、13・・・・・・データメモリ。
FIG. 1 is a block diagram of a memory addressing system of a microcomputer showing a first embodiment of the present invention, FIG. 2 is a block diagram of the upper address selection switching circuit in FIG. 1,
3 shows the country of data memory configuration to be accessed in FIG. 1, FIG. 4 shows the instruction code of the indirect addressing instruction in FIG. 1, and FIGS. FIG. 7 is a block diagram of an upper address selection switching circuit for explaining a second embodiment of the present invention. l...HL register, 2...DE register, 3...BC register, 4...lower address selection switching circuit, 5... Memory bank select register, 6... Valid register selection register, 7... Upper address selection switching circuit, 8
・・・・・・Concordance judgment circuit, 9゜10・・・・・・AN
D gate, 11... Inverter, 12...
...OR gate, 13...data memory.

Claims (1)

【特許請求の範囲】[Claims] メモリ空間を分割した複数のメモリバンクと、前記メモ
リバンクのうち1つを指定するメモリバンクセレクトレ
ジスタと、前記メモリバンク内のメモリアドレスを間接
的に指定するアドレス指定手段とを有するマイクロコン
ピュータのメモリアドレッシング方式において、複数の
間接アドレッシング用レジスタと、前記複数の間接アド
レッシング用レジスタのうち1つを間接アドレッシング
命令の命令コードにより指定してメモリアドレスの一部
として出力する下位アドレス選択切換回路と、前記メモ
リバンクセレクトレジスタにより指定したメモリバンク
に対して有効となる間接アドレッシングを指定する有効
レジスタ選択レジスタと、前記有効レジスタ選択レジス
タの内容および前記間接アドレッシング命令の種類に応
じて前記メモリバンクセレクトレジスタの内容を上位メ
モリアドレスとして出力するか否かを切換える上位アド
レス選択切換回路とを有することを特徴とするマイクロ
コンピュータのメモリアドレッシング方式。
A memory for a microcomputer, comprising a plurality of memory banks into which a memory space is divided, a memory bank select register for specifying one of the memory banks, and addressing means for indirectly specifying a memory address within the memory bank. In the addressing method, a plurality of indirect addressing registers, a lower address selection switching circuit that specifies one of the plurality of indirect addressing registers by an instruction code of an indirect addressing instruction and outputs it as part of a memory address; an effective register selection register that specifies indirect addressing that is valid for the memory bank specified by the memory bank select register, and the contents of the memory bank select register according to the contents of the effective register selection register and the type of the indirect addressing instruction. 1. A memory addressing system for a microcomputer, comprising: an upper address selection switching circuit for switching whether or not to output an upper memory address as an upper memory address.
JP1325109A 1989-12-14 1989-12-14 Memory addressing method of microcomputer Expired - Lifetime JP2874230B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1325109A JP2874230B2 (en) 1989-12-14 1989-12-14 Memory addressing method of microcomputer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1325109A JP2874230B2 (en) 1989-12-14 1989-12-14 Memory addressing method of microcomputer

Publications (2)

Publication Number Publication Date
JPH03185536A true JPH03185536A (en) 1991-08-13
JP2874230B2 JP2874230B2 (en) 1999-03-24

Family

ID=18173217

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1325109A Expired - Lifetime JP2874230B2 (en) 1989-12-14 1989-12-14 Memory addressing method of microcomputer

Country Status (1)

Country Link
JP (1) JP2874230B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7352372B2 (en) 2004-10-22 2008-04-01 Seiko Epson Corporation Indirect addressing mode for display controller
US8184110B2 (en) 2007-11-05 2012-05-22 Seiko Epson Corporation Method and apparatus for indirect interface with enhanced programmable direct port
JP2019114303A (en) * 2019-04-18 2019-07-11 株式会社エルイーテック Control chip and game machine using the same

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7352372B2 (en) 2004-10-22 2008-04-01 Seiko Epson Corporation Indirect addressing mode for display controller
US8184110B2 (en) 2007-11-05 2012-05-22 Seiko Epson Corporation Method and apparatus for indirect interface with enhanced programmable direct port
JP2019114303A (en) * 2019-04-18 2019-07-11 株式会社エルイーテック Control chip and game machine using the same

Also Published As

Publication number Publication date
JP2874230B2 (en) 1999-03-24

Similar Documents

Publication Publication Date Title
US5751988A (en) Microcomputer with memory bank configuration and register bank configuration
US4737909A (en) Cache memory address apparatus
JPS60157646A (en) Memory bank switching device
US5956517A (en) Data driven information processor
US4318175A (en) Addressing means for random access memory system
JPH03185536A (en) Memory addressing system for microcomputer
JPS5814260A (en) Data transfer system
JPH07334420A (en) Extended memory control circuit
JP2687679B2 (en) Program development equipment
JP3449749B2 (en) Information processing device
JPH0244445A (en) Data processor
JPS62151955A (en) Memory addressing system
JPH03218546A (en) Address conversion mechanism
JPS63300628A (en) Programmable address decoder
JPS59106047A (en) Microcomputer
JPH0764858A (en) Cache memory
JPH04245556A (en) Instruction memory
JPH01219931A (en) Memory control method
JPH03211641A (en) Address designation method for memory device
JPS58122688A (en) Memory device
JPH03291740A (en) Memory controller
JPH0317758A (en) Memory mapping storage
JPH06337847A (en) Multiprocessor equipment
JPH04177439A (en) Single chip microcomputer
JPS598070A (en) Memory access circuit