JPS5931094B2 - Arithmetic control method for electronic calculator with program - Google Patents

Arithmetic control method for electronic calculator with program

Info

Publication number
JPS5931094B2
JPS5931094B2 JP51032813A JP3281376A JPS5931094B2 JP S5931094 B2 JPS5931094 B2 JP S5931094B2 JP 51032813 A JP51032813 A JP 51032813A JP 3281376 A JP3281376 A JP 3281376A JP S5931094 B2 JPS5931094 B2 JP S5931094B2
Authority
JP
Japan
Prior art keywords
mode
calculation
program
signal
register
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
JP51032813A
Other languages
Japanese (ja)
Other versions
JPS52116033A (en
Inventor
孝夫 内倉
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.)
KASHIO KEISANKI KK
Original Assignee
KASHIO KEISANKI KK
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 KASHIO KEISANKI KK filed Critical KASHIO KEISANKI KK
Priority to JP51032813A priority Critical patent/JPS5931094B2/en
Publication of JPS52116033A publication Critical patent/JPS52116033A/en
Publication of JPS5931094B2 publication Critical patent/JPS5931094B2/en
Expired legal-status Critical Current

Links

Description

【発明の詳細な説明】 この発明はプログラム設定機能を有するプログラム付電
子式計算機の演算制御方式に関する。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to an arithmetic control system for a programmable electronic computer having a program setting function.

一般に電子式卓上計算機に於いては、イコールキー操作
によつて演算を実行した際、その結果はラウンドスイツ
チおよび小数点指定スイッチの設定状態に基づいて求め
られる。すなわち、ラウンドスイツチによつてフリー演
算モードまたは四捨五人、切捨て(カット)等の丸め演
算モードを選択し、小数点以下何位までを求めるかをd
黴点指定スイッチによつて選択するもので、これら各ス
イッチの指定に基づいた演算結果値を求めて、これを認
識表示させる。そしてこのような演算手段はプログラム
付電子式計算機のプログラム演算実行に際しても同様で
あつた。従つて、従来プログラム付電子式計算機に於い
て、複数の演算が連続して実行されるよう設定されてい
るプログラムに対して各プログラム演算実行により求め
られる演算結果値というものは各演算ブロックの演算結
果共上記各スイッチの指定に従つた結果値を得てしまい
、例えば累積計算、或いは近似式を何回も使用して、ま
ず部分値を求めそれを順次累積してゆく科学計算、複数
の計算値を各々求め、その結果値を平均する計算(標準
偏差を求める計算)等を或る小数点以下の切捨てまたは
四捨五人にて求めたい際は、上記各スイッチで予め設定
されたモードに従つて各演算ブロックの結果を得、この
数値に基づいて順次それに続く演算を実行して行くと、
最終的な結果値を得た際に実際の結果値との間に大きな
開きがでてしまうという不都合が生じる。そこで最終的
な結果を求める以前の演算ブロックに於ける各イコール
演算はフリーモードで結果を求め、最終的な結果を求め
る際にのみ或る小数点以下の切捨てまたは四捨五人を行
なえば精度の高い演算結果を求めることができるが、プ
ログラム演算の実行中に於いてその都度上記各スイッチ
を切換制御することは計算機の演算システム上不可能で
あり、従つて従来ではプログラム制御により精度の高い
演算結果を得ることができなかつた。この発明は上記実
情に鑑みなされたもので、プログラムの設定持に於いて
ラウンドスイツチの指定に従つた演算モードとラウンド
スイツチの指定に拘わらずフリーモ―ド演算を実行する
演算モードとを任意に設定でき、以つてオペレーターの
プログラム使用時における各演算に対するプログラムの
汎用性を向上すると共にプログラム演算実行による精度
の高い演算結果を得ることのできるプログラム付電子式
計算機の演算制御方式を提供することを目的とする。
Generally, in electronic desktop calculators, when a calculation is performed by operating an equal key, the result is obtained based on the settings of the round switch and decimal point designation switch. In other words, use the round switch to select free calculation mode or rounding calculation mode such as rounding, rounding down, etc., and then select d
Selection is made using mold point designation switches, and calculation result values are determined based on the designations of these switches and are recognized and displayed. Such arithmetic means were also used when executing program arithmetic operations in a programmable electronic calculator. Therefore, in conventional electronic calculators with programs, the calculation result value obtained by executing each program calculation for a program that is set to execute multiple calculations in succession is the calculation result of each calculation block. The result is a result value according to the specifications of each of the above switches, for example, cumulative calculations, scientific calculations that use approximation formulas many times to first obtain partial values and accumulate them sequentially, or multiple calculations. If you want to obtain each value and calculate the average of the resulting values (calculation to obtain standard deviation), etc., by rounding down or rounding to the nearest whole number, follow the mode set in advance with each switch above. Obtaining the result of each calculation block and sequentially executing subsequent calculations based on this value,
When the final result value is obtained, there is an inconvenience that there is a large difference between the actual result value and the final result value. Therefore, each equal operation in the calculation block before obtaining the final result obtains the result in free mode, and only when obtaining the final result do truncation or rounding to the nearest whole number. Although calculation results can be obtained, it is impossible to switch and control each of the above switches each time a program calculation is being executed due to the calculation system of the computer.Therefore, conventional program control has been used to obtain highly accurate calculation results. I couldn't get it. This invention was made in view of the above-mentioned circumstances, and in the program settings, an operation mode that follows the designation of the round switch and an operation mode that executes free mode calculation regardless of the designation of the round switch can be arbitrarily set. It is an object of the present invention to provide an arithmetic control method for an electronic calculator with a program, which can improve the versatility of the program for each operation when the operator uses the program, and can obtain highly accurate arithmetic results by executing the program operations. shall be.

以下図面を参照してこの発明の一実施例を説明する。An embodiment of the present invention will be described below with reference to the drawings.

第1図に於いて、11はキーボードであり、このキーボ
ード11には(1)(2)・・・・・・6等の数値キー
(テンキ一)、田日凶円・・・・・・円等の通常のフア
ンクシヨンキ一が設けられるとともに、プログラム設定
用の各種プログラマブルキーが設けられるもので、この
プログラマブルキー群にはフリー演算モード専用のイコ
ールキ一(以下フリーイコールキ一と呼称する)が設け
られる。また12は各種演算および全体の動作を司る演
算処理装置部(以下プロセツサユニツトと呼称する)で
あり、このプロセツサユニツトには、キー入カバツフア
部、後述するプログラムメモリより読出されるマイクロ
プログラムデータを解読して各種マイクロ命令 二およ
び判定信号等を得る機能部、コード発生機能部、内部お
よび外部のメモリアドレス制御を行なうアドレス制御機
能部、演算部、ゲート制御部、フラグ記憶部等を備えて
いる。また13は上記プロセツサユニツト12より得ら
れるイコールキ一 5判定信号N−Eqによつてりセツ
ト状態となり、フリーイコールキ一判定信号F−Eqに
よつてセツト状態となるモード指定用フリツグフロツプ
、14はフリー演算(F)、切捨て演算(Cut)、四
捨五人演算(5/4)等を選択指定 3するためのラウ
ンドスイツチ、15は小数点指定スイツチ、16はディ
ジツト信号Kl,K2・・・・・・KE,KP・・・・
・・および上記信号KE内のピットタイミング信号Tl
,T2・・・・・・等を含む種々のタイミング信号を発
生するタイミング信号発生部で φある。而して上記し
たフリツプフロツプ13のセツト出力信号とラウンドス
イツチ14の設定出力信号とノイミング信号発生部16
より得られるデイジツト信号KEのピットタイミング信
号Tl,T2,T3とは、モード判定信号を得るモード
判定回路17に供給される。このモード判定回路17は
アンドゲートA1乃至A5とインバータINVlとオア
ゲート01とによつて構成され、フリツプフロツプ13
がセツト状態となつた際ぱラウンドスイツチ14の設定
状態に拘らずアンドゲートA3よりビツトタイミング信
号T1に同期したモード判定信号を得、またフリツプフ
ロツブ13がりセツト状態にある際はラウンドスイツチ
14の設定状態に応じ、対応するアンドゲートA3,A
4またはA5よりピットタイミング信号Tl,T2また
はT3に同期したラウンドスイツチ14の指定に従うモ
ード判定信号を得るものである。また上記小数点指定ス
イツチ15の設定出力信号はエンコーダ18でコード化
され、このエンコード出力(小数点指定コード)と上記
モード判定回路17のアンドゲートA3,A4,A5出
力とはオアゲート02を介しデータ入力制御回路19に
供給される。このデータ入力制御回路19は上記オアゲ
ート02の出力データ、後述するデータメモリの読出し
データ(DR)、プロセツサユニツト12より得られる
置数人力データ(DNu)、アダー出力データ(DAO
)、レジスタ入力制御信号(XlN)およびモード サ
ンプリング信号(MOD)、その他のメモリ部より読出
されるデータ(DEX.R)等を受けて演算および表示
用xレジスタ20への入力制御を行なうもので、アンド
ゲートA6,A7,A8オアゲート03、インバータI
N2,NV3等により構成される。而してモードサンプ
リング信号(MOD)と上記表示用xレジスター20の
最上位桁へデータを記憶させるタイミング信号KEとの
出力時に於いてはオアゲート02を介して得られるモー
ド判定信号がアンドゲートA8およびオアゲート03を
介してXレジスタ20のモードビツト記憶桁に割当てら
れた対応ピツト(以下ビツトタイミング信号T1に同期
した書込みタイミングの第1記憶ビツトをαビツト、同
じくT2に同期した第2記憶ビツトをβビツト、T3に
同期した第3記憶ビツトをγビツトとそれぞれ呼称する
)に書込まれる。すなわち、ビツトタイミング信号T1
に同期してアンドゲートA3より得られるフリーモード
判定信号はαビツトに貯えられ、ビツトタイミング信号
T2に同期してアンドゲートA4より得られるカツトモ
ード判定信号はβビツトに貯えられ、ピットタイミング
信号T3に同期してアンドゲートA5より得られる5/
4(四捨五人)モード判定信号はγビツトに貯えられる
ものである。更にタイミング信号KPの出力時点に於い
てはエンコーダ18より得られる小数点コードがxレジ
スタ20のポイント指数桁の下位ビツトに又置数或いは
演算結果の小数点位置を示す小数点情報が上記桁の上位
ビツトに貯えられ、タイミング信号KE,KPおよびK
F(種々の演算モードコードが貯えられる桁を指定する
タイミング)発生時以外に於いてタイミング信号発生部
16より得られるデーノ入力汐イミング信号KDに同期
して数値データがXレジスタ20の数値データ記憶領域
に貯えられるものである。このXレジスタ20の内容は
プロセツサユニツト12内に設けられたアダー回路を経
て演算用Yレジスタ21に供給されるとともに、上記モ
ードビツト記憶桁のα、β、γビツト内容から演算モー
ドを検出するモード検出部22および表示用バッファレ
ジスタ23に供給され、更にゲート回路G1を介してデ
ータメモリ24に供給される。上記モード検出部22は
Xレジス汐20のαビツト、βビツト内容を読込みパル
スφ1で読込み、読出しパルスφ2で読出す2個のフリ
ツプフロツプFa,Fbと、タイミング信号KE−T3
・φ1で読込み制御され、読出しパルスφ2で読出し制
御される3個のフリツプフロツプFα,Fβ,Fγとに
より構成されるもので、上記フリツプフロツプFα,F
β,Fγの各セツト出力がモード検出信号Dα,Dβ,
Dγとしてプロセツサユニツト12に供給される。また
上記データメモリ24は、複数(n)ワードのデータ記
憶部Ml,M2・・・・・・Mnと書込むべきデータ記
憶エリアを選択指定する書込み用アドレスセレクタAS
wと読出すべきデータ記憶エリアを選択指定する読出し
用アドレスセレクタASRとにより構成される。このデ
ータメモリ24と、設定されたマイクロプログラムを記
憶するプログラムメモリ25とは、プロセツサユニツト
12より得られるスタートアドレスデータAD8Tおよ
び+1歩進制御される更新アドレスゼータAD(+1)
をゲート回路G2を介して貯えるアドレスレジスタ26
の内容により番地指定されるもので、上記データメモリ
24はアドレスレジスタ26のアツパ側(Au)に貯え
られた内容によつてデータ記憶部M1・・・・・・の指
定が行なわれ、また上記プログラムメモリ25はアドレ
スレジスタ26のアツパ側(Au)内容による行指定と
ロア側(AL)内容による列指定とによつて番地指定さ
れるものである。而してデータメモリ24より読出され
たデータはゲート回路G3を介して上記データ入力制御
回路19に送られ、またプログラムメモリ25にはプロ
グラム設定(書込み)時に於いてキーボード11上のプ
ログラマブルキーの操作により入力されるマイクロプロ
グラムデータがプロセツサユニツト12を介して送出さ
れ、そのマイクロプログラムデータはゲート回路G4を
介して上記アドレスレジスタ26によつて指定される番
地領域に順次書込まれる。そしてプログラム実行時等に
於いて読出されるマイクロプログラムデータはゲート回
路G5を介してインストラクシヨンレジスタ27に貯え
られた後、ゲート回路G6を介して命令判断部28に送
られる。この命令判断部28より得られる判断結果情報
は、プロセツサユニツト12に送られる。また上記表示
用バツフアレジスタ23に貯えられたデータは表示用デ
コーダ29でデコードされて表示部30に供給される。
また31はプログラム演算の実行および設定を選択指定
するための切換スイツチであり、実行モードの際は可動
端子が固定端子COmに切換接続され、設定(書込み)
モードの際は固定端子wに切換接続される。而してこの
切換スイツチ31の出力は判断部32で判断され、その
判断信号はプロセツサユニツト12に供給されるもので
ある。ここで第2図に示すフローチヤートを参照して作
用を説明すると、プログラム設定時に於いては先ず切換
スイツチ31をプログラム設定(書込み)側に選択切換
する。これにより、プロセツサユニツト12より出力さ
れる予め定められたタイミングの切換スイツチ用サンプ
リング信号によつて判断部32からはプログラムの設定
(書込み)であることを示す判断信号が出力されてプロ
セツサユニツト12に供給される。プロセツサユニツト
12ではこの判断信号を受けてキー入力されるプログラ
ムデータを順次プログラムメモリ25の空番地より書込
むべく、内部のメモリ(ROM)を起動し、このメモリ
の起動によつて得られる予め定められた一連の制御用マ
イクロインストラクシヨンにより、プログラムメモリ2
5の先頭空番地を検索し、その検索によつて得られた書
込み開始番地をアドレスレジスタ26にセツトする等、
プログラムの設定準備を行ない、更には上記マイクロイ
ンストラクシヨンの制御により設定準備が完了したこと
を表示すべく制御を行なう。この際の一連の動作手順は
既存のプログラム設定機能をもつ計算機と略同様であり
、かつこの発明の要旨ではないため詳細な説明は省略す
る。而してプログラマが所望するプログラムステツプに
従つてキーボード11内のキーを選択的に操作すること
により、操作キーに従つたコードがデータ入力制御回路
19を介してXレジスタ20に貯えられ、更にこのXレ
ジスタ20の内容が表示用バツフアレジスタ23に供給
されるとともに、プロセツサユニツト12に供給される
。而しで表示用バツフアレジスタ23に貯えられたコー
ドはデコーダ29でデコードされ、表示部30によりキ
ー入力内容が表示される。更にプロセツサユニツト12
では入力されたXレジスタ20の内容から書込むべきプ
ログラム内容を検出し、これをコード化してアドレスレ
ジスタ26で指定されたプログラムメモリ25の番地領
域に書込み、更にアドレスレジスタ26の内容を更新す
べく更新アドレスデータAD(+1)を送出する。この
ようにして順次プログラムの設定が実行される。このプ
ログラム設定時に於いて各演算プロツクの演算実行を指
示するプログラムキ一操作を行なう際に、例えば最終的
な演算結果のみを丸め演算にて求めたい場合は、その最
終的な演算ステツプの設定を除いて各演算プロツクの演
算実行を指示するプログラムキ一入力時に、フアンクシ
ヨンキ一群のイコールキ一に代つてプログラマブルキー
群のフリーイコールキ一を操作し、演算実行後の小数点
処理をフリーモードでおこなう旨のプログラムを設定し
最終的な演算結果を求める際にのみ、フアンクシヨンキ
一群のイコールキ一操作によつて演算実行後の小数点処
理はモードスイツチのモード状態に従つておこなう旨の
単なる=のプログラムキー入力を行なう。従つてプログ
ラムメモリ25には、最終的な演算結果を求めるステツ
プを除き、各演算結果を求めるステツプに於いてフリー
イコールキ一に対応したコードが書込まれる。ここで上
述した如く設定されたプログラムに基づいて演算を実行
する際の作用を第2図に示すフローチヤートを参照して
説明すると、先ずプログラム演算の実行に先立つて切換
スイツチ31をプログラム実行側に選択切換する。
In Fig. 1, 11 is a keyboard, and this keyboard 11 includes numerical keys (1), (2), etc. (1), 6 (numeric keypad 1), etc. In addition to the usual function keys such as yen, various programmable keys for program settings are provided, and this programmable key group includes an equal key (hereinafter referred to as the free equal key) dedicated to the free calculation mode. It will be done. Reference numeral 12 denotes an arithmetic processing unit (hereinafter referred to as a processor unit) that controls various calculations and the overall operation. It is equipped with a functional unit that decodes various microinstructions and judgment signals, etc., a code generating functional unit, an address control functional unit that controls internal and external memory addresses, an arithmetic unit, a gate control unit, a flag storage unit, etc. There is. Reference numeral 13 denotes a mode designation flip-flop which is brought into the set state by the equal key 5 judgment signal N-Eq obtained from the processor unit 12, and set state by the free equal key 1 judgment signal F-Eq; Round switch for selecting and specifying free calculation (F), rounding calculation (Cut), rounding calculation (5/4), etc. 3, 15 is decimal point designation switch, 16 is digit signal Kl, K2...・KE, KP・・・・
...and the pit timing signal Tl in the above signal KE
, T2, . . . , a timing signal generating section φ. The set output signal of the above-mentioned flip-flop 13, the set output signal of the round switch 14, and the noise signal generator 16 are
The pit timing signals Tl, T2, T3 of the digit signal KE obtained from the above are supplied to a mode determination circuit 17 which obtains a mode determination signal. This mode determination circuit 17 is composed of AND gates A1 to A5, an inverter INV1, and an OR gate 01, and a flip-flop 13.
When the flip-flop 13 is in the set state, a mode determination signal synchronized with the bit timing signal T1 is obtained from the AND gate A3 regardless of the setting state of the round switch 14, and when the flip-flop 13 is in the set state, the setting state of the round switch 14 is obtained. , the corresponding AND gate A3,A
4 or A5 to obtain a mode determination signal according to the designation of the round switch 14 synchronized with the pit timing signal Tl, T2 or T3. Further, the setting output signal of the decimal point designation switch 15 is encoded by the encoder 18, and this encoded output (decimal point designation code) and the AND gate A3, A4, A5 output of the mode determination circuit 17 are controlled by data input via the OR gate 02. The signal is supplied to the circuit 19. This data input control circuit 19 inputs the output data of the OR gate 02, read data (DR) of the data memory (to be described later), numerical input data (DNu) obtained from the processor unit 12, and adder output data (DAO).
), register input control signal (XIN), mode sampling signal (MOD), data read out from other memory sections (DEX.R), etc., and controls input to the x register 20 for calculation and display. , AND gate A6, A7, A8 OR gate 03, inverter I
Consists of N2, NV3, etc. When the mode sampling signal (MOD) and the timing signal KE for storing data in the most significant digit of the display x register 20 are output, the mode determination signal obtained via the OR gate 02 is outputted from the AND gate A8 and Corresponding pits assigned to the mode bit storage digits of the , the third storage bit synchronized with T3 is referred to as the γ bit). That is, bit timing signal T1
The free mode determination signal obtained from the AND gate A3 in synchronization with the bit timing signal T2 is stored in the α bit, and the cut mode determination signal obtained from the AND gate A4 in synchronization with the bit timing signal T2 is stored in the β bit. 5/ obtained from AND gate A5 in synchronization
The 4 (rounded off) mode determination signal is stored in γ bits. Furthermore, at the time of outputting the timing signal KP, the decimal point code obtained from the encoder 18 is placed in the lower bits of the point exponent digit of the x register 20, and the decimal point information indicating the decimal point position of the placed number or calculation result is placed in the upper bits of the above digit. stored timing signals KE, KP and K
Numerical data is stored in the X register 20 in synchronization with the data input timing signal KD obtained from the timing signal generator 16 at times other than when F (timing for specifying the digit in which various calculation mode codes are stored) occurs. It is something that can be stored in a region. The contents of this X register 20 are supplied to the Y register 21 for calculation via an adder circuit provided in the processor unit 12, and a mode for detecting the calculation mode from the contents of the α, β, and γ bits in the mode bit storage digit. The signal is supplied to the detection section 22 and the display buffer register 23, and further supplied to the data memory 24 via the gate circuit G1. The mode detection unit 22 reads the contents of the α bit and β bit of the X register 20 with a read pulse φ1, and reads out the contents with a read pulse φ2 using two flip-flops Fa and Fb, and a timing signal KE-T3.
・It is composed of three flip-flops Fα, Fβ, Fγ whose read is controlled by φ1 and read by read pulse φ2, and the flip-flops Fα, Fγ are
Each set output of β, Fγ is a mode detection signal Dα, Dβ,
It is supplied to the processor unit 12 as Dγ. The data memory 24 also includes a plurality of (n) word data storage sections Ml, M2, .
w and a read address selector ASR that selects and specifies the data storage area to be read. This data memory 24 and the program memory 25 that stores the set microprogram are configured to include start address data AD8T obtained from the processor unit 12 and update address zeta AD(+1) which is controlled by +1 increments.
The address register 26 stores the
The address of the data memory 24 is specified according to the contents stored in the upper side (Au) of the address register 26, and the address of the data memory 24 is specified according to the contents stored in the upper side (Au) of the address register 26. The address of the program memory 25 is specified by the row specification based on the upper side (Au) content of the address register 26 and the column specification based on the lower side (AL) content. The data read from the data memory 24 is sent to the data input control circuit 19 via the gate circuit G3, and the data is sent to the program memory 25 by the operation of the programmable keys on the keyboard 11 during program setting (writing). Microprogram data inputted by the processor unit 12 is sent out via the processor unit 12, and the microprogram data is sequentially written into the address area specified by the address register 26 via the gate circuit G4. Microprogram data read out during program execution is stored in the instruction register 27 via the gate circuit G5, and then sent to the instruction determining section 28 via the gate circuit G6. Judgment result information obtained from the instruction judgment section 28 is sent to the processor unit 12. Further, the data stored in the display buffer register 23 is decoded by the display decoder 29 and supplied to the display section 30.
Further, 31 is a changeover switch for selecting and specifying the execution and setting of program calculations, and in the execution mode, the movable terminal is switched and connected to the fixed terminal COm, and the setting (writing) is performed.
In mode, it is switched and connected to the fixed terminal w. The output of this changeover switch 31 is determined by a determining section 32, and the determined signal is supplied to the processor unit 12. Here, the operation will be explained with reference to the flowchart shown in FIG. 2. At the time of program setting, the selector switch 31 is first selectively switched to the program setting (writing) side. As a result, the determination section 32 outputs a determination signal indicating program setting (writing) based on the sampling signal for the changeover switch at a predetermined timing output from the processor unit 12, and the processor unit 12. In response to this judgment signal, the processor unit 12 activates an internal memory (ROM) in order to sequentially write the program data inputted by keys from empty addresses in the program memory 25. A predetermined series of control micro-instructions causes the program memory 2 to
5, and set the write start address obtained by the search in the address register 26, etc.
Preparations for setting the program are made, and furthermore, control is performed to display that the preparation for setting has been completed by controlling the microinstructions. The series of operating procedures at this time is substantially the same as that of an existing computer having a program setting function, and since it is not the gist of the present invention, a detailed explanation will be omitted. When the programmer selectively operates the keys on the keyboard 11 in accordance with the desired program step, the code corresponding to the operated key is stored in the X register 20 via the data input control circuit 19, and this The contents of the X register 20 are supplied to a display buffer register 23 and also to the processor unit 12. The code stored in the display buffer register 23 is decoded by the decoder 29, and the contents of the key input are displayed on the display section 30. Furthermore, the processor unit 12
Then, detect the program content to be written from the input contents of the X register 20, encode it and write it to the address area of the program memory 25 specified by the address register 26, and further update the contents of the address register 26. Sends updated address data AD(+1). In this way, program settings are sequentially executed. When setting this program, when performing a program key operation to instruct the execution of each calculation block, for example, if you want to obtain only the final calculation result by rounding, set the final calculation step. When inputting the program key to instruct the execution of each calculation block except for the function keys, the free equal key of the programmable key group is operated instead of the equal key of the function key group, and the decimal point processing after execution of the calculation is performed in free mode. Only when setting the program and obtaining the final calculation result, simply input the = program key to indicate that the decimal point processing after execution of the calculation will be performed according to the mode state of the mode switch by operating one equal key in the function key group. . Therefore, the code corresponding to the free equal key is written in the program memory 25 at each step of obtaining the calculation result, except for the step of obtaining the final calculation result. Here, the operation when executing a calculation based on the program set as described above will be explained with reference to the flowchart shown in FIG. Switch selection.

これによつて判断部32からは切換スイツチ用のサンプ
リング信号に同期してプログラム演算の実行を示す判断
信号が得られ、この判断信号がプロセツサユニツト12
に供給される。プロセツサユニツト12ではこの判断信
号に基づき、先ずプログラムの選択指定指示を行なうべ
く表示制御を行なう。ここでキーボード11の操作によ
つてプログラムが指定されると、プロセツサユニツト1
2ではこのキー入力内容から指定プログラムの実行開始
アドレスを検出し、その検出されたアドレスをアドレス
レジスタ26にセツトした後、プログラムメモリ25を
アクセス制御してアドレスレジスタ26で指定した番地
領域の内容(プログラムマイクロインストラクシヨンコ
ード)を読出し、演算プログラムの実行が開始される。
而してプログラムメモリ25より読出されたマイクロイ
ンストラクシヨンコードはインストラクシヨンレジスタ
27に貯えられた後、命令判断部28に送られて内容の
判断が行なわれ、その判断情報がプロセツサユニツト1
2に送られる。プロセツサユニツト12では、この判断
情報を内容判別して、予め設定されたプログラムに従う
プログラムステツプを順次進行させるべく、表示または
アドレス更新制御を実行し、これに従つてオペレータは
キーボード11のキー操作により、演算数、被演算数等
演算データの置数設定および置数設定終了指示等を実行
して行く。これによつてXレジスタ20およびYレジス
タ21に演算データが貯えられる(ステツプ1)。而し
て或る演算ステツプに於いてインストラクシヨンレジス
タ27に貯えられたプログラム内容がイコールキ一また
はフリーイコールキ一設定に対するコードであると、こ
の判断信号がプロセツサユニツト12に送られ、これに
よつてプロセツサユニツト12では演算実行ステツプと
なつたことを判断し(ステツプ2)、更に演算開始に先
立ち、その判断情報からイコールキ一設定による演算モ
ードかまたはフリーイコールキ一設定による演算モード
かを判断する(ステツプ3)。ここでフリーイコールキ
一設定によるフリー演算モードであることが判定される
と、プロセツサユニツト12ではフリーイコールキ一判
定信号F−Eqを出力し、モード指定用フリツプフロツ
ブ13をセツト状態にする(ステツプ4)。これによつ
てモード判定回路17のアンドゲートA3よりビツトタ
イミング信号T1に同期してフリーモード判定信号が出
力され(ステツプ5)、更にこの判定信号はオアゲート
02および、データ入力制御回路19を介し、Xレジス
タ20に割当てられたモードビツト記憶桁のαビツトに
貯えられる。すなわちモードビツト記臆桁のαビツトの
みにゞゞ1″が書込まれる(ステツプ6)。而してプロ
セツサユニツト12ではXレジスタ20フラグビツト桁
の内容によるフアンクシヨン情報およびX..Yレジス
タ20,21の数値データ記憶領域に貯えられた演算デ
ータに基づいて演算を実行する(ステツプ7)。一方、
Xレジスタ20のモードビツト記憶桁の読出し出力はモ
ード検出部22に送られ、この際αビツトの内容が6F
”であるため、フリツプフロツプFαよりモード検出信
号Dαが得られ、このモード検出信号Dαがプロセツサ
ユニツト12に供給される。プロセツサユニツト12で
は1演算プロツクの演算を実行した後、モード検出部2
2より得られたモード検出信号からフリーモードの演算
結果を得るのかまたはカツトモード、5/4モード等の
丸め演算結果を得るのかを判断し(ステツプ8)、この
際はモード検出信号Dαが入力されているため、フリー
モードの演算結果を出力するための小数点に関連する後
処理を実行する(ステツプ9)。而してフリーモードで
後処理された演算結果データはデータ入力制御回路19
を介してXレジスタ20の数値データ記憶領域に貯えら
れた後、表示用バツフアレジスタ23に貯えられ、表示
部30にて表示されるとともに、データメモリ24の指
定されたアドレス領域に記憶される(ステツプ10)。
更にプロセツサユニツト12では後処理が終了した時点
で演算終了信号を出力し、この演算終了信号によつてモ
ード検出部22の各フリツプフロツプFa,Fb,Fα
,Fβ,Fγがクリアされる。このように、プログラム
演算の実行時に於いて、フリーイコールキ一設定ステツ
プとなつた際は、ラウンドスイツチ14の設定状態に拘
らずフリーモードの演算結果が各演算プロツク毎に得ら
れる。而して或る演算プロツク、例えば最終演算プロツ
クのプログラム実行時に於いて、プログラムメモリ25
より、イコールキ一設定による命令コードが読出される
と、このコードがインストラクシヨンレジスタ27にセ
ツトされ、命令判断部28でこのコード内容が判断され
る。
As a result, a judgment signal indicating execution of the program operation is obtained from the judgment section 32 in synchronization with the sampling signal for the changeover switch, and this judgment signal is sent to the processor unit 12.
supplied to Based on this determination signal, the processor unit 12 first performs display control in order to issue a program selection designation instruction. When a program is specified by operating the keyboard 11, the processor unit 1
In step 2, the execution start address of the specified program is detected from the contents of this key input, and the detected address is set in the address register 26, and then the program memory 25 is access controlled and the contents of the address area specified by the address register 26 ( The microinstruction code (program microinstruction code) is read out, and execution of the arithmetic program is started.
After the microinstruction code read from the program memory 25 is stored in the instruction register 27, it is sent to the instruction determination section 28, where the contents are determined, and the determination information is sent to the processor unit 1.
Sent to 2. The processor unit 12 determines the contents of this judgment information and executes display or address update control in order to sequentially advance the program steps according to a preset program. , the number setting of calculation data such as the number of operations, the number of operands, etc., and the instruction to end the setting of the number of operations, etc. are executed. As a result, the operation data is stored in the X register 20 and Y register 21 (step 1). If the program content stored in the instruction register 27 in a certain calculation step is a code for setting an equal key or a free equal key, this judgment signal is sent to the processor unit 12, Therefore, the processor unit 12 determines that the calculation execution step has come (step 2), and, prior to starting the calculation, determines based on the judgment information whether the calculation mode is the calculation mode with the equal key setting or the calculation mode with the free equal key setting. Make a judgment (Step 3). If it is determined that the free calculation mode is set by the free equal key setting, the processor unit 12 outputs the free equal key determination signal F-Eq, and sets the mode specifying flip-flop 13 to the set state (step 1). 4). As a result, a free mode determination signal is output from the AND gate A3 of the mode determination circuit 17 in synchronization with the bit timing signal T1 (step 5), and this determination signal is further transmitted via the OR gate 02 and the data input control circuit 19. It is stored in the α bit of the mode bit storage digit assigned to the X register 20. In other words, ``1'' is written only to the alpha bit of the mode bit recording digit (step 6).The processor unit 12 then stores the function information based on the contents of the flag bit digit of the X register 20 and the X...Y registers 20, 21. The calculation is executed based on the calculation data stored in the numerical data storage area (step 7).Meanwhile,
The readout output of the mode bit storage digit of the X register 20 is sent to the mode detection section 22, and at this time, the content of the α bit is
”, the mode detection signal Dα is obtained from the flip-flop Fα, and this mode detection signal Dα is supplied to the processor unit 12. After the processor unit 12 executes the operation of one operation block, the mode detection section 2
From the mode detection signal obtained in step 2, it is determined whether to obtain the calculation result of the free mode or the rounding calculation result of cut mode, 5/4 mode, etc. (step 8), and in this case, the mode detection signal Dα is input. Therefore, post-processing related to the decimal point is executed to output the free mode calculation result (step 9). The calculation result data post-processed in the free mode is then sent to the data input control circuit 19.
After being stored in the numerical data storage area of the X register 20 via (Step 10).
Furthermore, the processor unit 12 outputs a computation end signal when the post-processing is completed, and this computation end signal causes each flip-flop Fa, Fb, Fα of the mode detection section 22 to be activated.
, Fβ, and Fγ are cleared. In this manner, when the free equal key setting step is reached during execution of program calculations, free mode calculation results are obtained for each calculation program regardless of the setting state of the round switch 14. Therefore, when executing a program of a certain calculation block, for example, the final calculation block, the program memory 25
Therefore, when the instruction code based on the equal key setting is read out, this code is set in the instruction register 27, and the contents of this code are judged by the instruction judgment section 28.

こO判断信号がプロセツサユニツト12に供給されるこ
とにより、プロセツサユニツト12では演算実行ステツ
プとなつたことを判断し(ステツプ2)、更にイコール
キ一設定によるラウンドスイツチ14の指定に従つた演
算モードであることを判定する(ステツブ3)。この判
断結果に基づいてプロセツサユニツト12ではイコール
キ一判定信号(N−Eq)を出力し、モード指定用フリ
ツプフロツプ13をりセツト状態にする(ステツプ11
)。これによリモート判定回路17のアンドゲートAl
,A2は”開゛状態となり、ラウンドスイツチ14の指
定に従つたモード判定信号がモード判定回路17より得
られる。すなわち、例えばラウンドスイツチ14が5/
4モードに設定されていたとすると、ビツトタイミング
信号T3に同期してアンドゲートA5より5/4モード
判定信号が出力される(ステツプ12)。而してこの判
定信号はオアゲート02およびデータ入力制御回路19
のアンドゲートA8、オアゲート03を介し、Xレジス
タ20に割当てられたモードビツト記憶桁のγビツトに
貯えられ(ステツプ6)、更にタイミング信号KPに同
期してエンコーダ18より得られる小数点指定コードが
ポイント指定桁下位ビツトに貯えられる。而してプロセ
ツサユニツト12ではXlYレジスタ20,21の内容
に基づいて演算を実行し(ステツプ7)、一方、Xレジ
スタ20のモードビツト記憶桁の読出し出力はモード検
出部22に送られてモード検出部22よりモード検出信
号Dγが出力される。プロセツサユニツト12では1演
算プロツク(最終演算プロツク)の演算を実行した後、
モード検出部22より得られたモード検出信号Dγから
5/4モードの演算結果を得ることを判断し(ステツプ
8)、ポイント指定以下の値を四捨五人するための後処
理を実行する(ステツプ13)。而して5/4モードぐ
後処理された最終的な演算結果データはデータ入力制御
回路19を介してXレジスタ20の数値データ記憶領域
に貯えられた後、表示用バツフアレジスタ23に順次送
られ、表示部29にで表示されるとともに、データメモ
リ24の指定されたアドレス領域に前記モードビツト記
憶桁のモード信号と共に転送され記憶される(ステツプ
10)。このようにプログラム演算実行時に於いて、ラ
ウンドスィツチ14の指定に従つたモード演算と、ラウ
ンドスイツチ14の指定に拘らずフリーモードで演算を
行なうフリーモード演算とを実行できるため、精度の高
いプログラム演算による最終結果が得られる。すなわち
一例を示すと、のプログラム演算に於いて、小数点2位
以下を四捨五人して最終的な結果を得る場合、従来では
プログラム演算に先立つて予めラウンドスイツチを5/
4モードに設定し、小数点指定スイツチを2位に設定し
ておき、この設定に従つて各演算プロツクの演算が実行
されるため、x−5.61、x′64.55、!−5.
84となり、従つて最終的な演算結果zは76.00と
なる。
By supplying this judgment signal to the processor unit 12, the processor unit 12 judges that it is the step to execute the operation (step 2), and further executes the operation according to the designation of the round switch 14 by setting the equal key. mode is determined (Step 3). Based on the result of this judgment, the processor unit 12 outputs an equal key judgment signal (N-Eq) and puts the mode specifying flip-flop 13 into the reset state (step 11).
). As a result, the AND gate Al of the remote judgment circuit 17
, A2 are in the open state, and a mode determination signal according to the designation of the round switch 14 is obtained from the mode determination circuit 17. That is, for example, when the round switch 14 is set to 5/
If the mode is set to 4 mode, a 5/4 mode determination signal is output from the AND gate A5 in synchronization with the bit timing signal T3 (step 12). This judgment signal is then sent to the OR gate 02 and the data input control circuit 19.
The decimal point designation code obtained from the encoder 18 in synchronization with the timing signal KP is stored in the γ bit of the mode bit storage digit assigned to the It is stored in the lower bit. Then, the processor unit 12 executes calculations based on the contents of the XlY registers 20 and 21 (step 7), while the readout output of the mode bit storage digit of the X register 20 is sent to the mode detection section 22 for mode detection. The mode detection signal Dγ is output from the section 22. After the processor unit 12 executes the operation of one operation block (final operation block),
It is determined from the mode detection signal Dγ obtained by the mode detection unit 22 that a calculation result of 5/4 mode is to be obtained (step 8), and post-processing is executed to round off values less than or equal to the specified point (step 8). 13). The final arithmetic result data processed after the 5/4 mode is stored in the numerical data storage area of the X register 20 via the data input control circuit 19, and then sequentially sent to the display buffer register 23. is displayed on the display section 29, and is also transferred and stored in the designated address area of the data memory 24 together with the mode signal of the mode bit storage digit (step 10). In this way, when executing program calculations, mode calculations according to the designation of the round switch 14 and free mode calculations in which calculations are performed in free mode regardless of the designation of the round switch 14 can be executed, allowing highly accurate program calculations. The final result is obtained. In other words, to give an example, when obtaining the final result by rounding off to the second decimal place in a program calculation, conventionally, the round switch is set to 5/5 in advance of the program calculation.
4 mode and set the decimal point designation switch to the 2nd place, and the calculations for each calculation block are executed according to this setting, so x-5.61, x'64.55,! -5.
84, so the final calculation result z is 76.00.

これに対し上記実施例の如く、演算プロツク1、2、3
の演算結果X、Xl,.x(/をフリーイコールキ一設
定によるフリーモード演算で求め、演算プロツク4の演
算結果zのみを上記した如くラウンドスイツチおよび小
数点指定スイツチの指定に従うモードで求めた際は、x
=5.6088となりx′=64.5498となり、f
=5.8353となり、従つて最終的な演算結果zは7
5.99となり、実際の値75.993に非常に近い精
度の高い値が得られるものである。又、上記各演算結果
は後処理モードコードと共にデータメモリ24の所定番
地に記憶される。従つて後の別の演算プログラムで上記
演算結果を使用する為に演算部に読み出す場合、これは
浮動モードで得られた演算結果か又は丸め処理モードで
行なわれた演算結果かを判定すべくプログラムを組む必
要がなく、非常に簡潔なプログラムでよいのでオペレー
タの負担が非常に軽くなる。なお上記した実施例に於い
ては、プログラマブルキー群にフリーイコールキ一を設
け、プログラム設定時にのみ用いるように説明したが、
これに限定されずプログラムを使用しない際の演算時に
於いて、ラウンドスイツチの切換を要せずに上記フリー
イコールキ一を用いてフリー演算を実行せしめることも
可能である。
On the other hand, as in the above embodiment, the calculation blocks 1, 2, 3
The calculation results of X, Xl, . x
= 5.6088, x' = 64.5498, f
=5.8353, so the final calculation result z is 7
5.99, which is a highly accurate value that is very close to the actual value of 75.993. Further, the results of each of the above calculations are stored at a predetermined location in the data memory 24 together with the post-processing mode code. Therefore, when reading the above calculation result to the calculation section for use in another calculation program later, the program must determine whether it is the calculation result obtained in floating mode or the calculation result performed in rounding mode. Since there is no need to assemble a program and a very simple program is required, the burden on the operator is greatly reduced. In the above embodiment, a free equal key is provided in the programmable key group, and it is explained that it is used only when setting a program.
The present invention is not limited to this, and when performing calculations without using a program, it is also possible to use the free equal key to execute free calculations without changing the round switch.

また上記実施例では演算部(アダー回路)、フラグ記憶
部(フラグレジスタ)等をプロセツサユニツト12内に
設けた構成として説明したが、これに限らず外部に別個
に設けた構成としてもよく、要はこの発明の要旨を逸脱
しない範囲で種々応用可能である。以上詳記したように
この発明によれば、プログラム演算の実行時に於いて、
ラウンドスイツチの指定モードに拘らずフリーモード演
算結果を得る機能とラウンドスイツチの指定モードに従
つたモード演算結果を得る機能とを備えたことにより、
各種演算に対して、オペレーターが要望するモードのプ
ログラム演算が実行できると共に精度の高いプログラム
演算結果を得ることができ、以つて汎用性のあるプログ
ラム付電子式計算機の演算制御方式が提供できる。
Further, in the above embodiment, the arithmetic unit (adder circuit), flag storage unit (flag register), etc. are provided in the processor unit 12, but the structure is not limited to this, and may be provided separately outside. In short, various applications are possible without departing from the gist of the invention. As detailed above, according to the present invention, when executing a program operation,
By being equipped with a function to obtain free mode calculation results regardless of the specified mode of the round switch, and a function to obtain mode calculation results according to the specified mode of the round switch,
For various calculations, it is possible to execute programmed calculations in the mode desired by the operator, obtain highly accurate program calculation results, and provide a versatile calculation control system for a programmable electronic calculator.

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

第1図はこの発明の一実施例を示すプロツク構成図、第
2図は上記実施例の動作を説明するためのフローチヤー
トである。 11・・・・・・キーボード、12・・・・・−キー入
カバツフア部、13・・・・・・モード指定用フリツプ
フロツプ、14・・・・・・ラウンドスィツチ、15・
・・・・・小数点指定スイツチ、16・・・・・・タイ
ミング信号発生部、17・・・・・・モード判定回路、
18・・・・・・エンコーダ、19・・・・・・データ
入力制御回路、20・・・・・・Xレジスタ、21・・
・・・・Yレジスタ、22・・・・・・モード検査部、
23・・・・・・表示用バツフアレジスタ、24・・・
・・・データメモリ、25・・・・・・プログラムメモ
リ、26・・・・・・アドレスレジスタ、27・・・・
・・インストラクシヨンレジスタ、28・・・・・・命
令判断部、29・・・・・・表示用デコーダ、30・・
・・・・表示部、31・・・・・・切換スイツチ、32
・・−・・・判断部、N−Eq・・・・・・イコールキ
一判定信号、F−Eq・・・・・・フリーイコールキ一
判定信号。
FIG. 1 is a block diagram showing an embodiment of the present invention, and FIG. 2 is a flowchart for explaining the operation of the embodiment. 11...keyboard, 12...-key input cover part, 13...flip-flop for mode specification, 14...round switch, 15...
... Decimal point designation switch, 16 ... Timing signal generation section, 17 ... Mode judgment circuit,
18...Encoder, 19...Data input control circuit, 20...X register, 21...
... Y register, 22 ... Mode inspection section,
23... Display buffer register, 24...
...Data memory, 25...Program memory, 26...Address register, 27...
...Instruction register, 28...Instruction judgment unit, 29...Display decoder, 30...
...Display section, 31...Selector switch, 32
. . . Judgment unit, N-Eq . . . Equal key judgment signal, F-Eq . . . Free equal key judgment signal.

Claims (1)

【特許請求の範囲】[Claims] 1 プログラマブルキーを備えたキーボードと小数点指
定スイッチおよびラウンドスイツチとを備えたプログラ
ム付電子式計算機に於いて、上記キーボードにノーマル
イコールキーおよび浮動演算用の特定イコールキーを設
け、プログラム演算実行時これら各イコールキーの操作
によつてプログラミングされたプログラム内容が読み出
され、演算を実行するステップとなつた際に演算実行に
先立ち前記プログラム内容が上記何れのイコールキー設
定による演算モードかを判定する手段と、この判定結果
に基づき、特定イコールキー設定による演算モードであ
る際は上記ラウンドスイツチの指定に拘わらず浮動演算
用のモード指定コードをノーマルイコールキー設定によ
る演算モードである際は上記ラウンドスイツチの指定に
従つたモード指定コードを記憶する手段と、上記プログ
ラム演算が実行された後、上記記憶手段に記憶されたモ
ード指定コードに従つて演算の後処理を実行する手段と
を具備してなるプログラム付電子式計算機の演算制御方
式。
1. In a programmable electronic calculator equipped with a keyboard equipped with programmable keys, a decimal point designation switch, and a round switch, the keyboard is provided with a normal equals key and a specific equals key for floating arithmetic operations, and when executing program arithmetic operations, these means for determining which of the above-mentioned equal key settings the program content is in, prior to execution of the calculation, when the program content programmed by the operation of the equal key is read out and the step for executing the calculation is reached; Based on this determination result, when the calculation mode is based on a specific equal key setting, the mode specification code for floating calculation is set regardless of the specification of the round switch, and when the calculation mode is based on the normal equal key setting, the mode specification code is set for the round switch. and means for executing post-processing of the operation according to the mode specification code stored in the storage means after the program operation is executed. Arithmetic control method for electronic calculators.
JP51032813A 1976-03-25 1976-03-25 Arithmetic control method for electronic calculator with program Expired JPS5931094B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP51032813A JPS5931094B2 (en) 1976-03-25 1976-03-25 Arithmetic control method for electronic calculator with program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP51032813A JPS5931094B2 (en) 1976-03-25 1976-03-25 Arithmetic control method for electronic calculator with program

Publications (2)

Publication Number Publication Date
JPS52116033A JPS52116033A (en) 1977-09-29
JPS5931094B2 true JPS5931094B2 (en) 1984-07-31

Family

ID=12369264

Family Applications (1)

Application Number Title Priority Date Filing Date
JP51032813A Expired JPS5931094B2 (en) 1976-03-25 1976-03-25 Arithmetic control method for electronic calculator with program

Country Status (1)

Country Link
JP (1) JPS5931094B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0625965B2 (en) * 1985-12-23 1994-04-06 日本電気株式会社 Rounding specification method

Also Published As

Publication number Publication date
JPS52116033A (en) 1977-09-29

Similar Documents

Publication Publication Date Title
US4168523A (en) Data processor utilizing a two level microaddressing controller
US4301511A (en) Programmable calculator with a device for controlling the reading of program data
US4467415A (en) High-speed microprogram control apparatus with decreased control storage requirements
JPS60262204A (en) Programmable controller
JPS5931094B2 (en) Arithmetic control method for electronic calculator with program
US4609997A (en) Input processor
US4473886A (en) Data processing apparatus with algebraic memory operation and entry sequence
KR910002021B1 (en) Programmable controller
JPS5921068B2 (en) Program step calculation method
JPS6315958Y2 (en)
JPH0610434Y2 (en) Small electronic calculator
JPS6142184Y2 (en)
JPS6225213B2 (en)
JPS6217782B2 (en)
JPS6236560B2 (en)
JPS6113623B2 (en)
JPH0228757A (en) Document generating device
JPS6338732B2 (en)
JPH0616278B2 (en) Calculation mode setting device for desktop computer
JPS5911946B2 (en) Operation specification method
JPH0578055B2 (en)
JPS5911940B2 (en) Program calculation start device
JPS6228878B2 (en)
JPS59127162A (en) Program type electronic calculator
JPS6226725B2 (en)