JPH0435955Y2 - - Google Patents

Info

Publication number
JPH0435955Y2
JPH0435955Y2 JP1986141887U JP14188786U JPH0435955Y2 JP H0435955 Y2 JPH0435955 Y2 JP H0435955Y2 JP 1986141887 U JP1986141887 U JP 1986141887U JP 14188786 U JP14188786 U JP 14188786U JP H0435955 Y2 JPH0435955 Y2 JP H0435955Y2
Authority
JP
Japan
Prior art keywords
line number
program
program data
line
cursor
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
Application number
JP1986141887U
Other languages
Japanese (ja)
Other versions
JPS6348252U (en
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 filed Critical
Priority to JP1986141887U priority Critical patent/JPH0435955Y2/ja
Publication of JPS6348252U publication Critical patent/JPS6348252U/ja
Application granted granted Critical
Publication of JPH0435955Y2 publication Critical patent/JPH0435955Y2/ja
Expired legal-status Critical Current

Links

Description

【考案の詳細な説明】 [考案の技術分野] この考案はプログラムリストのデバツクのため
のプログラムリストのトレース機能を付加したプ
ログラマブル小型電子式計算機に関する。
[Detailed Description of the Invention] [Technical Field of the Invention] This invention relates to a programmable small electronic computer equipped with a program list tracing function for debugging the program list.

[従来技術とその問題点] 従来のプログラム可能な小型電子式計算機にお
けるプログラムリストの表示機能は、単に、表示
画面上にプログラムリストを行番号の順に表示す
るだけであり、プログラム中で分岐が有る場合は
分岐先のプログラムの行を指定して読み出さねば
ならず、プログラムのバグを探すのに不便であつ
た。
[Prior art and its problems] The program list display function in conventional programmable small electronic calculators simply displays the program list on the display screen in the order of line numbers, and there are branches in the program. In this case, it was necessary to specify and read the branch destination line of the program, which was inconvenient for searching for bugs in the program.

[考案の目的] この考案は上記の事情に鑑みてなされたもの
で、プログラムリストをプログラムの実行時と同
じ流れでトレース表示させることができるプログ
ラマブル小型電子式計算機を提供することを目的
とする。
[Purpose of the invention] This invention was made in view of the above-mentioned circumstances, and the purpose is to provide a programmable small electronic calculator that can trace and display a program list in the same flow as when the program is executed.

[考案の要点] この考案は、上記の目的を達成するため、トレ
ースキーを操作したときに表示部に表示されてい
るプログラムデータの特定箇所を指示するカーソ
ルの位置に応じて、次に読み出すプログラムのア
ドレスを選択するプログラム読出手段を設けたこ
とを要点とする。
[Key points of the invention] In order to achieve the above purpose, this invention determines the program to be read next according to the position of the cursor that points to a specific part of the program data displayed on the display when the trace key is operated. The main point is that a program reading means for selecting an address is provided.

[実施例] 以下図面を参照して、この考案の一実施例を説
明する。
[Embodiment] An embodiment of this invention will be described below with reference to the drawings.

第1図は本実施例の全体構成図である。図中、
1はプログラムメモリ部であり、ユーザープログ
ラムとして、例えば次のようなBASIC言語を用
いたプログラムデータがストアされている。
FIG. 1 is an overall configuration diagram of this embodiment. In the figure,
Reference numeral 1 denotes a program memory section, in which program data using the following BASIC language, for example, is stored as a user program.

10 A=123 20 INPUTB 30 IF A=B THEN 100 40 PRINT “OK” 50 END 100 PRINT A,B; 110 PRINT “NG” 120 GOTO 20 そして、2は表示バツフア、3は表示部であ
る。この表示部3はプログラムデータを1行分だ
け表示できるものである。
10 A=123 20 INPUTB 30 IF A=B THEN 100 40 PRINT “OK” 50 END 100 PRINT A, B; 110 PRINT “NG” 120 GOTO 20 2 is the display buffer, and 3 is the display section. This display section 3 is capable of displaying only one line of program data.

4はバツフアであり、表示部3にリストの順方
向にトレース表示したプログラム行番号の最新の
4行分が格納される。このバツフア4へのアドレ
スはポインタ5によつて指示される。このポイン
タ5はリストの順方向トレースの要求ごとに1イ
ンクリメントされる。現在行番号レジスタ6には
トレース中のプログラムの現在行が格納される。
4 is a buffer, and the latest four lines of program line numbers traced and displayed in the forward direction of the list are stored in the display section 3. The address to this buffer 4 is indicated by a pointer 5. This pointer 5 is incremented by one for each request for forward tracing of the list. The current line number register 6 stores the current line of the program being traced.

7はキー入力部であり、リストキーLIST、順
方向トレースキーELT、逆方向トレースキー
BLTを備える。リストキーLISTは選択されてい
るプログラムリストの先頭行を呼び出すのに用い
られる。順方向トレースキーFLTはプログラム
リストを順方向にトレースする場合に用いられ
る。逆方向トレースキーBLTはプログラムリス
トを逆方向にトレースする場合に用いられる。
7 is the key input section, including the list key LIST, forward trace key ELT, and backward trace key.
Equipped with BLT. The list key LIST is used to call the first line of the selected program list. The forward trace key FLT is used to trace the program list in the forward direction. The backward tracing key BLT is used to trace the program list in the backward direction.

8はカーソル位置を示すカーソルポインタであ
る。
8 is a cursor pointer indicating the cursor position.

9は装置全体を制御するCPUであり、キー入
力部7からの入力に応答して所定の処理を実行
し、カーソルポインタ8の示すカーソル位置にあ
るデータを調べることで、プログラムメモリ部1
から目的の行番号のプログラムデータを呼び出し
たり、あるいはポインタ5を使つて、バツフア4
から行番号を呼び出したり、またバツフア4や現
在行番号レジスタ6の内容をトレースの実行に従
つて更新し、さらに、表示バツフア2に現在の行
番号のプログラムデータを送つて表示部3に表示
させる。
Reference numeral 9 denotes a CPU that controls the entire device, and executes predetermined processing in response to input from the key input section 7, and checks the data at the cursor position indicated by the cursor pointer 8, thereby updating the program memory section 1.
Call the program data of the desired line number from , or use pointer 5 to call buffer 4.
, the contents of the buffer 4 and the current line number register 6 are updated as the trace is executed, and the program data of the current line number is sent to the display buffer 2 to be displayed on the display unit 3. .

次に、以上のように構成した本実施例の動作に
ついて、第2図ないし第4図を参照して説明す
る。
Next, the operation of this embodiment configured as above will be explained with reference to FIGS. 2 to 4.

まず、ユーザーはプログラムリストを参照する
ため、キー入力部7でリストキーLISTを押す。
これにより、第4図1に示すように、プログラム
リストの先頭行、ここでは行番号「10」のプログ
ラムデータが表示される。このとき入力カーソル
は行の先頭にある。また、現在行番号レジスタ6
にもCPU9を介して行番号「10」が格納される。
First, the user presses the list key LIST on the key input section 7 to refer to the program list.
As a result, as shown in FIG. 4, the program data of the first line of the program list, in this case line number "10", is displayed. At this time, the input cursor is at the beginning of the line. Also, the current line number register 6
The line number "10" is also stored in the CPU 9.

次に、第4図2に示すように順方向トレースキ
ーFLTを押すとプログラムリスト上の次の行番
号「20」のプログラムデータが表示される。
Next, as shown in FIG. 4, when the forward trace key FLT is pressed, the program data of the next line number "20" on the program list is displayed.

第4図3に示すように再度、この操作をくり返
すと、プログラムリスト上の次の行番号「30」の
プログラムデータが表示される。このプログラム
データは分岐をもつている。すなわち、IFの条
件成立のときは行番号「100」に分岐し、不成立
のときは行番号「40」に進む。条件成立のときの
分岐先を見るために、第4図4に示すようにユー
ザーはカーソルキーで行番号「100」の位置にカ
ーソルを移動させ、続いて第4図5のように順方
向トレースキーFLTを押す。これにより行番号
「100」のプログラムデータが表示される。
As shown in FIG. 4, when this operation is repeated again, the program data of the next line number "30" on the program list is displayed. This program data has branches. That is, when the IF condition is met, the process branches to line number "100", and when the condition is not met, the process branches to line number "40". In order to see the branch destination when the condition is satisfied, the user moves the cursor to line number ``100'' using the cursor keys as shown in Figure 4, and then moves the cursor to the forward direction trace as shown in Figure 4. Press ski FLT. As a result, the program data with line number "100" will be displayed.

ここで、以上の入力/応答が得られることにつ
いて、順方向トレースキーFLTの入力に対する
CPU9の動作を第2図に示すフローチヤートを
参照して説明する。
Here, regarding the above input/response being obtained, for the input of the forward trace key FLT,
The operation of the CPU 9 will be explained with reference to the flowchart shown in FIG.

順方向トレースキーFLTを操作すると、まず
ステツプS1に示すように現在行番号レジスタ6
の内容をポインタ5の示すバツフア4に格納す
る。次にステツプS2に進みポインタの内容を+
1する。さらに、ステツプS3を実行してカーソ
ルポインタ8の示すカーソル位置にあるプログラ
ムデータを取り込む。
When you operate the forward trace key FLT, first, as shown in step S1, the current line number register 6 is
The contents of are stored in the buffer 4 indicated by the pointer 5. Next, proceed to step S2 and change the contents of the pointer to +
Do 1. Further, step S3 is executed to fetch the program data at the cursor position indicated by the cursor pointer 8.

ステツプS4では取り込んだプログラムデータ
を判断し、データが行番号ではないときは(例え
ば第4図の2や3に示すような位置にカーソルが
あり、この位置で順方向トレースキーFLTを押
した場合)、ステツプS5に進んでプログラムメモ
リ部1から次の行のプログラムデータを読出し表
示し、現在行レジスタ6にその行を格納する。
In step S4, the imported program data is judged, and if the data is not a line number (for example, if the cursor is at a position like 2 or 3 in Figure 4 and the forward trace key FLT is pressed at this position) ), the program proceeds to step S5, reads out the next line of program data from the program memory section 1, displays it, and stores that line in the current line register 6.

一方、取り込んだデータが第4図の4に示すよ
うに行番号の場合には、ステツプS6を実行しそ
の行番号(ここでは「100」)をプログラムメモリ
部1からサーチする。次のステツプS7では行番
号があつたか否かを判断し、見つかつた場合に
は、ステツプS8でその行番号のプログラムデー
タを表示し、現在行番号レジスタ6に現在の行番
号を格納する。なお、サーチの結果、見つからな
かつたときにはエラー処理を行う。
On the other hand, if the captured data is a line number as shown in 4 in FIG. In the next step S7, it is determined whether or not a line number is found. If found, the program data of that line number is displayed in step S8, and the current line number is stored in the current line number register 6. Note that if the search result is that no item is found, error processing is performed.

したがつて、プログラム中に分岐のあるところ
で、カーソルを行番号のところに指定して順方向
トレースキーFLTを押したときは、その行番号
のプログラムデータが表示され、行番号以外のと
ころに指定して順方向トレースキーFLTを押し
たときは、単に次の行のプログラムデータが表示
される。
Therefore, if you specify a line number with the cursor and press the forward trace key FLT at a point where there is a branch in the program, the program data for that line number will be displayed, and the program data specified somewhere other than the line number will be displayed. When you press the forward trace key FLT, it simply displays the next line of program data.

第4図に戻り、第4図6では行番号以外のカー
ソル位置で順方向トレースキーが押されたため、
行番号「100」の次行、すなわち行番号「110」の
プログラムデータが表示されている。
Returning to Figure 4, in Figure 4 6, the forward trace key was pressed at a cursor position other than the line number, so
The next line after line number "100", that is, the program data at line number "110" is displayed.

次に第4図6および7からわかるように、行番
号「110」のプログラムデータが表示され、カー
ソルが行番号以外のところに位置している状態で
逆方向トレースキーBLTが押されたときは、第
4図7に示すようにプログラムリスト上の前行、
この場合、行番号「100」のプログラムデータが
表示される。
Next, as can be seen from Figure 4 6 and 7, when the program data of line number "110" is displayed and the backward trace key BLT is pressed while the cursor is positioned somewhere other than the line number, , the previous line on the program list as shown in FIG.
In this case, the program data with line number "100" is displayed.

ここで第4図8に示すようにカーソルキーでカ
ーソルを行番号の位置に移動して、逆方向トレー
スキーBLTを押すと分岐が行なわれた行番号
「30」のプログラムデータが表示される。
Here, as shown in FIG. 4, when the cursor is moved to the line number position using the cursor keys and the backward trace key BLT is pressed, the program data of line number "30" where the branch was made is displayed.

このような逆方向トレースキーBLTの機能に
ついて、第3図のフローチヤートを参照して説明
する。すなわち、逆方向トレースキーBLTに対
し、CPU9は、まずステツプT1によりカーソル
位置のデータを読み込み、ステツプT2ではそれ
が行番号か否かを判断する。例えば第4図7の右
のように行番号でない位置で逆方向トレースキー
BLTを押した場合のように、読み込んだデータ
が行番号でないときは、ステツプT5に進み現在
行番号レジスタ6の示す現在行番号より次に小さ
い行をプログラムメモリ部1より読み出し、表示
するとともにその行を現在行番号レジスタ6に格
納する。
The function of such a backward trace key BLT will be explained with reference to the flowchart of FIG. That is, for the backward trace key BLT, the CPU 9 first reads the data at the cursor position in step T1, and determines whether it is a line number in step T2. For example, as shown on the right in Figure 4, press the reverse trace key at a position that is not a line number.
If the read data is not a line number, as is the case when BLT is pressed, the process advances to step T5 and reads the next smaller line than the current line number indicated by the current line number register 6 from the program memory section 1, displays it, and displays it. Store the line in the current line number register 6.

一方、第4図8に示すように逆方向トレースキ
ーBLTの入力をカーソル位置に行番号が位置す
る状態で行つた場合のように、読み込んだデータ
が行番号の場合には、ステツプT3でバツフア4
が空かどうかをみるためにポインタ5を読み込
み、ステツプT4によりポインタ5が「0」か否
かを検査する。ポインタ5が「0」であればステ
ツプT5の処理を行うが、そうでなければ、ステ
ツプT6によりポインタ5の示すバツフア4から
行番号を読み込み、ステツプT7でポインタ5を
−1する。そして、ステツプT8により該当する
行、ここでは行番号「30」のプログラムテータを
読み出し表示する。
On the other hand, if the read data is a line number, as in the case where the backward trace key BLT is input with the line number located at the cursor position, as shown in FIG. 4
The pointer 5 is read to see if it is empty, and in step T4 it is checked whether the pointer 5 is "0". If the pointer 5 is "0", the process at step T5 is performed; otherwise, at step T6, the line number is read from the buffer 4 indicated by the pointer 5, and at step T7, the pointer 5 is decremented by 1. Then, in step T8, the program data of the corresponding line, line number "30" in this case, is read out and displayed.

このように、逆方向トレースキーBLT操作に
対しては、それが行番号以外の位置で行なわれた
ときはプログラムリスト上のひとつ前の行を呼び
出し、分岐先の行においてカーソルを行番号のと
ころに置いた状態で逆方向トレースキーBLT操
作があつたときは分岐元の行を呼び出す。
In this way, for a backward trace key BLT operation, if it is performed at a position other than a line number, the previous line on the program list is called, and the cursor is placed at the line number on the branch destination line. When the backward trace key BLT operation is performed while the line is placed in , the branch source line is called.

なお、順方向トレースキーFLTに関するバツ
フア処理に関し、バツフア4には分岐に関係する
行(上記実施例では行番号「30」と「100」)だけ
をセツトするようにしてもよい。すなわち、行番
号指示で順方向トレースキーFLT入力があつた
場合にのみ、現在行「30」をバツフアに入れ、プ
ログラムサーチで得た分岐先行番号「100」を次
のバツフアに入れる。
Regarding buffer processing regarding the forward trace key FLT, only lines related to branching (line numbers "30" and "100" in the above embodiment) may be set in the buffer 4. That is, only when the forward trace key FLT is input with a line number instruction, the current line "30" is put into the buffer, and the branch preceding number "100" obtained by the program search is put into the next buffer.

[考案の効果] 以上詳述したように、この考案ではトレースキ
ーを操作したときに表示されたプログラムデータ
におけるカーソル位置に応じて、次に読み出すプ
ログラムデータのアドレスを選択するようにした
ので、プログラムリストをプログラムの実行時と
同じ流れでトレース表示させることができ、バグ
捜しが容易になる。
[Effects of the invention] As detailed above, in this invention, the address of the next program data to be read is selected according to the cursor position in the program data displayed when the trace key is operated, so the program The list can be displayed as a trace in the same flow as when the program is executed, making it easier to search for bugs.

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

第1図はこの考案の一実施例の全体構成図、第
2図は順方向トレースキーの入力に対する処理を
示すフローチヤート、第3図は逆方向トレースキ
ーの入力に対する処理を示すフローチヤート、第
4図はキー操作例と各キー操作に対する表示の応
答結果を示す図である。 1……プログラムメモリ部、3……表示部、4
……バツフア、5……ポインタ、7……キー入力
部、9……CPU。
FIG. 1 is an overall configuration diagram of an embodiment of this invention, FIG. 2 is a flowchart showing processing for forward trace key input, FIG. 3 is a flowchart showing processing for backward trace key input, and FIG. FIG. 4 is a diagram showing examples of key operations and display response results for each key operation. 1...Program memory section, 3...Display section, 4
...Buffer, 5...Pointer, 7...Key input section, 9...CPU.

Claims (1)

【実用新案登録請求の範囲】[Scope of utility model registration request] 複数行から成るプログラムを記憶するプログラ
ム記憶手段と、このプログラム記憶手段に記憶さ
れている少なくとも1行のプログラムデータを表
示する表示手段と、この表示手段に表示されたプ
ログラムデータの特定箇所をカーソルにより指示
するカーソル手段と、上記表示手段に表示されて
いるプログラムデータを更新する為のトレースキ
ーと、このトレースキーが操作されたときに、上
記カーソル手段のカーソル位置に対応するプログ
ラムデータが行番号であるか否かを判断する判断
手段と、この判断手段により行番号であることが
判断された場合該当する行番号のプログラムデー
タを上記プログラム記憶手段から検索し上記表示
手段に読出す検索手段と、上記判断部により行番
号ではないことが判断された場合現在表示手段に
より表示されているプログラムデータの次の行の
プログラムデータを上記プログラム記憶手段から
表示手段に読出す読出し手段とを具備してなるプ
ログラマブル小型電子式計算機。
program storage means for storing a program consisting of multiple lines; display means for displaying at least one line of program data stored in the program storage means; A cursor means for giving instructions, a trace key for updating the program data displayed on the display means, and when this trace key is operated, the program data corresponding to the cursor position of the cursor means is displayed as a line number. a determining means for determining whether or not there is a line number, and a retrieving means for retrieving program data of the corresponding line number from the program storage means and reading it on the display means when the determining means determines that the line number is a line number. and reading means for reading program data of the next line of the program data currently displayed by the display means from the program storage means to the display means when the judgment section judges that it is not a line number. Programmable small electronic calculator.
JP1986141887U 1986-09-18 1986-09-18 Expired JPH0435955Y2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1986141887U JPH0435955Y2 (en) 1986-09-18 1986-09-18

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1986141887U JPH0435955Y2 (en) 1986-09-18 1986-09-18

Publications (2)

Publication Number Publication Date
JPS6348252U JPS6348252U (en) 1988-04-01
JPH0435955Y2 true JPH0435955Y2 (en) 1992-08-25

Family

ID=31050095

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1986141887U Expired JPH0435955Y2 (en) 1986-09-18 1986-09-18

Country Status (1)

Country Link
JP (1) JPH0435955Y2 (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS58195943A (en) * 1982-05-11 1983-11-15 Sanyo Electric Co Ltd Word processor
JPS60144837A (en) * 1983-12-31 1985-07-31 Casio Comput Co Ltd Program correction system

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS58195943A (en) * 1982-05-11 1983-11-15 Sanyo Electric Co Ltd Word processor
JPS60144837A (en) * 1983-12-31 1985-07-31 Casio Comput Co Ltd Program correction system

Also Published As

Publication number Publication date
JPS6348252U (en) 1988-04-01

Similar Documents

Publication Publication Date Title
JPH0435955Y2 (en)
JPH1040247A (en) Data processor
JP3178001B2 (en) Data processing device
JPS61226834A (en) Displaying picture editing system
JP2625782B2 (en) Document data display device
JPS6249528A (en) Help guidance system
JPS6210831Y2 (en)
JPH03260721A (en) Data display device
JPH02297663A (en) Electronic system notebook
JP2600272Y2 (en) Word processor
JPS6380631U (en)
JP2555606B2 (en) Electronic manual display system
JPH0193812A (en) System for displaying help screen
JPS6226498B2 (en)
JPH0772908A (en) Programmable controller
JPH0567977B2 (en)
JPH01290046A (en) File controller
JPS63610A (en) Automatic executing method for operation procedure
JPS6344217A (en) Station conversation control system
JPH0512953U (en) Small electronic calculator
JPS62127923A (en) Data processor
JPH0272424A (en) Display control system
JPH01306913A (en) Information processor
JPS61285525A (en) Command input method
JPH03174644A (en) Computer containing memo function