JPH0962502A - Information processor - Google Patents

Information processor

Info

Publication number
JPH0962502A
JPH0962502A JP21317495A JP21317495A JPH0962502A JP H0962502 A JPH0962502 A JP H0962502A JP 21317495 A JP21317495 A JP 21317495A JP 21317495 A JP21317495 A JP 21317495A JP H0962502 A JPH0962502 A JP H0962502A
Authority
JP
Japan
Prior art keywords
program
memory
function
calling address
read
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP21317495A
Other languages
Japanese (ja)
Inventor
Takuo Oguchi
琢夫 小口
Yasuhiro Shima
康弘 嶋
Kenji Saito
賢爾 斉藤
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.)
Hitachi Software Engineering Co Ltd
Hitachi Ltd
Original Assignee
Hitachi Software Engineering Co Ltd
Hitachi 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 Hitachi Software Engineering Co Ltd, Hitachi Ltd filed Critical Hitachi Software Engineering Co Ltd
Priority to JP21317495A priority Critical patent/JPH0962502A/en
Publication of JPH0962502A publication Critical patent/JPH0962502A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide an information processor with which an additionally unwritable program stored in a mask ROM or the like and integrated in an integral system can be exchanged. SOLUTION: This information processor in which a program is stored in a read only memory and the function of program is executed by an executing means by reading out this program, is provided with a first storage means for storing the calling address of program made into a table, changing means for changing the calling address of the program, and second storage means for storing the program corresponding to the calling address changed by the changing means. Thus, when performing the defective correction or function addition of program, a program to be exchanged relating to the program to be a correcting object can be exchanged without affecting the relevant program to be exchanged.

Description

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

【0001】[0001]

【産業上の利用分野】本発明は、情報処理装置に関する
ものであり、特に携帯可能な小型の情報処理装置に予め
組み込まれているソフトウェアプログラムを入れ換える
装置に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an information processing apparatus, and more particularly, to an apparatus for replacing a software program installed in advance in a small portable information processing apparatus.

【0002】[0002]

【従来の技術】従来、読み出し専用メモリに記憶されて
いるプログラムに支障が生じたり、プログラムの機能を
拡張したいといった場合に、情報処理装置のプログラム
を入れ換えるためには、プログラムが組み込まれている
読み出し専用メモリを全て入れ換えていた。
2. Description of the Related Art Conventionally, in the case where a program stored in a read-only memory is hindered or the function of the program is desired to be expanded, in order to replace the program of the information processing device, the read-in program is incorporated. I replaced all the dedicated memory.

【0003】もしくは、読み出し専用メモリではなく、
書き換え可能なメモリ上にプログラムを記憶させてい
た。
Alternatively, instead of a read-only memory,
The program was stored in a rewritable memory.

【0004】[0004]

【発明が解決しようとする課題】読み出し専用メモリに
プログラムが組み込まれている場合に、そのメモリを入
れ換えるには、メモリの装着が自由に出来る装置が必要
となる。このため、 (1)ハードウェアのメモリ入れ換え機構の装着コスト
の上昇 (2)マスクROMメモリの再作成によるコストの上昇 (3)ハードウェアのメモリ入れ換え機構により装置の
小型化ができなくなる といった問題が生じる。
When a program is incorporated in the read-only memory, a device capable of freely mounting the memory is required to replace the memory. For this reason, (1) an increase in the mounting cost of the hardware memory replacement mechanism (2) an increase in the cost due to the re-creation of the mask ROM memory (3) a problem that the device cannot be downsized due to the hardware memory replacement mechanism Occurs.

【0005】また、メモリ自体を読み出し専用メモリで
はなく、書き換え可能なメモリにすると、マスクROM
に代表される読み出し専用メモリに比べて、 (1)フラッシュメモリやSRAM使用によるコストの
上昇 (2)フラッシュメモリやSRAMによる電力消費の上
昇 といった問題が生じる。
If the memory itself is not a read-only memory but a rewritable memory, the mask ROM
Compared with the read-only memory represented by (1), there is a problem that (1) the cost is increased due to the use of the flash memory or SRAM, and (2) the power consumption is increased due to the flash memory or SRAM.

【0006】本発明の目的は、簡易で安価な構成で上述
の問題点を解決する情報処理装置を提供することにあ
る。
An object of the present invention is to provide an information processing apparatus which solves the above problems with a simple and inexpensive structure.

【0007】[0007]

【課題を解決するための手段】上記目的を達成するため
に、本発明は、読み出し専用メモリにプログラムが記憶
されており、実行手段により前記プログラムを読み出し
て前記プログラムの機能を実行する情報処理装置におい
て、テーブル化された前記プログラムの呼出しアドレス
を記憶する第1の記憶手段と、前記プログラムの呼出し
アドレスを変更する変更手段と、前記変更手段により変
更された呼出しアドレスに対応するプログラムを記憶す
る第2の記憶手段とを有し、前記変更手段により呼出し
アドレスが変更された場合には、前記読み出し専用メモ
リに記憶されているプログラムではなく、第2の記憶手
段に記憶されているプログラムの機能を実行手段が実行
することを特徴とする情報処理装置を提供する。
In order to achieve the above object, the present invention has an information processing apparatus in which a program is stored in a read-only memory, and the execution unit reads the program to execute the function of the program. In a first storage means for storing a calling address of the program tabulated, a changing means for changing the calling address of the program, and a program for storing a program corresponding to the calling address changed by the changing means. When the calling address is changed by the changing unit, the function of the program stored in the second storing unit is not the program stored in the read-only memory. Provided is an information processing device characterized by being executed by an executing means.

【0008】[0008]

【作用】上述した構成により、本発明では、マスクRO
M等に格納された追加書き込み不可の装置(以下、組み
込み型システムという。)にソフトウェアプログラムを
格納した場合、追加書き込み不可のプログラム(被プロ
グラム)の変更を他のプログラムに影響を与えずに別の
プログラムに入れ換えることができるので、プログラム
の不良修正や機能追加を行う場合に修正対象となるプロ
グラムに関連するプログラムに影響を与えずに当該被プ
ログラムを入れ換えることができる。
With the above-mentioned structure, the mask RO is used in the present invention.
When a software program is stored in an additional write-disabled device (hereinafter referred to as an embedded system) stored in M or the like, the change of the additional write-disabled program (program to be programmed) is performed separately without affecting other programs. Since the program can be replaced with the above program, the program to be corrected can be replaced without affecting the program related to the program to be corrected when the defect of the program is corrected or the function is added.

【0009】また、組込み型システム装置に統合された
ソフトウェアシステムに対して被プログラムを別の機能
を持つプログラムに入れ換えて実行することもできるの
で、幾つかの機能を持つ組込み型システムを一つの本装
置で複数種類作ることができる。
Further, since the program to be executed can be replaced with a program having another function for the software system integrated in the embedded system device, the embedded system having several functions can be executed in one book. You can make multiple types with the device.

【0010】さらに、組込み型システム装置に任意の時
点で被プログラムを幾つかの別の機能を持つプログラム
へ取り替えながら実行できるので、一つの本装置で複数
の機能が任意の時点で実行できる。
Further, since the program to be executed can be executed while being replaced by the program having some other function in the embedded system device at any time, a plurality of functions can be executed at any time in one device.

【0011】これにより、情報処理装置に予めソフトウ
ェアプログラムを読み出し専用メモリに組み込んでしま
った場合であっても、比較的低いコストでそのプログラ
ムを別の任意のプログラムに入れ換えることが出来る。
As a result, even if the software program is incorporated into the read-only memory in advance in the information processing apparatus, the program can be replaced with another arbitrary program at a relatively low cost.

【0012】[0012]

【実施例】図1は、本発明にかかる情報処理装置であ
り、1はマイクロプロセサ、2はマイクロプロセサ1と
統合されたプログラムの入っている読み出し専用メモリ
(マスクROM)、3は書き込み可能なメモリ(DRA
M)、4、5はそれぞれ入れ換えるプログラムの入って
いるフラッシュEEPROM、SRAMである。プログ
ラムの入っている記憶装置は、本装置に直接接続される
だけでなく、通信機能を用いることにより、Modem
Unit7を介して別の装置(サーバホスト等)6に
記録させておくこともできる。さらに、マイクロプロセ
サと周辺装置を制御するASIC8がある。
DESCRIPTION OF THE PREFERRED EMBODIMENTS FIG. 1 shows an information processing apparatus according to the present invention, in which 1 is a microprocessor, 2 is a read-only memory (mask ROM) containing a program integrated with the microprocessor 1, and 3 is writable. Memory (DRA
M), 4 and 5 are a flash EEPROM and an SRAM containing programs to be replaced. The storage device containing the program is not only directly connected to this device, but also by using the communication function, the Modem
It is also possible to record in another device (server host or the like) 6 via the Unit 7. In addition, there is an ASIC 8 that controls the microprocessor and peripherals.

【0013】プログラムの入れ換えにはタスク/プロセ
スと言ったプログラム群を構成する一つの大きな単位と
関数/サブルーチンと言ったプログラムを構成する最少
単位がある。ここでは、関数/サブルーチンと言ったプ
ログラムを構成する最少単位を対象としてプログラムの
入れ換えを行う。これにより、入れ換えるプログラムの
占有する書き換え可能メモリ上の容量を少なくする。
In order to exchange programs, there is one large unit which constitutes a program group called a task / process and the minimum unit which constitutes a program called a function / subroutine. Here, the programs are exchanged for a minimum unit that constitutes a program such as a function / subroutine. This reduces the capacity of the rewritable memory occupied by the program to be replaced.

【0014】プログラムの入れ換えには、図2に示すよ
うに入れ換えるプログラムにジャンプする為に必要な関
数のポインタを示すアドレステーブルを作成する。これ
をスタブテーブルと呼ぶ。
To replace the programs, an address table showing the pointers of the functions required to jump to the program to be replaced is created as shown in FIG. This is called a stub table.

【0015】高級言語(本実施例ではC言語を用いる)
は、複数の関数の集合になっている。この関数呼び出し
を行う時の実際のアドレスと実際の関数のアドレスをス
タブテーブルに登録する事により、実際の関数のアドレ
スが異なる関数のアドレスにすることができる。このた
め、関数の呼び出しは全て関数へのポインタを用いた関
数呼び出しとなるようにする。
High-level language (C language is used in this embodiment)
Is a set of functions. By registering the actual address when calling this function and the actual address of the function in the stub table, the address of the actual function can be made different. For this reason, all function calls should be made using function pointers.

【0016】関数呼び出しの部分にスタブを埋め込むた
めに、既存のプログラムの修正や修正量を出来るだけ少
なくする必要がある。そのため、スタブを埋め込む場合
とそうでない場合を出来るだけ等価にする為に、C言語
のプリプロセサによるマクロ展開を用いる。マクロはM
AKE_STUBが定義されている時には関数呼び出し
にスタブを埋め込む。すなわち、MAKE_STUBを
定義してコンパイルするとマクロを用いて宣言/定義さ
れた関数はスタブテーブルを介して呼び出されるように
する。
In order to embed the stub in the function call portion, it is necessary to modify the existing program and reduce the modification amount as much as possible. Therefore, in order to make the case of embedding a stub and the case of not embedding it as similar as possible, macro expansion by a C preprocessor is used. Macro is M
When AKE_STUB is defined, the stub is embedded in the function call. That is, when MAKE_STUB is defined and compiled, a function declared / defined using a macro is called via the stub table.

【0017】マクロの定義は以下のように3通りある。There are three macro definitions as follows.

【0018】 (1)#ifdef MAKE_STUB #define DEC(x) x##_DEF #else #define DEC(x) x #endif (2)#ifdef MAKE_STUB #define PROTO(x) (*x) #else #define PROTO(x) x #endif (3)#ifdef MAKE_STUB #define PROTOTYPE extern #else #define PROTOTYPE #endif スタブが埋め込まれた全てのプログラムはそのプログラ
ムが呼び出す被プログラムのアドレス解決時(リンケー
ジ時)、呼び出す被プログラムのポインタのあるアドレ
スを知ることで全て解決出来る。
(1) #ifdef MAKE_STUB #define DEC (x) x #### _ DEF #else #define DEC (x) x #endif (2) #ifdef MAKE_STUB #define PROX # * define (*) PROTO (x) x #endif (3) #ifdef MAKE_STUB #define PROTOTYPE extern #else #define PROTOTYPE #endif All programs with embedded stubs are called when the address of the program called by that program is resolved (linkage) All can be solved by knowing the address of the program pointer.

【0019】呼び出す関数を別のプログラムと置き換え
るには、任意の時点でプログラムを記憶装置から書き換
え可能なメモリ上にローディングし、スタブテーブルに
ローディングしたアドレスに書き換えることにより行え
る。
The function to be called can be replaced with another program by loading the program from the storage device into a rewritable memory at any time and rewriting it to the address loaded in the stub table.

【0020】スタブテーブルには、入れ換えるプログラ
ムが以下の方法でローディングされる。
A replacement program is loaded in the stub table by the following method.

【0021】(1)システムの開始時に記憶装置1、2
にある記憶装置からプログラムをシステムで書き換え可
能領域の固定アドレスにローディングする(入れ換えプ
ログラムA)。
(1) Storage devices 1 and 2 at the start of the system
The program is loaded into the fixed address of the rewritable area by the system from the storage device at (replacement program A).

【0022】(2)任意の時点で、記憶装置3から通信
装置等を用いて書き換え可能領域の固定アドレスにロー
ディングする(入れ換えプログラムB)。
(2) At an arbitrary time point, a fixed address in the rewritable area is loaded from the storage device 3 using a communication device or the like (replacement program B).

【0023】(3)記憶装置2又は3に書き込まれてい
るプログラムを直接使用する(入れ換えプログラム
C)。
(3) The program written in the storage device 2 or 3 is directly used (replacement program C).

【0024】また、置き換えるプログラムもこのスタブ
テーブルを用いてアドレス解決することにより、置き換
えるプログラムの中からスタブテーブルに登録されてい
る関数を呼び出すことが出来る。
Further, the replacement program can also call the function registered in the stub table from the replacement program by resolving the address using this stub table.

【0025】[0025]

【発明の効果】本発明により、プログラムの不良修正や
機能追加を行う場合に修正対象となるプログラムに関連
する被プログラムに影響を与えずに当該被プログラムを
入れ換えることができる。
According to the present invention, when a defect of a program is corrected or a function is added, the program can be replaced without affecting the program to be associated with the program to be corrected.

【0026】また、本発明の組込み型システムは安価な
マスクROMを使用し、装置に直接装着するので低コス
トで小型化のシステム装置を実現できる。さらに、任意
の時点でプログラムの呼び出し先を変更できる為、プロ
グラムのテストや機能拡張したプログラムを入れ換える
ことが可能となる。
Further, since the embedded system of the present invention uses an inexpensive mask ROM and is directly mounted on the device, a low-cost and downsized system device can be realized. Furthermore, since the call destination of the program can be changed at any time, it becomes possible to replace the test of the program or the function-enhanced program.

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

【図1】本発明にかかる情報処理装置の概略図である。FIG. 1 is a schematic diagram of an information processing apparatus according to the present invention.

【図2】本発明にかかるスタブテーブルの構造である。FIG. 2 is a structure of a stub table according to the present invention.

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

1…マイクロプロセサ、2…読み出し専用メモリ、3…
書き込み可能なメモリ、4…フラッシュEEPROM、
5…SRAM、6…サーバホスト、7…ModemUn
it、8…ASIC。
1 ... Microprocessor, 2 ... Read-only memory, 3 ...
Writable memory, 4 ... Flash EEPROM,
5 ... SRAM, 6 ... Server host, 7 ... ModemUn
it, 8 ... ASIC.

───────────────────────────────────────────────────── フロントページの続き (72)発明者 嶋 康弘 神奈川県横浜市中区尾上町六丁目81番地日 立ソフトウェアエンジニアリング株式会社 内 (72)発明者 斉藤 賢爾 神奈川県横浜市中区尾上町六丁目81番地日 立ソフトウェアエンジニアリング株式会社 内 ─────────────────────────────────────────────────── ─── Continuation of the front page (72) Inventor Yasuhiro Shima, 81-chome, Onoue-cho, Naka-ku, Yokohama-shi, Kanagawa, Hitachi Software Engineering Co., Ltd. (72) Kenji Saito Inoue-cho, Naka-ku, Yokohama, Kanagawa Address 81 Nitchi Software Engineering Co., Ltd.

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】読み出し専用メモリにプログラムが記憶さ
れており、実行手段により前記プログラムを読み出して
前記プログラムの機能を実行する情報処理装置におい
て、 テーブル化された前記プログラムの呼出しアドレスを記
憶する第1の記憶手段と、 前記プログラムの呼出しアドレスを変更する変更手段
と、 前記変更手段により変更された呼出しアドレスに対応す
るプログラムを記憶する第2の記憶手段とを有し、 前記変更手段により呼出しアドレスが変更された場合に
は、前記読み出し専用メモリに記憶されているプログラ
ムではなく、第2の記憶手段に記憶されているプログラ
ムの機能を実行手段が実行することを特徴とする情報処
理装置。
1. An information processing apparatus in which a program is stored in a read-only memory, and the execution means reads the program to execute the functions of the program, and stores a table-calling address of the program. Storage means, changing means for changing the calling address of the program, and second storage means for storing the program corresponding to the calling address changed by the changing means, and the calling address is changed by the changing means. An information processing apparatus, wherein when changed, the execution means executes the function of the program stored in the second storage means instead of the program stored in the read-only memory.
【請求項2】前記第2の記憶手段は、通信網を介して別
の装置に備えられていることを特徴とする請求項1記載
の情報処理装置。
2. The information processing apparatus according to claim 1, wherein the second storage means is provided in another device via a communication network.
JP21317495A 1995-08-22 1995-08-22 Information processor Pending JPH0962502A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP21317495A JPH0962502A (en) 1995-08-22 1995-08-22 Information processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP21317495A JPH0962502A (en) 1995-08-22 1995-08-22 Information processor

Publications (1)

Publication Number Publication Date
JPH0962502A true JPH0962502A (en) 1997-03-07

Family

ID=16634777

Family Applications (1)

Application Number Title Priority Date Filing Date
JP21317495A Pending JPH0962502A (en) 1995-08-22 1995-08-22 Information processor

Country Status (1)

Country Link
JP (1) JPH0962502A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004090232A (en) * 2002-08-29 2004-03-25 Canon Inc Recorder and its control method
EP3572932A4 (en) * 2017-02-28 2020-12-23 Nippon Telegraph and Telephone Corporation Communication processing device, information processing device, and communication processing device control method

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004090232A (en) * 2002-08-29 2004-03-25 Canon Inc Recorder and its control method
EP3572932A4 (en) * 2017-02-28 2020-12-23 Nippon Telegraph and Telephone Corporation Communication processing device, information processing device, and communication processing device control method
US11360758B2 (en) 2017-02-28 2022-06-14 Nippon Telegraph And Telephone Corporation Communication processing device, information processing device, and communication processing device control method

Similar Documents

Publication Publication Date Title
RU2220442C2 (en) Complete elimination of redundant loading for architectures supporting control and data speculation
US8037292B2 (en) Method for accelerating BIOS running
CN101183331B (en) Tasks stack overflow detection method, device and computer system thereof
KR100307857B1 (en) Electronics
JPH0836488A (en) Method and device for checking run-time error using dynamic patching
RU2003115617A (en) METHOD AND DEVICE FOR DATA PROCESSING FOR STORING RETURN CONDITION
US20030084229A1 (en) Methods and apparatus for modifying programs stored in read only memory
JPH0962502A (en) Information processor
US6738887B2 (en) Method and system for concurrent updating of a microcontroller's program memory
JPH10214203A (en) Information processor
JP3918434B2 (en) Information processing device
JP3691986B2 (en) Programmable controller
JP2555920B2 (en) Online real-time processor
JPS6252635A (en) Data converting system
JPH08249206A (en) Computer with stack area destruction detection function
JP3859063B2 (en) Configuration information access control method for virtual machines
JPH11259308A (en) Programmable controller
JPH1040094A (en) Program controller for firmware
JPH11110224A (en) Language processing device, its method and information storage medium
JPH08286948A (en) Device and method for supporting software development
JPS6144339B2 (en)
KR100260444B1 (en) How to operate memory area of transmitter
JPH09185512A (en) Method for storing program into rom
JPH07271574A (en) Microprocessor
JP3190735B2 (en) Memory chip select switching circuit