JPH0221614B2 - - Google Patents

Info

Publication number
JPH0221614B2
JPH0221614B2 JP57214364A JP21436482A JPH0221614B2 JP H0221614 B2 JPH0221614 B2 JP H0221614B2 JP 57214364 A JP57214364 A JP 57214364A JP 21436482 A JP21436482 A JP 21436482A JP H0221614 B2 JPH0221614 B2 JP H0221614B2
Authority
JP
Japan
Prior art keywords
mode
register
value
arithmetic processing
address
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.)
Expired - Lifetime
Application number
JP57214364A
Other languages
Japanese (ja)
Other versions
JPS59103146A (en
Inventor
Yoshio Nakano
Yutaka Takano
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 JP57214364A priority Critical patent/JPS59103146A/en
Publication of JPS59103146A publication Critical patent/JPS59103146A/en
Publication of JPH0221614B2 publication Critical patent/JPH0221614B2/ja
Granted legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F7/00Methods or arrangements for processing data by operating upon the order or content of the data handled
    • G06F7/38Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation
    • G06F7/48Methods or arrangements for performing computations using exclusively denominational number representation, e.g. using binary, ternary, decimal representation using non-contact-making devices, e.g. tube, solid state device; using unspecified devices

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computational Mathematics (AREA)
  • Computing Systems (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Pure & Applied Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Microcomputers (AREA)
  • Storage Device Security (AREA)

Description

【発明の詳細な説明】 産業上の利用分野 本発明はマイクロコンピユータなどの計算機シ
ステムにおける演算処理装置の動作モード表示を
行なう動作モード表示装置に関するものである。
DETAILED DESCRIPTION OF THE INVENTION Field of Industrial Application The present invention relates to an operation mode display device for displaying the operation mode of an arithmetic processing unit in a computer system such as a microcomputer.

従来例の構成とその問題点 マイクロコンピユータの発展に伴い、マイクロ
コンピユータシステムも大型し、処理内容も以前
の小型ミニコンピユータに匹敵する程度のものが
要求・実現されるようになつてきている。システ
ムの規模が小さい間はすべてを利用者管理にする
ことが可能であつたが、規模が大型化するに従い
利用者プログラムや周辺機器、主記憶などの資源
を管理し、より効率よく演算処理装置を稼働させ
るように制御する制御プログラムというものを導
入し、利用者管理を大幅に削減していくとが望ま
れる。この場合、利用者プログラムと制御プログ
ラムとはその処理内容の性格上扱える資源という
ものが厳然と区別される。この点を入出力管理と
いう側面を一例にして説明する。
Conventional configurations and their problems With the development of microcomputers, microcomputer systems have become larger, and processing capabilities comparable to those of previous small-sized minicomputers are now being demanded and realized. As long as the scale of the system was small, it was possible to have everything managed by the user, but as the scale of the system increased, resources such as user programs, peripherals, and main memory could be managed more efficiently, and the processing It is hoped that a control program will be introduced to control the operation of the system, thereby significantly reducing user management. In this case, the resources that can be handled by the user program and the control program are clearly differentiated due to the nature of their processing contents. This point will be explained using the aspect of input/output management as an example.

計算機システムの持つ代表的な入出力装置とし
ては二次記憶装置がある。二次記憶装置上には、
プログラムやデータがフアイルという形で保持さ
れており、それらはシステムで定義された一定の
形式に従つて記録されている。この一定の形式と
いうものは利用者が管理するのではなく、制御プ
ログラムが管理し、利用者はフアイルの形式とい
うものを知らなくても良いようになつている。し
たがつて、二次記憶装置への入出力は、利用者プ
ログラムからは直接には行えず、必ず制御プログ
ラムを仲介するように構成しなければならない。
つまり、利用者プログラム実行中は入出力装置へ
のアクセスを禁止または無効にし、制御プログラ
ム実行中のみ入出力装置へのアクセスが許される
ようにハードウエア装置の制御を切換えることが
必要になる。
A secondary storage device is a typical input/output device of a computer system. On the secondary storage device,
Programs and data are held in the form of files, and they are recorded according to a certain format defined by the system. This fixed format is not managed by the user, but by the control program, so that the user does not need to know the file format. Therefore, input/output to the secondary storage device cannot be performed directly from the user program, and must be configured so that the control program is used as an intermediary.
In other words, it is necessary to switch the control of the hardware device so that access to the input/output device is prohibited or disabled while the user program is running, and access to the input/output device is allowed only while the control program is running.

このように、ハードウエア装置の切換を指示す
るために、動作中のプログラムが特権プログラム
(制御プログラム)か非特権プログラム(利用者
プログラム)かを表示する動作モード表示装置と
いうものが必要となる。この動作モード表示とい
う機能はミニコンピユータ以上においては演算処
理装置自体が持つているが、現存し広範囲で使用
されているマイクロプロセツサには設計上の思想
またはLSI(大規模集積回路)化のためのピン数
制限のために、動作モード表示機能を持つていな
いので、高機能マイクロプロセツサシステムを構
築する上での大きな障害となつている。また特権
モードなるものが複数種類存在する場合もあり、
さらにはこの動作モードの変更によるハードウエ
アの切換は、プログラムの特権、非特権という性
格上、プログラムの分岐(動作モードの変更)と
同時にハードウエア的に行なわなければならな
い。
In this way, in order to instruct switching of hardware devices, an operation mode display device is required that displays whether the program in operation is a privileged program (control program) or a non-privileged program (user program). This function of displaying the operation mode is possessed by the arithmetic processing unit itself in minicomputers and above, but in the microprocessors that exist and are widely used, there is a function to display the operation mode due to design considerations or LSI (large scale integrated circuit). Due to the limited number of pins, it does not have an operation mode display function, which is a major obstacle in building a high-performance microprocessor system. Also, there may be multiple types of privileged modes,
Furthermore, this switching of hardware due to a change in operating mode must be performed in hardware at the same time as program branching (change in operating mode) due to the privileged and non-privileged nature of programs.

発明の目的 本発明は上記欠点に鑑み、演算処理装置自体に
動作モード表示機能のないシステムの動作モード
表示装置を提供することを目的とする。
OBJECTS OF THE INVENTION In view of the above drawbacks, it is an object of the present invention to provide an operation mode display device for a system in which the arithmetic processing unit itself does not have an operation mode display function.

発明の構成 本発明は上記目的を達するために予め設定され
たアドレスを命令コード読み込みサイクルとして
アクセスしたことを検出して、その際に定義づけ
られた動作モード値を動作モードレジスタに格納
し動作モードを表現させるようにしたものであ
る。
Composition of the Invention In order to achieve the above object, the present invention detects that a preset address is accessed as an instruction code read cycle, stores the operation mode value defined at that time in an operation mode register, and stores the operation mode value defined at that time in an operation mode register. It is designed to express.

実施例の説明 以下図面を参照しながら、本発明の一実施例に
ついて説明する。
DESCRIPTION OF EMBODIMENTS An embodiment of the present invention will be described below with reference to the drawings.

図は本発明の一実施例における動作モード表示
装置の構成を示すものである。
The figure shows the configuration of an operation mode display device in an embodiment of the present invention.

同図において、11は演算処理装置、12は主
記憶装置、13はデータ母線、14はアドレス母
線である。15,25はモード切換番地レジス
タ、19,29は設定モード値レジスタ、21は
演算処理装置11が主記憶装置12を命令コード
読み込みサイクルとしてアクセスしていることを
示す命令読み込み状態表示信号線(以下、フエツ
チ信号線と記す)、17はモードレジスタ、22
はモード退避レジスタ、16,26は制御部であ
る。
In the figure, 11 is an arithmetic processing unit, 12 is a main storage device, 13 is a data bus line, and 14 is an address bus line. 15 and 25 are mode switching address registers, 19 and 29 are setting mode value registers, and 21 is an instruction reading status display signal line (hereinafter referred to as , Fetch signal line), 17 is a mode register, 22
is a mode save register, and 16 and 26 are control units.

今、演算処理装置11はモードM1での実行が
許されているプログラムP1を実行中であり、モ
ードM2での実行が許されているプログラムP2
に分岐し、プログラムP2の処理終了後再びプロ
グラムP1に復帰しモードM1での処理を続行す
るものとする。
Currently, the arithmetic processing unit 11 is executing a program P1 that is allowed to be executed in mode M1, and a program P2 that is allowed to be executed in mode M2.
After the processing of program P2 is completed, the program branches to program P1 and continues processing in mode M1.

さて現在実行中のプログラムP1はモードM1
での実行が許されているので、プログラムP1で
の実行が開始されると同時にモードレジスタ17
には動作モードがM1であることを表示するため
にM1という値が格納されている。なお、モード
切換番地レジスタ15にはプログラムP2の実行
開始番地が設定モード値レジスタ19にはプログ
ラムP2の実行が許されているモード値M2が予
め設定されている。制御部16はフエツチ信号線
21が“1”の時にアドレス母線14の値とモー
ド切換番地レジスタ15の内容を比較し一致して
いなければモード切換信号線18に“0”を出力
し一致していればモード切換信号線18に“1”
を出力しこの信号“1”に同期してモードレジス
タ17の内容をモード表示信号線23を介してモ
ード退避レジスタ22に転送し、設定モード値レ
ジスタ19の内容を設定モードデータ線20を介
してモードレジスタ17に転送する。制御部26
も同様の機能を持つが現時点でのモード切換番地
レジスタ25および設定モード値レジスタ29の
内容は不定である。
Now, the currently running program P1 is in mode M1.
Since execution is allowed in the mode register 17 at the same time as execution of the program P1 is started.
A value M1 is stored in the field to indicate that the operation mode is M1. Note that the mode switching address register 15 is preset with the execution start address of the program P2, and the setting mode value register 19 is preset with a mode value M2 at which execution of the program P2 is permitted. When the fetch signal line 21 is "1", the control section 16 compares the value of the address bus 14 and the contents of the mode switching address register 15, and if they do not match, outputs "0" to the mode switching signal line 18, and if they do not match. If so, “1” is sent to the mode switching signal line 18.
is output, and in synchronization with this signal "1", the contents of the mode register 17 are transferred to the mode save register 22 via the mode display signal line 23, and the contents of the setting mode value register 19 are transferred via the setting mode data line 20. Transfer to mode register 17. Control unit 26
has a similar function, but the contents of the mode switching address register 25 and the setting mode value register 29 are undefined at present.

モードM1で実行中のプログラムP1がモード
M2で実行可能なプログラムP2を呼び出すと、
演算処理装置11はプログラムP2の実行開始番
地をアドレス母線14に出し同時にフエツチ信号
線21に“1”を出力する。すると、制御部16
はモード切換番地レジスタ15の内容と同じ値が
アドレス母線14に命令のフエツチサイクルで出
力されたことを検出し、前述の機能により、モー
ド退避レジスタ22にはモードレジスタ17の内
容M1が格納され、モードレジスタ17には設定
モード値レジスタ19の内容M2が格納される。
これにより、プログラム制御がプログラムP1か
らプログラムP2に分岐したのち同時に演算処理
装置11の動作モード表示値もM1からM2に変
更することができる。
When program P1 running in mode M1 calls program P2 that can be executed in mode M2,
The arithmetic processing unit 11 outputs the execution start address of the program P2 to the address bus line 14 and at the same time outputs "1" to the fetch signal line 21. Then, the control section 16
detects that the same value as the content of the mode switching address register 15 is output to the address bus 14 in the fetch cycle of the instruction, and the content M1 of the mode register 17 is stored in the mode save register 22 by the above-mentioned function. , the content M2 of the setting mode value register 19 is stored in the mode register 17.
Thereby, after the program control branches from the program P1 to the program P2, the operation mode display value of the arithmetic processing unit 11 can also be changed from M1 to M2 at the same time.

次にプログラムP2の処理が終了しプログラム
P1に復帰する時はモード退避レジスタ22の内
容を読み出し(現在はM1になつている)その値
を設定モード値レジスタ29に格納し呼び出し元
プログラムへの復帰番地をモード切換番地レジス
タ25に格納後、呼び出し元プログラムへの復帰
命令を実行すると、プログラムP2の実行開始時
と同様の機構により復帰番地に格納されている命
令をフエツチしプログラム制御がプログラムP2
からプログラムP1に復帰すると同時に動作モー
ド表示値もM2から呼び出し元プログラムの動作
モード表示値(今の場合M1)にもどすことがで
きる。
Next, when the processing of program P2 ends and returns to program P1, the contents of the mode save register 22 are read (currently M1), the value is stored in the setting mode value register 29, and the return is made to the calling program. After storing the address in the mode switching address register 25, when a return instruction to the calling program is executed, the instruction stored at the return address is fetched by the same mechanism as when program P2 starts execution, and the program control is changed to program P2.
At the same time as returning to program P1 from M2, the operating mode display value can be returned from M2 to the operating mode display value of the calling program (M1 in this case).

以上のように本実施例によれば、演算処理装置
1自体に動作モード表示機能のないものを使用し
た計算機システムにおいても動作モードというも
のによつて定義づけられるところのプログラムお
よびハードウエアの切換が同時に行なえモードの
異なるプログラムへの分岐をせずに不当にモード
を変更してアクセスの許されていない資源へのア
クセス権を得ることを防止することができる。
As described above, according to this embodiment, even in a computer system in which the arithmetic processing unit 1 itself does not have an operation mode display function, switching of programs and hardware defined by the operation mode is possible. It is possible to prevent unauthorized mode changes and gaining access rights to resources to which access is not permitted, without branching to programs with different modes.

なお本実施例では、モード切換番地レジスタ1
5,25設定モード値レジスタ19,29および
制御部16,26は各2組としたが各3組以上持
つ構成も可能である。また、動作モードを変更し
た後の復帰モード値、つまり本実施例における設
定モード値レジスタ29に設定する値が常に予め
分かつている値であるならば、モード退避レジス
タ23を省略することも可能である。
In this embodiment, mode switching address register 1
Although two sets each of the 5, 25 setting mode value registers 19, 29 and the control units 16, 26 are provided, it is also possible to have three or more sets each. Furthermore, if the return mode value after changing the operating mode, that is, the value set in the setting mode value register 29 in this embodiment, is a value that is always known in advance, the mode save register 23 can be omitted. be.

またモード表示信号線23にLED等を接続し
て表示状態を分るようにしてもよい。
Further, an LED or the like may be connected to the mode display signal line 23 so that the display state can be determined.

また、動作モードが複数定義されている場合、
プログラム自体のネステイングと同様に動作モー
ド自体もネステイング構造にすることも可能であ
り、モード退避レジスタ22の内容を参照するこ
とにより、呼び出し元プログラムのモードを確認
することができるので、動作モード自体が階層構
造を形成している場合の不当な呼び出し、例えば
下位レベルからP1−P2−P3とあつた場合で
もプログラムP1からプログラムP3への越し呼
び出しなどを検出することができる。
Also, if multiple operation modes are defined,
Similar to the nesting of the program itself, the operating mode itself can also have a nesting structure, and the mode of the calling program can be confirmed by referring to the contents of the mode save register 22, so the operating mode itself can be nested. It is possible to detect illegal calls when a hierarchical structure is formed, such as overcalls from program P1 to program P3 even when there are P1-P2-P3 from a lower level.

発明の効果 本発明の動作モード表示装置は以上のように予
め設定されたアドレスを命令コード読み込みサイ
クルとしてアクセスしたことを検出し、その場合
に定義づけられた動作モード値を動作モード表示
レジスタに格納する制御部を設けることにより、
動作モード表示機能を持たない演算処理装置を用
いた計算機システムにおいても、動作モードの異
なるプログラムに処理が移つた瞬間に動作モード
表示値を変更することができ、その価値は大なる
ものがある。
Effects of the Invention As described above, the operation mode display device of the present invention detects that a preset address is accessed as an instruction code read cycle, and stores the operation mode value defined in that case in the operation mode display register. By providing a control section to
Even in a computer system using an arithmetic processing unit that does not have an operation mode display function, the operation mode display value can be changed the moment processing shifts to a program with a different operation mode, and this has great value.

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

図は本発明の一実施例である動作モード表示装
置のブロツク図である。 11……演算処理装置、12……主記憶装置、
15,25……モード切換番地レジスタ、16,
26……制御部、17……モードレジスタ、1
9,29……設定モード値レジスタ、22……モ
ード退避レジスタ。
The figure is a block diagram of an operation mode display device which is an embodiment of the present invention. 11...Arithmetic processing unit, 12...Main storage device,
15, 25...Mode switching address register, 16,
26...Control unit, 17...Mode register, 1
9, 29...Setting mode value register, 22...Mode save register.

Claims (1)

【特許請求の範囲】 1 演算処理を行なう演算処理装置と、前記演算
処理装置が実行するプログラムを保持する主記憶
装置と、前記演算処理装置の動作モードを表示す
るモードレジスタと、モードの切換えられる番地
の値が格納されているモード切換番地レジスタ
と、切換えられるモードの値が格納されている設
定モード値レジスタと、前記演算処理装置が前記
主記憶装置を命令コード読み込みサイクルとして
出力したアドレス値と前記モード切換番地レジス
タの内容とを比較し一致していれば前記設定モー
ド値レジスタの内容を前記モードレジスタに格納
する制御部とを具備する動作モード表示装置。 2 モード切換番地レジスタ、設定モード値レジ
スタおよび制御部を複数組有することを特徴とす
る特許請求の範囲第1項記載の動作モード表示装
置。 3 演算処理を行なう演算処理装置と、前記演算
処理装置が実行するプログラムを保持する主記憶
装置と、前記演算処理装置の動作モードを表示す
るモードレジスタと、モードの切換えられる番地
の値が格納されているモード切換番地レジスタ
と、切換えられるモードの値が格納されている設
定モード値レジスタと、モード退避レジスタと、
前記演算処理装置が前記主記憶装置を命令コード
読み込みサイクルとして出力したアドレス値と前
記モード切換番地レジスタの内容とを比較し、一
致していれば前記モードレジスタの内容を前記モ
ード退避レジスタに格納後、前記設定モード値レ
ジスタの内容を前記モードレジスタに格納する制
御部とを有することを特徴とする動作モード表示
装置。 4 モード切換番地レジスタ、設定モード値レジ
スタおよび制御部を複数組有することを特徴とす
る特許請求の範囲第3項記載の動作モード表示装
置。
[Scope of Claims] 1. An arithmetic processing device that performs arithmetic processing, a main storage device that holds a program executed by the arithmetic processing device, a mode register that displays an operating mode of the arithmetic processing device, and a mode switchable mode register. A mode switching address register that stores an address value, a setting mode value register that stores a value of the mode to be switched, and an address value that the arithmetic processing unit outputs from the main memory as an instruction code read cycle. An operation mode display device comprising: a control unit that compares the contents of the mode switching address register and stores the contents of the setting mode value register in the mode register if they match. 2. The operation mode display device according to claim 1, comprising a plurality of sets of mode switching address registers, setting mode value registers, and control sections. 3. An arithmetic processing unit that performs arithmetic processing, a main memory that holds programs executed by the arithmetic processing unit, a mode register that displays the operating mode of the arithmetic processing unit, and a value of an address at which the mode is switched. a mode switching address register, a setting mode value register storing the value of the mode to be switched, a mode save register,
Compare the address value outputted by the arithmetic processing unit to the main memory as an instruction code read cycle with the contents of the mode switching address register, and if they match, store the contents of the mode register in the mode save register. , a control section that stores the contents of the setting mode value register in the mode register. 4. The operation mode display device according to claim 3, comprising a plurality of sets of mode switching address registers, setting mode value registers, and control sections.
JP57214364A 1982-12-06 1982-12-06 Operation mode display device Granted JPS59103146A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP57214364A JPS59103146A (en) 1982-12-06 1982-12-06 Operation mode display device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP57214364A JPS59103146A (en) 1982-12-06 1982-12-06 Operation mode display device

Publications (2)

Publication Number Publication Date
JPS59103146A JPS59103146A (en) 1984-06-14
JPH0221614B2 true JPH0221614B2 (en) 1990-05-15

Family

ID=16654560

Family Applications (1)

Application Number Title Priority Date Filing Date
JP57214364A Granted JPS59103146A (en) 1982-12-06 1982-12-06 Operation mode display device

Country Status (1)

Country Link
JP (1) JPS59103146A (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62105237A (en) * 1985-10-31 1987-05-15 Nec Corp Microprogram controller
JPH0516679U (en) * 1991-08-12 1993-03-02 調 内田 Multipurpose Tatsuyu Paper Case Holder

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS53132240A (en) * 1977-04-25 1978-11-17 Hitachi Ltd Processing mode selection system
JPS57120300A (en) * 1981-01-20 1982-07-27 Canon Inc Program protection system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS53132240A (en) * 1977-04-25 1978-11-17 Hitachi Ltd Processing mode selection system
JPS57120300A (en) * 1981-01-20 1982-07-27 Canon Inc Program protection system

Also Published As

Publication number Publication date
JPS59103146A (en) 1984-06-14

Similar Documents

Publication Publication Date Title
US5557766A (en) High-speed processor for handling multiple interrupts utilizing an exclusive-use bus and current and previous bank pointers to specify a return bank
KR100239028B1 (en) Computer system and method for support of two endians
US6223279B1 (en) Single chip microcomputer having a dedicated address bus and dedicated data bus for transferring register bank data to and from an on-line RAM
US20080133887A1 (en) Data processing apparatus of high speed process using memory of low speed and low power consumption
JPH01131949A (en) Parallel computer provided with processing request function
KR101913968B1 (en) Micro computer
US5752273A (en) Apparatus and method for efficiently determining addresses for misaligned data stored in memory
JP3605978B2 (en) Microcomputer
JPH0916409A (en) Microcomputer
JPH0221614B2 (en)
US6275925B1 (en) Program execution method and program execution device
EP0915416B1 (en) System for allowing a two word instruction to be executed in a single cycle and method therefor
JP3539984B2 (en) Processor
JPH059815B2 (en)
JP2883488B2 (en) Instruction processing unit
US7206894B2 (en) Microcomputer application system, microcomputer, signal processing system and signal processing LSI
JPS6011934A (en) Display device for action mode
JPH02211534A (en) Parallel processor
JPS59218569A (en) Microcomputer
JP3102399B2 (en) Data processing apparatus and method
JP4641391B2 (en) Direct memory access device, control method therefor, and data processing device
JP2883489B2 (en) Instruction processing unit
JPS60193046A (en) Detecting system for instruction exception
Mitchell et al. Microprocessors and Logic
Pittman Microcomputer design