JPS63223983A - Graphic drawing device - Google Patents

Graphic drawing device

Info

Publication number
JPS63223983A
JPS63223983A JP5662387A JP5662387A JPS63223983A JP S63223983 A JPS63223983 A JP S63223983A JP 5662387 A JP5662387 A JP 5662387A JP 5662387 A JP5662387 A JP 5662387A JP S63223983 A JPS63223983 A JP S63223983A
Authority
JP
Japan
Prior art keywords
display
attribute information
execution
group
calling
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
JP5662387A
Other languages
Japanese (ja)
Inventor
Tadashi Fukushima
忠 福島
Norito Watanabe
範人 渡辺
Shinya Tanifuji
真也 谷藤
Miyako Nio
都 仁尾
Toshiyuki Kuwana
利幸 桑名
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 Ltd
Original Assignee
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 Ltd filed Critical Hitachi Ltd
Priority to JP5662387A priority Critical patent/JPS63223983A/en
Publication of JPS63223983A publication Critical patent/JPS63223983A/en
Pending legal-status Critical Current

Links

Landscapes

  • Image Generation (AREA)

Abstract

PURPOSE:To improve the effective speed of graphic drawing by saving and reloading only display attribute information which needs to be saved and reloaded at least in calling a display instruction group. CONSTITUTION:One of display instruction group stored in a display instruction storage part 1 is fetched and executed by a display execution part 2. When a display instruction statement is a drawing instruction which indicates the execution of drawing like circle drawing, the execution result is drawn on an output display part 3. When the display instruction statement is a display attribute instruction which indicates the phase of the display of a graphic drawn like line width specification and line color specification, the display attribute information stored in the current attribute information memory 9 in the display execution part 2 is updated. Further, when the display instruction statement is a call instruction which indicates the execution by calling another display instruction group, an area which is large enough to store all pieces of display attribute information at the call point of time is secured in the attribute information storage part 4 and the execution of the called display instruction group is started.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、一つ以上の表示命令文からなる表示命令群を
実行中に、別の表示命令群を呼び出して実行し、その表
示命令群の実行終了後、呼び出し元の表示命令群の呼び
出し命令文以降の表示命令文を実行する図形描画装置に
関する。
[Detailed Description of the Invention] [Industrial Application Field] The present invention is directed to calling and executing a display command group consisting of one or more display command statements while executing a display command group consisting of one or more display command statements, and The present invention relates to a graphic drawing device that executes display command statements subsequent to the calling command statement of the display command group of the calling source after the execution of the display command group is completed.

〔従来の技術〕[Conventional technology]

これまでは、表示命令群の実行中に、他の表示命令群を
呼び出して実行する場合、呼び出し元の表示属性情報は
、呼び出し時に一括して退避していた。この考え方は、
N、l1lirth著の「アルゴリズム子デ構造溝造=
プログラム」にあるサブルーチンニールにおけるスタッ
キングに基づいている。
Until now, when a group of display commands is called and executed while a group of display commands is being executed, the display attribute information of the caller is saved all at once at the time of the call. This idea is
“Algorithm child structure Mizozo =
The program is based on stacking in the subroutine Neil.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

上記従来技術は、表示命令群の呼び出し実行において、
呼び出し元の表示命令群の表示属性情報の退避量を最小
限におさえて、表示命令群の呼び出し時のオーバーヘッ
ドを小さくする点について配慮されておらず、表示命令
群の呼び出し回数が多数となる場合、実効表示性能が低
下する問題があった。
In the above conventional technology, in calling and executing a group of display commands,
When the display command group is called many times because no consideration is given to minimizing the amount of display attribute information saved for the calling display command group and reducing the overhead when calling the display command group. , there was a problem that the effective display performance deteriorated.

本発明の目的は、表示命令群の呼び出し時に、呼び出し
元の表示命令群の表示属性情報の退避量を最小限におさ
えて、表示命令群の呼び出し時のオーバーヘッドを小さ
くすることにある。
An object of the present invention is to reduce the overhead when calling a display command group by minimizing the amount of display attribute information of the display command group that is the calling source when calling the display command group.

〔問題点を解決するための手段〕[Means for solving problems]

上記目的は、表示命令群を呼び出す際、呼び出し元の表
示命令群の表示属性情報をすべて退避できる領域を確保
した後、呼び出し元の表示命令群の呼び出し時の表示属
性情報を用いて、呼び出された表示命令群の実行を開始
する。そして呼び出された表示命令群の実行中に、表示
属性情報を変更する命令文が出現した際、呼び出し元の
表示命令文の変更される表示属性情報だけを、あらかじ
め確保した領域に退避させることにより達成される。
The purpose of the above is that when calling a display command group, after securing an area where all the display attribute information of the calling display command group can be saved, the calling display command group is called using the display attribute information at the time of the call. Starts execution of the set of display commands. Then, when a command statement that changes display attribute information appears during the execution of a group of called display commands, only the display attribute information to be changed of the calling display command statement is saved to a pre-secured area. achieved.

〔作用〕[Effect]

表示命令群を呼び出す際に確保する領域は、それを単位
とするスタックを形成する。実際にスタックされる内容
は呼び出された表示命令群が表示属性情報を変更するま
で決まらないが、すべての属性情報を退避できる領域が
確保されているため、変更量の多少により領域不足が発
生することがなく、退避不可となることは起こらない。
The area secured when calling a group of display commands forms a stack with that unit as a unit. The actual contents of the stack are not determined until the display command group that is called changes the display attribute information, but since an area is secured to save all attribute information, a lack of space may occur depending on the amount of changes. There will never be a situation where evacuation becomes impossible.

〔実施例〕〔Example〕

以下、本発明の一実施例を図面により説明する。 An embodiment of the present invention will be described below with reference to the drawings.

第2図において、1つ以上の表示命令文より成る表示命
令群は、表示命令格納部1に格納されている。表示命令
格納部1に格納されている表示命令群の1つが、表示実
行部2により選択され、表示命令文が1つずつ表示実行
部2に取り出されて実行される0表示命令文が直線描画
や円描画のように描画の実行を指示する描画命令の場合
、実行結果は出力表示部3に描画される0表示命令文が
線幅指定や線色指定のように描画される図形の表示様相
を指示する表示属性命令ならば、表示実行部2内の現属
性情報メモリ9に格納されている表示属性情報が更新さ
れる。また、表示命令文が他の表示命令群を呼び出して
実行を指示する呼び出し命令ならば、呼び出し時点の表
示属性情報をすべて格納できる領域を、属性情報格納部
4に確保して、被呼び出し表示命令群の実行を開始する
In FIG. 2, a display command group consisting of one or more display command sentences is stored in a display command storage section 1. One of the display commands stored in the display command storage section 1 is selected by the display execution section 2, and the display command sentences are fetched one by one to the display execution section 2 and executed. In the case of a drawing command that instructs the execution of drawing, such as drawing or circle drawing, the execution result is the display aspect of the figure to be drawn, such as the 0 display command statement drawn on the output display unit 3, such as line width specification and line color specification. If the display attribute command instructs , the display attribute information stored in the current attribute information memory 9 in the display execution unit 2 is updated. In addition, if the display command statement is a call command that calls another display command group and instructs its execution, an area that can store all the display attribute information at the time of the call is secured in the attribute information storage section 4, and the called display command Start the group execution.

属性情報格納部4は、スタックメモリ5とスタックポイ
ンタ6から成っており、スタックポインタ6の値を、増
加させることにより、格納領域を確保できる。
The attribute information storage unit 4 includes a stack memory 5 and a stack pointer 6, and by increasing the value of the stack pointer 6, a storage area can be secured.

第1図は、表示命令群の呼び出しを行う時の手順を表す
フローチャートである。表示命令群の呼び出しを行う場
合、まず、手続き10においてスタックポインタを増加
させて、すべての表示属性情報を格納するための属性格
納領域8と、表示属性情報のおのおのが格納されたかど
うかを示す格納済みフラグ7のための領域をスタック・
メモリ5に確保する。次に、手続き11において、手続
き10において確保した領域内のすべての格納済みフラ
グ7をクリアする。手続き12では、最初の表示命令文
が、表示命令格納部1より取り出され1手続き13で、
表示命令群の最終であるか否かが判定される。表示命令
群の最終でなければ、手続き17において、他の表示命
令群の呼び出し命令であるか否かが判定される。他の表
示命令群の呼び出し命令でないならば1手続き20にお
いて、表示属性命令であるか否かが判定される。表示性
命令でない表示命令文は、描画命令として手続き25で
描画が実行され、出力結果が出力表示部3に表示される
。手続き25の終了後は手続き112に戻り、次の表示
命令文の実行に移る。また手続き20において1表示命
令文が表示属性命令と判定された場合は、手続き21で
、呼び出し元の表示命令群の呼び出し時の表示属性情報
の内、被呼び出し表示命令群で新たに設定される表示属
性情報と同じものが、すでにスタックメモリ5に確保し
た属性格納領域8内に格納済みであるか否かを、格納済
みフラグ7により判定する。当該の格納済みフラグ7が
セットされているならば、スタックメモリ5への書き込
みは行わず、手続き24により、現属性情報メモリ8を
更新する。手続き21で、当該の格納済みフラグ7がク
リアであれば1手続き22で当該の格納済みフラグ7を
セットして、手続き23で、当該の表示属性情報を現属
性情報メモリ9より、スタックメモリ5内の属性格納領
域8に書き込んで後、手続き24により現属性情報メモ
リ9を更新する。手続き24の後は手続き12に戻り5
次の表示命令文の実行に移る。
FIG. 1 is a flowchart showing the procedure for calling a display command group. When calling a group of display commands, first, in procedure 10, the stack pointer is increased to create an attribute storage area 8 for storing all display attribute information, and a storage area 8 for indicating whether each piece of display attribute information has been stored. Stack area for completed flag 7
Allocate in memory 5. Next, in procedure 11, all stored flags 7 in the area secured in procedure 10 are cleared. In procedure 12, the first display command sentence is retrieved from display command storage section 1, and in procedure 13,
It is determined whether or not this is the last of the display command group. If it is not the last display command group, it is determined in procedure 17 whether it is a call command for another display command group. If the command is not a call command for another display command group, it is determined in step 20 whether or not it is a display attribute command. A display command sentence that is not a display command is executed as a drawing command in procedure 25, and the output result is displayed on the output display section 3. After the procedure 25 is completed, the process returns to the procedure 112 and moves to execution of the next display command statement. If one display command statement is determined to be a display attribute command in procedure 20, then in procedure 21, the display attribute information at the time of calling of the calling display command group is newly set in the called display command group. It is determined by the stored flag 7 whether the same display attribute information has already been stored in the attribute storage area 8 secured in the stack memory 5. If the stored flag 7 is set, the current attribute information memory 8 is updated by procedure 24 without writing to the stack memory 5. If the stored flag 7 is cleared in procedure 21, the stored flag 7 is set in procedure 22, and the displayed attribute information is transferred from the current attribute information memory 9 to the stack memory 5 in procedure 23. After writing to the attribute storage area 8 in the attribute information memory 9, the current attribute information memory 9 is updated by procedure 24. After procedure 24, return to procedure 12 5
Move on to execution of the next display command statement.

手続き17において、表示命令文が他の表示命令群の呼
び出しであると判定したならば、手続き18において、
表示命令群を呼び出して実行し、・終了した後、手続き
12に戻り、次の表示命□令文の実行に移る。
If it is determined in procedure 17 that the display command statement is a call to another display command group, in procedure 18,
After calling and executing the display command group and finishing, return to procedure 12 and move on to execution of the next display command□ command statement.

手続き13において、表示命令文が表示命令群の最終で
あると判定されたならば、手続き14において格納済み
フラグ7を検査して、セットされている格納済みフラグ
7に対応する属性格納領域8内の表示属性情報により、
表示実行部2内の現属性情報メモリ9を変更して、被呼
び出し表示命令群の呼び出し直前の状態に、現属性情報
メモリ9を回復させる。その後、手続き15により、ス
タックポインタ6を呼び出し前の値に戻して、手続き1
2に戻り、次の表示命令文の実行に移る。
If it is determined in procedure 13 that the display command statement is the last of the display command group, the stored flag 7 is checked in procedure 14, and the stored flag 7 is checked in the attribute storage area 8 corresponding to the set stored flag 7. According to the display attribute information of
The current attribute information memory 9 in the display execution unit 2 is changed to restore the current attribute information memory 9 to the state immediately before the called display command group was called. Then, in procedure 15, stack pointer 6 is returned to the value before the call, and procedure 1
Return to step 2 and proceed to execution of the next display command statement.

第3図は1例として3つの表示命令群A31゜B32.
C33の呼び出し関係を表している。表示命令群A31
は、表示命令群B32の呼び出し命35を含んでいる。
As an example, FIG. 3 shows three display command groups A31°B32.
It shows the calling relationship of C33. Display command group A31
includes a call instruction 35 of the display instruction group B32.

また表示命令群B32は、表示属性命令a372表示命
令群C33の呼び出し命令382表示表示属性情報9を
含んでいる。
The display command group B32 also includes a display attribute command a372, a call command 382 of the display command group C33, and display display attribute information 9.

又、表示命令群C33は表示属性命令c40を含んでい
る。
Furthermore, the display command group C33 includes a display attribute command c40.

第3図において、表示命令群B32の呼び出し命令35
を実行する場合、スタックメモリ5は。
In FIG. 3, calling command 35 of display command group B32
When executing, the stack memory 5 is.

第4図(a)の状態から第4図(b)の状態に変化する
ことになる。つまり、第4図(、)では。
The state shown in FIG. 4(a) changes to the state shown in FIG. 4(b). In other words, in Figure 4 (,).

スタックポインタ6は、スタックメモリ5の0番地を指
していたが、第4図(b)では、100番地を指してい
る。つまり、この例では格納済みフラグ7と属性格納領
域8のために100番地分の領域を確保したわけである
。また、表示命令群B32の最初の表示命令を実行する
時は、第4図(b)の格納済みフラグ71はすべてクリ
アされていて、属性格納領域81には何も書き込まれて
いない。しかし、表示属性命令a37を実行する際には
、格納済みフラグ71の内の表示属性命令aに対応する
部分がセットされ、書き換えられる現属性情報メモリ9
の内容が、属性格納領域81の対応する場所に書き込ま
れた後に、属性情報メモリ9が更新される。また、表示
命令群C33の呼び出し命令38の実行においては、ス
タックメモリ5は第4図(c)のような状態となる。つ
まり、スタックポインタ6は、スタックメモリ5の20
0番地を指し、格納済みフラグ71と属性格納領域81
の上に、さらに100番地分の領域が確保され、新たに
格納済みフラグ72と属性格納領域82が形成される。
The stack pointer 6 previously pointed to address 0 in the stack memory 5, but in FIG. 4(b) it points to address 100. That is, in this example, an area for 100 addresses is secured for the stored flag 7 and the attribute storage area 8. Furthermore, when the first display command of the display command group B32 is executed, all the stored flags 71 in FIG. 4(b) are cleared and nothing is written in the attribute storage area 81. However, when executing the display attribute command a37, the part of the stored flag 71 corresponding to the display attribute command a is set, and the current attribute information memory 9 is rewritten.
After the content of is written to the corresponding location of the attribute storage area 81, the attribute information memory 9 is updated. Further, when the call command 38 of the display command group C33 is executed, the stack memory 5 is in a state as shown in FIG. 4(c). In other words, the stack pointer 6 is 20 in the stack memory 5.
Pointing to address 0, stored flag 71 and attribute storage area 81
Above this, an area for 100 addresses is further secured, and a new stored flag 72 and attribute storage area 82 are formed.

表示命令群C33において表示属性命令c40を実行す
る際には、格納済みフラグ72の対応する部分がセット
され、属性格納領域82に、現属性情報メモリ9の更新
される表示属性情報が書き込まれることになる。表示命
令群C33の実行終了時は、格納済みフラグ72を検査
して、セットされた部分に対応する表示属性情報が、属
性格納領域82から現属性情報メモリ9に回復した後、
スタックメモリ5を第4図(b)の状態に戻すことにな
る。第3図の例では、表示命令群C33の実行後に表示
命令群B32の中で表示属性命令b39の実行が行われ
るが、この場合は、第4図(b)の状態で、さらに表示
属性命令b39で書き替えられる表示属性情報が、属性
格納領域81に書き込まれることになる。表示命令群B
32の実行後、表示命令群A31に実行制御が戻った時
は、第4図(b)の属性格納領域81に書き込まれた表
示属性情報はすべて現属性情報メモリ9に回復され、ス
タックメモリ9も、第4図(a)の状態に戻ることにな
る。
When executing the display attribute command c40 in the display command group C33, the corresponding part of the stored flag 72 is set, and the display attribute information to be updated in the current attribute information memory 9 is written into the attribute storage area 82. become. At the end of execution of the display command group C33, the stored flag 72 is checked, and after the display attribute information corresponding to the set part is restored from the attribute storage area 82 to the current attribute information memory 9,
The stack memory 5 is returned to the state shown in FIG. 4(b). In the example of FIG. 3, the display attribute command b39 is executed in the display command group B32 after the display command group C33 is executed, but in this case, in the state of FIG. The display attribute information rewritten in b39 will be written to the attribute storage area 81. Display command group B
32, when execution control returns to the display command group A31, all the display attribute information written in the attribute storage area 81 in FIG. The state also returns to the state shown in FIG. 4(a).

〔発明の効果〕〔Effect of the invention〕

本発明によれば、表示命令群の呼び出しにおいて、最低
限退避・回復しなければならない表示属性情報のみを退
避・回復できるので、図形描画の実効速度を向上させる
ことができるという効果がある。
According to the present invention, when calling a group of display commands, only the display attribute information that must be saved and restored at a minimum can be saved and restored, so that the effective speed of graphic drawing can be improved.

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

第1図は本発明の処理手順の一実施例を示すフローチャ
ート、第2図は本発明の一実施例の構成図、第3図は表
示命令群の呼び出し関係の1例を示す説明図、第4図は
本発明の一実施例におけるスタック・メモリとスタック
・ポインタの状態図である。 1・・・表示命令格納部、2・・・表示実行部、3・・
・出力事 10 ≠2虐 鰻3 口 第4図
FIG. 1 is a flowchart showing an embodiment of the processing procedure of the present invention, FIG. 2 is a configuration diagram of an embodiment of the present invention, FIG. 3 is an explanatory diagram showing an example of the calling relationship of display command groups, FIG. 4 is a state diagram of stack memory and stack pointer in one embodiment of the present invention. 1...Display command storage unit, 2...Display execution unit, 3...
・Output 10 ≠2 Eel 3 Mouth Figure 4

Claims (1)

【特許請求の範囲】[Claims] 1、図形表示を行うための表示命令文を格納する表示命
令格納部と、該表示命令格納部内の表示命令文を参照し
て、図形表示を実行する表示実行部と、該表示実行部の
実行結果を出力表示する出力表示部と、該表示実行部の
実行結果の一部である表示属性情報を一時的に格納する
属性情報格納部から成る図形描画装置において、一つ以
上の表示命令文より成る表示命令群を実行中に、別の表
示命令群を呼び出して実行する場合、呼び出し元の表示
命令群の表示属性情報のすべてを格納できる領域を該属
性情報格納部に確保し、呼び出された表示命令群が、呼
び出し元の表示命令群の呼び出し時の表示属性情報を変
更する際に、変更される表示属性情報を属性情報格納部
に確保した領域に格納し、呼び出された表示命令群の実
行を終了して、呼び出し元の表示命令群に実行制御が復
帰する際、該属性情報格納部から表示属性情報を取り出
して、該表示実行部の状態を、呼び出し元の表示命令群
が別の表示命令群を呼び出す直前の状態に回復させる方
式を採用したことを特徴とする図形描画装置。
1. A display command storage unit that stores display command statements for displaying graphics, a display execution unit that refers to the display command statements in the display command storage unit, and executes graphic display; and execution of the display execution unit. In a graphics drawing device that includes an output display section that outputs and displays results, and an attribute information storage section that temporarily stores display attribute information that is part of the execution result of the display execution section, from one or more display command statements. When calling and executing another display command group while a display command group consisting of When a display instruction group changes the display attribute information at the time of calling the calling display instruction group, the display attribute information to be changed is stored in an area secured in the attribute information storage section, and the display instruction group that is called is stored. When execution ends and execution control is returned to the calling display instruction group, the display attribute information is retrieved from the attribute information storage section and the state of the display execution section is changed to another display instruction group. A graphic drawing device characterized by adopting a method of restoring the state to the state immediately before calling a group of display commands.
JP5662387A 1987-03-13 1987-03-13 Graphic drawing device Pending JPS63223983A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP5662387A JPS63223983A (en) 1987-03-13 1987-03-13 Graphic drawing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP5662387A JPS63223983A (en) 1987-03-13 1987-03-13 Graphic drawing device

Publications (1)

Publication Number Publication Date
JPS63223983A true JPS63223983A (en) 1988-09-19

Family

ID=13032415

Family Applications (1)

Application Number Title Priority Date Filing Date
JP5662387A Pending JPS63223983A (en) 1987-03-13 1987-03-13 Graphic drawing device

Country Status (1)

Country Link
JP (1) JPS63223983A (en)

Similar Documents

Publication Publication Date Title
KR950033859A (en) Dynamic register management device and method in floating point unit
JPS63223983A (en) Graphic drawing device
JPS62151940A (en) Register saving/return system
JPH01217635A (en) Register saving system
JP2747164B2 (en) Software simulator
JP2815638B2 (en) Debug device
JP3425724B2 (en) System uninterrupted program switching method
JPS5843043A (en) Call instruction system for data processor
JPS59173876A (en) Vector data processor
JPS61216035A (en) Method for processing overflow of address stack
JPS646487B2 (en)
JPS61117635A (en) Virtual storage control system
JPH07134656A (en) Interruption control method and multi-task system for realizing the same
JPS6046450B2 (en) High-speed buffer memory control method
KR100280404B1 (en) How to Support Multiple Interrupt Service Routines in DSP
JPH0281227A (en) Program execution control system
JPS6365978B2 (en)
JPH05189227A (en) Microcomputer incorporating one time programmable rom
JPH0262633A (en) Inter-program communication system
JPH0214335A (en) Interrupting system for debugger
JPH0340139A (en) Context switching method for multi-task system
JPH0235332B2 (en) SAINYUKANOPUROGURAMUSEIGYOSHORIHOSHIKI
JPH01250143A (en) Program correction system
JPH02178696A (en) Graphic data control system
JPH02194427A (en) Graphic picture display controlling system