JPH09282224A - Memory capacity recognizing method - Google Patents

Memory capacity recognizing method

Info

Publication number
JPH09282224A
JPH09282224A JP8094479A JP9447996A JPH09282224A JP H09282224 A JPH09282224 A JP H09282224A JP 8094479 A JP8094479 A JP 8094479A JP 9447996 A JP9447996 A JP 9447996A JP H09282224 A JPH09282224 A JP H09282224A
Authority
JP
Japan
Prior art keywords
memory
capacity
data
address
written
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.)
Withdrawn
Application number
JP8094479A
Other languages
Japanese (ja)
Inventor
Yutaka Nakamura
豊 中村
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.)
Casio Computer Co Ltd
Casio Electronics Manufacturing Co Ltd
Original Assignee
Casio Computer Co Ltd
Casio Electronics Manufacturing Co 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 Casio Computer Co Ltd, Casio Electronics Manufacturing Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP8094479A priority Critical patent/JPH09282224A/en
Publication of JPH09282224A publication Critical patent/JPH09282224A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

PROBLEM TO BE SOLVED: To check the capacity of an extended memory in a short time by a simple program by writing an integer value obtained by dividing maximum memory capacity by unit capacity, in the initial address of the memory and subtracting the numerical value set by write processing in the case of address update processing. SOLUTION: A CPU writes data in the top address of the extended memory and reads out these data so as to judge whether the extended memory is mounted or not (steps S1-S4). Next, data are written in the start address (steps S5 and S6), the capacity of the extended memory is added to this start address and defined as a new address, data are written in this address, read out layer and judged (steps S7 and S8) and this processing is repeated until the read data become '0'. Then, when the read data become '0' (step S8), the capacity of the extended memory is defined as a capacity for which '1' is added to the data at the top address (step S9).

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は増設メモリのメモリ
容量認識装置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a memory capacity recognition device for additional memory.

【0002】[0002]

【従来の技術】今日、パーソナルコンピュータ(以下、
単にパソコンという)が広く普及し、多くのアプリケー
ションプログラムが市販されている。特に、最近各種ア
プリケーションプログラムの容量が大きくなり、その使
用に大きなRAMメモリを必要とする。このため、パソ
コンを快適に駆動するべく、RAMメモリを増設する場
合が多い。かかる場合、シム(SIMM(シングル・イ
ンライン・メモリ・モジュール))は増設メモリとして
一般的に使用される。そして、この増設メモリをコンピ
ュータに搭載すると、搭載した増設メモリの容量チェッ
クを先ず行っている。
2. Description of the Related Art Today, personal computers (hereinafter referred to as
(Personally referred to as a personal computer) has become widespread, and many application programs are commercially available. In particular, recently, the capacity of various application programs has increased, and a large RAM memory is required for their use. For this reason, RAM memory is often added in order to comfortably drive the personal computer. In such cases, shims (SIMMs (single in-line memory modules)) are commonly used as additional memory. When this additional memory is mounted on a computer, the capacity of the mounted additional memory is checked first.

【0003】従来、この容量チェックには以下の2つの
方式が提案されている。 (イ)先ず、増設メモリの基板そのものに容量検出機構
が装備されている場合である。この場合、増設メモリに
設けられた切り換え機構(スイッチ)を切り換えること
により、増設メモリを本体基板に搭載することで接続す
る本体側のポートが増設メモリの容量を検出するもので
ある。 (ロ)一方、増設メモリの容量をソフトウエアによって
チェックする方式もある。例えば、図13はこの方式を
説明する図である。同図には16MB、8MB、4M
B、2MB、1MBの5種類の増設メモリを示してい
て、16MBの場合すべてのアドレス(A23〜A0)
を使用するが、8MBではアドレス(A23)を使用せ
ず、4MBではアドレス(A22、A23)を使用せ
ず、2MBではアドレス(A23〜A21)を使用せ
ず、1MBではアドレス(A23〜A20)を使用しな
いことを示す。
Conventionally, the following two methods have been proposed for this capacity check. (A) First, there is a case where the board itself of the additional memory is equipped with a capacity detection mechanism. In this case, by switching the switching mechanism (switch) provided in the additional memory, the additional memory is mounted on the main body board so that the connected port on the main body side detects the capacity of the additional memory. (B) On the other hand, there is also a method of checking the capacity of the additional memory by software. For example, FIG. 13 is a diagram for explaining this method. 16MB, 8MB, 4M in the figure
5 types of additional memory of B, 2MB, 1MB are shown, and in case of 16MB, all addresses (A23 to A0)
However, 8MB does not use the address (A23), 4MB does not use the addresses (A22, A23), 2MB does not use the addresses (A23 to A21), and 1MB does not use the addresses (A23 to A20). Indicates not to use.

【0004】尚、コンピュータ側ではいずれの容量のメ
モリが増設されたか分からない。このため、従来のメモ
リ容量認識方式は、1MB単位毎のスタートアドレス
「0 0000H」(A19〜A0)にある値Xを書き込み、
順次1MB〜16MBに対応するアドレスを読み出す。
すなわち、1MB目のアドレス「10 0000H」を読み出
し、このアドレス「10 0000H」に上記値Xが書き込まれ
ていれば1MBのメモリが増設されたものと判断する。
また、上記アドレスに値Xが書き込まれていなければ次
の2MB目のアドレス「20 0000H」の値を読み出し判断
する。そして、アドレス「20 0000H」の値もXでなけれ
ば、以下4MB、8MBの順に、順次アドレス「40 000
0H」、「80 0000H」に対して同様の処理を行い、増設メ
モリの容量をチェックする。
It should be noted that the computer does not know which capacity of memory has been added. Therefore, the conventional memory capacity recognition method writes the value X at the start address “0 0000H” (A19 to A0) for each 1 MB unit,
Addresses corresponding to 1 MB to 16 MB are sequentially read.
That is, the address "10 0000H" of the first MB is read, and if the value X is written in this address "10 0000H", it is determined that the 1 MB memory has been added.
If the value X is not written in the above address, the value of the next 2 MB address "20 0000H" is read and determined. If the value of the address "20 0000H" is also not X, then the address "40 000" is sequentially entered in the order of 4 MB and 8 MB.
Perform the same processing for "0H" and "80 0000H" to check the capacity of the expansion memory.

【0005】[0005]

【発明が解決しようとする課題】従来の増設メモリの容
量チェック方式では以下の問題がある。先ず(イ)の方
式では、増設メモリに容量検出機構が装備されているの
で増設メモリ自体が高価である。また、コンピュータ側
に容量を判断するポートが必要であり、スイッチを誤っ
て操作するとメモリ容量の正確なチェックができない。
The conventional capacity check method for the additional memory has the following problems. First, in the method (a), since the additional memory is equipped with the capacity detection mechanism, the additional memory itself is expensive. In addition, the computer needs a port for judging the capacity, and if the switch is operated by mistake, the memory capacity cannot be accurately checked.

【0006】一方、(ロ)の方式の場合、増設メモリが
1MBであればよいが、例えば2MB以上のメモリが増
設された場合、アドレス「20 0000H」、「40 0000H」、
「800000H」のデータを読み出した時、同じ値Xが読み
出される。したがって、結果的にアドレス「10 0000
H」、「20 0000H」、「40 0000H」、「80 0000H」に対
して、それぞれ異なる値の数値を書き込む必要がある。
このため、増設メモリの容量チェックに複雑なプログラ
ムが必要となる。また、容量チェックに長時間を要す
る。
On the other hand, in the case of the method (b), the expansion memory may be 1 MB. For example, when a memory of 2 MB or more is expanded, the addresses "20 0000H", "40 0000H",
When the data of "800000H" is read, the same value X is read. Therefore, as a result, the address "10 0000
It is necessary to write different values for "H", "20 0000H", "40 0000H", and "80 0000H".
Therefore, a complicated program is required to check the capacity of the additional memory. In addition, it takes a long time to check the capacity.

【0007】本発明は、こうした実情に鑑みなされたも
のであり、高価な増設メモリを使用することなく、簡単
なプログラムによって、短時間で増設メモリの容量チェ
ックを行うことができるメモリ容量認識装置を提供する
ことである。
The present invention has been made in view of the above circumstances, and provides a memory capacity recognizing device capable of checking the capacity of an additional memory in a short time with a simple program without using an expensive additional memory. Is to provide.

【0008】[0008]

【課題を解決するための手段】上記目的は本発明によれ
ば、所定容量のメモリを1単位とし、該単位容量の整数
倍の容量のメモリを任意に選択して増設可能な電子機器
のメモリ容量識別装置において、増設可能な最大メモリ
容量を前記単位容量で割り算した整数値に対応するデー
タを前記メモリの初期アドレスに書き込む書き込み処理
と、前記単位容量毎にアドレス更新するアドレス更新処
理と、該アドレス更新処理の際、前記書き込み処理によ
り設定された数値を減算する減算処理と、該減算処理に
よる減算値が所定値になる時、前記初期アドレスに残る
データを前記電子機器に増設されたメモリ容量と認識す
る認識処理とを行うメモリ容量認識方法を提供すること
により達成できる。
According to the present invention, a memory having a predetermined capacity is defined as one unit, and a memory having an integral multiple of the unit capacity can be arbitrarily selected and added to an electronic device memory. In the capacity identifying device, a writing process of writing data corresponding to an integer value obtained by dividing the maximum expandable memory capacity by the unit capacity into an initial address of the memory, an address updating process of updating an address for each unit capacity, At the time of the address update process, a subtraction process for subtracting the numerical value set by the write process, and when the subtracted value by the subtraction process reaches a predetermined value, data remaining at the initial address is added to the memory capacity of the electronic device. This can be achieved by providing a memory capacity recognition method that performs recognition processing for recognizing.

【0009】すなわち、容量認識を行おうとするメモリ
の初期アドレスに対し、増設可能な最大メモリ容量を前
記単位容量で割り算した整数値に対応する数値(デー
タ)を設定し、減算処理により単位容量毎にアドレス更
新する際−1づつ減算し、例えば上記減算値が“0”と
なるまで減算し、この時、例えば初期アドレスに最初に
設定された数値が維持されていれば、増設されたメモリ
容量は最大メモリ容量であると認識する。一方、最大メ
モリ容量より少ない容量のメモリが増設されたのであれ
ば、上記減算値が“0”になるまでに、初期アドレスに
は新たなデータが書き込まれ、その数値が増設されたメ
モリの容量となる。
That is, a numerical value (data) corresponding to an integer value obtained by dividing the maximum expandable memory capacity by the unit capacity is set for the initial address of the memory whose capacity is to be recognized, and the subtraction process is performed for each unit capacity. When the address is updated, the value is decremented by one, for example, until the decrement value becomes "0". At this time, for example, if the value initially set in the initial address is maintained, the expanded memory capacity Is recognized as the maximum memory capacity. On the other hand, if a memory with a capacity smaller than the maximum memory capacity is added, new data is written to the initial address by the time the subtraction value becomes "0", and that value is the capacity of the added memory. Becomes

【0010】例えば、前記書き込み処理により初期アド
レスに設定する数値が最大メモリ容量より1単位容量だ
け少なく、前記減算処理により前記数値が所定値になる
時の前記メモリ容量は初期アドレスに設定する数値に+
1した容量である構成とすることができる。この場合、
例えば最大メモリ容量を16MBとすれば、初期アドレ
スに設定する数値は15であり、前記減算処理により前
記数値が所定値(例えば“0”)になる時の前記メモリ
容量は初期アドレスに設定する数値に+1した容量であ
るので16MBであることが分かる。
For example, when the numerical value set in the initial address by the writing process is smaller than the maximum memory capacity by one unit capacity and the numerical value becomes a predetermined value by the subtraction process, the memory capacity is set to the numerical value set in the initial address. +
The capacity may be one. in this case,
For example, if the maximum memory capacity is 16 MB, the numerical value set to the initial address is 15, and the memory capacity when the numerical value becomes a predetermined value (for example, “0”) by the subtraction processing is the numerical value set to the initial address. It can be seen that the capacity is 16 MB since the capacity is +1.

【0011】[0011]

【発明の実施の形態】以下、本発明の実施形態の例を図
面を用いて詳細に説明する。図1は、一実施形態のメモ
リ容量認識装置のシステム構成図である。尚、本実施形
態のメモリ容量認識装置はパソコン等のコンピュータに
メモリを増設する場合の他、プリンタ装置やスキャナ
ー、携帯端末装置、等のRAMメモリの増設にも使用す
るものである。
BEST MODE FOR CARRYING OUT THE INVENTION Hereinafter, an example of an embodiment of the present invention will be described in detail with reference to the drawings. FIG. 1 is a system configuration diagram of a memory capacity recognition device of one embodiment. The memory capacity recognition device of the present embodiment is used not only when a memory is added to a computer such as a personal computer but also when a RAM memory is added to a printer device, a scanner, a mobile terminal device, or the like.

【0012】図1において、CPU1は本実施形態のメ
モリ容量チェック装置が適用される機器の中央処理装置
であり、ROM2に記憶するプログラムに従って機器の
処理制御を行う。また、ROM2には後述するメモリ容
量のチェックプログラムが登録されている。RAM3は
CPU1の制御処理の際発生するデータを格納し、また
ハードディスク等から読み出したシステムプログラムも
記憶する。増設メモリ4はRAM3の容量を増設するた
めに搭載されたメモリであり、所定のメモリ容量を有す
る。
In FIG. 1, a CPU 1 is a central processing unit of equipment to which the memory capacity checking apparatus of this embodiment is applied, and controls processing of equipment according to a program stored in a ROM 2. Also, a check program of a memory capacity described later is registered in the ROM 2. The RAM 3 stores the data generated during the control processing of the CPU 1, and also stores the system program read from the hard disk or the like. The expansion memory 4 is a memory mounted to expand the capacity of the RAM 3 and has a predetermined memory capacity.

【0013】図2はこの増設メモリ4の構成を示す図で
あり、5はメモリ容量16MBの増設メモリを示し、6
はメモリ容量8MBの増設メモリを示し、7はメモリ容
量4MBの増設メモリを示し、8はメモリ容量2MBの
増設メモリを示し、9はメモリ容量1MBの増設メモリ
を示す。尚、同図に示す*Aはアドレスデータが全て0
であるアドレス入力を意味する。 また、同図に示す増
設メモリ5〜9の中のいずれの容量のメモリが図1の増
設メモリ4として搭載されているかは後述するメモリの
容量チェックを行う前には分からない状態である。
FIG. 2 is a diagram showing the structure of the additional memory 4, 5 indicates an additional memory having a memory capacity of 16 MB, and 6
Indicates an additional memory with a memory capacity of 8 MB, 7 indicates an additional memory with a memory capacity of 4 MB, 8 indicates an additional memory with a memory capacity of 2 MB, and 9 indicates an additional memory with a memory capacity of 1 MB. In * A shown in the figure, all address data are 0.
Means inputting an address that is. Further, which of the additional memories 5 to 9 shown in FIG. 1 is installed as the additional memory 4 in FIG. 1 is unknown before the memory capacity check described later.

【0014】通常、増設メモリ4をコンピュータ、プリ
ンタ装置、等の機器に増設した場合、装置の電源をリセ
ットし、装置の初期設定処理を行う。この時、ROM2
に登録されたメモリ容量認識プログラムが機能する。図
3はこのプログラム処理を説明するフローチャートであ
り、このプログラムをCPU1が実行することで増設メ
モリ4の容量認識を行う。
Normally, when the additional memory 4 is added to a device such as a computer or a printer, the power of the device is reset and the initial setting process of the device is performed. At this time, ROM2
The memory capacity recognition program registered in function. FIG. 3 is a flow chart for explaining this program processing, and the CPU 1 executes this program to recognize the capacity of the additional memory 4.

【0015】先ず、増設メモリ4のトップアドレス「00
0000H」に、データ“AA”を書き込み(ステップ(以
下Sで示す)1)、その後、このトップアドレス「00 0
000H」に書き込んだデータを読み出すことにより、CP
U1は読み出したデータが“AA”か否か判断する(S
2)。この判断は、増設メモリ4が機器の本体基板に搭
載されているか否か判断するものであり、データ“A
A”が読み出せない時(S2がNO)、増設メモリ4は
未装着であると判断する。
First, the top address "00" of the expansion memory 4
The data "AA" is written in "0000H" (step (hereinafter referred to as S) 1), and then the top address "00 0
By reading the data written in "000H", CP
U1 determines whether the read data is "AA" (S
2). This judgment is to judge whether or not the additional memory 4 is mounted on the main body board of the device.
When "A" cannot be read (NO in S2), it is determined that the additional memory 4 is not installed.

【0016】一方、トップアドレスから読み出したデー
タが“AA”である時(S2がYES)、再度、CPU
1はトップアドレスに異なるデータ“55”を書き込み
(S3)、再度トップアドレスに書き込んだデータを読
み出し、このデータが“55”であるか否か判断する
(S4)。このように、トップアドレスに2度にわたっ
てデータを書き込み、そのデータを読み出して判断する
理由は、増設メモリ4の装着状態を確実に判断するため
である。したがって、この判断(S4)がNOであれ
ば、勿論増設メモリ4は未装着であると判断する。
On the other hand, when the data read from the top address is "AA" (YES in S2), the CPU
1 writes different data "55" to the top address (S3), reads the data written to the top address again, and determines whether this data is "55" (S4). In this way, the reason why data is written twice at the top address and the data is read and judged is to reliably judge the mounting state of the additional memory 4. Therefore, if this determination (S4) is NO, it is of course determined that the additional memory 4 is not installed.

【0017】一方、2回の増設メモリ4の装着のチェッ
クにより増設メモリ4が本体基板に搭載されていると判
断すると(S4がYES)、CPU1は次にスタートア
ドレス「00 0000H」(尚、この場合スタートアドレスと
上述のトップアドレスは同じである)にデータ“0F
(H)”(但し、Hは16進数であることを示す)を書
き込むべくデータをセットする(S5)。そして、上記
スタートアドレスにデータ“0F(H)”を書き込む
(S6)。
On the other hand, if it is determined that the additional memory 4 is mounted on the main body board by checking the mounting of the additional memory 4 twice (YES in S4), the CPU 1 next starts the start address "00 0000H" (this In this case, the start address is the same as the above-mentioned top address)
(H) "(where H indicates a hexadecimal number) is set to write data (S5), and data" 0F (H) "is written to the start address (S6).

【0018】次に、CPU1は上述のスタートアドレス
「00 0000H」に「10 0000H」を加えて新たなアドレスを
「10 0000H」とし、このアドレスにデータ“0E”を書
き込む(S7)。その後、このアドレス「10 0000H」の
データを読み出し、このデータが“0”であるか判断す
る(S8)。しかし、上述のようにこの時アドレス「10
0000H」から読み出されるデータは“0E”であり、最
初のこの判断(S8)はNOである。
Next, the CPU 1 adds "10 0000H" to the above-mentioned start address "00 0000H" to make a new address "10 0000H", and writes data "0E" to this address (S7). After that, the data of this address "10 0000H" is read and it is judged whether this data is "0" (S8). However, as described above, at this time the address "10
The data read from "0000H" is "0E", and the first judgment (S8) is NO.

【0019】したがって、CPU1は再度処理(S6、
S7)を実行し、新たなアドレス「20 0000H」にデータ
“0D”を書き込み、このアドレス「20 0000H」のデー
タを読み出し、このデータが“0”であるか判断する
(S8)。しかし、この判断もNOであり、以後CPU
1は更新したアドレスから読み出すデータが“0”にな
るまで上述の処理(S6〜S8)を繰り返し実行する。
そして、更新したアドレスから読み出すデータが“0”
になった時(S8がYES)、増設メモリ4の容量をト
ップアドレスのデータに1を加えた容量とする(S
9)。
Therefore, the CPU 1 performs the process again (S6,
S7) is executed, the data "0D" is written to the new address "20 0000H", the data at this address "20 0000H" is read, and it is determined whether this data is "0" (S8). However, this judgment is also NO, and after that, the CPU
1 repeats the above-described processing (S6 to S8) until the data read from the updated address becomes "0".
The data read from the updated address is "0"
When (S8 is YES), the capacity of the extension memory 4 is set to the capacity obtained by adding 1 to the data of the top address (S8).
9).

【0020】ここで、上述の処理(S5〜S9)を具体
的なメモリマップを用いて説明する。図4(a)は増設
メモリ4が16MBの場合を示し、同図(b)は増設メ
モリ4が8MBの場合を示し、同図(c)は増設メモリ
4が4MBの場合を示す。さらに、図5(a)は増設メ
モリ4が2MBの場合を示し、同図(b)は増設メモリ
4が1MBの場合を示す。 先ず、増設メモリ4が16
MBである場合について説明する。この場合、図4
(a)に示すように、最初のスタートアドレス「00 000
0H」にはデータ“0F”が書き込まれ(S5)、次のア
ドレス「10 0000H」にはデータ“0E”が書き込まれ
(S7)、以下順次アドレス「20 0000H」にデータ“0
D”、アドレス「30 0000H」にデータ“0C”、・・
・、アドレス「F0 0000H」にデータ“0”が書き込まれ
る。したがって、最後のアドレス「F0 0000H」にデータ
“0”を書き込んだ後、判断(S8)がYESとなり、
この時のスタートアドレスにはデータ“0F”、すなわ
ち10進数でデータ15が書き込まれており、増設メモ
リ4の容量は16(15+1)となる(S9)。したが
って、上述の処理により機器に搭載された増設メモリ4
は16MBのメモリであると容易に分かる。
Here, the above-described processing (S5 to S9) will be described using a specific memory map. 4A shows the case where the expansion memory 4 is 16 MB, FIG. 4B shows the case where the expansion memory 4 is 8 MB, and FIG. 4C shows the case where the expansion memory 4 is 4 MB. Further, FIG. 5A shows the case where the extension memory 4 is 2 MB, and FIG. 5B shows the case where the extension memory 4 is 1 MB. First, the expansion memory 4 has 16
The case of MB will be described. In this case, FIG.
As shown in (a), the first start address "00 000
Data "0F" is written to "0H" (S5), data "0E" is written to the next address "10 0000H" (S7), and data "0F" is sequentially written to address "20 0000H".
D ", data" 0C "at address" 30 0000H ", ...
・ Data “0” is written to the address “F0 0000H”. Therefore, after writing the data “0” to the last address “F0 0000H”, the judgment (S8) becomes YES,
At this time, the data "0F", that is, the data 15 in decimal notation, is written in the start address at this time, and the capacity of the additional memory 4 becomes 16 (15 + 1) (S9). Therefore, the additional memory 4 installed in the device by the above processing
Is easily found to be 16 MB of memory.

【0021】次に、増設メモリ4が8MBである場合に
ついて説明する。この場合にも最初のスタートアドレス
「00 0000H」には上述と同様のデータ“0F”が書き込
まれ(S5)、次のアドレス「10 0000H」にはデータ
“0E”が書き込まれ(S7)、以下順次アドレス「20
0000H」にはデータ“0D”が書き込まれ、アドレス
「30 0000H」にはデータ“0C”が書き込まれ、・・
・、アドレス「70 0000H」にはデータ“08”が書き込
まれる。しかし、8MBのメモリの場合、次に書き込む
アドレス「80 0000H」は先にデータ“0F”が書き込ま
れたスタートアドレス「00 0000H」である。また、次の
アドレス「90 0000H」はデータ“0E”が書き込まれア
ドレス「10 0000H」である。すなわち、8MBの増設メ
モリ6の場合、図2に示したようにアドレス(A23)
が接続されていないので、図4(b)の*1印で示すア
ドレス「80 0000H」〜「F0 0000H」にデータを供給する
と上述のスタートアドレス「00 0000H」〜アドレス「70
0000H」までに新たな減算データが書き込まれる。
Next, a case where the expansion memory 4 is 8 MB will be described. Also in this case, the same data "0F" as described above is written to the first start address "00 0000H" (S5), and the data "0E" is written to the next address "10 0000H" (S7). Sequential address "20
Data "0D" is written to "0000H", data "0C" is written to address "30 0000H", ...
・ Data “08” is written to the address “70 0000H”. However, in the case of the 8 MB memory, the address "80 0000H" to be written next is the start address "00 0000H" to which the data "0F" was previously written. Further, the next address "90 0000H" is the address "10 0000H" to which the data "0E" is written. That is, in the case of the 8 MB additional memory 6, the address (A23) as shown in FIG.
Is not connected, therefore, when data is supplied to the addresses "80 0000H" to "F0 0000H" indicated by * 1 in FIG. 4B, the above-mentioned start address "00 0000H" to address "70
New subtraction data is written by "0000H".

【0022】したがって、アドレス「00 0000H」(「80
0000H」にはデータ“07”が書き込まれ、アドレス
「10 0000H」(「90 0000H」)にはデータ“06”が書
き込まれ、以下順次新たなデータ“05”、“04”、
・・・、“0”が書き込まれる。したがって、最後のア
ドレス「70 0000H」(「F0 0000H」)にデータ“0”が
書き込まれた時、スタートアドレス「00 0000H」にはデ
ータ“07”、すなわち10進数でデータ7が書き込ま
れており、増設メモリ4の容量は8(7+1)となり
(S9)、増設メモリ4には8MBのメモリが増設され
たことが直ちに分かる。
Therefore, the address "00 0000H"("800000H"
The data “07” is written in “0000H”, the data “06” is written in the address “10 0000H” (“90 0000H”), and new data “05”, “04”,
..., "0" is written. Therefore, when the data “0” is written to the last address “70 0000H” (“F0 0000H”), the data “07”, that is, the data 7 in decimal number is written to the start address “00 0000H”. The capacity of the expansion memory 4 becomes 8 (7 + 1) (S9), and it is immediately understood that 8 MB of memory has been expanded in the expansion memory 4.

【0023】次に、増設メモリ4が4MBである場合に
ついて説明する。この場合にも8MBの場合と同様、最
初のスタートアドレス「00 0000H」〜4番目のアドレス
「300000H」まではデータ“0F”〜“0C”が順次書
き込まれるが、4MBのメモリの場合、次に書き込むア
ドレス「40 0000H」は先にデータ“0F”が書き込まれ
たスタートアドレス「00 0000H」に戻る。すなわち、4
MBの増設メモリ7の場合、図2に示したようにアドレ
ス(A23、A22)が接続されていないので、図4
(c)の*2印で示すアドレス「40 0000H」〜「70 000
0H」、「80 0000H」〜「B0 0000H」、「C0 0000H」〜
「F0 0000H」にデータを供給すると上述のスタートアド
レス「00 0000H」〜アドレス「30 0000H」までに新たな
減算データが繰り返し供給される。
Next, a case where the extension memory 4 is 4 MB will be described. In this case as well, similar to the case of 8 MB, data “0F” to “0C” are sequentially written from the first start address “00 0000H” to the fourth address “300000H”. The write address "40 0000H" is returned to the start address "00 0000H" where the data "0F" was previously written. That is, 4
In the case of the expanded memory 7 of the MB, the addresses (A23, A22) are not connected as shown in FIG.
Addresses indicated by * 2 in (c) "40 0000H" to "70 000"
0H "," 80 0000H "~" B0 0000H "," C0 0000H "~
When data is supplied to "F0 0000H", new subtracted data is repeatedly supplied to the above-mentioned start address "00 0000H" to address "30 0000H".

【0024】このため、「30 0000H」(「F0 0000H」)
にデータ“0”が書き込まれた時、スタートアドレス
「00 0000H」にはデータ“03”、すなわち10進数で
データ3が書き込まれており、増設メモリ4の容量は4
(3+1)MBのであることが容易に分かる。
Therefore, "30 0000H"("F00000H")
When the data “0” is written to the start address “00 0000H”, the data “03”, that is, the data 3 is written in decimal, and the capacity of the extension memory 4 is 4
It is easy to see that it is (3 + 1) MB.

【0025】次に、増設メモリ4が2MBである場合に
ついて説明する。この例は上述のように図5(a)に示
すが、更に具体的に図6〜図9にメモリ内容の変化も含
めて示す。先ず、図6(a)は、最初のスタートアドレ
ス「00 0000H」にデータ“0F”を書き込むことを示
し、同図(b)は次のアドレス「100000H」にデータ
“0E”を書き込むことを示す。メモリ容量が2MBの
場合、次にデータ“0D”を書き込むアドレスは「20 0
000H」ではなく、先にデータ“0F”が書き込まれたス
タートアドレス「00 0000H」である。このため、次のア
ドレス(スタートアドレス)「00 0000H」(30 0000
H」)にはデータ“0D”が書き込まれる。すなわち、
ここでスタートアドレス「00 0000H」のデータは“0
F”から“0D”に書き変わる(更新される)(図6
(c)参照)。
Next, a case where the expansion memory 4 is 2 MB will be described. This example is shown in FIG. 5 (a) as described above, but more specifically in FIG. 6 to FIG. 9 including the change of the memory contents. First, FIG. 6A shows that data “0F” is written to the first start address “00 0000H”, and FIG. 6B shows that data “0E” is written to the next address “100000H”. . When the memory capacity is 2MB, the address to write the next data "0D" is "20 0
It is not 000H ”but the start address“ 00 0000H ”to which the data“ 0F ”has been previously written. Therefore, the next address (start address) "00 0000H" (30 0000H
The data “0D” is written in “H”). That is,
Here, the data of the start address "00 0000H" is "0
Rewriting (updated) from "F" to "0D" (Fig. 6)
(C)).

【0026】続いて、次のアドレス「30 0000H」へのデ
ータ書き込みについても、データ“0C”を書き込むア
ドレスは「30 0000H」ではなく、先にデータ“0E”が
書き込まれたアドレス「10 0000H」である。したがっ
て、この場合にも、次のアドレス「10 0000H」(30 000
0H」)にはデータ“0C”が書き込まれ、アドレス「10
0000H」のデータは“0E”から“0C”に書き変わる
(更新される)(図6(d)参照)。
Subsequently, also in the data writing to the next address "30 0000H", the address for writing the data "0C" is not "30 0000H", but the address "10 0000H" where the data "0E" was previously written. Is. Therefore, in this case as well, the next address "10 0000H" (30 000H
Data “0C” is written to 0H ”) and the address“ 10C ”is written.
The data of "0000H" is rewritten (updated) from "0E" to "0C" (see FIG. 6D).

【0027】以下同様にして、2MB毎にデータが順次
更新され、スタートアドレス「00 0000H」及び次のアド
レス「10 0000H」には、次にデータ“0B”と“0A”
が書き込まれる(図7(b)参照)。さらに、スタート
アドレス「00 0000H」と次のアドレス「10 0000H」のデ
ータは、データ“09”と“08”(図7(d)参照)
→データ“07”と“06”(図8(b)参照)→デー
タ“05”と“04”(図8(d)参照)→データ“0
3”と“02”(図9(b)参照)→データ“01”と
“0”(図9(d)参照)の如く順次更新され、データ
“0”が書き込まれた時、スタートアドレス「00 0000
H」のデータは“01”まで更新されている。したがっ
て、増設メモリ4には容量2(1+1)MBのメモリが
搭載されたことが分かる。
Similarly, data is sequentially updated every 2 MB, and data "0B" and "0A" are next stored at the start address "00 0000H" and the next address "10 0000H".
Is written (see FIG. 7B). Further, the data of the start address "00 0000H" and the next address "10 0000H" are the data "09" and "08" (see FIG. 7D).
→ Data “07” and “06” (see FIG. 8B) → Data “05” and “04” (see FIG. 8D) → Data “0”
3 "and" 02 "(see FIG. 9 (b)) → data" 01 "and" 0 "(see FIG. 9 (d)) are sequentially updated, and when the data" 0 "is written, the start address" 00 0000
The data of "H" has been updated to "01". Therefore, it can be seen that the additional memory 4 has a capacity of 2 (1 + 1) MB.

【0028】尚、増設メモリ4が1MBである場合に
は、図5(b)に示すようにデータ“0”が書き込まれ
た時、スタートアドレス「00 0000H」のデータは“0”
であり、増設メモリ4には容量1MBのメモリが搭載さ
れたことが分かる。
If the extension memory 4 is 1 MB and the data "0" is written as shown in FIG. 5B, the data of the start address "00 0000H" is "0".
Therefore, it can be seen that the additional memory 4 is equipped with a memory having a capacity of 1 MB.

【0029】また、上述の実施形態の例ではスタートア
ドレス「00 0000H」にデータ“0F”(10進数で15
を示すデータ)を先ず書き込んだが、最初に書き込むデ
ータはこのデータに限るものではない。
Further, in the example of the above-mentioned embodiment, the data "0F" (15 decimal number) is assigned to the start address "00 0000H".
(Data indicating that) is written first, but the data to be written first is not limited to this data.

【0030】図10はその一例を示すフローチャートで
ある。同図において、各処理及び判断はステップSTの
記号で示すが、前述の図3に示すフローチャートの各ス
テップSに対応するものである。但し、ST5の処理に
おいてスタートアドレスにデータ“10”(10進数で
16を示すデータ)を書き込む処理が異なり、またST
8の判断において減算データが“1”であるか否か判断
する点が異なる。
FIG. 10 is a flow chart showing an example thereof. In the figure, each process and judgment is indicated by a symbol of step ST, but corresponds to each step S of the flowchart shown in FIG. However, in the process of ST5, the process of writing data “10” (data indicating 16 in decimal) to the start address is different, and ST
8 is different in that it is determined whether or not the subtraction data is "1".

【0031】すなわち、増設メモリ4の装着の有無を判
断(ST1〜4)した後の処理において、データを順次
−1し(ST6〜8)、データが“1”になった時のス
タートアドレスのデータを確認することで、スタートア
ドレスのデータそのものがメモリ容量を示すことにな
る。
That is, in the processing after determining whether or not the additional memory 4 is mounted (ST1 to 4), the data is sequentially decremented by 1 (ST6 to 8), and the start address when the data becomes "1" is set. By checking the data, the start address data itself indicates the memory capacity.

【0032】例えば、図11(a)は増設メモリ4が1
6MBの場合を示し、同図(b)は増設メモリ4が8M
Bの場合を示し、同図(c)は増設メモリ4が4MBの
場合を示す。さらに、図12(a)は増設メモリ4が2
MBの場合を示し、同図(b)は増設メモリ4が1MB
の場合を示す。両図に示すように、いずれの容量のメモ
リの場合においても、データ“1”が書き込まれた時の
スタートアドレス「000000H」のデータは、増設メモリ
4のメモリ容量そのものになっている。
For example, in FIG. 11A, the extension memory 4 has one
The case of 6 MB is shown, and in the figure (b), the expansion memory 4 has 8 M
The case of B is shown, and FIG. 7C shows the case where the extension memory 4 is 4 MB. Further, in FIG.
In the case of MB, the expansion memory 4 is 1 MB in the same figure (b).
The case of is shown. As shown in both figures, the data of the start address “000000H” when the data “1” is written is the memory capacity itself of the additional memory 4 in any capacity memory.

【0033】また、本発明はスタートアドレスにデータ
“0F”や“10”を入力する場合に限るものではな
い。
The present invention is not limited to the case of inputting data "0F" or "10" to the start address.

【0034】[0034]

【発明の効果】以上説明したように、本発明によればス
タートアドレスに書き込まれたデータはチェックする増
設メモリのメモリ容量に自動的に書き換えられ、増設さ
れたメモリ容量を極めて簡単に知ることができる。
As described above, according to the present invention, the data written at the start address is automatically rewritten to the memory capacity of the expanded memory to be checked, and the expanded memory capacity can be known very easily. it can.

【0035】また、本発明の処理プログラムは、増設可
能なメモリ容量の最大値に対応する数値をスタートアド
レスに書き込み、以後この数値を減算することで自動的
に更新されるスタートアドレスのデータを最終的に読む
ことでメモリ容量の認識を行うことができ、高価な増設
メモリを使用することなく装置全体のコストダウンを図
ることができる。
Further, the processing program of the present invention writes the numerical value corresponding to the maximum value of the expandable memory capacity to the start address, and thereafter subtracts this numerical value to automatically update the data of the start address to the final value. It is possible to recognize the memory capacity by reading the information, and it is possible to reduce the cost of the entire apparatus without using an expensive additional memory.

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

【図1】一実施形態のメモリ容量チェック装置のシステ
ム構成図である。
FIG. 1 is a system configuration diagram of a memory capacity check device according to an embodiment.

【図2】増設メモリの構成を示す図である。FIG. 2 is a diagram showing a configuration of an additional memory.

【図3】一実施形態のメモリ容量チェック装置のプログ
ラム処理を説明するフローチャートである。
FIG. 3 is a flowchart illustrating a program process of the memory capacity check device according to the embodiment.

【図4】(a)は増設メモリが16MBの場合の例を示
す。(b)は増設メモリが8MBの場合の例を示す。
(c)は増設メモリが4MBの場合の例を示す。
FIG. 4A shows an example in which the expansion memory is 16 MB. (B) shows an example when the extension memory is 8 MB.
(C) shows an example when the expansion memory is 4 MB.

【図5】(a)は増設メモリが2MBの場合の例を示
す。(b)は増設メモリが1MBの場合の例を示す。
FIG. 5A shows an example in which the extension memory is 2 MB. (B) shows an example when the expansion memory is 1 MB.

【図6】増設メモリが2MBの場合の例を示す。FIG. 6 shows an example when the extension memory is 2 MB.

【図7】増設メモリが2MBの場合の例を示す。FIG. 7 shows an example when the extension memory is 2 MB.

【図8】増設メモリが2MBの場合の例を示す。FIG. 8 shows an example when the extension memory is 2 MB.

【図9】増設メモリが2MBの場合の例を示す。FIG. 9 shows an example when the extension memory is 2 MB.

【図10】メモリ容量チェック装置のプログラム処理を
説明する他のフローチャートである。
FIG. 10 is another flowchart illustrating the program processing of the memory capacity check device.

【図11】(a)は増設メモリが16MBの場合の例を
示す。(b)は増設メモリが8MBの場合の例を示す。
(c)は増設メモリが4MBの場合の例を示す。
FIG. 11A shows an example in which the expansion memory is 16 MB. (B) shows an example when the extension memory is 8 MB.
(C) shows an example when the expansion memory is 4 MB.

【図12】(a)は増設メモリが2MBの場合の例を示
す。(b)は増設メモリが1MBの場合の例を示す。
FIG. 12A shows an example in which the extension memory is 2 MB. (B) shows an example when the expansion memory is 1 MB.

【図13】従来のメモリ容量チェック装置の処理を説明
する図である。
FIG. 13 is a diagram illustrating a process of a conventional memory capacity check device.

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

1 CPU 2 ROM 3 RAM 4 増設メモリ 5 増設メモリ(メモリ容量が16MBの増設メモリ) 6 増設メモリ(メモリ容量が8MBの増設メモリ) 7 増設メモリ(メモリ容量が4MBの増設メモリ) 8 増設メモリ(メモリ容量が2MBの増設メモリ) 9 増設メモリ(メモリ容量が1MBの増設メモリ) 1 CPU 2 ROM 3 RAM 4 Expansion memory 5 Expansion memory (expansion memory with 16MB memory capacity) 6 Expansion memory (expansion memory with 8MB memory capacity) 7 Expansion memory (expansion memory with 4MB memory capacity) 8 Expansion memory (memory) Expansion memory with a capacity of 2MB) 9 Expansion memory (expansion memory with a memory capacity of 1MB)

【手続補正書】[Procedure amendment]

【提出日】平成8年6月18日[Submission date] June 18, 1996

【手続補正1】[Procedure amendment 1]

【補正対象書類名】図面[Document name to be amended] Drawing

【補正対象項目名】図12[Correction target item name] FIG.

【補正方法】変更[Correction method] Change

【補正内容】[Correction contents]

【図12】 FIG.

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】 所定容量のメモリを1単位とし、該単位
容量の整数倍の容量のメモリを任意に選択して増設可能
な電子機器のメモリ容量識別装置において、 増設可能な最大メモリ容量を前記単位容量で割り算した
整数値に対応するデータを前記メモリの初期アドレスに
書き込む書き込み処理と、 前記単位容量毎にアドレス更新するアドレス更新処理
と、 該アドレス更新処理の際、前記書き込み処理により設定
された数値を、減算する減算処理と、 該減算処理による減算値が所定値になる時、前記初期ア
ドレスに残るデータを前記電子機器に増設されたメモリ
容量と認識する認識処理とを行うことを特徴とするメモ
リ容量認識方法。
1. A memory capacity identification device for an electronic device, wherein a memory having a predetermined capacity is defined as one unit, and a memory having an integral multiple of the unit capacity can be arbitrarily selected to be expanded. A writing process of writing data corresponding to an integer value divided by a unit capacity to an initial address of the memory, an address updating process of updating an address for each unit capacity, and a writing process set by the writing process during the address updating process. A subtraction process for subtracting a numerical value, and a recognition process for recognizing the data remaining at the initial address as the memory capacity added to the electronic device when the subtraction value obtained by the subtraction process reaches a predetermined value. Memory capacity recognition method.
【請求項2】 前記書き込み処理により初期アドレスに
設定するデータは、増設可能な最大メモリ容量より1単
位容量だけ少ないデータであり、前記減算値が所定値に
なる時の初期アドレスに残るデータに+1したデータが
増設したメモリの容量であることを特徴とする請求項1
記載のメモリ容量認識方法。
2. The data set to the initial address by the writing process is one unit capacity smaller than the maximum expandable memory capacity, and +1 is added to the data remaining at the initial address when the subtraction value becomes a predetermined value. The data that has been stored is the capacity of the expanded memory.
The memory capacity recognition method described.
JP8094479A 1996-04-16 1996-04-16 Memory capacity recognizing method Withdrawn JPH09282224A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP8094479A JPH09282224A (en) 1996-04-16 1996-04-16 Memory capacity recognizing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP8094479A JPH09282224A (en) 1996-04-16 1996-04-16 Memory capacity recognizing method

Publications (1)

Publication Number Publication Date
JPH09282224A true JPH09282224A (en) 1997-10-31

Family

ID=14111423

Family Applications (1)

Application Number Title Priority Date Filing Date
JP8094479A Withdrawn JPH09282224A (en) 1996-04-16 1996-04-16 Memory capacity recognizing method

Country Status (1)

Country Link
JP (1) JPH09282224A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113297014A (en) * 2020-02-22 2021-08-24 北京希姆计算科技有限公司 Method and device for identifying capacity of memory to be tested, electronic equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113297014A (en) * 2020-02-22 2021-08-24 北京希姆计算科技有限公司 Method and device for identifying capacity of memory to be tested, electronic equipment and storage medium
CN113297014B (en) * 2020-02-22 2024-03-08 广州希姆半导体科技有限公司 Identification method and device for memory capacity to be tested, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
US7325236B2 (en) Electronic device, apparatus using the same, and method of reading out data
JPH09282224A (en) Memory capacity recognizing method
JPH10198463A (en) Automatic operating condition setting circuit
CN111176738B (en) Display card display method and system of UEFI mode and related components thereof
JPS5998362A (en) Discriminating device of memory cassette
JPH1145206A (en) Electronic device, memory starting method, and record medium recording memory starting program
US20060294283A1 (en) Universal Serial Bus Device
JPH0776895B2 (en) Small portable devices
JP3128817B2 (en) Memory type determination method
JP2858816B2 (en) Initial setting method of EEPROM
JP3202796B2 (en) Output device
JP3019346B2 (en) Data processing device
JP2914538B2 (en) Programmable controller
JP2978008B2 (en) Memory management method
JP2664168B2 (en) Starting method of information processing device
JP2003281487A (en) Portable electronic device, and method for providing application and data area in memory
JPH07271553A (en) Memory control method for fifo memory device
US20020078398A1 (en) Data processing apparatus and data processing method
JP2000200213A (en) Microcomputer, and system and method for rewriting data
JPH05342167A (en) Electronic notebook system
CN118193941A (en) Address de-duplication method, device, HMI device and storage medium
JP2003203211A (en) Portable electronic device
JPH03256128A (en) Method for loading program
JPH11250204A (en) Ic card
JPH02257282A (en) Table preparation processor

Legal Events

Date Code Title Description
A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20030701