JPH1011320A - Rom program monitor device of processor of computer or the like - Google Patents

Rom program monitor device of processor of computer or the like

Info

Publication number
JPH1011320A
JPH1011320A JP8158401A JP15840196A JPH1011320A JP H1011320 A JPH1011320 A JP H1011320A JP 8158401 A JP8158401 A JP 8158401A JP 15840196 A JP15840196 A JP 15840196A JP H1011320 A JPH1011320 A JP H1011320A
Authority
JP
Japan
Prior art keywords
instruction
monitor
execution
task
rom
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
JP8158401A
Other languages
Japanese (ja)
Inventor
Emi Kuzumaki
恵美 葛巻
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial 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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP8158401A priority Critical patent/JPH1011320A/en
Publication of JPH1011320A publication Critical patent/JPH1011320A/en
Pending legal-status Critical Current

Links

Landscapes

  • Debugging And Monitoring (AREA)
  • Stored Programmes (AREA)

Abstract

PROBLEM TO BE SOLVED: To make monitor processing easy even unless RAM capacity is sufficient for a ROM program. SOLUTION: When the processor 2 reads instructions out of a ROM as a storage device 1 in sequence and executes them, a task execution flag indicates that a specific task is being executed and a monitor execution flag 3 indicates that monitor operation is being carried out; when an instruction matches a specific instruction stored in an instruction registration table 7, the instruction to be executed is replaced with an instruction predetermined corresponding to a device selected with a device selection flag 4.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、計算機等の処理装
置に係り、特にROM(リード・オンリー・メモリ)プロ
グラムのためのモニタを行うROMプログラムモニタ装
置に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a processing device such as a computer, and more particularly to a ROM program monitor device for monitoring a ROM (read only memory) program.

【0002】[0002]

【従来の技術】計算機の中央処理装置等の処理装置にお
いて実行される命令を記憶する記憶装置には、RAM
(ランダム・アクセス・メモリ)のように、随時、命令の
変更が可能な記憶装置と、ROMのように変更ができな
い記憶装置とがある。一般的にプログラムやデバイスの
動作状態を確認するためにはプログラムを実行させて、
そのときのプログラムやデバイスの状態を調べるが、そ
の場合に、記憶装置上に存在する命令を一時的に他の命
令に書き換えてモニタプログラムを実行する方が、プロ
グラムやデバイスの動作状態を確認するのに好都合な場
合がある。
2. Description of the Related Art A storage device for storing instructions to be executed in a processing unit such as a central processing unit of a computer includes a RAM.
There are a storage device such as (random access memory) whose instructions can be changed at any time, and a storage device such as ROM which cannot be changed. Generally, to check the operating status of a program or device, run the program,
The state of the program or device at that time is checked. In this case, it is better to temporarily rewrite the instruction existing on the storage device to another instruction and execute the monitor program to check the operation state of the program or device. It may be convenient for you.

【0003】このようなモニタ方式を用いるとすると、
ROMプログラムの実行時にROM上にある命令を一時
的に書き換えることができないので、ROM上にあるプ
ログラムをRAMに一旦コピーした後、RAM上にある
任意の命令を一時的に書き換えて、モニタプログラムを
起動することが必要である。
If such a monitor system is used,
Since the instructions on the ROM cannot be temporarily rewritten during the execution of the ROM program, the program on the ROM is temporarily copied to the RAM, and then any instruction on the RAM is temporarily rewritten to change the monitor program. It is necessary to start.

【0004】しかしながら、このようなモニタ方式を用
いると、動作確認を行おうとするターゲットが携帯端末
のようにメモリ容量の少ない小規模の機器である場合、
RAM上にプログラムをコピーした上でモニタプログラ
ムを起動させるような方法をとるのに必要なメモリを確
保できなかったり、処理を実行するためのメモリが不足
する等の問題が生じる。
However, if such a monitor method is used, if the target whose operation is to be checked is a small-sized device having a small memory capacity such as a portable terminal,
There are problems such as the inability to secure the memory required to take the method of starting the monitor program after copying the program on the RAM, and the shortage of memory for executing processing.

【0005】[0005]

【発明が解決しようとする課題】上述のごとく、従来の
モニタ方式では、プログラムやデバイスの動作状態を確
認するためには、プログラムの一部を一時的に他の命令
に置き換えてモニタプログラムを実行する場合、プログ
ラムをRAM上に置き換えて行っていたが、RAM容量
が十分でない場合は、必要なメモリが確保できなかった
り、処理を実行するためのメモリが不足する等の問題が
生じることがあった。
As described above, in the conventional monitor system, in order to confirm the operation state of a program or a device, a part of the program is temporarily replaced with another instruction and the monitor program is executed. In such a case, the program is replaced on the RAM, but if the RAM capacity is not sufficient, there may be a problem that a necessary memory cannot be secured or a memory for executing the processing becomes insufficient. Was.

【0006】本発明は、前記のような問題を解決するも
のであり、ROMプログラムであっても命令を変更して
モニタ処理が容易に行える計算機等の処理装置における
ROMプログラムモニタ装置の提供を目的とする。
An object of the present invention is to solve the above-mentioned problems and to provide a ROM program monitoring device in a processing device such as a computer which can easily execute a monitoring process by changing an instruction even in a ROM program. And

【0007】[0007]

【課題を解決するための手段】前記目的を達成するた
め、本発明は、複数の命令を記憶するROM等の記憶手
段と、この記憶手段に記憶されている命令を逐次読み出
して実行することにより処理を行う処理手段とを有する
計算機等の処理装置におけるROMプログラムモニタ装
置おいて、モニタ動作の実行を指示するモニタ実行指示
手段と、モニタ動作に移行するタスクを記憶するタスク
登録手段と、特定のタスクの実行を指示するタスク実行
指示手段と、モニタ動作時に移る特定命令を記憶する命
令登録手段とを備え、前記処理手段を、前記ROMに記
憶されている命令を逐次読み出して実行する際に、前記
タスク実行指示手段が特定のタスクの実行中であること
を示し、かつ前記モニタ実行指示手段がモニタ動作の実
行を指示しており、当該命令が命令登録手段に記憶され
ている特定命令と一致している場合には、特定のタスク
に対してあらかじめ定められた命令と置き換えて実行す
るように構成したことを特徴とするものであって、この
構成により、マルチタスク環境で実行されるROMプロ
グラムであっても、特定命令をモニタ処理を実行する命
令に変更してモニタ処理を容易に実行することができ、
モニタに当たりRAMメモリを増設するなどの必要はな
くすことができる。
In order to achieve the above object, the present invention provides a storage means such as a ROM for storing a plurality of instructions, and sequentially reads and executes the instructions stored in the storage means. In a ROM program monitor device in a processing device such as a computer having a processing device for performing processing, a monitor execution instructing device for instructing execution of a monitoring operation, a task registration device for storing a task to be shifted to the monitoring operation, Task execution instructing means for instructing execution of a task, and instruction registering means for storing a specific instruction to be transferred at the time of the monitor operation, the processing means, when sequentially reading and executing the instructions stored in the ROM, The task execution instructing means indicates that a specific task is being executed, and the monitor execution instructing means instructs execution of a monitoring operation, When the instruction matches a specific instruction stored in the instruction registering means, the instruction is replaced with a predetermined instruction and executed for a specific task. With this configuration, even in the case of a ROM program that is executed in a multitask environment, a specific instruction can be changed to an instruction for executing a monitor process, and the monitor process can be easily executed.
It is possible to eliminate the necessity of adding a RAM memory to the monitor.

【0008】また、本発明は、モニタの対象となるデバ
イスを指定するデバイス選択指示手段を備え、前記モニ
タ動作を行う場合に前記デバイス選択指示手段で選択さ
れたデバイスに対してモニタ動作を実行することを特徴
とするものであって、この構成により、マルチタスク環
境で実行されるROMプログラムであっても、RAMメ
モリに無関係に、特定命令をデバイスに応じた命令に変
更して特定のタスクに対するモニタ処理を容易に行うこ
とができる。
The present invention further comprises device selection instructing means for designating a device to be monitored, and when performing the monitoring operation, executes the monitoring operation on the device selected by the device selection instructing means. With this configuration, even with a ROM program executed in a multitask environment, a specific instruction is changed to an instruction corresponding to a device, regardless of a RAM memory, and thus a specific task is executed. The monitoring process can be easily performed.

【0009】また、本発明は、複数の命令を記憶するR
OM等の記憶手段と、この記憶手段に記憶されている命
令を逐次読み出して実行することにより処理を行う処理
手段とを有する計算機等の処理装置におけるROMプロ
グラムモニタ装置おいて、モニタ動作の実行を指示する
モニタ実行指示手段と、モニタ動作に移行するタスクを
記憶するタスク登録手段と、特定のタスクの実行を指示
するタスク実行指示手段と、モニタ動作時に移る特定命
令を記憶する命令登録手段とを備え、前記処理手段を、
前記ROMに記憶されている命令を逐次読み出して実行
する際に、前記タスク実行指示手段が特定のタスクの実
行中であることを示し、かつ前記モニタ実行指示手段が
モニタ動作の実行を指示しており、当該命令が命令登録
手段に記憶されている特定命令と一致している場合に
は、モニタ処理用のトラップを発生して特定のタスクに
対するモニタ動作を実行するように構成したことを特徴
とするものであって、この構成により、マルチタスク環
境で実行されるROMプログラムであっても、モニタ処
理用のトラップの発生により、モニタ処理を容易に実行
することができ、モニタに当たりRAMメモリを増設す
るなどの必要はなくすことができる。
Also, the present invention provides an R
In a ROM program monitor device in a processing device such as a computer having a storage means such as an OM and a processing means for performing processing by sequentially reading and executing instructions stored in the storage means, a monitor operation is executed. Monitor execution instructing means for instructing, task registering means for storing a task to be shifted to a monitor operation, task execution instructing means for instructing execution of a specific task, and instruction registering means for storing a specific instruction to be shifted during the monitor operation The processing means,
When sequentially reading and executing the instructions stored in the ROM, the task execution instructing means indicates that a specific task is being executed, and the monitor execution instructing means instructs execution of a monitoring operation. When the instruction matches a specific instruction stored in the instruction registering means, a monitor processing trap is generated to execute a monitor operation for a specific task. With this configuration, even if the ROM program is executed in a multitask environment, the monitor process can be easily executed by generating a trap for the monitor process, and the RAM memory is added to the monitor. The need to do so can be eliminated.

【0010】また、本発明は、モニタの対象となるデバ
イスを指定するデバイス選択指示手段を備え、前記モニ
タ動作を行う場合に前記デバイス選択指示手段により選
択されたデバイスに対してモニタ動作を実行するモニタ
処理用のトラップを発生することを特徴とするものであ
って、この構成により、マルチタスク環境で実行される
ROMプログラムであっても、RAMメモリに無関係
に、モニタ処理用のトラップを発生してデバイスに応じ
たモニタ処理を容易に行うことができる。
The present invention further comprises device selection instructing means for designating a device to be monitored, and when performing the monitoring operation, executes the monitoring operation on the device selected by the device selecting instruction means. This is characterized in that a trap for monitor processing is generated. With this configuration, even if a ROM program is executed in a multitask environment, a trap for monitor processing is generated regardless of the RAM memory. Thus, the monitoring process according to the device can be easily performed.

【0011】また、本発明は、複数の命令を記憶するR
OM等の記憶手段と、この記憶手段に記憶されている命
令を逐次読み出して実行することにより処理を行う処理
手段とを有する計算機等の処理装置におけるROMプロ
グラムモニタ装置おいて、モニタ動作の実行を指示する
モニタ実行指示手段と、モニタ動作に移行する割込みを
記憶する割込み登録手段と、特定の割込み処理の実行を
指示する割込み実行指示手段と、モニタ動作時に移る特
定命令を記憶する命令登録手段とを備え、前記処理手段
を、前記ROMに記憶されている命令を逐次読み出して
実行する際に、前記割込み実行指示手段が特定の割込み
処理中であることを示し、かつ前記モニタ実行指示手段
がモニタ動作の実行を指示しており、当該命令が命令登
録手段に記録されている特定命令と一致している場合に
は、モニタ処理を実行するあらかじめ定められた命令と
置き換えて実行するように構成したことを特徴とするも
のであって、この構成により、割込み駆動のROMプロ
グラムであってもRAMメモリに無関係に、特定命令を
モニタ動作を実行する命令に変更してモニタ処理を容易
に実行することができる。
Also, the present invention provides a method for storing a plurality of instructions.
In a ROM program monitor device in a processing device such as a computer having a storage means such as an OM and a processing means for performing processing by sequentially reading and executing instructions stored in the storage means, a monitor operation is executed. Monitor execution instructing means for instructing, interrupt registering means for storing an interrupt to shift to the monitor operation, interrupt execution instructing means for instructing execution of a specific interrupt process, and instruction registering means for storing a specific instruction to shift during the monitor operation When the processing means sequentially reads and executes the instructions stored in the ROM, it indicates that the interrupt execution instruction means is performing a specific interrupt processing, and the monitor execution instruction means If the instruction to execute the operation is given and the instruction matches the specific instruction recorded in the instruction registering means, the monitor process is executed. A predetermined instruction to be executed is replaced with a predetermined instruction to be executed. With this configuration, even if an interrupt-driven ROM program is executed, a specific instruction is monitored regardless of the RAM memory. Can be easily changed to an instruction to execute the monitoring process.

【0012】また、本発明によれば、モニタの対象とな
るデバイスを指定するデバイス選択指示手段を備え、前
記モニタ動作を行う場合に前記デバイス選択指示手段で
選択されたデバイスに対してモニタ動作を実行すること
を特徴とするものであり、この構成により、割込み駆動
のROMプログラムであってもRAMメモリに無関係
に、特定命令をモニタ動作を実行する命令に変更してモ
ニタ処理を容易に実行することができる。
Further, according to the present invention, there is provided device selection instructing means for designating a device to be monitored, and when performing the monitoring operation, the monitor operation is performed on the device selected by the device selection instructing means. With this configuration, even if an interrupt-driven ROM program is used, a specific instruction is changed to an instruction for executing a monitor operation, regardless of the RAM memory, and the monitor process is easily executed. be able to.

【0013】[0013]

【発明の実施の形態】以下、本発明の好適な実施の形態
を図面を参照して詳細に説明する。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Preferred embodiments of the present invention will be described below in detail with reference to the drawings.

【0014】図1は本発明の第1実施形態を説明するた
めの計算機等の処理装置における構成を示すブロック図
であり、この装置は記憶装置(この例ではROM)1と処
理装置2とを有しており、記憶装置1には所定の命令が
保持され、また処理装置2は、モニタ実行フラグ3,デ
バイス選択フラグ4,タスク登録テーブル5,タスク実
行フラグ6,命令登録テーブル7,命令バッファ8,命
令解釈部9,命令実行部10を有している。
FIG. 1 is a block diagram showing a configuration of a processing device such as a computer for explaining a first embodiment of the present invention. This device includes a storage device (ROM in this example) 1 and a processing device 2. The storage device 1 stores predetermined instructions. The processing device 2 includes a monitor execution flag 3, a device selection flag 4, a task registration table 5, a task execution flag 6, an instruction registration table 7, an instruction buffer 8, an instruction interpreting unit 9 and an instruction executing unit 10 are provided.

【0015】モニタ実行フラグ3はモニタ処理を実行中
か否かを示しており、デバイス選択フラグ4はモニタ処
理を実行するデバイスを示し、両者とも状況に応じて所
定のオン/オフ状態を設定するように構成されている。
さらに、タスク登録テーブル5は、タスクを選択的に登
録するように構成され、タスク実行フラグ6はタスク登
録テーブルに登録されているタスクの実行中にはオン
に、また実行中でないときはオフに設定されるように構
成されている。命令登録テーブル7は特定命令を選択的
に登録するように構成されている。
The monitor execution flag 3 indicates whether or not the monitor process is being executed, and the device selection flag 4 indicates a device for which the monitor process is to be executed. Both of them set a predetermined on / off state according to the situation. It is configured as follows.
Further, the task registration table 5 is configured to selectively register a task, and the task execution flag 6 is turned on when the task registered in the task registration table is being executed, and is turned off when the task is not being executed. It is configured to be set. The instruction registration table 7 is configured to selectively register a specific instruction.

【0016】処理装置2では、記憶装置1の諸命令を命
令バッファ8に逐次読み出し、命令解釈部9がその命令
を解釈し、命令実行部10がその命令を実行する。このと
き、命令解釈部9はタスク実行フラグ6がオンで、かつ
モニタ実行フラグ3がオンであると、命令バッファ8に
読み出した命令と命令登録テーブル7に記憶されている
特定命令とを比較し、特定命令のうちの1つであること
を識別した場合には、その特定命令の実行に代えてあら
かじめ設定されている所定の命令を実行する。
In the processing device 2, the instructions in the storage device 1 are sequentially read into the instruction buffer 8, the instruction interpreting unit 9 interprets the instructions, and the instruction executing unit 10 executes the instructions. At this time, if the task execution flag 6 is on and the monitor execution flag 3 is on, the instruction interpreting unit 9 compares the instruction read into the instruction buffer 8 with the specific instruction stored in the instruction registration table 7. If it is determined that the instruction is one of the specific instructions, the predetermined instruction is executed instead of executing the specific instruction.

【0017】以下、前記第1実施形態の装置の動作をさ
らに詳しく説明する。
Hereinafter, the operation of the apparatus according to the first embodiment will be described in more detail.

【0018】図1において、処理装置2内の命令解釈部
9は、記憶装置1から命令バッファ8に読み出した命令
を解釈して、命令コードをデコードした信号とオペラン
ドの情報を命令実行部10に渡す。命令実行部10は命令解
釈部9から受け取る情報に従って、命令に従う演算,制
御,記憶装置1へのアクセス等を実行し、また後に実行
する命令を記憶装置1から命令バッファ8に読み出す。
In FIG. 1, an instruction interpreting unit 9 in the processing unit 2 interprets an instruction read from the storage device 1 to the instruction buffer 8 and decodes an instruction code into a signal and operand information to an instruction executing unit 10. hand over. The instruction execution unit 10 performs an operation, control, access to the storage device 1 and the like according to the instruction according to the information received from the instruction interpretation unit 9, and reads an instruction to be executed later from the storage device 1 to the instruction buffer 8.

【0019】ここまでの処理は、従来の処理装置でのも
のと同じであるが、第1実施形態の装置においては、命
令解釈部9は、タスク実行フラグ6がオンの場合で、か
つモニタ実行フラグ3がオンの場合に、命令解釈部9に
渡される命令と命令登録テーブル7に登録されている命
令とを比較し、命令登録テーブル7に登録されている命
令のうちの1つであることが識別されると、デバイス選
択フラグ4の中でフラグがオンとされている該当するデ
バイス種類に対してあらかじめ定めてあるモニタ処理を
実行する命令を命令実行部10に渡す。したがって、その
場合には指定されたデバイスでは、記憶装置1から読み
出された命令ではなくて、変換されたモニタ処理を実行
する命令が実行される。
The processing up to this point is the same as that of the conventional processing apparatus. However, in the apparatus of the first embodiment, the instruction interpreting section 9 executes the processing when the task execution flag 6 is on and the monitor execution is performed. When the flag 3 is on, the instruction passed to the instruction interpreting unit 9 is compared with the instruction registered in the instruction registration table 7, and the instruction is one of the instructions registered in the instruction registration table 7. Is identified, a command for executing a predetermined monitor process for the corresponding device type for which the flag is turned on in the device selection flag 4 is passed to the command execution unit 10. Therefore, in this case, the designated device executes not the command read from the storage device 1 but the command for executing the converted monitor process.

【0020】図2は第1実施形態の装置の動作に係るフ
ローチャートであり、タスク実行フラグ6とモニタ実行
フラグ3とデバイス選択フラグ4の内のある1つのフラ
グがオンで、特定種類の命令として「nop」命令が命令
登録テーブル7に記載されている場合、この「nop」命
令をデバイス選択フラグ4に対応するモニタ処理を実行
する命令に変換する場合における命令解釈部9の処理の
流れを示すフローチャートである。
FIG. 2 is a flowchart relating to the operation of the apparatus according to the first embodiment. When one of the task execution flag 6, the monitor execution flag 3, and the device selection flag 4 is on, a specific type of instruction is set. When the “nop” instruction is described in the instruction registration table 7, the processing flow of the instruction interpreting unit 9 when converting the “nop” instruction into an instruction to execute a monitor process corresponding to the device selection flag 4 is shown. It is a flowchart.

【0021】図2に沿って処理の流れを説明する。ま
ず、ステップ(S)10でタスク実行フラグ6を読み取る。
オフであればステップ16に進み、通常のように命令バッ
ファ8に読み出された命令の解釈結果にあたる信号を生
成して命令実行部10に渡す。
The flow of processing will be described with reference to FIG. First, the task execution flag 6 is read in step (S) 10.
If it is off, the process proceeds to step 16, where a signal corresponding to the interpretation result of the instruction read into the instruction buffer 8 is generated and passed to the instruction execution unit 10 as usual.

【0022】ステップ10でタスク実行フラグ6がオンで
あれば、ステップ11に分岐してモニタ実行フラグ3を読
み取る。
If the task execution flag 6 is on at step 10, the process branches to step 11 to read the monitor execution flag 3.

【0023】ステップ11でモニタ実行フラグ3がオフで
あればステップ16に進み、通常のように命令バッファ8
に読み出された命令の解釈結果にあたる信号を生成して
命令実行部10に渡す。
If the monitor execution flag 3 is off at step 11, the process proceeds to step 16, where the instruction buffer 8 is operated as usual.
A signal corresponding to the interpretation result of the instruction read out is generated and passed to the instruction execution unit 10.

【0024】ステップ11でモニタ実行フラグ3がオンで
あれば、ステップ12に分岐して命令コードを識別する。
命令が命令登録テーブル7に登録されている「nop」命
令でなければ、処理ステップ16に進み、通常のように命
令バッファ8に読み出された命令の解釈結果にあたる信
号を生成して命令実行部10に渡す。
If the monitor execution flag 3 is on in step 11, the program branches to step 12 to identify the instruction code.
If the instruction is not a "nop" instruction registered in the instruction registration table 7, the process proceeds to processing step 16, in which a signal corresponding to the interpretation result of the instruction read into the instruction buffer 8 is generated as usual, and the instruction execution unit Pass to 10.

【0025】命令が命令登録テーブルに登録されている
「nop」命令であれば、デバイス選択フラグ4を読み(ス
テップ13)、ステップ14でオンであるフラグに対応する
処理を実行する命令に変換する。
If the instruction is a "nop" instruction registered in the instruction registration table, the device selection flag 4 is read (step 13), and converted into an instruction for executing a process corresponding to the flag being on in step 14 .

【0026】次にステップ15に進み、命令バッファ8に
読み出されている命令のプログラムカウンタ等の値をス
タックに保存した後、ステップ16に進み、ステップ16で
モニタ処理を行う命令に変更された命令を命令実行部10
に渡す。
Next, the process proceeds to step 15, where the value of the program counter or the like of the instruction read into the instruction buffer 8 is stored in the stack. Then, the process proceeds to step 16, where the instruction is changed to an instruction for performing a monitor process in step 16. Instruction execution unit 10
Pass to.

【0027】次に、本発明の第2実施形態について説明
する。第2実施形態の装置の基本構成は図1のものと同
じであるが、第1実施形態の装置と異なるところは、命
令解釈部9が、タスク実行フラグ6がオンの場合で、か
つモニタ実行フラグ3がオンの場合に、命令解釈部9に
渡される命令と命令登録テーブル7に登録されている命
令とを比較し、命令登録テーブル7に登録されている命
令の内の1つであることが識別されると、デバイス選択
フラグ4の中でフラグがオンとされている該当するデバ
イス種類に対してモニタ処理用のトラップを発生させ、
モニタ処理を行う割込みハンドラの実行を行う点であ
る。
Next, a second embodiment of the present invention will be described. Although the basic configuration of the device of the second embodiment is the same as that of the device of FIG. 1, the difference from the device of the first embodiment is that the instruction When the flag 3 is on, the instruction passed to the instruction interpreting unit 9 is compared with the instruction registered in the instruction registration table 7, and the instruction is one of the instructions registered in the instruction registration table 7. Is identified, a trap for monitor processing is generated for the corresponding device type for which the flag is turned on in the device selection flag 4,
The point is that an interrupt handler that performs monitor processing is executed.

【0028】図3は第2実施形態の装置の動作に係るフ
ローチャートであって、図1とともに説明すると、タス
ク実行フラグ6とモニタ実行フラグ3とデバイス選択フ
ラグ4の内のある1つのフラグがオンで、特定種類の命
令として「nop」命令が命令登録テーブル7に記載され
ている場合、デバイス選択フラグ4に対応するモニタ処
理を処理するトラップを発生する場合の、命令解釈部9
の処理の流れを示すフローチャートである。
FIG. 3 is a flowchart relating to the operation of the apparatus according to the second embodiment. When described in conjunction with FIG. 1, one of the task execution flag 6, the monitor execution flag 3, and the device selection flag 4 is turned on. In the case where the “nop” instruction is described in the instruction registration table 7 as a specific type of instruction, the instruction interpreting unit 9 generates a trap for processing a monitor process corresponding to the device selection flag 4.
3 is a flowchart showing the flow of the processing of FIG.

【0029】図3に沿って処理の流れを説明する。ま
ず、ステップ20でタスク実行フラグ6を読み取る。オフ
であればステップ26に進み、通常のように命令バッファ
8に読み出された命令の解釈結果にあたる信号を生成し
て命令実行部10に渡す。
The processing flow will be described with reference to FIG. First, at step 20, the task execution flag 6 is read. If it is off, the process proceeds to step 26, where a signal corresponding to the interpretation result of the instruction read into the instruction buffer 8 is generated and passed to the instruction execution unit 10 as usual.

【0030】ステップ20でタスク実行フラグ6がオンで
あれば、ステップ21に分岐してモニタ実行フラグ3を読
み取る。
If the task execution flag 6 is on at step 20, the process branches to step 21 to read the monitor execution flag 3.

【0031】ステップ21でモニタ実行フラグ3がオフで
あれば、ステップ26に進み、通常のように命令バッファ
8に読み出された命令の解釈結果にあたる信号を生成し
て命令実行部10に渡す。
If the monitor execution flag 3 is off at step 21, the process proceeds to step 26, where a signal corresponding to the interpretation result of the instruction read into the instruction buffer 8 is generated as usual, and passed to the instruction execution unit 10.

【0032】ステップ21でモニタ実行フラグ3がオンで
あれば、ステップ22に分岐して命令コードを識別する。
命令が命令登録テーブル7に登録されている「nop」命
令でなければ、処理ステップ26に進み、通常のように命
令バッファ8に読み出された命令の解釈結果にあたる信
号を生成して命令実行部10に渡す。
If the monitor execution flag 3 is on at step 21, the program branches to step 22 to identify the instruction code.
If the instruction is not a "nop" instruction registered in the instruction registration table 7, the process proceeds to processing step 26, where a signal corresponding to the interpretation result of the instruction read into the instruction buffer 8 is generated as usual, and the instruction execution unit Pass to 10.

【0033】命令が命令登録テーブルに登録されている
「nop」命令であれば、デバイス選択フラグ4を読む(ス
テップ23)。
If the instruction is a "nop" instruction registered in the instruction registration table, the device selection flag 4 is read (step 23).

【0034】次にステップ24に進み、命令バッファ8に
読み出されている命令のプログラムカウンタ等の値をス
タックに保存した後、ステップ25に進み、モニタ処理用
のトラップを発生させ、モニタ処理を行う割込みハンド
ラの実行を行う。
Next, the process proceeds to step 24, where the value of the program counter or the like of the instruction read into the instruction buffer 8 is stored in the stack. Then, the process proceeds to step 25, where a trap for monitor processing is generated, and monitor processing is performed. Execute the interrupt handler to be performed.

【0035】割込みハンドラの実行後、「nop」命令の
解釈結果にあたる信号を生成し、ステップ26で命令実行
部10に渡す。
After the execution of the interrupt handler, a signal corresponding to the interpretation result of the "nop" instruction is generated, and is passed to the instruction execution unit 10 in step 26.

【0036】図4は本発明の第3実施形態を説明するた
めの計算機等の処理装置における構成を示すブロック図
であり、図1の装置と異なるところはタスク登録テーブ
ル5とタスク実行フラグ6に代えて割込登録テーブル11
と割込実行フラグ12とを設けた点であって、割込登録テ
ーブル11は割り込みを選択的に登録するように構成さ
れ、割込実行フラグ12は割込登録テーブル11に登録され
ている割り込みの処理を実行中にはオンに、実行中でな
いときにはオフに設定されるように構成されている。
FIG. 4 is a block diagram showing a configuration of a processing device such as a computer for explaining a third embodiment of the present invention. The difference from the device of FIG. 1 is that a task registration table 5 and a task execution flag 6 Instead, interrupt registration table 11
And an interrupt execution flag 12 are provided. The interrupt registration table 11 is configured to selectively register an interrupt, and the interrupt execution flag 12 is configured to register an interrupt registered in the interrupt registration table 11. Is set to ON when the process is being executed, and is set to OFF when the process is not being executed.

【0037】そして、命令解釈部9は割込実行フラグ12
がオンの場合で、かつモニタ実行フラグ3がオンの場合
に、命令解釈部9に渡される命令と命令登録テーブル7
に登録されている命令とを比較し、命令登録テーブル7
に登録されている命令の内の1つであることが識別され
ると、デバイス選択フラグ4の中でフラグがオンとされ
ている該当するデバイス種類に対してあらかじめ定めて
あるモニタ処理を実行する命令を命令実行部10に渡す。
従って、その場合には指定されたデバイスでは記憶装置
1から読み出された命令ではなく、変換されたモニタ処
理を実行する命令が実行される。
Then, the instruction interpreting section 9 outputs the interrupt execution flag 12
Is ON and the monitor execution flag 3 is ON, the instruction passed to the instruction interpreting unit 9 and the instruction registration table 7
Is compared with the instruction registered in the instruction registration table 7
If it is determined that the instruction is one of the instructions registered in the device selection flag 4, a predetermined monitor process is executed for the corresponding device type whose flag is turned on in the device selection flag 4. The instruction is passed to the instruction execution unit 10.
Therefore, in this case, the designated device executes not the command read from the storage device 1 but the command for executing the converted monitor process.

【0038】図5は第3実施形態の装置の動作に係るフ
ローチャートであって、割込実行フラグ12とモニタ実行
フラグ3とデバイス選択フラグ4の内のある1つのフラ
グがオンで、特定種類の命令として「nop」命令をデバ
イス選択フラグ4に対応するモニタ処理を実行する命令
に変換する場合の、命令解釈部9の処理の流れを示すフ
ローチャートである。
FIG. 5 is a flowchart relating to the operation of the apparatus according to the third embodiment, in which one of the interrupt execution flag 12, the monitor execution flag 3, and the device selection flag 4 is turned on, and 10 is a flowchart illustrating a flow of processing of the instruction interpreting unit 9 when converting a “nop” instruction into an instruction for executing a monitor process corresponding to the device selection flag 4 as an instruction.

【0039】図5に沿って処理の流れを説明する。ま
ず、ステップ30で割込実行フラグ12を読み取る。オフで
あればステップ36に進み、通常のように命令バッファ8
に読み出された命令の解釈結果にあたる信号を生成して
命令実行部10に渡す。
The processing flow will be described with reference to FIG. First, at step 30, the interrupt execution flag 12 is read. If it is off, proceed to step 36, where instruction buffer 8
A signal corresponding to the interpretation result of the instruction read out is generated and passed to the instruction execution unit 10.

【0040】ステップ30で割込実行フラグ12がオンであ
れば、ステップ31に分岐してモニタ実行フラグ3を読み
取る。
If the interrupt execution flag 12 is ON at step 30, the process branches to step 31 to read the monitor execution flag 3.

【0041】ステップ31でモニタ実行フラグ3がオフで
あればステップ36に進み、通常のように命令バッファ8
に読み出された命令の解釈結果にあたる信号を生成して
命令実行部10に渡す。
If the monitor execution flag 3 is off at step 31, the process proceeds to step 36, where the instruction buffer 8 is operated as usual.
A signal corresponding to the interpretation result of the instruction read out is generated and passed to the instruction execution unit 10.

【0042】ステップ31でモニタ実行フラグ3がオンで
あれば、ステップ32に分岐して命令コードを識別する。
命令が命令登録テーブル7に登録されている「nop」命
令でなければ、処理ステップ36に進み、通常のように命
令バッファ8に読み出された命令の解釈結果にあたる信
号を生成して命令実行部10に渡す。
If the monitor execution flag 3 is on in step 31, the program branches to step 32 to identify the instruction code.
If the instruction is not a "nop" instruction registered in the instruction registration table 7, the process proceeds to processing step 36, where a signal corresponding to the interpretation result of the instruction read into the instruction buffer 8 is generated as usual, and the instruction execution unit Pass to 10.

【0043】命令が命令登録テーブルに登録されている
「nop」命令であれば、デバイス選択フラグ4を読み(ス
テップ33)、ステップ34でオンであるフラグに対応する
モニタ処理を実行する命令に変換する。
If the instruction is a "nop" instruction registered in the instruction registration table, the device selection flag 4 is read (step 33) and converted into an instruction for executing a monitor process corresponding to the flag being on in step 34. I do.

【0044】次にステップ35に進み、命令バッファ8に
読み出されている命令のプログラムカウンタの値等をス
タックに保存した後、ステップ36に進み、ステップ36で
モニタ処理を行う命令に命令が変更されたものが命令実
行部10に渡される。
Next, the process proceeds to step 35, where the program counter value and the like of the instruction read in the instruction buffer 8 are stored in the stack. The result is transferred to the instruction execution unit 10.

【0045】[0045]

【発明の効果】以上説明したように、本発明によれば、
ROMプログラムであっても、特定命令をデバイスに応
じた命令に変更してモニタ処理を容易に実行することが
でき、かつモニタにあたりRAMメモリが必要ではない
ので、携帯装置等に用いて廉価にかつ容易にモニタを実
行できる。
As described above, according to the present invention,
Even in the case of a ROM program, it is possible to easily execute a monitor process by changing a specific command to a command corresponding to a device, and since a RAM memory is not required for monitoring, it can be used in a portable device at low cost. Monitor can be easily executed.

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

【図1】本発明の第1実施形態を説明するための計算機
等の処理装置における構成を示すブロック図である。
FIG. 1 is a block diagram illustrating a configuration of a processing device such as a computer for explaining a first embodiment of the present invention.

【図2】第1実施形態の装置の動作に係るフローチャー
トである。
FIG. 2 is a flowchart relating to the operation of the device of the first embodiment.

【図3】第2実施形態の装置の動作に係るフローチャー
トである。
FIG. 3 is a flowchart relating to the operation of the device of the second embodiment.

【図4】本発明の第3実施形態を説明するための計算機
等の処理装置における構成を示すブロック図である。
FIG. 4 is a block diagram illustrating a configuration of a processing device such as a computer for explaining a third embodiment of the present invention.

【図5】第3実施形態の装置の動作に係るフローチャー
トである。
FIG. 5 is a flowchart relating to the operation of the device of the third embodiment.

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

1…記憶装置、 2…処理装置、 3…モニタ実行フラ
グ、 4…デバイス選択フラグ、 5…タスク登録テー
ブル、 6…タスク実行フラグ、 7…命令登録テーブ
ル、 8…命令バッファ、 9…命令解釈部、 10…命
令実行部、 11…割込登録テーブル、 12…割込実行フ
ラグ。
DESCRIPTION OF SYMBOLS 1 ... Storage device, 2 ... Processing device, 3 ... Monitor execution flag, 4 ... Device selection flag, 5 ... Task registration table, 6 ... Task execution flag, 7 ... Instruction registration table, 8 ... Instruction buffer, 9 ... Instruction interpretation part , 10: Instruction execution unit, 11: Interruption registration table, 12: Interruption execution flag.

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 複数の命令を記憶するROM等の記憶手
段と、この記憶手段に記憶されている命令を逐次読み出
して実行することにより処理を行う処理手段とを有する
計算機等の処理装置におけるROMプログラムモニタ装
置おいて、モニタ動作の実行を指示するモニタ実行指示
手段と、モニタ動作に移行するタスクを記憶するタスク
登録手段と、特定のタスクの実行を指示するタスク実行
指示手段と、モニタ動作時に移る特定命令を記憶する命
令登録手段とを備え、前記処理手段を、前記ROMに記
憶されている命令を逐次読み出して実行する際に、前記
タスク実行指示手段が特定のタスクの実行中であること
を示し、かつ前記モニタ実行指示手段がモニタ動作の実
行を指示しており、当該命令が命令登録手段に記憶され
ている特定命令と一致している場合には、特定のタスク
に対してあらかじめ定められた命令と置き換えて実行す
るように構成したことを特徴とする計算機等の処理装置
におけるROMプログラムモニタ装置。
A ROM in a processing device such as a computer having a storage means such as a ROM for storing a plurality of instructions, and a processing means for performing processing by sequentially reading and executing the instructions stored in the storage means. In the program monitor device, monitor execution instruction means for instructing execution of a monitor operation, task registration means for storing a task to be shifted to the monitor operation, task execution instruction means for instructing execution of a specific task, Instruction registering means for storing a specific instruction to be transferred, wherein the task execution instructing means is executing a specific task when the processing means sequentially reads and executes the instructions stored in the ROM. And the monitor execution instructing means instructs execution of the monitor operation, and the instruction corresponds to a specific instruction stored in the instruction registering means. A ROM program monitor device in a processing device such as a computer, wherein a specific task is replaced with a predetermined instruction and executed when the instruction is executed.
【請求項2】 モニタの対象となるデバイスを指定する
デバイス選択指示手段を備え、前記モニタ動作を行う場
合に前記デバイス選択指示手段で選択されたデバイスに
対してモニタ動作を実行することを特徴とする請求項1
記載の計算機等の処理装置におけるROMプログラムモ
ニタ装置。
2. The apparatus according to claim 1, further comprising a device selection instructing unit for designating a device to be monitored, wherein the monitor operation is performed on the device selected by the device selection instructing unit when performing the monitoring operation. Claim 1
A ROM program monitor device in a processing device such as a computer described in the above.
【請求項3】 複数の命令を記憶するROM等の記憶手
段と、この記憶手段に記憶されている命令を逐次読み出
して実行することにより処理を行う処理手段とを有する
計算機等の処理装置におけるROMプログラムモニタ装
置おいて、モニタ動作の実行を指示するモニタ実行指示
手段と、モニタ動作に移行するタスクを記憶するタスク
登録手段と、特定のタスクの実行を指示するタスク実行
指示手段と、モニタ動作時に移る特定命令を記憶する命
令登録手段とを備え、前記処理手段を、前記ROMに記
憶されている命令を逐次読み出して実行する際に、前記
タスク実行指示手段が特定のタスクの実行中であること
を示し、かつ前記モニタ実行指示手段がモニタ動作の実
行を指示しており、当該命令が命令登録手段に記憶され
ている特定命令と一致している場合には、モニタ処理用
のトラップを発生して特定のタスクに対するモニタ動作
を実行するように構成したことを特徴とする計算機等の
処理装置におけるROMプログラムモニタ装置。
3. A ROM in a processing device such as a computer having a storage means such as a ROM for storing a plurality of instructions, and a processing means for performing processing by sequentially reading and executing the instructions stored in the storage means. In the program monitor device, monitor execution instruction means for instructing execution of a monitor operation, task registration means for storing a task to be shifted to the monitor operation, task execution instruction means for instructing execution of a specific task, Instruction registering means for storing a specific instruction to be transferred, wherein the task execution instructing means is executing a specific task when the processing means sequentially reads and executes the instructions stored in the ROM. And the monitor execution instructing means instructs execution of the monitor operation, and the instruction corresponds to a specific instruction stored in the instruction registering means. A monitoring program for generating a trap for a monitoring process to execute a monitoring operation for a specific task.
【請求項4】 モニタの対象となるデバイスを指定する
デバイス選択指示手段を備え、前記モニタ動作を行う場
合に前記デバイス選択指示手段により選択されたデバイ
スに対してモニタ動作を実行するモニタ処理用のトラッ
プを発生することを特徴とする請求項3記載の計算機等
の処理装置におけるROMプログラムモニタ装置。
4. A monitor processing device, comprising: device selection instructing means for designating a device to be monitored; and performing a monitoring operation on the device selected by the device selecting instruction means when performing the monitoring operation. 4. The ROM program monitoring device in a processing device such as a computer according to claim 3, wherein a trap is generated.
【請求項5】 複数の命令を記憶するROM等の記憶手
段と、この記憶手段に記憶されている命令を逐次読み出
して実行することにより処理を行う処理手段とを有する
計算機等の処理装置におけるROMプログラムモニタ装
置おいて、モニタ動作の実行を指示するモニタ実行指示
手段と、モニタ動作に移行する割込みを記憶する割込み
登録手段と、特定の割込み処理の実行を指示する割込み
実行指示手段と、モニタ動作時に移る特定命令を記憶す
る命令登録手段とを備え、前記処理手段を、前記ROM
に記憶されている命令を逐次読み出して実行する際に、
前記割込み実行指示手段が特定の割込み処理中であるこ
とを示し、かつ前記モニタ実行指示手段がモニタ動作の
実行を指示しており、当該命令が命令登録手段に記録さ
れている特定命令と一致している場合には、モニタ処理
を実行するあらかじめ定められた命令と置き換えて実行
するように構成したことを特徴とする計算機等の処理装
置におけるROMプログラムモニタ装置。
5. A ROM in a processing device such as a computer having storage means such as a ROM for storing a plurality of instructions, and processing means for performing processing by sequentially reading and executing the instructions stored in the storage means. In a program monitor device, monitor execution instructing means for instructing execution of a monitor operation, interrupt registration means for storing an interrupt for transition to the monitor operation, interrupt execution instructing means for instructing execution of a specific interrupt process, and monitor operation Command registering means for storing a specific command which changes at the time,
When sequentially reading and executing the instructions stored in
The interrupt execution instructing means indicates that a specific interrupt is being processed, and the monitor execution instructing means instructs execution of a monitor operation, and the instruction matches a specific instruction recorded in the instruction registering means. A ROM program monitoring device in a processing device such as a computer, wherein the ROM program monitoring device is configured to execute the monitoring process in place of a predetermined command for executing the monitoring process.
【請求項6】 モニタの対象となるデバイスを指定する
デバイス選択指示手段を備え、前記モニタ動作を行う場
合に前記デバイス選択指示手段で選択されたデバイスに
対してモニタ動作を実行することを特徴とする請求項5
記載の計算機等の処理装置におけるROMプログラムモ
ニタ装置。
6. A device selecting means for designating a device to be monitored, wherein when performing the monitor operation, the monitor operation is performed on the device selected by the device select instruction means. Claim 5
A ROM program monitor device in a processing device such as a computer described in the above.
JP8158401A 1996-06-19 1996-06-19 Rom program monitor device of processor of computer or the like Pending JPH1011320A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP8158401A JPH1011320A (en) 1996-06-19 1996-06-19 Rom program monitor device of processor of computer or the like

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP8158401A JPH1011320A (en) 1996-06-19 1996-06-19 Rom program monitor device of processor of computer or the like

Publications (1)

Publication Number Publication Date
JPH1011320A true JPH1011320A (en) 1998-01-16

Family

ID=15670947

Family Applications (1)

Application Number Title Priority Date Filing Date
JP8158401A Pending JPH1011320A (en) 1996-06-19 1996-06-19 Rom program monitor device of processor of computer or the like

Country Status (1)

Country Link
JP (1) JPH1011320A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011514606A (en) * 2008-03-17 2011-05-06 フリースケール セミコンダクター インコーポレイテッド Debugging method, control method, and debugging device for authenticating conditional debug instruction based on address
JP2011150691A (en) * 2009-12-25 2011-08-04 Fujitsu Ltd Arithmetic processing unit, information processing device, and control method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011514606A (en) * 2008-03-17 2011-05-06 フリースケール セミコンダクター インコーポレイテッド Debugging method, control method, and debugging device for authenticating conditional debug instruction based on address
JP2011150691A (en) * 2009-12-25 2011-08-04 Fujitsu Ltd Arithmetic processing unit, information processing device, and control method

Similar Documents

Publication Publication Date Title
JP4703718B2 (en) Selective subroutine return structure
JPH0682320B2 (en) Data processing device
US4656581A (en) Vector mask control system
JPH10214203A (en) Information processor
JPH1011320A (en) Rom program monitor device of processor of computer or the like
US20070011440A1 (en) Processor and processing method
JPH09288595A (en) Arithmetic processing unit
JPH10222361A (en) Rom program monitor device in processor of computer or the like
JPH09198337A (en) Processor
JP2506591B2 (en) Auxiliary processor
JP2880658B2 (en) Runaway detection device for multitask program
JP2000076095A (en) Device and method for tracing program and storage medium storing program therefor
JPH04338825A (en) Arithmetic processor
JP3130421B2 (en) Program analysis method and apparatus
JPH11163968A (en) Protocol monitor device for processing device such as computer
JP2926590B1 (en) Program debugger, program debugging method and recording medium
JPS595931B2 (en) Address stop method for arithmetic processing system
JPS5835648A (en) Program execution controlling system
JPS5822765B2 (en) Program loading method in electronic computer system
KR910006841A (en) Data processing unit based on microprogram control
JPS62221033A (en) Data processing system
JPS5849901B2 (en) data processing equipment
JPH0535499A (en) Data processing device and method
JPH08161010A (en) Ladder sequence program arithmetic unit
JPH1139159A (en) Computer system