JP2005338952A - Program branching method - Google Patents
Program branching method Download PDFInfo
- Publication number
- JP2005338952A JP2005338952A JP2004153630A JP2004153630A JP2005338952A JP 2005338952 A JP2005338952 A JP 2005338952A JP 2004153630 A JP2004153630 A JP 2004153630A JP 2004153630 A JP2004153630 A JP 2004153630A JP 2005338952 A JP2005338952 A JP 2005338952A
- Authority
- JP
- Japan
- Prior art keywords
- program
- processing unit
- branch
- programs
- switching
- 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
Links
Images
Abstract
Description
本発明は、複数のプログラムを切替えるプログラム分岐方法に関する。 The present invention relates to a program branching method for switching a plurality of programs.
従来、小さなプログラム領域で複数のプログラムを実行しなければならない場合には、メモリからプログラムデータを制御手段の実行領域にコピーした後にプログラムによる処理を開始しなければならなかった。 Conventionally, when it is necessary to execute a plurality of programs in a small program area, it is necessary to start processing by the program after copying the program data from the memory to the execution area of the control means.
図6は、従来のプログラムコピーの動作を示すフローチャートである。
図6において、制御手段の動作を起動すると(ステップS41)、まず、複数のプログラムのいずれかを選択的に切り替えるための分岐の判断をする(ステップS42)。ここで、分岐の判断は制御手段のレジスタ、ポートの状態を条件とする。
FIG. 6 is a flowchart showing a conventional program copy operation.
In FIG. 6, when the operation of the control means is started (step S41), first, a branch is determined for selectively switching one of a plurality of programs (step S42). Here, the determination of branching is made on condition of the state of the register and port of the control means.
次に、外部のメモリ領域から制御手段によるプログラムの実行領域へプログラムコードをコピーする(ステップS43)。これにより、分岐先を決定してその処理へ移ることにより、実行領域へコピーされたプログラムに応じた処理71、処理72、又は処理73のいずれかが制御手段により実行される。
Next, the program code is copied from the external memory area to the program execution area by the control means (step S43). Thus, by determining the branch destination and proceeding to the processing, any one of the
また、特許文献1に記載の方法ではブート専用のブロック、各パーティションへ切り替えるブロックを用いることによりプログラム切り替えを実現するようにしていた。
また、特許文献2に記載の方法では処理の切り替え時にハードウエアが次に呼び出す関数のアドレスを計算することによりプログラム切り替えを実現するようにしていた。
In the method described in
上述した従来のプログラムコピーの方法では、小さなプログラム領域で複数のプログラムを実行しなければならない場合、メモリからプログラムデータを実行領域にコピーした後に処理を開始しなければならなかったという不都合があった。 In the conventional program copy method described above, when a plurality of programs must be executed in a small program area, there is a disadvantage that the process must be started after the program data is copied from the memory to the execution area. .
また、特許文献1に記載の方法ではブート専用のブロック、各パーティションへ切り替えるブロックがあるが、ブート処理は他の処理と異なる扱いであるため、簡単にプログラム切り替えを実現することができなかった。また、この方法では各パーティションへの処理の移動のみでパーティション間の切り替えはできなかった。
Further, in the method described in
また、特許文献2に記載の方法では処理の切り替え時にハードウエアが次に呼び出す関数のアドレスを計算しているが、アドレスの計算を行うため処理が複雑になるため、ハードウエアの付加が重くなり、また切り替え部分をハードウエアで実装するため汎用性がなくなる。
Further, in the method described in
そこで、本発明は、大きなメモリ記憶容量を必要とせず、簡単な処理でプログラム切り替えを実現することができるプログラム分岐方法を提供することを目的とするものである。 Therefore, an object of the present invention is to provide a program branching method that can realize program switching with a simple process without requiring a large memory storage capacity.
上記課題を解決し、本発明の目的を達成するため、本発明のプログラム分岐方法は、複数のプログラムが記憶されているメモリ領域自体を実行領域に割り当てるステップと、複数のプログラムのいずれかを選択的に切り替えるための分岐の判断をするステップと、分岐の判断に従って複数のプログラムのいずれかを選択的に切り替える分岐の処理をするステップと、分岐の処理に対応するように選択的に切り替えられたプログラムに応じた処理を実行するステップとを備えるものである。 In order to solve the above problems and achieve the object of the present invention, a program branching method of the present invention includes a step of allocating a memory area itself storing a plurality of programs to an execution area, and selecting one of the plurality of programs The step of making a branch decision for switching automatically, the step of making a branch process for selectively switching one of a plurality of programs according to the decision of the branch, and selectively switching to correspond to the branch process And a step of executing processing according to the program.
これによれば、実行しなければならないプログラムが記憶されたメモリ領域自体を制御手段の実行領域に割り当てることにより、従来のようなプログラムコード自体のコピー処理の必要がなくなる。 According to this, by assigning the memory area itself in which the program to be executed is stored to the execution area of the control means, it is not necessary to copy the program code itself as in the prior art.
異なるプログラムが書かれた複数のメモリを選択的に制御手段の実行領域に割り付けることで処理の分岐を行うため、あるプログラムコードが置かれたメモリが割り付けられているアドレス空間に別のプログラムコードが置かれたメモリを割り付けることでオーバーヘッドなく処理の切り替えが行うことができる。 Since a plurality of memories in which different programs are written are selectively allocated to the execution area of the control means, the process branches, so that another program code is placed in the address space to which the memory in which a certain program code is placed is allocated. By allocating the placed memory, processing can be switched without overhead.
また、本発明のプログラム分岐方法は、複数のプログラムが記憶されているメモリ領域自体を実行領域に割り当てるステップと、複数のプログラムのいずれかを選択的に切り替えるための分岐の判断をするステップと、分岐の判断に従って複数のプログラムのいずれかを選択的に切り替える分岐の処理をするステップと、分岐の処理に対応するように選択的に切り替えられたプログラムに応じた処理を実行するステップと、選択的に切り替えられたプログラムに応じた処理の実行領域を残すステップとを備えるものである。 The program branching method of the present invention includes a step of assigning a memory area itself storing a plurality of programs to an execution area, a step of determining a branch for selectively switching one of the plurality of programs, A step of performing a branch process for selectively switching one of a plurality of programs according to the determination of the branch, a step of executing a process according to the program selectively switched to correspond to the branch process, and a selective process And a step of leaving an execution area for processing according to the program switched to (1).
これによれば、実行しなければならないプログラムが記憶されたメモリ領域自体を制御手段の実行領域に割り当てることにより、従来のようなプログラムコード自体のコピー処理の必要がなくなる。また、選択的に切り替えられたプログラムに応じた処理の実行領域を残すことにより、切り替えの前後でプログラムに応じた処理の実行領域を一致させることができので、切り替え処理を効率的に行うことができる。 According to this, by assigning the memory area itself in which the program to be executed is stored to the execution area of the control means, it is not necessary to copy the program code itself as in the prior art. In addition, by leaving the execution area of the process corresponding to the selectively switched program, the execution area of the process corresponding to the program can be matched before and after the switching, so that the switching process can be performed efficiently. it can.
異なるプログラムが書かれた複数のメモリを選択的に制御手段の実行領域に割り付けることで処理の分岐を行うため、あるプログラムコードが置かれたメモリが割り付けられているアドレス空間に別のプログラムコードが置かれたメモリを割り付け、選択的に切り替えられたプログラムに応じた処理の実行領域を残すことでオーバーヘッドなく処理の切り替えが行うことができる。 Since a plurality of memories in which different programs are written are selectively allocated to the execution area of the control means, the process branches, so that another program code is placed in the address space to which the memory in which a certain program code is placed is allocated. Processing can be switched without overhead by allocating the placed memory and leaving a processing execution area corresponding to the selectively switched program.
本発明によれば、従来のようなプログラムコード自体のコピー処理の必要がなくなるため、大きなメモリ記憶容量を必要とせず、簡単な処理でプログラム切り替えを実現することができる。また、オーバーヘッドなく処理の切り替えが行うことができる。 According to the present invention, since it is not necessary to copy the program code itself as in the prior art, program switching can be realized by simple processing without requiring a large memory storage capacity. In addition, processing can be switched without overhead.
以下に、本発明の実施の形態について、適宜図面を参照しながら説明する。
図1は、本発明の実施の形態によるプログラム分岐装置の構成を示す図である。
図1において、制御手段としてのCPU(Central Processing Unit)1は、ROM(Read Only Memory),RAM(Random access Memory)などで構成されるワークエリアと呼ばれる実行領域のうちのプログラム領域2に割り付けられたプログラムの動作を実行するように構成される。
Embodiments of the present invention will be described below with reference to the drawings as appropriate.
FIG. 1 is a diagram showing a configuration of a program branching apparatus according to an embodiment of the present invention.
In FIG. 1, a CPU (Central Processing Unit) 1 as a control means is allocated to a
ここで、複数のプログラムとして、メモリ切替処理部6及びブート処理部3、メモリ切替処理部7及び第1の処理部4、メモリ切替処理部8及び第2の処理部5が記憶されているメモリ領域自体を実行領域であるプログラム領域2に割り当てるように構成される。つまり、メモリ切替処理部6及びブート処理部3、メモリ切替処理部7及び第1の処理部4、メモリ切替処理部8及び第2の処理部5は、制御手段としてのCPU1に対してプログラム領域2の同じメモリアドレス領域に割り当てられる。具体的には、同じアドレスに配置した複数のメモリを選択することで処理を切り替えることになる。
Here, the memory in which the memory switching processing unit 6 and the boot processing unit 3, the memory
また、メモリ切替処理部6、メモリ切替処理部7、メモリ切替処理部8は、制御手段としてのCPU1により、複数のプログラムとして、ブート処理部3、第1の処理部4、第2の処理部5のいずれかを選択的に切り替えるための分岐の判断をするように構成される。ここで、メモリ切替処理部6、メモリ切替処理部7、メモリ切替処理部8は全て同一のプログラムで構成される。また、メモリを切り替える条件は制御手段としてのCPU1のポート、レジスタなどのメモリ外の情報を用いるように構成される。
In addition, the memory switching processing unit 6, the memory
また、メモリ切替処理部6、メモリ切替処理部7、メモリ切替処理部8は、制御手段としてのCPU1により、分岐の判断に従って複数のプログラムとして、ブート処理部3、第1の処理部4、第2の処理部5のいずれかを選択的に切り替える分岐の処理をするように構成される。
The memory switching processing unit 6, the memory
また、制御手段としてのCPU1は、分岐の処理に対応するように選択的に切り替えられたプログラムとして、ブート処理部3、第1の処理部4、第2の処理部5に応じた処理を実行するように構成される。
Further, the
これにより、9に示すように、メモリ切替処理部6、メモリ切替処理部7、メモリ切替処理部8による切替処理によってプログラム領域2に割り付けられるプログラムデータが選択される。そして、制御手段としてのCPU1は、メモリ切替処理部6、メモリ切替処理部7、メモリ切替処理部8による切替処理によって、実行領域のうちのプログラム領域2に割り付けられたプログラムとしてのブート処理部3、第1の処理部4、第2の処理部5の動作を実行する。
As a result, as shown in 9, program data to be allocated to the
図2は、割込要因に対応したメモリ切替の動作を示すフローチャートである。図2は、上述したメモリを切り替える条件が、割込み要因に対応する場合の動作を示すものである。
図2において、制御手段としてのCPU1は、割込があるか否かを判断する(ステップS1)。具体的には、CPU1は、一定時間毎に発生するタイマー割込みや、CPU1によって制御される被制御部の状態遷移による割込みなどを検出する。
FIG. 2 is a flowchart showing the memory switching operation corresponding to the interrupt factor. FIG. 2 shows an operation when the above-described memory switching condition corresponds to an interrupt factor.
In FIG. 2, CPU1 as a control means judges whether there exists interruption (step S1). Specifically, the
CPU1は、割込があると判断したとき、割込要因が何であるかを判断する(ステップS2)。具体的には、CPU1は、パワーオンスイッチのオン操作時のリセット動作による割込要因や、CPU1によって制御される被制御部の状態が他の状態に遷移したときの割込要因などを検出する。
When
CPU1は、割込要因に対応してメモリ切替を行う(ステップS3)。具体的には、CPU1は、パワーオンスイッチのオン操作時のリセット動作による割込要因のときは、図1に示したメモリ切替処理部6による切替処理によってブート処理部3がプログラム領域2に割り付けられるように選択される。また、CPU1によって制御される被制御部の状態が他の状態に遷移したときの割込要因のときは、図1に示したメモリ切替処理部7、メモリ切替処理部8による切替処理によって第1の処理部4、第2の処理部5がプログラム領域2に割り付けられるように選択される。
The
図3は、分岐によるプログラム全体の切替の動作を示すフローチャートである。
図3において、メモリ切替処理部は、分岐の判断を行う(ステップS11、ステップS21、ステップS31)。具体的には、図1に示したメモリ切替処理部は、制御手段としてのCPU1により、複数のプログラムとして、第1の処理部、第2の処理部、第3の処理部のいずれかを選択的に切り替えるための分岐の判断をする。
FIG. 3 is a flowchart showing the operation of switching the whole program by branching.
In FIG. 3, the memory switching processing unit determines branching (step S11, step S21, step S31). Specifically, the memory switching processing unit shown in FIG. 1 selects any one of the first processing unit, the second processing unit, and the third processing unit as a plurality of programs by the
分岐が必要であると判断されたときは、次に、メモリ切替処理部は、分岐(切替)処理を行う(ステップS12、ステップS22、ステップS32)。具体的には、図1に示したメモリ切替処理部(ステップS12、ステップS22、ステップS32)は、制御手段としてのCPU1により、第1の処理部による第1の処理(ステップS13)、第2の処理部による第2の処理(ステップS23)、第3の処理部による第3の処理(ステップS33)のいずれかを選択的に切り替える分岐の処理をする。
If it is determined that branching is necessary, the memory switching processing unit next performs branching (switching) processing (step S12, step S22, step S32). Specifically, the memory switching processing unit (step S12, step S22, step S32) shown in FIG. 1 is performed by the
メモリ切替処理部(ステップS12、ステップS22、ステップS32)の分岐(切替)処理により、31に示すように、全てをプログラムごと(ステップS11〜ステップS13、ステップS21〜ステップS23、ステップS31〜ステップS33)
切り替える。
By branching (switching) processing of the memory switching processing unit (step S12, step S22, step S32), as shown in 31, all of them are programmed (step S11 to step S13, step S21 to step S23, step S31 to step S33). )
Switch.
ここで、第1の処理部による第1の処理(ステップS13)に切り替えられたときは、図1に示した制御手段としてのCPU1は、分岐の処理に対応するように選択的に切り替えられたプログラムとして、第1の処理部に応じた処理を実行する(ステップS13)。
Here, when the process is switched to the first process (step S13) by the first processing unit, the
また、第2の処理部による第2の処理(ステップS23)に切り替えられたときは、図1に示した制御手段としてのCPU1は、分岐の処理に対応するように選択的に切り替えられたプログラムとして、第2の処理部に応じた処理を実行する(ステップS23)。
When the second processing unit switches to the second processing (step S23), the
また、第3の処理部による第3の処理(ステップS33)に切り替えられたときは、図1に示した制御手段としてのCPU1は、分岐の処理に対応するように選択的に切り替えられたプログラムとして、第3の処理部に応じた処理を実行する(ステップS33)。
When switched to the third processing (step S33) by the third processing unit, the
このように、メモリ切替処理部(ステップS12、ステップS22、ステップS32)は、第1の処理部による第1の処理(ステップS13)、第2の処理部による第2の処理(ステップS23)、第3の処理部による第3の処理(ステップS33)を呼び出すように動作する。 As described above, the memory switching processing unit (step S12, step S22, step S32) includes the first processing by the first processing unit (step S13), the second processing by the second processing unit (step S23), The third processing unit operates so as to call the third processing (step S33).
ここでは、前提として、まず、切替処理の数分のプログラムを記憶したメモリが同じアドレスに配置されている。次に、全てのメモリに記録されているプログラムの先頭部分にメモリ切り替えを管理するメモリ切替処理部を搭載していて、メモリ切替処理部の後部にそれぞれのプログラムの処理部を実装している。 Here, as a premise, first, memories storing programs for the number of switching processes are arranged at the same address. Next, a memory switching processing unit for managing memory switching is mounted at the head of the program recorded in all memories, and the processing unit for each program is mounted at the rear of the memory switching processing unit.
そして、処理を開始すると、まずメモリに記録されているプログラムの先頭部分に搭載されているメモリ切替処理部により分岐の判断及び切替処理が行われる。ここでは、31に示すように、分岐(切替)によって全てをプログラムごと切り替える。 Then, when the process is started, branch determination and switching processing are first performed by the memory switching processing unit mounted at the head portion of the program recorded in the memory. Here, as shown at 31, all of the programs are switched by branching (switching).
次に、切替えられたメモリ上に記憶されているプログラムが図1に示した制御手段としてのCPU1により実行され、プログラムの実行処理が終わると再びメモリ切替処理部による分岐の判断及び切替処理へ戻って、これらの判断及び処理を繰り返す。
Next, the program stored in the switched memory is executed by the
図4は、ハードウエア構成を示す図である。
図4において、制御手段としてのCPU41には、第1のメモリ43、第2のメモリ44、第3のメモリ45のそれぞれが同じアドレス領域に割り当てられている。CPU41は、例えばチップセレクト信号などの同じアドレス信号ADを第1のメモリ43、第2のメモリ44、第3のメモリ45に対して供給する。
FIG. 4 is a diagram illustrating a hardware configuration.
In FIG. 4, the
ここで、スイッチ42から、第1のメモリ43、第2のメモリ44、第3のメモリ45に対して、たとえばチップイネーブル信号などの選択信号CHが供給される。この選択信号CHは、同じアドレス領域に割り当てられた第1のメモリ43、第2のメモリ44、第3のメモリ45のアドレス領域を有効にする信号であればよい。
Here, a selection signal CH such as a chip enable signal is supplied from the
CPU41に対して同じアドレス領域に配置された第1のメモリ43、第2のメモリ44、第3のメモリ45に対して、CPU41は、例えばチップセレクト信号などの同じアドレス信号ADを第1のメモリ43、第2のメモリ44、第3のメモリ45に対して供給して、第1のメモリ43、第2のメモリ44、第3のメモリ45のいずれかを選択する。
For the
そして、CPU41は、スイッチ42からの選択信号CHによって選択された第1のメモリ43、第2のメモリ44、第3のメモリのいずれかに記憶されたプログラムデータを出力する。
Then, the
なお、ここで、選択信号CHを管理しているスイッチ42に対してCPU41からの選択信号CHに基づいて切り替え処理が可能に構成される。
Here, the
図5は、OS処理に応じたプログラム分岐装置の構成を示す図である。
図5において、制御手段としてのCPU51は、ROM,RAMなどで構成されるワークエリアと呼ばれる実行領域のうちのプログラム領域53に割り付けられたプログラムの動作を実行するように構成される。
FIG. 5 is a diagram illustrating a configuration of a program branching apparatus according to the OS process.
In FIG. 5, a
ここで、複数のプログラムとして、オペレーティングシステム(OS(Operating System))処理部57、第1のタスク処理部54、プログラムカウンタ部61及びスタックポインタ部62と、オペレーティングシステム(OS)処理部58、第2のタスク処理部55、プログラムカウンタ部63及びスタックポインタ部64と、オペレーティングシステム(OS)処理部59、第3のタスク処理部56、プログラムカウンタ部65及びスタックポインタ部66は、制御手段としてのCPU51に対してプログラム領域53の同じメモリアドレス領域に割り当てられる。具体的には、同じアドレスに配置した複数のメモリを選択することで処理を切り替えることになる。
Here, as a plurality of programs, an operating system (OS (Operating System))
また、オペレーティングシステム(OS)処理部57、オペレーティングシステム(OS)処理部58、オペレーティングシステム(OS)処理部59は、制御手段としてのCPU51により、複数のプログラムとして、第1のタスク処理部54、第2のタスク処理部55、第3のタスク処理部56のいずれかを選択的に切り替えるための分岐の判断をするように構成される。ここで、オペレーティングシステム(OS)処理部57、オペレーティングシステム(OS)処理部58、オペレーティングシステム(OS)処理部59は全て異なるプログラムで構成される。また、メモリを切り替える条件は制御手段としてのCPU51のポート、レジスタなどのメモリ外の情報を用いるように構成される。
In addition, the operating system (OS)
また、オペレーティングシステム(OS)処理部57、オペレーティングシステム(OS)処理部58、オペレーティングシステム(OS)処理部59は、制御手段としてのCPU51により、分岐の判断に従って複数のプログラムとして、第1のタスク処理部54、第2のタスク処理部55、第3のタスク処理部56のいずれかを選択的に切り替える分岐の処理をするように構成される。
In addition, the operating system (OS)
また、制御手段としてのCPU51は、分岐の処理に対応するように選択的に切り替えられたプログラムとして、第1のタスク処理部54、第2のタスク処理部55、第3のタスク処理部56に応じた処理を実行するように構成される。
Further, the
また、プログラムカウンタ部61及びスタックポインタ部62と、プログラムカウンタ部63及びスタックポインタ部64と、プログラムカウンタ部65及びスタックポインタ部66は、選択的に切り替えられたプログラムとして、第1のタスク処理部54、第2のタスク処理部55、第3のタスク処理部56に応じた処理の実行領域を残すように構成される。
The
ここで、プログラムカウンタ部61,63,65は、第1のタスク処理部54、第2のタスク処理部55、第3のタスク処理部56によるプログラムのアドレスを計数する。また、スタックポインタ部62,64,66は、プログラムカウンタ部61,63,65によるプログラムのアドレスを指して残す。
Here, the
また、スタックRAM52は、スタックポインタ部62と、スタックポインタ部64と、スタックポインタ部66により残したプログラムのアドレスを読み出し可能に記憶する。
Further, the
これにより、67に示すように、オペレーティングシステム(OS)処理部57、オペレーティングシステム(OS)処理部58、オペレーティングシステム(OS)処理部59による切替処理によってプログラム領域53に割り付けられるプログラムデータが選択される。
As a result, as shown in 67, the program data allocated to the
そして、制御手段としてのCPU51は、オペレーティングシステム(OS)処理部57、オペレーティングシステム(OS)処理部58、オペレーティングシステム(OS)処理部59による切替処理によって、実行領域のうちのプログラム領域53に割り付けられたプログラムとしての第1のタスク処理部54、第2のタスク処理部55、第3のタスク処理部56の動作を実行する。
Then, the
1…CPU、2…プログラム領域、3…ブート処理部、4…第1の処理部、5…第2の処理部、6…メモリ切替処理部、7…メモリ切替処理部、8…メモリ切替処理部、9…切替処理によってプログラム領域2に割り付けられるプログラムデータが選択される、31…分岐(切替)によって全てをプログラムごと切り替える、41…CPU、42…スイッチ、43…第1のメモリ、44…第2のメモリ、45…第3のメモリ、AD…同じアドレス信号、CH…選択信号、51…CPU、53…プログラム領域、54…第1のタスク処理部、55…第2のタスク処理部、56…第3のタスク処理部、57…オペレーティングシステム(OS)処理部、58…オペレーティングシステム(OS)処理部、59…オペレーティングシステム(OS)処理部、61…プログラムカウンタ部、62…スタックポインタ部、63…プログラムカウンタ部、64…スタックポインタ部、65…プログラムカウンタ部、66…スタックポインタ部、67…オペレーティングシステム(OS)による切替処理によってプログラム領域53に割り付けられるプログラムデータが選択される、
DESCRIPTION OF
Claims (8)
上記複数のプログラムが記憶されている上記メモリ領域自体を上記実行領域に割り当てるステップと、
上記複数のプログラムのいずれかを選択的に切り替えるための分岐の判断をするステップと、
上記分岐の判断に従って上記複数のプログラムのいずれかを選択的に切り替える分岐の処理をするステップと、
上記分岐の処理に対応するように選択的に切り替えられたプログラムに応じた処理を実行するステップと
を備えたことを特徴とするプログラム分岐方法。 In a program branching method for switching a plurality of programs stored in a memory area to an execution area of a control means and reading and executing processing according to the program,
Assigning the memory area itself storing the plurality of programs to the execution area;
Determining a branch for selectively switching one of the plurality of programs;
A step of performing a branch process for selectively switching one of the plurality of programs according to the determination of the branch;
And a step of executing a process according to a program selectively switched so as to correspond to the branch process.
上記複数のプログラムは、上記分岐の処理をするステップに応じた切替処理部と、上記複数のプログラムに応じたプログラム処理部
を備えることを特徴とするプログラム分岐方法。 The program branching method according to claim 1, wherein
The plurality of programs includes a switching processing unit corresponding to the step of performing the branching process, and a program processing unit corresponding to the plurality of programs.
上記分岐の判断をするステップと、上記分岐の処理をするステップと、上記処理を実行するステップは繰り返して実行される
を備えたことを特徴とするプログラム分岐方法。 The program branching method according to claim 1, wherein
A program branching method comprising: the step of determining the branch, the step of performing the branch process, and the step of executing the process are repeatedly executed.
上記分岐の判断をするステップは割り込み処理の有無を判断し、上記分岐の処理をするステップは上記割り込み処理の割り込み要因に対応して分岐の処理をする
ことを特徴とするプログラム分岐方法。 The program branching method according to claim 1, wherein
The program branching method characterized in that the step of determining the branch determines whether or not there is an interrupt process, and the step of performing the branch process performs a branch process corresponding to the interrupt factor of the interrupt process.
上記複数のプログラムが記憶されている上記メモリ領域自体を上記実行領域に割り当てるステップと、
上記複数のプログラムのいずれかを選択的に切り替えるための分岐の判断をするステップと、
上記分岐の判断に従って上記複数のプログラムのいずれかを選択的に切り替える分岐の処理をするステップと、
上記分岐の処理に対応するように選択的に切り替えられたプログラムに応じた処理を実行するステップと、
上記選択的に切り替えられたプログラムに応じた処理の実行領域を残すステップと、
を備えたことを特徴とするプログラム分岐方法。 In a program branching method for switching a plurality of programs stored in a memory area to an execution area of a control means and reading and executing processing according to the program,
Assigning the memory area itself storing the plurality of programs to the execution area;
Determining a branch for selectively switching one of the plurality of programs;
A step of performing a branch process for selectively switching one of the plurality of programs according to the determination of the branch;
Executing a process corresponding to the program selectively switched to correspond to the branch process;
Leaving an execution area for processing according to the selectively switched program;
A program branching method comprising:
上記複数のプログラムは、上記分岐の処理をするステップに応じたオペレーティングシステム(OS)処理部と、上記複数のプログラムに応じたプログラム処理部と、上記プログラム処理部によるプログラムのアドレスを計数するプログラムカウンタ部と、上記プログラムカウンタ部によるプログラムのアドレスを残すスタックポインタ部
を備えることを特徴とするプログラム分岐方法。 The program branching method according to claim 5, wherein
The plurality of programs include an operating system (OS) processing unit corresponding to the step of performing the branching process, a program processing unit corresponding to the plurality of programs, and a program counter that counts program addresses by the program processing unit. And a stack pointer section for leaving the address of the program by the program counter section.
上記分岐の判断をするステップと、上記分岐の処理をするステップと、上記処理を実行するステップと、上記処理の実行領域を残すステップは繰り返して実行される
を備えたことを特徴とするプログラム分岐方法。 The program branching method according to claim 5, wherein
The program branch comprising: the step of determining the branch, the step of performing the branch process, the step of executing the process, and the step of leaving the execution area of the process are repeatedly executed. Method.
上記分岐の判断をするステップはオペレーティングシステム(OS)処理及び割り込み処理の有無を判断し、上記分岐の処理をするステップは上記オペレーティングシステム(OS)処理に基づく処理要求及び上記割り込み処理の割り込み要因に対応して分岐の処理をする
ことを特徴とするプログラム分岐方法。 The program branching method according to claim 5, wherein
The step of determining the branch determines whether or not there is an operating system (OS) process and an interrupt process, and the step of performing the branch process determines a processing request based on the operating system (OS) process and an interrupt factor of the interrupt process. A program branching method characterized by branching correspondingly.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004153630A JP2005338952A (en) | 2004-05-24 | 2004-05-24 | Program branching method |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2004153630A JP2005338952A (en) | 2004-05-24 | 2004-05-24 | Program branching method |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2005338952A true JP2005338952A (en) | 2005-12-08 |
Family
ID=35492490
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2004153630A Pending JP2005338952A (en) | 2004-05-24 | 2004-05-24 | Program branching method |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2005338952A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010244679A (en) * | 2009-04-06 | 2010-10-28 | Samsung Electronics Co Ltd | Method of dynamically relocating code and disk drive |
-
2004
- 2004-05-24 JP JP2004153630A patent/JP2005338952A/en active Pending
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010244679A (en) * | 2009-04-06 | 2010-10-28 | Samsung Electronics Co Ltd | Method of dynamically relocating code and disk drive |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP2017037370A (en) | Computing device, process control method and process control program | |
KR20070090649A (en) | Apparatus and method for providing cooperative scheduling on multi-core system | |
US7694182B2 (en) | Debugging system and method | |
US20080133899A1 (en) | Context switching method, medium, and system for reconfigurable processors | |
JP2008522277A (en) | Efficient switching between prioritized tasks | |
JP2007334403A (en) | System and method for supporting trouble of computer system | |
JP4170364B2 (en) | Processor | |
JP2009252128A (en) | Memory control apparatus and method of controlling the same | |
TWI592803B (en) | Method of operating embedded system and control chip thereof | |
JP2005338952A (en) | Program branching method | |
JP2007226640A (en) | Memory diagnosis processing circuit and memory diagnosis processing method | |
JP3956305B2 (en) | Nonvolatile semiconductor memory device and data processing device | |
JP2000215068A (en) | Multitask scheduling device | |
JP2007122337A (en) | Arithmetic unit | |
KR100401560B1 (en) | Kernel Stack Dynamic Allocation Method In Operating System | |
JP2001229038A (en) | Multi-operating computer system | |
JP2005071141A (en) | Method and device for managing stack and stack management program | |
JP2004178427A (en) | Central processing unit | |
JP2001134449A (en) | Data processor and its control method | |
JP3695078B2 (en) | Programmable controller with pulse output instructions | |
JPH07230358A (en) | Multiplexed volume device | |
JPS62151942A (en) | Task changing-over system | |
JP5789237B2 (en) | Memory management device | |
JP2007122421A (en) | Memory management method | |
JP2017187895A (en) | Memory managing device, and memory managing method |