[go: up one dir, main page]

JPH01263725A - Program processor - Google Patents

Program processor

Info

Publication number
JPH01263725A
JPH01263725A JP9210588A JP9210588A JPH01263725A JP H01263725 A JPH01263725 A JP H01263725A JP 9210588 A JP9210588 A JP 9210588A JP 9210588 A JP9210588 A JP 9210588A JP H01263725 A JPH01263725 A JP H01263725A
Authority
JP
Japan
Prior art keywords
address
instruction
input
program
executed
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
JP9210588A
Other languages
Japanese (ja)
Inventor
Naoki Shiraishi
奈緒樹 白石
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.)
Sharp Corp
Original Assignee
Sharp Corp
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 Sharp Corp filed Critical Sharp Corp
Priority to JP9210588A priority Critical patent/JPH01263725A/en
Priority to US07/331,650 priority patent/US5148531A/en
Publication of JPH01263725A publication Critical patent/JPH01263725A/en
Pending legal-status Critical Current

Links

Landscapes

  • Executing Machine-Instructions (AREA)

Abstract

PURPOSE:To search a processing position to need execution without reading a step to become unnecessary at the time of executing a conditions instruction by placing a pointer to show a position to be executed when a conditions sentence is false immediately after the intermediate code of an IF sentence. CONSTITUTION:When a code converted to an intermediate code is an 'IF' instruction, '1' is held at an F/F circuit 8 by the output of an IF detecting part 7. A control part 2 advances an address controller 6 to a next address, inserts a dummy code to a storing part 5 and stores an address '01' to a temporary storing part 9. When an ELSE detecting part 10 detects the intermediate code of 'ELSE,' the condition of the F/F circuit 8 is watched, and an IF instruction is detected, a difference '09' between an address oa and an address 01 of the intermediate code of the 'ELSE' is calculated and written to the temporary storing part 9. The conditions instruction is executed, the execution after 'THEN' is unnecessary, and then, the address 01 is added to address information '09' and the position, in which the intermediate code of the 'ELSE' is stored, can be known.

Description

【発明の詳細な説明】 (産業上の利用分野) この発明はプログラムを入力可能なプログラム式コンピ
ュータに於いて、条件命令を効率的に行えるようにした
プログラム処理装置に関する。
DETAILED DESCRIPTION OF THE INVENTION (Field of Industrial Application) The present invention relates to a program processing device capable of efficiently executing conditional commands in a programmable computer into which a program can be input.

(従来の技術) プログラムを入力可能なプログラム式コンピュータに於
いて例えば、RASIC言語では、条件命令であるIF
文の条件式として「A=1」等の式がある。これらの条
件命令は例えば判断結果が「YES」のときは[THE
NJ以降のステップ、「NOJのときは「ELsEJ以
降のステ・ンプの処理を行うようになっている。また判
断結果がrNO」の場合は条件式に続< rTHENJ
以降のステップは、実行の必要が無い。
(Prior Art) In a programmable computer that can input a program, for example, in the RASIC language, there is an IF which is a conditional instruction.
There are expressions such as "A=1" as conditional expressions of sentences. These conditional commands are, for example, when the judgment result is "YES", [THE
Steps after NJ, "When NOJ, the steps after ELsEJ are processed. Also, if the judgment result is rNO, follow the conditional expression < rTHENJ
The subsequent steps do not need to be executed.

(発明が解決しようとする問題点) しかしながらrELSEJを示すコードの位置を探す為
には、実行の必要の無い[THENI以降のステップの
プログラムデーターを1つずつ順に読み出して探してい
たので不要な時間が消費され、でいた。第・黍図にて今
少し詳細に説明すると、第4図aは、キー人力によりI
F文のプログラムを入力した直後のプログラムデーター
の記憶状態を示しているアト1/ス15番地の「OD」
は次の命令との区切り:j−ドを示している。第4図b
fL′i、第・1図aのプログラムのステートメント’
r 中間コード化した図である。このIF文のプログラ
ムが実行され判断結果が「NO」であわ、ば「THEN
jを読み出しそれ以降のステップは実行せずJELSE
j以降のステップである変数Cに20を代入する作業が
実行される。1〜かし、[t、sEJを示すコードの位
置を探す為には「THEN」以降の“B ”“・・”0
”全1つずつIllに呼び出1〜てアト1/ス09番地
のJELSEjを示すコードの位置を探す必要がある。
(Problem to be solved by the invention) However, in order to search for the location of the code indicating rELSEJ, there is no need to execute it. was consumed. To explain in more detail in Fig. 4, Fig. 4 a shows the key human power.
"OD" at address 1/s 15 indicates the storage state of the program data immediately after inputting the F statement program.
indicates a break from the next instruction: j-do. Figure 4b
fL'i, statement of the program in Figure 1a'
r It is a diagram converted into intermediate code. If the program of this IF statement is executed and the judgment result is "NO", then "THEN" is executed.
Read j and do not execute subsequent steps JELSE
In the step after j, the task of assigning 20 to variable C is executed. 1~Kashi, [t, To search for the position of the code indicating sEJ, press “B” “...”0 after “THEN”
``It is necessary to call Ill one by one to find the position of the code indicating JELSEj at address 1/s09.

この発明は−に記の点に鑑みてなさ!1.たもので、そ
の目的は条件命令実行待不要となるステップを読み取ら
ず実行を必要とする処理位置を探す事の出来るプログラ
ム処理装置を提供することにある。
This invention was made in consideration of the points mentioned in -! 1. The purpose is to provide a program processing device that can search for a processing position that requires execution without reading steps that are unnecessary while waiting for the execution of a conditional instruction.

(問題点全解決するための手段) この発明のプログラム処理装置は、プログラムデータを
入力する為の入力手段と、該入力手段より入力さ力、た
プログラムデータを記憶する記憶手段と該記憶手段に記
憶さ力、ているプログラムデータを順次読み出す為のア
ドレス指示手段と、該アト1/ス指示手段で読み出され
たプログラムデータを実行するプログラム実行手段と、
上記プログラム入力手段で条件命令が入力された事を検
出する第1の検出手段と、該条件が否である時に実行さ
力、るべき命令を検出する第2の検出手段、該第2の検
出手段により検出された実行されるべき命令のアドレス
情報と、上記第1検出手段にて検出された条件命令のア
ト1/ス情報との位置関係を計算する演算手段とを備え
たことを特徴とする。
(Means for Solving All Problems) The program processing device of the present invention includes an input means for inputting program data, a storage means for storing the program data input from the input means, and a storage means for storing the program data input from the input means. address instruction means for sequentially reading the stored program data; program execution means for executing the program data read by the address instruction means;
a first detection means for detecting that a conditional command has been input by the program input means; a second detection means for detecting a command to be executed when the condition is negative; It is characterized by comprising a calculation means for calculating the positional relationship between the address information of the instruction to be executed detected by the means and the address information of the conditional instruction detected by the first detection means. do.

(作用) IF文の中間コードの直後に条件文が偽であった時に実
行する位置を示すポインタを置き、条件文が偽のとき即
座にそのポインタを使って実行すべき位置を求める。
(Operation) A pointer indicating the position to be executed when the conditional statement is false is placed immediately after the intermediate code of the IF statement, and when the conditional statement is false, the pointer is immediately used to find the position to be executed.

(実施例) 以下、第1図から第3図を参照してこの発明の し一実
施例を説明する。第1図に於いて、1はアルファベット
キー、ファンクションキー、テンキー、区切りコード入
力キー等を備えた入力部で有る入力部1より入力された
プログラムデーターは、制御部2により読み書き可能な
記憶部5にアドレスコン)・ローラ6の指定するアドレ
スにプログラムデーターを書き込む、そh−と同時にL
 CD等からなる表示部3にも制御部2よりプログラム
データーが送られプログラムデーターが表示され確認が
出来る様になっている。7は[FJ命令の中間コードを
検出するIF検出部であり、その出力はF/F回路8に
保持される。9は、後述するダミーコードのアドレスを
一時的に記憶する一時記憶部。10は[E L S E
 jの中間コードを検出するELSE検出部である。
(Embodiment) Hereinafter, an embodiment of the present invention will be described with reference to FIGS. 1 to 3. In FIG. 1, numeral 1 denotes an input section equipped with alphabet keys, function keys, numeric keys, delimiter code input keys, etc. Program data input from the input section 1 is stored in a storage section 5 that can be read and written by the control section 2. Write the program data to the address specified by the address controller) and roller 6, and at the same time
Program data is also sent from the control section 2 to a display section 3 consisting of a CD or the like, so that the program data can be displayed and checked. Reference numeral 7 denotes an IF detection section that detects the intermediate code of the FJ instruction, and its output is held in the F/F circuit 8. Reference numeral 9 denotes a temporary storage unit that temporarily stores the address of a dummy code, which will be described later. 10 is [EL S E
This is an ELSE detection unit that detects the intermediate code of j.

第2図のaは、先に示した従来技術と同様のプログラム
データーを入力部1より入力し記憶部5に記憶されてい
る状態を示している。区切りコードが入力されると入力
されたプログラムデーターはアト1/スコントローラ6
に」:り制御部2に読み出されステートメントは中間コ
ードに変換され書き込まれる。(第3図Sl、 S2.
53. S4 )そして中間コードに変換されたコード
が[F1命令であれば、IF検出部7の出力によりF/
F回路8に1が保持される。
FIG. 2a shows a state in which program data similar to that of the prior art described above is input from the input section 1 and stored in the storage section 5. When the delimiter code is input, the input program data is transferred to Atto 1/S controller 6.
The statement is read into the control unit 2 and is converted into intermediate code and written. (Figure 3 Sl, S2.
53. S4) Then, if the code converted to the intermediate code is an [F1 instruction, the F/
1 is held in the F circuit 8.

(第2図す、第3図35) 1F検出部により[I FJ命令が検出されると制御部
2は7ドレスコントローラ6をrIFj命令の中間コー
ドの次のアドレス進めダミーコードを記憶部5に挿入し
、そのダミーコードのアト1ノスである(01)を−時
記憶部9に一時記憶させる。
(Figures 2 and 35) When the 1F detection unit detects the [I FJ instruction, the control unit 2 advances the 7-dress controller 6 to the address next to the intermediate code of the rIFj instruction and stores the dummy code in the storage unit 5. and (01), which is the at1 nos of the dummy code, is temporarily stored in the - hour storage section 9.

(第2図C2第3図56) この作業と同じくしてELSE検出部が「E T−S 
E jの中間コード全検出する。
(Fig. 2 C2 Fig. 3 56) At the same time as this operation, the ELSE detection section
Detect all intermediate codes of E j.

(第2図C2第3図57) [ELSEjの中間コードが検出されるとF/F回路8
の状態を見てIF命令が検出されているかを判断する。
(Fig. 2 C2 Fig. 3 57) [When the intermediate code of ELSEj is detected, the F/F circuit 8
It is determined whether an IF command has been detected by looking at the state of .

(第3図5S) 1F命令が検出されていれば[LsEJの中間コードの
アドレス(Oa)と−時記憶部9が記憶しているアドレ
ス(01)との差(Oa−01=09)を演算部4にて
計算し一時記障部9のグミ−コードが記憶されているア
ドレスに「ELSE」の中間コードまでのアドレス情報
として書き込む。
(Fig. 3, 5S) If the 1F instruction is detected, calculate the difference (Oa-01=09) between the address (Oa) of the intermediate code of LsEJ and the address (01) stored in the -time storage unit 9. The arithmetic unit 4 calculates the result and writes it to the address where the gummy code is stored in the temporary memorization unit 9 as address information up to the intermediate code of "ELSE".

(第2図e、第3図59) この作業を区切りコードまで繰り返し行う(第2図f、
第3図510) この条件命令を実行し「THENJ以降のステップの実
行が不要な時には、IF検出部にて「IF」の中間コー
ドが検出された次のアドレスに記憶されているアドレス
情報(09)にダミーコードが記憶されているアドレス
(01)を加える事により(o1+O(+=or)[E
LsEJの中間コードが記憶されて論る位置を知る事が
出来きアドレスコントローラのアドレスに前記アドレス
を置き換える事により不要なステップのプログラムデー
ターを読み出さずして「ELSE」の中間コードの記憶
されている位置を探す事が出来き高速の処理を行う事が
出来る。
(Fig. 2 e, Fig. 3 59) Repeat this operation up to the delimiter code (Fig. 2 f,
510 in Figure 3) When this conditional instruction is executed and the execution of the steps after THENJ is unnecessary, the address information (09 ) by adding the address (01) where the dummy code is stored to (o1+O(+=or)[E
The intermediate code of LsEJ can be stored and the position to be discussed can be known, and by replacing the address with the address of the address controller, the intermediate code of "ELSE" can be stored without reading the program data of unnecessary steps. It is possible to search for a location and perform high-speed processing.

(効果) 以上詳細に説明したように、この発明のプログラム処理
装置によれば、IF文の中間コードの直後に条件文が偽
であった時に実行する位置を示すポインタを置いている
ので、IF文の高速化を計ることができる。
(Effects) As explained in detail above, according to the program processing device of the present invention, a pointer indicating the position to be executed when the conditional statement is false is placed immediately after the intermediate code of the IF statement, so the IF You can measure the speed of sentences.

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

第1図はこの発明の一実施例を示すプログラムを入力可
能なプログラム式コンピュータのブロック図、第2図は
この発明のプログラムデークーの記憶状態を示す図、第
3図は発明の詳細な説明するためのフロチャート図、第
4図は従来技術のプログラムデークーの記憶状態を示す
図である。 l:入力部 2:制御部 3:表示部 4:演算部 5
:記憶部 6:アドレスコントローラ7:IF検出部 
8:フリップフロップ回路 9ニ一時記憶部 1 o 
: ELSE検出部代理人 弁理士 杉 山 毅 至(
他1名)G1図 32♂
FIG. 1 is a block diagram of a programmable computer into which a program can be input, showing an embodiment of the invention. FIG. 2 is a diagram showing the storage state of the program disk of the invention. FIG. 3 is a detailed explanation of the invention. FIG. 4 is a flowchart showing the storage state of a program disk in the prior art. l: Input section 2: Control section 3: Display section 4: Calculation section 5
: Storage section 6: Address controller 7: IF detection section
8: Flip-flop circuit 9 d Temporary storage section 1 o
: ELSE Detection Department Representative Patent Attorney Takeshi Sugiyama (
1 other person) G1 figure 32♂

Claims (1)

【特許請求の範囲】 1、プログラムを入力可能なプログラム式コンピュータ
に於いて、 プログラムデータを入力する為の入力手段と、該入力手
段より入力されたプログラムデータを記憶する記憶手段
と、該記憶手段に記憶されているプログラムデータを順
次読み出す為のアドレス指示手段と、該アドレス指示手
段で読み出されたプログラムデータを実行するプログラ
ム実行手段と、上記プログラム入力手段で条件命令が入
力された事を検出する第1の検出手段と、該条件が否で
ある時に実行されるべき命令を検出する第2の検出手段
と、該第2の検出手段により検出された実行されるべき
命令のアドレス情報と上記第1検出手段にて検出された
条件命令のアドレス情報との位置関係を計算する演算手
段とを備え、該計算結果を上記第1の検出手段にて検出
された条件命令の後のアドレスに記憶するようにした事
を特徴とするプログラム処理装置。
[Scope of Claims] 1. In a programmable computer into which a program can be input, an input means for inputting program data, a storage means for storing program data input from the input means, and the storage means address instruction means for sequentially reading out program data stored in the address instruction means; program execution means for executing the program data read by the address instruction means; and detection of input of a conditional command by the program input means. a first detection means for detecting an instruction to be executed when the condition is negative; a second detection means for detecting an instruction to be executed when the condition is negative; and address information of the instruction to be executed detected by the second detection means and the above. calculation means for calculating the positional relationship between the conditional instruction detected by the first detection means and the address information, and storing the calculation result at an address after the conditional instruction detected by the first detection means. A program processing device characterized by:
JP9210588A 1988-03-31 1988-04-14 Program processor Pending JPH01263725A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP9210588A JPH01263725A (en) 1988-04-14 1988-04-14 Program processor
US07/331,650 US5148531A (en) 1988-03-31 1989-03-31 System for executing a conditional statement without reading program data part that does not satisfy the conditional clause

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP9210588A JPH01263725A (en) 1988-04-14 1988-04-14 Program processor

Publications (1)

Publication Number Publication Date
JPH01263725A true JPH01263725A (en) 1989-10-20

Family

ID=14045159

Family Applications (1)

Application Number Title Priority Date Filing Date
JP9210588A Pending JPH01263725A (en) 1988-03-31 1988-04-14 Program processor

Country Status (1)

Country Link
JP (1) JPH01263725A (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5472646A (en) * 1977-11-22 1979-06-11 Toshiba Corp High level language processing device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5472646A (en) * 1977-11-22 1979-06-11 Toshiba Corp High level language processing device

Similar Documents

Publication Publication Date Title
JPH01263725A (en) Program processor
JPS61223923A (en) Information processor
JPH064331A (en) Decimal check circuit
JP2727023B2 (en) Information processing device
JPH0537314Y2 (en)
JP2682049B2 (en) Error history collection method
JPS60238946A (en) Snapshot dump processing method
KR970011897B1 (en) Language interpretation processing device
JP2904488B2 (en) Character processor
JPH01253033A (en) Program processing method
JPS6316340A (en) Checking system for source program
JPH01187640A (en) Unset area detection method
JPH0462649A (en) Fetch control system for instruction data to instruction cache
JPH04316140A (en) Program tracing device
JPH05100913A (en) Error factor searching system
JPH0330022A (en) Information processor
JPH04273335A (en) Error detection system for controll information read data
JPS58121440A (en) Document editing processor
JPS58189747A (en) Execution history display device
JPH031273A (en) Character processor having operation self-study function
JPS61221827A (en) information processing equipment
JPS62166451A (en) History analyzing device for logical unit
JPS62241058A (en) Additional processor control system
JPH0236488A (en) Execution detection system for data flow computer
JPS62127944A (en) Information processor