CA1099020A - Programmable calculator - Google Patents

Programmable calculator

Info

Publication number
CA1099020A
CA1099020A CA316,026A CA316026A CA1099020A CA 1099020 A CA1099020 A CA 1099020A CA 316026 A CA316026 A CA 316026A CA 1099020 A CA1099020 A CA 1099020A
Authority
CA
Canada
Prior art keywords
electronic calculator
storage means
program
lines
keyboard input
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
CA316,026A
Other languages
French (fr)
Inventor
Richard M. Spangler
Frank E. Cada
Eugene V. Burmeister
Wayne F. Covington
Chris J. Christopher
Robert E. Watson
Myles A. Judd
Freddie W. Wenninger
Kent W. Simcoe
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.)
HP Inc
Original Assignee
Hewlett Packard Co
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
Priority claimed from CA174,483A external-priority patent/CA1046644A/en
Application filed by Hewlett Packard Co filed Critical Hewlett Packard Co
Priority to CA316,026A priority Critical patent/CA1099020A/en
Application granted granted Critical
Publication of CA1099020A publication Critical patent/CA1099020A/en
Expired legal-status Critical Current

Links

Landscapes

  • Calculators And Similar Devices (AREA)

Abstract

ABSTRACT

An adaptable programmable calculator is provided by employing a modular read-write and read-only memory unit, a central processing unit, and an input-output control unit capable of bidirectionally transferring information between the memory or central processing units and a number of input and output units. These input and output units include an alphanumeric keyboard input unit, a magnetic tape cassette reading and recording unit, an alphanumeric solid state output display unit, an output printer, an X-Y plotter, a magnetic or paper tape reading and recording unit, a magnetic disc reading and recording unit, and a modem for connecting the calculator via telephone lines to a remotely located computer.
The calculator employs an extended version of BASIC computer language and allows the user to enter a line comprising one or more alphanumeric statements into the calculator from the key-board input unit while visually observing an alphanumeric display of the line to check for errors therein. Syntax errors are automatically detected by the calculator when an entered statement is terminated, and execution errors are automatically detected upon attempted execution of a statement or statements.
Both types of errors are indicated to the user via error messages displayed by the output display unit. The calculator employs a compiler for converting each statement entered into the calculator in BASIC language into an internal stored format.
It also employs an uncompiler for regenerating in BASIC language any entered line converted to the internal stored format. The magnetic tape cassette reading and recording unit employed in the calculator allows the user to chain together several pro-gram segments and allows program manipulation of several blocks of data on an individual basis. An interrupt feature of the cassette unit facilitates searching for a particular file located on a magnetic tape at the same time the calculator is performing other functions.

Description

99~20 BACKGROUND OF THE INVENTION
This invention relates generally to calculators and improvements therein and mo-e particularly to programmable calculators that may be controlled both manually from the keyboard input unit and automatically by a stored , , ~.

..

.~.~ - 3 , .
.

109g~20 program loaded into the calculator from thc keyboard input unit or an external record member.
Computational problems may be solved manually, with the aid of a calculator (a dedicated computational keyboard-driven machine that may be either programmable or nonprogrammable), or a general purpose computer. Manual solution of computational problems is often very slow, so slow in many cases as to be an impractical, expensive, and ineffective use of the human resource, particularly when there are other alternatives for solution of the computational problems.
Nonprogrammable calculators may be employed to solve many relatively simple computational problems more efficiently than they could be solved by manual methods.
However, the keyboard operations or language employed by these calculators is typically trivial in structure, thereby requiring many keyboard operations to solve more general arithmetic problems. Programmable calculators may be employed to solve many additional computational problems at rates hundreds of times faster than manual methods.
However~ the keyboard language employed by these calcula-tors is also typically relatively simple in structure, thereby again requiring many keyboard operations to solve more general arithmetic problems.
Another basic problem with nearly all of the key-board languages employed by conventional programmable and nonprogrammable calculators is that they allow the character-istics of the hardware of the calculator to show through to the user. Thus, the user must generally work with data movement at the hardware level, for example, by making sure zo that data is in certain storage registers before specifying the operations to be performed with that data and by perform-ing other such "housekeeping" functions. In addition, these languages have been unique to a particular calculator and have not been generally familiar to those persons skilled in the computer and calculator arts. The calculator of the present invention employs a high level language called BASIC
with which nearly all persons skilled in the computer arts have a working familiarity. The implementation of BASIC
language in the present calculator allows the usex to rapidly and efficiently perform sophisticated computational tasks without any special knowledge of the calculator hardware as was previously required in the case of prior art calculators employing lower levél languages. In addition, the user of the present BASIC language calculator is spared the difficult-ies and inefficiences inherent in running BASIC language programs on larger scale prior art computers.
In the past both programmable and nonprogrammable calcu-~ators have generally had very limited memories, thereby severely limiting the size of the computational problems they could be employed to solve. Because of these limitations, the relatively simple structure of the keyboard languages employed by these calculators and the "housekeeping" requirements associated with their languages have not heretofore been serious shortcomings. However, with advances in technology, the cost of memories has decreased to a point where larger memories could be economically included in programmable cal-culators. These larger memories have allowed larger and more sophisticated problems to be handled by programmable calculators. As a result the shortcomings of conventional calculator languages have become more critical, thereby creat-ing the need for higher level keyboard languages.

~ .

In addition to the foregoing shortcomings, con-ventional programmable calculators generally have less capability and flexibility than is required to meet the needs of many users. For example, they typically cannot be readily expanded and adapted by the user to increase the amount of program and data storage memory or to perform many special keyboard functions oriented toward the environment of the user.
In some conventional programmable calculators a - 5a -B

~, .

program ~l;or~d ~vithi~ c.~lculator can be recorded OlltO an external ma~netic record membcr and can later be reloaded back into the calculator from the magnetic record member.
However, data and programs stored within these calculators typically cannot be separately recorded onto an external magnetic record member and later separately reloaded back into the calculator therefrom, Moreover, these calculators typically have no provision for making a program secure when it is recorded onto an external magnetic record member. Any user may therefore re-record the program or obtain an indi-cation of the individual program steps once the program is reloaded into the calculator, Conventional programmable calculators with self-contained output display units typically have little or no alpha capability and typically can only display the contents of one or more selected registers. They are therefore typically unable to display a line containing an alpha-numeric statement or an alphabetic message such as might be used, for example, to inform the user how to run programs with which he may be unfamiliar. Such features would be very helpful to the user both in editing programs and in simplifying their use.
Conventional programmable calculators typically have little or no capability for editing keyboard entries or pro-grams stored within the calculator. For example, they typically have no provision for deleting, replacing, and inserting information included in or omitted from a keyboard entry or internally-stored program on a character-by-character or line-by-line basis. As another example, they typically have no provision for d_rectly recalling any line of an z~ :~

internally-stored program. As a further example, they typl-cally have no provision for automatically accommodating and sequencing program statements which are entered by the user in random order. Such features would be very helpful to the user in editing programs, Conventional computers typically pose an inter-iacing problem between the user and the machine. This interface requirement takes the form of a machine-level operator with special abilities for maintaining the soft-ware system in operative condition for the user. Com-puter time sharing systems comprising a centrally located computer and a multiplicity of remotely located user terminals connected thereto by telephone lines have partially solved the user/machine interface problem. How-ever, these systems lack the same flexibility as conven-tional computers in that they are only programmable and provide no convenient non-programmable method for per-forming relatively simple calculations. Both types of systems lack provision ~or editing a program statement ~rom a keyboard without the necessity of retyping the entire statement.
S D ary of the Invention In accordance with one aspect of this invention there is provided an improved programmable calculator that has more capability and flexibility than conventional programmable calculators, that is smaller, less expensive and more effi-cient in calculating elementary mathematical functions than conventional computer systems, and that is easier to utilize than conven$ional programmable calculators or computer ~ystems.

' ' ' ' - .

_.= ., .
":, - ~ ~ - - -, ~ . , ,. ..

This invention in another aspect provides a programmable calculator employing BASIC computer language implemented in a read-only memory (ROM) that completely eliminates the user/machine interface requirement of con- -ve~tional computers and further eliminates the necessity o~ learning a non-universal language such as those typically associated with conventional programmable calculators.
This invention in another aspect provides a programmable calculator in which the user may, be employing a BACK key or a FOR~VARD key of a keyboard, position a visual cursor over any character position of a line of information entered from the keyboard or recalled into the display from memory to indicate the character which may be edited by simply actuating a key representing the replacement charac-ter, This invention in another aspect provides a programmable calculator in which the ~ser may employ an ~NSERT key of a keyboard to insert a blank character posi-tlon immediately to the left of the cursor position, and may insert any character therein by actuating its repre-sentative key.
This invention in another aspect provides a programmable calculator in which the user may employ a space bar of a keyboard when entering a line of information from the keyboard to introduce blank characters at desired character positions along the line.
This invention in another aspect provides a prograr~mable calculator in which the user may delete a character fro~ a line of informatio~ entered from the key-board or recalled into the display from memory by actuating - - ., ~

the space bar after positioning a cursor over the charac-ter to be deleted.
This invention in another aspect provides a programmable calculator in which the user may delete a character from a line o~ information entered from the key-board or recalled into the display from memory and simul-taneously move the right hand portion of that line one char-acter position to the left to occupy the space resulting from the deleted character by positioning the cursor over the character to be deleted and then simultaneously actu-~ting the INSERT key and a SHIFT key.
This invention.in another aspect provides a programmable calculator in which the user may move a displayed line of information either left or right across a display register independently of the location of a cursor at a particular character position thereo~.
This invention in another aspect provides a programmable calculator in which the user may display a statement located at a particular line in memory by actu-ati~g a ~ETCH key of a keyboard f~ollowed by the line desig-Dation.
This invention in another aspect provides a programmable calculator in which the user may halt execu-tlon of a program, call various lines o~ information from memory into a display register for visual examination, and thereafter automatically resume program execution æt the point at which the halt occurred by actuating a single key of a keyboard unit.
This invention in another aspect provides a programmable calculator in which the user may call a pa~ticular ,. _.. .

llne of information from memory into a display register and may then actuate one of two keys of a keyboard unit to ~tep to and visually observe the contents of lines pre-ceding or following the line originally displayed.
This invention in another aspect provides a programmable calculator in which the user may store into ~emory a line of information residing in a display register irrespective of the position of that line in the display register and irrespective of the location of a cursor.
This invention in another aspect provides a programmable calculator in which the user may, by actua-ting a RECALL key of a keyboard unit, recall into a display register the most recent line of information which was terminated by either an ~XECUIE or END-OF-LINE command.
This invention in another aspect provides a programmable calculator in which a group of keys of a key-- board unit, representing various edit~ng commands, are provided for conditioning the calculator to perform the command represented without the necessity of literally spelling out the command by actuating a sequence of alpha-betic keys.
This invention in another aspect provides a programmable calculator in which the user may, by actua-ting a single key of a keyboard unit, delete a statement portion of a line of information being entered into a dis-play register while retaining the line number of that line.
This invention in another aspect provides a programmable calculator in ~hich the user may, by actua-ting a single key of a keyboard unit, erase from memory a line o$ information recalled into a display register irom the ~320 `~

memory.
This invention in another aspect provides a programmable calculator in which the user may selectively list on an external printing unit an entire file stored in memory or any portion thereo~, This invention in another aspect provides a programmable calculator in which the user may designate an automatic line numbering mode for automatically providing a line number, according to a selected sequence involving a starting line number and an incremen~ at the beginning of each line of in~ormation entered into a display register.
This invention in another aspect provides a programmable calculator in which the user may selectively scratch from memory a mainline program, non-common vari-ables, a symbol table, and the definitions of a group of user-defi~able keys.
This invention in another aspect provides a programmable calculator in which the user may, during execu-tion oi a program, designate a trace mode o~ operation whereby the line number o~ each statement executed is printed on an external output unit as it is executed.
This invention in another aspect provides a programmable calculator in which the user may, prior to execution o~ a program and without altering the program, designate a line or lines prior to the execution o~ which program execution is to be halted.
This invention in another aspect provides a programmable calculator in which the user may selectively commence execution o~ a program at either the beginning or at any intermediate line and may designate that at such time .

9~zo all variables are to be either unaltered or set to an unde-iined state.
-This invention in another aspect provides a programmable calculator in which the user may, by actua-ting a single key of a keyboard unit, instruct the calcu-lator to set all program variables to an unde~ined state and to set up array storage for all arrays previously di-mensioned in a program.
This invention in another aspect provides a programmable calculator in which the user may designate any portion of a program as being secure so that a user may not obtain any indication of the contents of such por-tion and may not store onto a magnetic record member any ~ecure program that has previously been entered into the calculator from a magnetic record member but may observe the contents of the unsecure portion of any program residing in ~emory.
This invention in another aspect provides a programmable calculator in which a group of characters may be associated with each one of a plurality of definable keys of a Xeyboard unit, may later be displayed upon actu-ation of the associated key, and, if ,the group o~ char-acters represents an executable command, may be immediately ~xe~.uted upon actuation of the associated key.
This invention in another aspect provides a programmable calculator in which each of a plurality of de-finable keys oi a keyboard unit may be associated with a single or multiline function of one argument, which function - may be emploYed as part o~ a program or immediately executed $rom the keyboard.
.
',. .

'"' ' ' , .

1~ 20 This invention in another aspect provides a programmable calculator in whlch each o~ a plurality o~
deYtnable key~ o~ a keyboard unlt may be associated with a multlpllcity oi BASIC language pro~ram statements and the resulting program executed upon actuation oi the asso-ciated key.
This invention in another aspect provides a programmable calculator in which the user may, when employ-lng a matrix p~ug-in read-only memory module, select as a iunction the determ~nant o~ a prevlously defined square matrix, This invention in another aspect provides a programmable calculator in ~hich the user may, by actua-ting a SHIET key o~ a keyboard unit, selectively cause to be printed on an external printing unit either lower or upper case alphabetic characters.
This invention in another aspect provides a programmable calculator in which the user may, when the calculator is used in con~unction with an e~ternal print-lng unit, designate a print-all mode for printing all lines o~ ln$ormation entered from a keyboard and terminated by EXE~JTE or E~D-OF-LINE commands, all error messages, and all in~ormation displayed during exepution.
This invention in another aspect provides a programmable calculator in which the user may immediately execute any seli-contained BASIC language program statement ~rom a keyboard unit.
This invention in another aspect provides a 2rogrammable calculator in which plug-in read-only memory modules are not uniqueiy associated with a particular group oi keys of a keyboard unit.

, . .
' ~99~zo This invent.on in another aspect provides a programmable calculator in which functions available through the use o~ plug~in read-only memory modules are selected by actuatlng a series o~ alphanumeric keys of a keyboard - unit rather than a single key, thereby allowing the number o~ ~unctions available to be independent o~ the number o~ keys available.
This invention in another aspect provides a programmable calculator in whlch the user may create a pro-gram using ~unctions available from a plurality o~ plug-in read-only memory modules inserted into receptacles on the calculator in a particular sequence, may record such program onto an external magnetic record member, and may thereafter execute such program on an~ther ralculator oi the same type con~igured with the same plug-in read-only memory moduies but without observing the sequence ln which they ~ere placed in the receptacles oi the ~rst calculator.
This invention in another aspect provides a p~ogrammable calculator in which the user may, when the calculator is con~igured with a plotter plug-in read-only memory module and an external X-Y plotter~ speci~y an o~i-set o~ X and ~ coordinates to be applied to all subsequent coordinate speci~ications This invention in another aspect provides a programmable calculator in which the user may, when the calculator is coniigured with a plotter plug-in read-only ~emory module, and an external ~-~ plotter, incrementally plot, in user units, polnts relative to a current pen posi-tion, This invention in another aspect provides a programmable calculator ln which the user may, when the calculator is configured with a plotter plug-~n read-only memory module and external X-Y plotter, plot rectangular coordinate axes by specifying in user units starting and ending coordinates for each axis, a coordinate at which each axls intersects the other axis, and a tick mark spac-lng for tick marking along each axis in either direction ~rom a starting point, This invention in another aspect provides a programmable calculator in ~hich the user may, when the calculator is configured ~ith a plotter plug-in read-only memory module and an external X-Y plotter, plot labels according to the format of a standard BASIC language print statement or according to a reierenced ~ormat statement o~ a program, speci~y the height oi characters contained ~ such labels, speci~y a character aspect ratio (ratio.
ot height to width) ~or the characters contained in such labels, speci~y an angle o~ rctation in either degrees, radians or grads at which such labels are to be plottedJ
and speci~y a paper height~D-width ratio for assuring character uni~ormity regardless o~ plot angle.
This invention in another aspect provides a programmable calculator in which the user may, when the calculator is con~igured with a plotter plug-in read-only ~emory module and an external X-Y plotter, incrementally plot characters according to character size units ~or ~acilitatlng pen placement at the beginning of plotter labelllng operations.
This invention in another aspect provides a programmable calculator 1- which the user may, ~hen the ~C~99~20 calculator is c~n~l~ured with a plotter plug-in read-only memory module and ~ external X-Y plotter, plot characters a~ the corresponding keys of a ~eyboard input unit are actuated and use UP, DOl~N, LE~T, and RIGHT ARR0~ keys of the ~eyboard input unit for controlllng the position o~
the plotter pen.
This in~ention in another aspect pro~ides a programmable calculator in which the user may, when the calculator is configured with a terminal plug-in read-only memory module and an external modem ~or transmitting and receiving in~orma~ion over telephone lines, select from a ke~board unit any baud rate from a continuously vari-able range o~ baud rates.
This invention in another aspect provides a programmable calculator in which the user may, when the calculator is configured with a terminal plug-in read-only memory module and an e~ternal modem ~cr transmitting and receiving data over telephone lines, select by actuating a slngle ~ey o~ a keyboard unit either odd or even parity o~ transmitted data.

This invention in another aspect provides a programmable calculator in which the user may, when the calcu-lator is con~igured wit~ a terminal plug-in read-only memory module, enter free text information from a key-board input unlt, an external magnetic record member, or any peripheral input unit, edit such information on a line-by-line or character-by-character basis, store such in~ormatlon on an external magnetic record member, and thereafter transmit such information, for example, to a remotely located time-sharing computer system -. . .

, ~99~20 ~

This invention in another aspect provides a programmable calculator ln which the user may, when the calculator is con~igured with a terminal plug-in read-only ~emory module, generate and transmit any ASCII codes This invention in another aspect provides a programmable calculator in which the user may, when the calculator i5 con~igured with a terminal plug-ln read-only memory module and an external modem for transmitting and receivlng information over telephone lines, make calcula-tlons and run programs locally at the same time as, ~orexample, the calculator ls on-line with and running pro-grams through a remotely located time-sharing computer ~ystem.
This invention in another aspect provides a programmable calculator in which the user may, when the calculator is configured with a terminal plug-in read-only memory module, receive BASIC language programs ~rom remote - locations a~d thereafter run them locally on the calculator.
This invention in another aspect provides a programmable calculator in which the user may, when the calculator is con~igured with an extended input-output plug-in read-only memory module, ~rom a keyboard unit or under program control, generate and transmit to any oi a plurality of input-output channels any twelve-bit code, This invention in another aspect provides a programmable calculator in which the user may, when the calculat~r is conflgured ~lth an extended input-output plug-in read-only memory module, ~rom a keyboard un~t or Under program control, read an eight-bit character from a ! 30 deslgnated input-output channel.

, l~9~Z~ f~' This invention in another aspect provides a programmable calculator in which the user may, when the calculator is configured with an extended input-output plug-in read-only memory module, from a keyboard unit or under program control, read the status of a designated external input-output unit, This invention in another aspect provides a programmable calculator in which the user may, when the calculator is con~igured ~ith an extended input-output plug-in read-only memory module, from a keyboard unit or under program control, perform bit manipulation on sixteen-bit integer data according to the functions of ROTATE, AND, and OR.
This invention in another aspect provides a programmable calculator in which the user may, when the calculator is configured with an extended input-output plug-in read-only memory module, from a keyboard unlt or under program control, convert between various multi-bit data codes and the ASCII code of the calculator for allo~-ing the calculator to communicate with peripheral unitsha~lng operating codes ot~er than ASCII, This invention in another aspect provides a programmable calculator in which the user may, when the calculator is configured with an extended input-output -. plug-in read-only memory module, from a keyboard unit or under program control, ~rite into a string variable any information which may be transmitted to an output unit.
This invention in another aspect provides a pro-grammable calculator in which the user may, from a key-board or under program control, by means of a single ., .

~ ~399~20 -~

command which may involve parameters, mark a magnetlc tape, stored either on an internal tape cassette or on one of a plurality of external tape cassettes, into a designated number of files each being of a designated length, This invention in another aspect provides a programmable calculator in which the user may designate that a particular file stored on a magnetic tape cassette ls to be used for either program storage or data storage and in which he is subsequently prevented from attempting to access data from a file deslgnated for program storage and vlce versa.
This invention in another aspect provides a programmable calculator ln which the user may, from a keyboard or under program control, access a file stored on a magnetic tape cassette, by means of a s~ngle command lndicating a file number, which file number may be the result of an arithmetic expression.
This invention in another aspect provides a programmable calculator in which only complete files of a ZO designated length may be mar~ed on a magnetlc tape, thus preventing the existence of a partially complete file near the end of a tape because of an insufficient amount of tape.
This invention in another aspect provides a programmable calculator in ~hich the user may, by means of a single command entered either from a keyboard or en-countered under program control, list on an external print-ing unit certain information wlth respect to each ~ile - stored on a m~gnetic tape cassette, such information being ~ the flle number, the amount of information currently stored thereln, the ~lle type, the maxlmum iile length, the starting . . .

' ' ' ' ' ' `~ ~V99~P2~

and endlng line numbers o~ a program stored therein, the ~umber o~ words of common data storage associated with a program stored therein, and the form o~ data stored therein, This invention in another aspect provides a programmable calculator in which the user may, from a key-board unit or under program control, chain one or more program segments stored on a magnetic tape cassette to a program residing in the calculator memory and may use the same variables in each segment without declaring common storage ~or the variables.
This invention in another aspect provides a programmable calculato~ in which the user may, ~rom a ~eyboard unit or under program control, insert a program or a program segment stored on a magnetic tape cassette at any line number of a program residing in the calculator ~emory.
This invention in another aspect provides a programmable calculator in which the user may specify a line number in memory at which a program or a program seg-ment loaded from a magnetic tape cassette is to begin andin which, i~ the resulting line numbers differ from those -oi the program or program segment as it resided on tape, reierences within such program or program segment are auto-matically modiiied to reflect the current line number se-guence.
This invention in another aspect provides a programmable calculator in which the user may, ~rom a key-board unit or under program control, selectively store ~ny portlon o~ a program residing ln the calculator memory onto a magnetlc tape cassette.

. -20-' 0 ~

This invention in another aspect provides a programmable calculator in which the user may, fro~ a key-board unit or under program control, store the deiinltions associated with all keys oi a group oY user-definable keys lnto a iile on a magnetic tape cassette This invention in another aspect provides a programmable calculator in which the user may, ~rom a key-board or under program control, load from a ~ile on a mag-netic tape cassette the definitions associated with all . lO ~eys of a group o~ user-deiinable keys This invention in another aspect provides a programmable calculator ln which the user may, from a key-board unit or under program control, load, store, merge, or chain programs or functions residing or to reside on a ~g~etic tape cassette and associated with or to be associated with any key o~ a group o~ user-definable keys.
This invention in another aspect provides a programmable calculator in which the user may, ~rom a key-board unit or under program control, load into the calcu-lator memory from a magnetic tape cassette or store ontoa magnetic tape cassette ~rom the calculator memory all common data deiined in the program residing in the calcu-lator memory without specifying individual variable names and by means o~ a single command.
This invention in another aspect provides a programmable calculator in whlch the user may load prere-corded assembly language programs containing commands, statements, or iunctions which expand the capabilities - oi the calculator and which may be selected ~or execution by the user Just as though the same commands, statements, ~9961 ZO

or functions had been made available to the user by means of a plug-in read-only me ry module.
This invention in another aspect provides a program-mable calculator in which the user may, from a keyboard unit or under program control, search a magnetic tape cassette in either forward or reverse directions for locating a partic-ular file at the same time as the calculator is executing p~ogram statements or keyboard commands.
Other and incidental aspects of this invention will become apparent from a reading of this application and an inspection of the accompanying drawings.
In accordance with one aspect of this invention there is provided an electronic calculator comprising: key-board input means with a plurality of alphameric keys for entering BASIC language commands into the calculator and with an execute key for initiating execution of BASIC language commands entered into the calculator; storage means, coupled to said keyboard input means, for storing BASIC language commands entered into the calculator; and processing means, coupled to said keyboard input means and storage means, for immediately executing a BASIC language command in response to entry of that BASIC language command into the calculator followed by actuation of said execute key.
In the illustrated preferred form of the apparatus there is employed a keyboard input unit, a magnetic tape cassette reading and recording unit, a solid state output display unit, an optional external output printer unit, an input-output control unit, a memory unit, and a central pro-cessing unit to provide an adaptable programmable calculator having manual operating, automatic operating, program enter-ing, magnetic tape reading, magnetic tape recording, and ~" .
~ :

"

~w9~zo alphanumeric display and print modes. The keyboard input - unit includes a group of data keys for entering numeric data into the calculator, a group of control keys for controlling the various des and operations of the calculator and the format of the output display, a group of alphanumeric keys arranged as a typewriter keyboard for entering statements, and a group of user-definable keys. All of the data and alphanumeric keys and some of the control keys may also be employed for programming the calculator.
The magnetic tape cassette reading and recording unit ncludes a reading and recording head, a drive mechanism for driving a magnetic tape past the reading and recording head, and reading and recording drive circuits coupled to the reading and recording head for bidirectionally transferring information between the magnetic tape and the calculator as determined by keyboard commands or commands which are part of a stored program.

-23/23a-. . ......................... .
. .

99~20 The input-output control unit includes a si~teen-bit universal shift register serving as an input-output register into which informatioll may be transferred serially from the central processing unit or in parallel from the keyboard input and magnetic tape cassette reading and re-cording units and ~rom which information may be transferred serially to the central processing unit or in parallel to the solid state output display, magnetic tape cassette reading and recording, and output printer units It also includes control logic responsive to the central process-ing unit for controlling the transfer of information be-tween these units, The input-output control unit may also be employed to perform the same functions between the central processing unit and peripheral units including, for example, an external printing unit, a digitizer, a marked card reader, an X-Y plotter, an external magnetic tape unit, a disc, a typewriter, and a modem. A plurality of peripheral units may be com~ected at the same time to the ~nput-output control unit by simply plugging interface modules associated with the selected peripheral units into receptacles provided therefore in a rear panel of the cal-culator housing.
The memory unit includes a modular random-access read-write memory having a dedicated system area and a separate user area for storing program statements and/or data. The user portion of the read-write memory may be expanded without increasing the overall dimensions of the calculator by the addition of a program storage module.
Additional read-write memory made available to the user is automatically accommodated by the calculator, and the
-2~-1~99~i20 user is auto~atically informed when the storage capacity of the read-write memory has been exceeded.
The memory unit also includes a modular read-only memory in which routines and subroutines of assembly lan-guage instructions for performing the various functions of the calculator are stored. These routines and subrou-tines of the read-only memory may be expanded and adapted by the user to perform additional functions oriented to-ward the specific needs of the user. This is accomplished by simply plugging additional read-only memory modules into receptacles provided therefore in a side panel o~ the calculator housing. Added read-only memory modules are automatically accommodated by the calculator and are ac-cessed by the calculator through a series of mnemonic tables.
These tables contain mnemonics which are additions to the calculator's programming language Plug-in read-only memory modules include, for ex-ample, a matrix module, a string variables modulel a plot-ter module, an extended input-output module, and a ter~i-nal module, The matrix module makes available to the user standard BASIC language matrix functions plus an additlonal function which returns the determinant of a previously defined square matrix. The string variables module makes available to the user standard BASIC language string vari-ables operations. The plotter module enables the user to conveniently plot and label on an external ~-Y plotter.
The extended input-output module allows the calculator to be used with a wide variety of peripheral input-output units. The terminal module facilitates interfacing the calculator with a modem for communicating, for example, -~5-~99C~20 witll remotely located time-sharillg computer systems. It furthcr allows free text editing and storage.
The memory unit further includes a pair of recir-culating sixteen-bit serial shift registers. One of these registers serves as a memory address register for serially receiving ini'ormation from an arithmetic-logic unit inclu-ded in the central processing unit, for parallel address-ing any memory location designated by the received informa-tion back to the arithmetic-logic unit. The other of these registers serves as a memory access register for serially receiving information from the arithmetic-logic unit, for writing information in parallel into any addressed memory location, for reading information in parallel from any addressed memory location, and for serially transferring ¦ ini'ormation to the arithmetic-logic unit. It also serves as a four-bit parallel shi~t register for trans~erring four bits o~ binary-coded-decimal information ln parallel to th~ arithmetic-logic unit.
The central processing unit includes four recir-culating sixteen-bit serial shift registers, a ~our-bit serial shift register, the arithmetic-logic unit, a pro-grammable clock, and a microprocessor. Two of these sixteen-bit serial shift registers serve as accumulator registers for serially receiving information from and serially trans-ferring information to the arithmetic-logic unit. The accumulator register employed is designated by a control flip-flop. One of the accumulator registers also serves as a four-bit parallel shift register for receiving four bits of binary-coded-decimal information in parallel from and transfe.rinig i'our bits of such information in parallel _26-;

~ass~zo to the arithmetic~logic unit. The two remalning sixteen-bit serial shift registers serve as a program counter register and a qualifier register, respectively. They are also employed for serially receiving information from and serially transferring information to the arithmetic-logic unit. The four-bit serial shift register serves as an extend register for serially receiving information from either the memory access register or the arithmetic-logic unit and for serially transferring information to the arithmetic-logic unit.
The arithmetic-logic unit is employed for perform-ing one-bit serial binary arithmetic, four-bit parallel binary-coded-decimal arithmetic, and logic operations. It may also be controlled by the microprocessor to perform bidirectional direct and indirect arithmetic between any of a plurality of the working registers and any of the registers of the read-write memory.
The programmable clock is employed to supply a variable number of shift clock pulses to the arithmetic-logic unit and to the serial shift registers of the input-output, memory, and central processing units. It is also employed to supply clock control signals to the input-output control logic and to the microprocessor The microprocessor includes a read-only memory in which a plurality of microinstructions and codes are stored.
These microinstructions and codes are employed to perform the basic instructions o~ the calculator. They include a plurality of coded and non-coded microinstructions for transferring control to the input-output control logic, for controlling the addressing and accessing of the memory _27-~Q~9~i2~

unit, and ~or con-trollillg the operation o~ the two accumu-lator registers, the program counter register, the extend register and the arithmetic-logic unit. They also include a plurality of clock codes for controlling the operation of the programmable clock, a plurality of qualifier selec-tion codes for selecting qualifiers and serving as primary address codes for addressing the read-only memory of the microprocessor, and a plurality of secondary address codes for addressing the read-only memory of the microprocessor.
In response to a control signal from a power supply pro-vided for the calculator, control signals for the pro-grammable clock, and qualifier control signals from the central processing and input-output control units, the microprocessor issues the microinstructions and codes stored in the read-only memory of the microprocessor as required to process either binary or binary-coded-decimal in~ormation entered into or stored in the calculator.
In the keyboard mode, the calculator is controlled by keycodes sequentially entered into the calculator from the keyboard input unit by the user. The solid state out-put display unit displays either the alphanumeric repre-sentation of the keys as they are depressed or a numeric representatio~ of output data or alphanumeric user instruct-ions or program results. An external output printer unit may be controlled by the user to selectively print a nu-meric representation of any numeric data entered into the calculator ~rom the keyboard input unit, a numeric representation of any result calculated by the calculator, or a program listing on a line-by-line basis of the state-ments entered.

,~ . . . .

l~9L~ZO

Wllen the calculator is in the keyboard ~ode, it may also be operated in a print-all printing mode. The output printer Ullit then prints out each program line as it is entered by the user.
In the program running mode, the calculator is controlled by automatically obtaining an internal repre-sentation of the program statements stored in the user storage section of the read-write memory. During automatic operation of the calculator, data may be obtained from the memory unit as designated by the program, from the keyboard input unit while the operation of the calculator is stopped for data either by the program or by the user, or from the magnetic tape cassette unit as designated by the program.
When the calculator is in the program running mode, the user may also selectively employ a trace mode to check the execution of the program line-by-line in order to determLne whether the program, as entered into the calcu-lator, does in fact carry out the desired sequence of state-ments.
In the program entering mode, statements are se-quentially entered by the user into the calculator from the keyboard.input unit and are translated into an inter-nal stored format which consists of a series of operation codes and operand names and are thereafter stored as state-ments of a program in the user storage section o~ the read-write memory.
The magnetic tape cassette reading and recording unit may be employed by the user to separately load either data, BASIC language programs, assembly language programs, . .

:"
- :

1~99~20 or sets o~ user-de~inable key c~e~initions into the calcu-lator from an external magnetic tape cassette.
The magnetic tape cassette readlng and recording unit may also be employed by the user to separately re-cord either data, BASIC language programs, or sets of user-definable key definitions stored in the user section of - the read-write memory onto an external magnetic tape cas-sette. Programs, or portions thereof, may be coded by the user as being secure when they are recorded onto an external magnetic tape cassette. The calculator detects such programs when they are reloaded into the calculator and prevents the user from re-recording them or obtain-ing any listing or other lndication of the individual pro-gram steps contained in the secured portions of such pro-grams.
Description of the Drawings Figure 1 is a front perspective view of an adapt-able programmable calculator according to the preferred embodiment of this invention.
Figure 2 is a rear perspective view of the adapt-able programmable calculator of Figure 1.
Figures 3A-B are a simplified block diagram of the adaptable programmable calculator of Figures 1 and 2.
Figures 4A-F are a memory map of the memory unit employed in the adaptable programmable calculator of Fig-ures 1-3.
Figure 4' is a diagram showing the arrangement of Figures 4A-F.
Figures 5A-B are a detailed memory map of the system read-write section of memory as shown in Flgure 4A.

. . .

11399~

~ Figure 5' is a diagram showing the arrangement `: of Figures 5A-B.
Figure 6 is a detailed memory map of the user read/write section of memory as shown in Figure 4F.
Figure 7 is a simplified operational logic flow chart illustrating the operation of the microprocessor employed in the central processing unit of Figures 3A-B.
Figure 8 is a plan view of the keyboard input unit employed in the adaptable programmable calculator of Figures 1-3B.
Figure 9 is an overall firmware block diagram for the adaptable programmable calculator.
Figures lOA-C are flow charts of floating point add and subtract routines selectable by the execution monitor .......
of Figure 9.
Figure 11 is a flow chart of a floating point multiply routine selectable by the execution monitor of Figure 9.
Figures 12A-B are a flow chart of a floating point divide routine selectable by the execution monitor of Figure 9.
Figures 13A-C are a flow chart of a floating -v, point square root routine selectable by the execution monitor of Figure 9.
Figure 14 is a flow chart of a store routine selectable by the execution monitor of Figure 9.
Figure 15 is a flow chart of a rounding routine .
employed in connection with several of the routines select-able by the execution monitor of Figure 9.
Figures 16A-B are a flow chart of a tangent X
. ., ~

- ; ~
~; .

~L099~20 routine selectable by the execution monitor of Figure 9.
Figures 17A-s are a flow chart of an arctangent X routine selectable by the execution monitor of Figure 9.
Figures 18A-B are a flow chart of an e routine selectable by the execution monitor of Figure 9.
Figure 19 is a flow chart of a natural logarithm X routine selectable by the execution monitor of Figure 9.
Figure 20 is a flow chart of a subroutine employed by the tangent X and e routines of Figures 16A-B and 18A-B, respectively.
Figures 21A-B are a flow chart of a subroutine employed by the tangent X and arctangent X routines of Figures 16A-B and 17A-B, respectively.
Figures 22A-B are a flow chart of a subroutine . ~-- ~: x employed by the e and natural logarithm X routines of Figures 18A~B and 19, respectively.
Figure Z3 is a flow chart of a subroutine employed - by the arctangent X and natural logarithm X routines of Figures 18A-B and 19, respectively.
Figure 24 is a flow chart of sine and cosine rou-tines selectable by the execution monitor of Figure 9.
Figure 25 is a flow chart of an X power routine selectable by the execution ~monitor of Figure 9.
Figure 26 (27th sheet of drawings) is a flow chart of a logarithm to the base ten routine selectable by the execution monitor of Figure 9.
Figure 27 is a block diagram of the microprocessor of Figures 3A-B.
Figures 28A-D are a detailed schematic diagram _ 30 of the microprocessor of Figures 3A-B and 27.

-~99~20 `' Figure 2~' is a diagram showing the arrangement of Figures 28A-D.
Figures 29A-H are detailed flow charts illustra-ting the operation of the microprocessor of Figures 3A-B, 27, and 28A-D.
Figures 29' and 29" are diagrams showing the arrange-ment of Figures 29A-H.
Figure 30 is a block diagram of the programmable clock of Figures 3A-B.
Figures 31A-C are a detailed schematic diagram of the programmable clock of Figures 3A-B and 30 and of a portion of the input-output control unit of Figures 3A-B.
Figure 31' (55th sheet of drawings) is a diagram showing the arrangement of Figures 31A-C.
~-- Figure 32 is a waveform diagram illustrating the operation of the programmable clock of Figures 3A-B, 30, and 31A-C.
Figures 33A-D are a detailed schematic diagram of the shift register and arithmetic logic units of Figures 3A-B.
Figure 33' is a diagram showing the arrangement of Figures 33A-D.
r~ Figure 34 is a block diagram of the arithmetic logic unit of Figures 3A-B.
Figure 35 is a block diagram of the memory unit of Figures 3A-B.
Figures 36A-B are a schematic diagram of the read-write memory of Figures 3A-B, 4A-F, and 35.
Figure 36' is a diagram showing the arrangement of Figures 36A-B.

, .,, ._ ~ 33 . . .

.

~399~20 Flgures 37A-B are a schematic diagram of the op-~ional add-on read-write memory of Figures 3A-B, 4A-F, and 35.
Figure 37' ls a diagram showing the arrangement of Figures 37A-B.
Figure 38 is a schematic diagram of the basic read-only memory o~ Figures 3A-B, 4A-F, and 35.
Figure 39 is a schematic diagram of the optional add-on read-only memory modules of Figure 35 that may be plugged into the calculator to increase the number of functions available to the user.
Figure 40 is a detailed schematic diagram of the buffer circuitry associated with the read-only memory mod-ules of Figure 39~
Figure 41 is a block diagram of one of the read-only memory chips of Figures 38 and 39.
Figures 42A-D are a schematic diagram of one of the read-only memory chips of Figures 38 and 39.
Figure 42' is a diagram showing the arrangement oi' Figures 42A-D.
Figure 43 is a memory map of the memory unit of Figures 3A-B and 4A-F illustrating how it is partitioned into the read-only and read-write memory chips o~ Figures 36A-B through 42A-D.
Figure 44 is a flow chart illustrating how the row members oi' the lists stored in the read-only memory chips are computed.
Figure 45 is a table of bit numbers and actual bits used in connection with the ~low chart of Figure 44.
Figures 46A-B are a detailed schematic diagram o~
-3~-the memory address register of Figures 3A-B and 35 with its associated control circuitry.
Figure ~6' is a diagram showing the arrangement of Figures 46A-B.
Figures 47A-B are a waveform diagram and state sequence charts illustrating the operation of the control c~ircuitry of Figures 46A-B.
Figure 47' (65th sheet of drawings) is a diagram showing the arrangement of Figures 47A-B.
Figures 48A-B are a detailed schematic diagram of the memory access register of Figures 3A-B and 35.
'~- Figure 48' is a diagram showing the arrangement of Figures 48A-B.
Figures 49A-D are a detailed schematic diagram of the input-output register and gating control circuits employed in the input-output control unit of Figures 3A-B.
Figure 49' is a diagram showing the arrangement - of Figures 49A-D.
Figure 50 is a schematic diagram of the source and relationship of the input-output party lines connected to the peripheral interface module receiving receptacles of Figure 20.
; ~ Figure 51 is a waveform diagram illustrating the operation of the control section of the input-output con-trol unit of Figures 3A-B and 32.
Figure 52 is a flow chart illustrating the opera-tion of the control section of the input-output control unit of Figures 3A-B and 31A-C.
Figure 53 is a diagram showing how a one-of-ten _ 30 decoder is employed to address peripheral input-output 99~20 ullits to t;lle calc~llator t~lrougll tlle input-output control unit of Figures 3A-B.
Figure 54 is a waveform diagram of some of the in-put signals employed by the input-output control unit and associated interface modules of Figures 3A-B.
Figure 55 is a waveform diagram of some of the output signals employed by the input-output control unit and associated interface modules of Figures 3A-B.
Figure 56 is a waveform diagram of some of the high speed input signals employed by the input-output con-trol unit and associated interface modules of Figures 3A-B.
Figure 57 is a waveform diagram of some of the high speed output signals employed by the input-output control unit and associated interface modules of Figures 3A-B.
Figure 58 is a waveform diagram illustrating the operation of the interrupt mode of operation of the input-output control unit of Figures 3A-B.
Figure 59 is a schematic diagram of logic that may be used to interface an X-Y plotter to the input-output control unit of Figures 3A-B.
Figure 60 is a schematic diagram of logic that may be used to interface a printing unit to the input-output control print of Figures 3A-B.
Figure 61 is a schematic diagram of logic that may be used to interface a modem to the input-output con-trol unit of Figures 3A-B.
Figure 62 is a schematic diagram of logic that may be used to transfer any eight-bit code into or out of the input-output control unit of Figures 3A-B.

. ~ ~

~V99~2~ ~

Figure 63 is a detailed schematic diagram of the keyboard input unit employed in the adaptable programmable calculator of Figures 1-3B.
Figure 64 is a block diagram of the magnetic tape cassette reading and recording unit employed in the cal-culator of Figures 1-3B.
Figure 65 is a detailed schematic diagram of the interface block of Figure 64.
Figures 66A-B are a detailed schematic diagram of the control logic block of Figure 64.
Figure 66' is a diagram showing the arrangement of Figures 66A-B.
Figures 67A-B are a detailed schematic diagram of the read-write block of Figure 64.

.:
Pigure 67' is a diagram showing the arrangement of Figures 67A-B.
Figures 68A-B are a detailed schematic diagram of the motor control block of Figure 64.
Figure 68' is a diagram showing the arrangement of Figures 68A-B.
Figure 69 is a detailed schematic diagram of the interconnect block of Figure 64.
Figure 70 is a detailed schematic diagram of the head driver and preamp blocks of Figure 64.
- Figure 71 is a block diagram illustrating how the magnetic tape cassette reading and recording unit of Figures 64-70 interacts with the calculator of Figures 1-3B.
Figures 72A-B are a detailed schematic diagram of the output display unit employed in the adaptable program-mable calculator of Figures 1-3B.

.,, _.

l~99~ZO

Figure 72' is a di~gram showing the arrangement of Figures 72A-B.
Figures 73A-B are a detailed schematic diagram of the control logic circuit associateâ with the output dis-play unit of Figures 72A-B.
Figure 73' is a diagram showing the arrangement of Figures 73A-B.
Figure 74 is a block diagram of the power supply system employed in the adaptable programmable calculator of Figures 1-3B.
Figures 75A-B are a detailed schematic diagram ~, of the power sup~ply system of Figure 74.
Figure 75' is a diagram showing the arrangement of Figures 75A-B.
... ::.
Figures 76A-B are a block diagram of an interface module that may be employed to interface a typewriter to the adaptable programmable calculator of Figures 1-3B.
Figure 76' is a diagram showing the arrangement of Figures 76A-B.
Figures 77A-R are a flow chart of an input-output : ~ routine performed when a typewriter is employed with the programmable calculator of Figures 1-3B.
Figure 77' is a diagram showing the arrangement of Figures 77A-8.
Figures 78A-D are a detailed schematic diagram of the control logic block of Figures 76A-B.
Figure 78' is a diagram showing the arrangement of Figures 78A-D.
Figures 79A-B are a detailed schematic diagram of the power gates of Figures 76A-B.

.......

., :
. ;.: . . ":
.. , ~, .

Figure 79' (133rd sheet of drawings) is a diagram showing the arrangement of Figures 79A-B.
Figures 80A-B are a simplified logic diagram show-ing state qualifiers and instructions relating to the flow chart of Figures 77A-B.
Figure 81 is a detailed schematic diagram of the ROM, data latch, and compare circuitry of Figures 76A-B.
Figure 82 is a detailed schematic diagram of a power supply that may be employed to power the typewriter interface circuitry of Figures 78A-D, 79A-B, and 81.
Figure 83 is a flow chart of the turn-on routine which is a portion of the system monitor of Figure 4B.
Figures 84A-D are a flow chart of a routine ~om-prising another portion of the system monitor of Figure .
4B.
Fîgure 85 is a flow chart of the system table scan routine of Figure 4D.
Figure 86 is a flow chart of a subroutine called by the routine of Figure 85.
Figure 87 is a flow chart of the table search rou-tine of Figure 4A.
Figures 88A-G are a flow chart of the keyboard input routine and special keyboard functions routines of Figure 4A.
Figures 89A-B are flow charts of subroutines called by the routines of Figures 88A-G.
Figure 90 is a flow chart of the clear subroutine called by various ones of the routines of Figures 4A-F.
Figure 91 is a flow chart of a subroutine called by the routine of Figure 88F.

_ -39-~LC99~20 Figure 92 is a flow chart o~ a subroutille called by the keyboard input routine of Figures 4A and 88A-Go Figure 93 is a flow chart o~ a keyboard driver subroutine called by the subroutine of Figure 92, Figures 94A-F are flow charts of some of the gen-eral system subroutines of Figure 4A.
Figure 95 is a flow chart of the error routine of Figure 4B.
Figures 96A-D are flow charts of the program memory manager routines of Figure 4B.
Figure 97 is a flow chart of another of the gen-eral system subroutines of Figure 4A which is also called by the routines of Figures 96A-D.
Figure 98 is a flow chart of another o~ the gen-eral system subroutines of Figure 4A.
Figures 99A-F are flow charts of the user-definable key routines of Figure 4A.
Figures lOOA-D are flow charts of the execution . monitor and keyboard execution control blocks of Figure 4C~
Figure 101 is a flow chart of the load execution routine of Figure 4D.
Figure 102 is a flow chart of the store execution routine of Figure 4D.
Figure 103 is a flow chart of the merge execution routine of Figure 4D, Figure 104 is a flow chart of the link execution routine of Figure 4D.
Figure 105 is a ~low chart of the find execution routine of Figure 4D.
Figures 106A-D are flow charts of subroutines .-. . . . : , , ` ` ~a99~2~

called ~y tl~e e~ecutioll ro~ltines oL Figures 101-104.
Figure 107 is a flow chart of the load data execu-tion routine of Figure 4D.
Figure 108 is a flow chart of the store data execu-tion routine of Figure 4D.
Figure 109 is a flow chart of a subroutine called by the routines of Figures 107 and 108.
Figure 110 is a flow chart of the load key execu-tion routine of Figure 4D, Figure 111 is a flow chart of the store key execu-tion routine of Figure 4D.
Figure 112 is a flow chart of the load bin execu-tion routine of Figure 4D.
Figure 113 is a flow chart of the mark execu-tion routine of Figure 4D.
Figure 114 is a flow chart of a subroutine called by the routine of Figure 113.
Figure 115A is a flow chart of the list execution routine of Figure 4D.
Figure 115B is a flow chart of a subroutine called by the routine of Figure 115A.
Figure 116 is a flow chart of the secure routine of Figure 4D.
Figures 117A-B are a flow chart of the interrupt routine of Figure 4D.
Figures 118A-B are a flow.chart of a routine for performing an OFFSET command selectable when the plotter plug-in read-only memory module is employed with the cal-culator.
Figure 119 is a flow chart of a routine for .~

1~99~0 performin~ an IPLOT com~and selectablc whcn the plotter plug~ read-only memory module is employed witll tlle calculator.
Figure 120 is a flow chart of a routine for per-forming a LABEL command selectable whell the plotter plug-in read-only memory module is employed with the calculatorO
Figure 121 is a flow chart of a routine for per-forming a LETTER command selectable when the plotter plug-in read-only memory module is employed witll the calculator.
Figure 122 is a flow chart of a routine for per-forming a CPLOT command selectable when the plotter plug-in read-only memory module is employed with the calculator.
Figure 123 is a flow chart of a subroutine employed by the routine of Figure 122.
Figure 124 is a flow chart of a routine for per-forming XAXIS and YAXIS commands selectable when the plotter plug-in read-only memory module is employed with the cal-culator.
Figures 125A-C are flow charts of subroutines called by the routine of Figure 124.
Figures 126A-C are flow charts of subroutines called by the routines of Figures 118-124.
Figure 127 is a flow chart of a primary entry rou-tine employed when the terminal read-only memory module is plugged into the calculator.
Figures 128A-W are a flow chart of a keyboard input and editing routine employed when the terminal read-only memory module is plugged into the calculator.
Figures 129A-B are a flow chart of a modem inter-rupt service routine employed when the terminal read-only memory module is plugged into the calculator;

. .

:: , , Z~

Figure 130 is a flow chart of a secondary entry routine employed when the terminal read-only memory module is plugged into the calculator.
Figure 131 is a flow chart of an output statement routine employed when the extended input-output read-only memory module is plugged into the calculator.
Figures 132A-D are flow charts of subroutines called by the routine of Figure 131.
Figure 133 is a flow chart of a BIN command selectable when the extended input-output plug-in read-only memory module is employed with the calculator.
Figure 134 is a flow chart of a CHAR command select-able when the extended input-output plug-in read-only memory module is employed with the calculator.
Figure 135 is a flow chart of a STAT command select-able when the extended input-output plug-in read-only memory module is employed with the calculator.
Figure 136 is a flow chart of binary ROTATE, AND, and OR command selectable when the extended input-output plug-in read-only memory module is employed with the calcu-lator.

Description of tlle Pre~erred Embocliment GENERAL DESC~IPTION
Referring to Figures 1 and 2, there is shown an adaptable programmable calculator 10 including both a key-board input unit 12 for entering information into and controlling the operation of the calculator and the magnetic tape cassette reading and recording unit 14 for recording in-formation stored within the calculator onto one or more ex-ternal tape cassettes 16 and for subsequently loading the information recorded on these and other similar magnetic tape cassettes back into the calculator. The calculator also in-cludes a solid state output display unit 18 for displaying alphameric information stored within the calculator~ All of these input and output units are mounted within a single cal-culator housing 24 adjacent to a curved front panel 26 there-of.
As shown in Figure 2, a plurality of peripheral input and output units including, for example, a line printer, a digitizer, a marked card reader, an X-Y plotter, a type-writer, a teletypewriter, an extended read-write memory unit, a magnetic disc reading and recording unit, and a modem for connecting the calculator via telephone lines to a remotely located computer, may be connected to the calculator at the same time by simply inserting interface modules 30 associated with the selected peripheral units into any of four receptacles 32 provided therefor in a rear panel 34 of the calculator housing. As each interface module 30 is inserted into one of these receptacles, a spring-loaded door 38 at the en-trance of the receptacle swings down allowing passage of the interface module. Once the interface module is fully inserted, -~4-99~20 a printed-circuit terminal board ~0 contained withill the interface module plugs into a mating edge connector mounted inside the calculator. If any of the selected peripheral units require AC line power, their power cords may be plugged into either of two AC power outlets 42 provided therefor at the rear panel of calculator housing 24.
Referring to the simplified block diagram shown in Figures 3A-B, it may be seen that the calculator also in-cludes an input-output control unit 44 (hereinafter referred to as the I/0 control unit) for controlling the transfer of information to and from the input and output units, a memory unit 46 for storing and manipulating information entered into the calculator and for storing routines and subroutines of basic instructions performed by the calculator, and a central processing unit 48 (hereinafter referred to as the CPU) for controlling the execution of the routines and sub-` routines of basic instructions stored in the memory unit as required to process information entered into or stored within the calculator. The calculator also includes a bus system 20 comprising an ~-bus 50, a T-bus 52, and an ~-bus 54 for transferring information from the me~ory and I/0 control units to the CPU, from the CPU to the memory and I/0 control units, and between different portions of the CPU. It further comprises a power supply for supplying DC power to the calculator and peripheral units employed therewith and for issuing a control signal POP when power is supplied to the calculator~
The I/0 control unit 44 includes an input-output register 56 (hereinafter referred to as the I/0 register), associated I/0 gating control circuitry 58, and input-output control logic 60 (hereinafter referred to as the I/0 control), -~5-~-~99~

I/0 register 56 comprises ~ universal sixteen-bit shift re-gister into which information may be transferred either bit-serially from CPU 48 via T-bus 52 or in parallel from keyboard input unit 12, magnetic tape cassette reading and recording unit 14, and peripheral input units 28 such as the marked card reader via twelve input party lines 62. Informa-tion may be transferred from I/0 register 56 either bit-serially to CPU 48 via ~-bus 50 or in parallel to magnetic tape cassette reading and recording unit 14, solid state output display unit 18, output printer unit 20, and peripheral output units 28 such as the X-Y plotter or the typewriter via sixteen output party lines 64.
I/0 gating control circuitry 58 includes control circuits for controlling the transfer of information into and out of I/0 register 56 in response to selected I/0 qualifier control signals from CPU 48 and selected I/0 control instructions from.I/0 control 60. It also includes an interrupt control circuit 65, a peripheral control circuit 66, a printer control circuit 68j and a display control circuit 69 for variously controlling the input and output units and issuing control signals QFG and EBT to I/0 control 60 via two output lines 71 and 72. These last mentioned control circuits variously perform their control functions in response to control signal POP from the power supply, I/0 qualifier control signals from CPU 48, I/0 control instructions from I/0 control 60, and control signals from keyboard input unit 12. Interrupt control circuit 65 initiates the transfer of information into I/0 register 56 from keyboard input unit 12 or interrupting peripheral input units 28 such as the marked card reader and issues a qualifier control signal -~ ~099~20 QNR to CPU ~8 via output lines 73. Peripheral control circuit 66 enables interface modules 30 plugged into the calculator to respond to information from I/0 register 56, control associated peripheral units 28, transfer information to and/or receive information from associated peripheral units 28, and in some cases initiate the transfer of infor-mation to I/0 register 56 from the interface modules them-selves. Printer control circuit 68 and display control cir-cuit 69 enable output display unit 18, and output printer unit 20, respectively, to respond to information from I/0 register 56.
When a basic I/0 instruction obtained from memory unit 46 is to be executed, CPU 48 transfers control to I/0 control 60 by issuing a pair of I/0 microinstructions PTR
and XTR thereto. In response to these I/0 microinstructions from CPU 48, control signal POP from the power supply, control signals QFG and EBT from I/0 gating control circuitry 58, and I/0 qualifier and clock control signals from CPU 48, I/0 control 60 selectively issues one or more I/0 control in-structions to gating control circuitry 58 as required to execute the basio I/0 instructions designated by CPU 48 and issues control signals, TTX, XTR, QRD, and SCB to CPU 48 via output lines 74-77. The I/0 qualifier control signals issued to I/0 control 60 and gating control circuitry 58 by CPU 48 are derived from the basic I/0 instruction to be executed. Those qualifier control signals issued to I/0 control 60 designate the specific I/0 control instructions to be issued by I/0 control 60, while those issued to gating control circuitry 58 designate selected control circuits to be employed in executing the basic I/0 instruction.

,.... . ~
.

99~20 Memory Ullit 46 includcs a modul~r random-access read-write memory 78 (hereinafter referred to as the R~
a modul~r read-only memory 80 (hereinafter referred to as the ROM), a memory address register 82 (hereinafter referred to as the M-register), a memory access register 84 (herein-after referred to as the T-register), and control circuitry 85 for these memories and registers. The RWM 78 and ROM 80 comprise MOS-type semiconductor memories. As shown in the memory map of Figures 4A-F the basic RWM 78 contains a dedicated system storage section of 256 sixteen-bit words extending from address 1400 to address 1777 and a separate user program and/or data storage section of 1792 sixteen-bit words extending from address 40400 to address 43777. Al addresses on the memory map are represented in octal form.
An optional 2048 sixteen-bit words of RWM may be made available to the user at address 44000 to address 47777.
This is accomplished by removing a top panel 90 of the calculator housing shown in Figure 1, and inserting an ad-ditional printed circuit board containing the optional memory. The additional RWM is automatically accommodated by the calculator.
As shown in the more detailed memory map of Figures 5A-B, the RWM dedicated system storage section includes 52 words (addresses 1400-1463) containing information in the form of mnemonic variables which is employed by the firmware routines shown in Figure 9. A more detailed description of these mnemonic variables is given on page 21 of the calculator basic system firmware listing located elsewhere in this specification. Addresses 1466-1477 and 1701-1737 are used as temporary storage by the various routines shown in Figure 9.

1~99~20 Addresses 1500-~550 comprise a 41-word buffer used to contain the input characters during syntax analysis. Addresses 1551-1621 comprise a 41-word buf~er used by the single line display refresh routine of Figure 9. These 41 words along with 42 additional words (addresses 1622-lG73) are used as a syntax buffer during syntax analysis. Four of these words (addresses 1622-1625) are used as temporary registers by several of the statement execution routines of Figure 9.
Eight words (addresses 1630-1637) are used as two temporary floating point number registers by the formula evaluation routines of Figure 9. Addresses 1640-1677 comprise 32 words which are used by the statement execution routines of Figure 9. Eight words (addresses 1744-1747 and 1754-1757) are employed as "ARl" and "AR2" four-word working registers for performing binary-coded-decimal arithmetic. An additional eight words (addresses 1740-1743 and 1750-1753) are employed as wor~ing data registers ''Xc'' and "Yc" for implementation of the trigonometric functions. These sixteen words (addresses 1740-1757) are used as temporary storage registers by all the ;
routines of Figure 9 except the statement execution and formula evaluation routines. A variable-length "system sub-routine stack" (addresses 1760-1772) is employed for storing return addresses required by programs stored in ROM 80. Four words (addresses 1773-1776) are used to store the result of the latest keyboard computation. The last word in the system R~l (address 1777) is used to store a pointer indicating the next available location for the return address of the next subroutine call within the basic system. A complete assembly language description of the system RWM is included in pages 21-24 of the calculator basic system firmware listing.

_~9_ ~99~1120 As shown in the memory map of Figures 4A-F and the more detailed memory map of Figure 6, user program ànd/or data storage section of RWM 78 contains 1760 words available to the user (as user addresses 40440-43777) for storing pro-grams and/or data, 20 words dedicated for use by the interrupt routine of Figures 9 and 117A-B, and 12 words available for use by plug-in read-only memory modules. An additional 2048 sixteen-bit words may be made available to the user (as user addresses 44000-47777).
Also, as shown in the memory map of Figures 4A-B, the basic ROM 80 contains 7680 sixteen-bit words extending from address 0000 to address 1377, from address 2000 to ad-dress 16777, and from address 40000 to address 40377. Rou-tines and~subroutines of basic instructions for performing the basic functions of the calculator and constants employed by these routines and subroutines are stored in these por-- tions of ROM 80. An additional 8192 sixteen-bit words of ROM may also be added at addresses 20000-37777 in steps of 512 and 1,024 words. This is accomplished by simply inserting plug-in ROM modules 92 into receptacles provided therefor within the calculator which are accessible through a door in the left panel of the calculator housing as illustrated in Figure 1. As each plug-in ROM module 92 is inserted into one of these receptacles a printed circuit terminal board 96 con-tained within the plug-in ROM module plugs into a mating edge connector mounted inside the calculator. A handle pivotally mounted at the top end of each plug-in ROM module 92 facili-tates removal of the plug-in ROM module once it has been fully inserted into one of the receptacles.
Routines and subroutines of basic instructions ~Q99~ZO
(and any needed constants) for ena~ling the calculator to perform many additional functions are stored in each plug-in ROM module 92. The user himself may therefore quickly and simply adapt the calculator to perform many additional functions oriented toward his specific needs by simply plugging ROM modules of his own choosing into the calculator.
Added plug-in ROM modules are automatically accommodated by the calculator.
Referring again to Figures 3A-B, M-register 82 of the memory unit comprises a recirculating sixteen-bit serial shift register into which information may be transferred bit-serially from CPU 48 via T-bus 52 and out of which in-formation may be transferred bit-serially to CPU 48 via ~-bus 50. Information shifted into M-register 82 may be employed to address any word in RWM 78 or ROM 80 via fifteen output lines 106.
T-register 84 of the memory unit comprises a re-- circulating sixteen bit serial shift register into which information may be transferred either bit-serially from CPU
48 via T-bus 52 or in parallel from any addressed word in RWM 78 and ROM 80 via sixteen parallel input lines 108. In-formation may be transferred from T-register 84 either bit-serially to CPU 48 via Y-bus 50 or parallel to any addressed work in RWM 78 via sixteen parallel output lines 110. The four least significant bits of information contained in T-register 84 may comprise binary-coded-decimal information any may be transferred from the T-register in parallel to CPU
48 via three parallel output lines 112 taken with ~-bus 50.
The control circuitry 85 of the memory unit controls these transfers o~ information into and out of M-register 82 and T-regis~r 84, controls tlle addressing and accessing of RWM 78 and ROM 80, and refreshes RW~ 780 It per-forms these functions in response to memory microinstructions, memory clock pulses, and shift clock pulses from CPU 48.
CPU 48 includes a register unit 114, an arithmetic-logic unit 116 (hereinafter referred to as the ALU), a pro-grammable clock 118, and a microprocessor 120. Register unit 114 comprises four recirculating sixteen-bit shift registers 122, 124, 126, and 128 and one four-bit shift register 130.
Shift registers 122 and 124 serve as sixteen-bit serial ac-cumulator regist~ers (hereinafter referred to as the A-register and the B-register, respectively) into which information may be transferred bit-serially from ALU 116 via T-bus 52 and out of which information may be transferred bit-serially to ALU
116 via ~-bus 54. The four least significant bit positions of A-register 122 also serve as a four-bit parallel accumulator register into which four bits of binary-coded-decimal infor-mation may be transferred in parallel from ALU 116 via four parallel input lines 132 and out of which four bits of binary-coded-decimal information may also be transferred in parallel to ALU 116 via three parallel output lines 134 taken with ~-bus 54.
Shift register 126 serves as a sixteen-bit system program counter (hereinafter referred to as the P-register) into which information may be transferred bit-serially from ALU 116 via T-bus 52 and out of which information may be transferred bit-serially to ALU 116 via ~-bus 54. Informa-tion contained in the least significant bit position of P-register 126 may also be transferred as a qualifier control signal QPO to microprocessor 120 via output line 135.

. .. ~.

`` l(~99~ZO
Shift register 128 serves as a sixteen-bit qualifier register (hereina~ter referred to as the Q-register) into which information may be transferred bit-serially from ALU
116 via T-bus 52 and out of which information may be trans-ferred bit-serially to ALU 116 via ~-bus 54. Information contained in the five least significant bit positions of Q-register 128 is transferred to I/0 gating control circuitry 58 as five one-bit I/0 qualifier control signals Q00-Q04 via five parallel output lines 136, and information contained in the six next least significant bit positions of the Q-register is transferred to I/0 control 60 as six one-bit I/0 qualifier control signals Q05-Q10 via six parallel output lines 138. Similarly, information contained in the seven least significant, the ninth and eleventh least significant, and the most significant bit positions of Q-register 128 and information derived from the thirteenth, fourteenth, and fifteenth bit positions of the Q-register may be transferred to microprocessor 120 as eleven one-bit microprocessor qualifier control signals Q00-Q06, Q08, Q10, Q15, and QMR via eleven output lines 140. Information con-tained in the twelfth through the fifteenth least significant bit positions of Q-register 128 may be transferred to micro-processor 120 as a four-bit primary address code via four parallel output lines 142.
Shift register 130 serves as a four-bit serial extend register (hereinafter referred to as the E-register) into which information may be transferred bit-serially either from ALU 116 via T-bus 52 or from the least significant bit position of T-register 84 via input line 144. Information may also be transferred out of E-register 130 to ALU 116 ~9V20 vi~ R-bus 54, Re~ister unit 114 also includes control circuitry 146 for controlling the transfer of parallel binary-coded-decimal information into and out of A-register 122 and the transfer of serial binary information into and out of A-register 122, B-register 124, P-register 126, Q-register 128, and E-register 130. This is accomplished in response to register microinstructions from microprocessor 120, control signals ~g and XT~ from I/0 control 60, and shift clock control pulses from programmable clock 118. Control circuitry 146 includes a flip-flop 148 (hereinafter referred to as the A/B flip-flop) for enabling the transfer of in-formation into and out of either the A-register 122 or the B-register 124 as determined by the state of the A/B flip-flop. The state of A/B flip-flop 148 is initially determined by information Qll transferred to the A/B flip-flop from the twelfth least significant bit-position of Q-register 128 but may be subsequently complemented one or more times by micro-instruction CAB from microprocessor 120.' ALU 116 may perform either one-bit serial binary arithmetic on data received from T-register 84 or M-register 82 via ~-bus 50 and/or from any register of register unit 114 via R-bus 54 or four-bit parallel binary-coded-decimal arithmetic on data received from T-register 84 via output lines 112 taken with ~-bus 50 and/or from A-register 122 via output lines 134 taken with ~-bus 54. It may also perform logic operations on data received from memory unit 46 and/or register unit 114 via any of these lines. The arithmetic and logic operations performed are designated by ALU microlnstructions from microprocessor 120 ",. , ~. .

~ ' - ~99~21) and are carried out in rcsponse to tLIese microinstructions, shift clock control pulses from programmable clock 118, and control signal SCB from I/0 control 60. Information is also transferred from ALU 116 to A-register 122 via output lines 132 or to I/0 register 56, M-register 82, T-register 84, or any register of register unit 114 via T-bus 52 in response to microinstructions and control signals applied to these registers, If a carry results while ALU 116 is performing either one-bit serial binary arithmetic or four-bit parallel binary-coded-decimal arithmetic, the ALU issues a corresponding qualifier control signal QBC and QDC to microprocessor 120 via one of two output lines 152 and 154.
Programmable clock 118 includes a crystal-controlled system clock 156, a clock decoder and generator 158, and a control gate 160. System clock 156 issues regularly re-curring clock pulses to slock decoder and generator 158 via output line 162. In response to these regularly recurring clock pulses from system clock 156 and to four-bit clock codes from microprocessor 120, clock decoder and generator 158 issues trains of n shift clock pulses to ALU 116, M-register 82, T-register 84, and all of the registers of register unit 114 via output line 164. These trains of n shift clock pulses are employed for shifting a corresponding number of bits of serial information into or out of any of these registers or for shifting a carry bit in the ALU, The number n of pulses in each of these trains may vary from one to sixteen as determined by the number of bits of serial information re~uired during each operation to be performed rn response to a control signal CC0 from microprocessor 120, control gate 160 prevents any shift clock pulses from being î(~99~20 applied to the ALU or any o~ these registers. Upon completion of each train of n shift clock pulses, clock decoder and generator 158 issues a ROM clock pulse to microprocessor 120 via output line 166 and an I/O clock puls~ to I/O control 60 via output line 168, In response to the regularly re-curring clock signal ~rom system clock 56, clock decoder and generator 158 also issues correspondingly regularly recurring memory clock pulses to memory unit 46 via output line 1700 ` Microprocessor 120 selectively issues two I/O
. 10 microinstructions to I/O control 60 via two output lines 172, six memory microinstructions to memory unit 46 via six output lines 174, thirteen register microinstructions to register unit 114 via thirteen output lines 176, and five ALU microinstructions to ALU 116 via five output lines 178. It also issues a four-bit clock code associated with each of these microinstructions to clock decoder 158 via four output lines 180. Thess microinstructions and associated clock codes are issued as determined by the control signal POP from the power supply, the eleven microprocessor qualifier control signals from Q-register 128, the four-bit primary address codes from Q-register 128, and the iive microprocessor qualifier control signals from I/O control 60, interrupt control 65, ALU 116, and P-register 126.
As shown in the simplified flow chart of Figure 7, microprocessor 120 executes a hardware diagnostic routine ` (stored within the microprocessor itself) in response to the control signal POP. Upon completLon of this diagnostic routine, ALU 116 issues the qualifier controI signal QBC
indicating whether or not the diagnostic routine was suc-cessful, Microprocessor 120 thereupon responds to this !

; -56-,.
', ' : '' :
~, `

~99~DZO

qualifier control signal by entering the basic machille operating loop and issuing microinstructions causing a sixteen-bit instruction stored in ROM 80 to be loaded into T-register 84 and transferred from there to Q-register 128. Micropro-cessor 120 thereupon sequentially responds to one or more additional qualifier control signals by issuing micro-instructions and associated clock codes for executing the instruction then contained in Q-register 128 and causing another sixteen-bit instruction stored in ROM 80 to be loaded into T-register 84 and transferred from there to the Q-register. When an instruction requiring multiple branching is contained in Q-register 128, microprocessor 120 issues a pair of microinstructions ~E and XTR causing the micro-processor to respond to a four-bit primary address code from the Q-register by issuing additional microinstructions and associated clock codes for executing the instruction contained in the Q-register.
As illustrated by the basic machine operating loop shown in the flow chart of Figure 7, microprocessor 120 initially responds to the qualifier control signal QNR
either by issuing microinstructions and associated clock codes for interrupting the basic machine operating loop and executing an I~O service routine or by issuing microinstruc-tions and associated clock codes for loading A/B flip-flop 148 with the information Qll contained in Q-register 128.
The manner in which micropxocessor 120 responds is deter-mined by the condition of the qualifier control signal QNR, which in turn indicates whether or not the basic machine operating loop should be interrupted.
Assuming the basic machine operating loop is not to 1~99~20 be interrupted, microprocessor 120 loads the information Qll into A/B flip-flop 1~8 and responds to the qualifier control signal QMR either by issuing microinstructions for transferring an address portion of the instruction contained in Q-register 128 from T-register 84 into M-register 82 or by responding to another qualifier control signal Q15.
Again, the manner in which microprocessor 120 responds is determined by the condition of the qualifier control signal QMR, which in turn indicates whether or not the instruction contained in Q-register 128 is a memory reference instruction.
Assuming the instruction contained in Q-register 128 is a memory reference instruction, microprocessor 120 transfers the required address information into the M-register 82 and responds to qualifier control signal Q10 either by issuing microinstructions and associated clock codes to select the base page of the memory (iOe. page 0) or by issuing microinstructions and associated clock codes to select the current page of the memory (i.e. the page from which the instruction contained in Q-register 128 was obtained). In either case, the microprocessor then issues microinstructions as required to read data from the preset page of the memory at the address designated by the address information last trans~erred into M-register 82. Upon completion of this operation, microprocessor 120 responds to qualifier control signal Q15 by issuing additional micro-instructions and associated clock codes to execute an in-direct memory access operation if the condition of this qualifier control signal indicates that the address informa-tion contained in M-register 82 is indirect.
Assuming the address information contained in M-register ~., - .... -., ,j . ....
,. ... .

~399~20 82 is direct (or upon completion of tlle indirect memory access operation), microprocessor 120 issues micro-instructions and associated clock codes causing the micro-processor itself to respond to a four-bit primary address code from the Q-register. The microprocessor responds by issuing additional microinstructions and associated clock codes for executing whichever one of ten possible memory reference instructions is contained in Q-register 12~ and designated by the four-bit primary address code. Following execution of the designated memory reference instruction, microprocessor 120 issues microinstructions and associated clock codes causing another sixteen-bit instruction stored in ROM 80 to be loaded into T-register 84 and transferred from there to Q-register 128, thereby beginning another cycle of the basic machine operating loop.
As illustrated by other possible paths of the basic~
machine operating loop shown in Figure 7, microprocessor 120 sequentially responds to other qualifier control signals when other types of instructions are contained in Q-register 128. For example, when an I/O instruction is contained in Q-register 128, microprocessor 120 sequentially responds to qualifier control signals QNR, QMR, Q15, Q10, and QRD by issuing microinstructions and associated clock codes to execute the I/O instruction. It should be noted that the microprocessor qualifier control signals not shown in the simplified flow chart of Figure 7 are variously contained within those flow chart blocks requiring decisions as will hereinafter become apparent.
The calculator firmware operational diagram of Figure 9 illustrates the basic components of the calculator ~99~zo :) firmware. These components comprise routines wllich reside in the calculator ROM 80 and serve to implement the definition of the calculatorO Control information passing between routines is represented by solid lines on the drawing.
Referring to Figure 9, it is shown that the calculator hardware units are controlled by firmware routines contained in ROM 80. These units comprise an on-off power switch 182, an alphanumeric keyboard input unit 12, a display unit 18, and a magnetic tape cassette reading and recording unit 14. The firmware routines also control an external printer 20, external tape cassette reading and recording units 14, and various other external input-output devices 244 operation of the calculator is begun by placing the on-off switch in the "on" position, thus forcing the hardware internal to the calculator to execute the instruction located at address 0000 of ROM 80. This instruction directs control to the start-up routine 200, which is shown in the flowchart of Figure 83, and described in detail on page 53 of the basic system firmware listing. The purposes of this routine are to initiali7e RWM 78, set the stack pointer address at location 1777, set the keyboard execution numeric output format to float 9, initialize certain variables in the systém RWM area for later use by other firmware routines, and initialize the various read-write pointers to the user read-write memory area shown in detail in the memory map of Figure 6.
After completion of the start-up routine, control is passed to the keyboard monitor routine 202 shown in the flow-chart of Figures 84A-D and detailed on pages 53-56 of the basic system firmware listing. This routine initializes certain variables in the system RWM 78 .

`- ~0996~

for use by -the keyboard input routine 204. It also outputs the automatic line number if necessary It then calls for an input record from the keyboard input routine 204. When the keyboard input routine returns with a record the keyboard monitor routine searches the mnemonic tables in the assembly language program area shown in Figure 6. It then searches the mnemonic tables in each of the plug-in read-only memory modules of Figure 4~ and finally searches the mnemonic tables of the main system ROM 80. A complete assembly language listing of each of the tables in read-only memory is given in the firmware listings. The subroutines which do the search of the mnemonic tables are detailed in the flowcharts of Figures 85, 86, and 87. If a match is found between the characters of the input record and any of the mnemonic tables, the keyboard monitor branches through a jump table to the appropriate syntax routine 210 for syntax analysis if the mnemonic is a statement, or branches through a jump table for execution if the mnemonic is a system command. A separate syntax analysis routine is provided for each statement and a !

separate execution routine is provided for each system command.
Syntax and execution routines for statements and commands on an optional read-only memory module are contained in the firm-i ware of that module. The assembly language program area is handled in the same fashion as the plug-in read-only memory module If no mnemonic is found, control is passed to the implied LET syntax routine.
The keyboard input routine 204 is detailed in the flowcharts of Figures 88A-G, 89A-B, and 90-93. It calls on the display refresh routine 206 to refresh the 32 character single line display 18 between key entries. The display a ~99~zo refresh routine is dctalIed on pa~e 35 of the firmwarc listing.
When a key is entered through th~ alpllanumeric keyboard 12, the interrupt circuitry causes the calculator to execute the instruction at address 00002. This instruction causes a jump to the interrupt routine 208, which is detailed in the flowchart of Figures 117A-B and pages 257-8 of the firmware listing. The interrupt routine 208 saves the keycode in a memory location of the system R~M 78 and returns. The key-board input routine 204 reads this memory word and decides what operations need to be performed for that particular keycode. The shift bit is stripped from the keycode and stored as a flag in a temporary location in system R~M 78.
If the key requires that a mnemonic name be displayed, the single line display buffer shown in Figures 5A-B is cleared and the mnemonic name is entered. If an editing function is required, a routine is called to perform the editing function.
If a user-definable key f0-f9 has been given, the user-definable key routine 228 is called. If an alphanumeric key has been given, the shift flag in RlnM 78 is tested, and, if the shift has been given, the keycode is converted to the code for the shifted key. Then the keycode is inserted into the single line display buffer shown in Figures 5A-B~ either at the end of the line or at the cursor position, if $he cursor is within the line.
The user-definable key routines 228 perform the special operations for keys f0-f9. They are detailed in the flowcharts of Figures 99A-F and pages 43-47 of the firmware listing.
The syntax routines 210 translate the characters of the input record into an internal format which is more easily 99~320 handled by the e~ecution routincs. If a syntax error is encountered control is passed to the error routine 238 which outputs an error message. The error routine is shown in the flowchart of Figure 95 and the firmware listing at pages 58 and 59. If no error is found, control is passed to either the memory management routines 236, if the statement is to be stored in memory, or to the routine for initialization for keyboard execution if the statement is to be executed. The memory management routines are shown in the flowcharts of Figures 96A-D, 97, and 98 and pages 16 and 60-62 of the firm-ware listings. The routine 230 for initialization for keyboard execution servesto initialize the run time stacks shown in the memory map of Figure 6. This routine is detailed in the flow-chart of Figure lOOC and pages 109-110 of the firmware list-ing.
When the RUN command is given, or if the INIT key is actuated,control is passed to the pre-execution processing routines 232. These routines are detailed in pages 65-77 of the firmware listing. They serve to initialize the symbol table and non-common value table areas of the user read-write memory shown in Figure 6.
Control is next passed to the execution monitor 214, which is detailed in the flowchart of Figures lOOA-B and pages 108-110 of the firmware listing. This routine initializes the run time stacks in the user read-write memory of Figure 6 and initiates execution of a stored program beginning at the line number given by the user. After each statement is exe-cuted control is returned to the execution monitor, which prints the line number of the next line if the program is being exe-cuted in the trace mode. Step, stop, or error conditions are ~ (~99~20 ch~ckcd and program e~ecution is terminated if any of these conditions exist. If program execution is to be continued, the jump address of the execution routine for the next state-ment of the program is computed, and control is passed to that routine.
Several of the statement execution routines 240 require evaluation of arithmetic functions and expressions.
This is done in the formula evaluation routines 242.
Several of the statement execution routines 240 require in-put from or output to various external input-output devices 20 and 244. This is done by calling the standard output driver 224 or an optional special I/0 driver 234. Several of $he statement e~ecution routines require input from or output to an internal or external tape cassette unit 14.
This is done by calling the tape cassette drivers 226. The statement execution routines for the statements that com-municate with the tape cassette units are detailed in the flowcharts of Figures 101-115 and pages 250-276 of the firm-ware listing.
The list routine 220 is used when listing stored pro-grams on either the single line display 18 or an external ASCII output device 20. The list routine is detailed on pages 78-82 of the firmware listing. Its function is to translate the stored program from the internal stored format into a string of ASCII characters which can be printed or displayed. To print a line of translated characters, the list routine calls on the standard output driver 242 which is detailed in Figure 94E and pages 20 and 33 of the firmware listing.
Detailed assembly language information relating to - ~ass~2~
!

all of the firmware routines and subroutines herein des-cribed may be obtained by referring to the memory map of Figures 4A-F and the basic system firmware listing located at a later point in this specification.
~ ommunication with the routines in the various plug-in read-only memory modules is accomplished through a series of mnemonic tables and jump tables. The standard firm-ware, the cassette operating firmware, and each of the plug-in read-only memory modules all contain the following tables:
(1) A statement mnemonic table (2) A statement syntax jump table (3) A statement execution jump table
(4) A system command mnemonic table
(5) A system com~and execution jump table
(6) A function mnemonic table
(7) A function execution jump table
(8) A non-formula operator mnemonic table All of these tables, with the exception of the state-ment execution jump table, may appear anywhere within a memory module. The last five words in each module are used by the table scan routines of Figures 85-87 to find the actual location of the tables. The last word of each module contains a unique operation code word for that particular module. The second from the last word contains a relative address of the statement mnemonic table. The third from the last word contains a-relative address of the system command mnemonic table. The fourth from the last word contains a relative address to the function mnemonic table. The fifth from the last word contains a relative address to the non-formula operator table. The jump tables for statement syntax, .

.: .. ~;

99~20 system command execution, and function execution are located directly above their respective mnemonic tables. The state-ment execution jump table is located directly above the fifth from the last word of each module. The complete set of tables for the standard firmware is shown in the firmware listings at pages 48-49, 103-104, 131, and 141.
Each of the mnemonic tables consists of a string of seven-bit ASCII character and six-bit operation code characters packed two characters per sixteen-bit word. The eighth bit of each character is used to indicate whether that character is ASCII or an operator code. A zero in the eighth bit indicates ASCII and a one indicates an operation code. The seventh bit of each operation code character is used to indicate whether that operation code is the last character in that tableO The jump table address for each mnemonic is found by subtracting the operation code for that mnemonic from the sta~ting address of the associated mnemonic table. The internal stored format for program statements consists of a series of operation codes, operand codes, and other special codes. The first word of each statement contains the line number of that statement in binary formatO The second word contains both the operation code for that particular statement mnemonic and also the length of the statement. The length information is used by various firmware routines to scan from one statement to the next. The third word contains the operation code for the table or optional read-only memory module, and it also contains the first operand code. The remainder of the statement is stored with one operator code and one operand code in each word.
Formula operation codes from the table on page 132 of the firmware listing and mnemonic operation codes are stored in ..-. ~ - ~ . . .

99~20 --a five-bit field, bits 10-14. The operand codes are stored in two five-bit fields. Bi~s 5-9 are ~sed to store the operand name. The name consists of an ASCII letter, A-Z, with its sixth and seventh bits removed. For example, the ASCII code for A is 1000001 and the five-bit operand code for A is 00001.
Bits 0-4 are used to store the operand type. Bit 15 is used as a special flag bit. When bit 15 is set, the operand field is interpreted differently than when it is not set. The following table shows the various operand types and the special codes.

. , .

~(~99V20 OPERAND OPERAND TYPEMEANING IF BIT 15=1 TYPE CO~E (BIT 15=0) Full PrecisionConstant follows Variablesin next word , OOOOO Simple variable OOOOl Array of 1 dimensionFixed point decimal OOOlO Array of 2 dimensionsFloating point decimal OOOll Array of unknown dimension Binary integer Split Precision Variables OOlOO Simple variableBinary line number OOlOl Array of 1 dimension OOllO Array of 2 dimensions Integer Precision Variables OlOOO Simple variable OlOOl Array of 1 dimension OlOlO Array of 2` dimensions Full Precision Variables Letter followed by digit lOOlO 2 lOOll 3 lOlOO 4 lOlOl 5 lOllO 6 lOlll 7 llOOO 8 llOOl 9 llllO String Variable rBits 5-9 contain the 11111 User defined function ~operation code of a ~function in ROM

; . :

- ~99~;D20 ~

As an example, the intern~l stored ~orm~t for the following statements is shown in the table below:
DIM A[5]
LET B=C+FND(E) : 15 14-lO 4-5 4-0 O OOOlO OOOOO OOlll DIM op-code -- Length 7 O OlOlO OOOOl OOOOl Table op-code -- A ¦dimension 1 lOlOO OOOOO OOOll ~ -- integer ~ollows . O OOOOO OOOOO OOlOl 5 O OOlOl OOOOO OOOOO ] -- null operand O OOOOO OOOOO lOlOO 20 O lOllO OOOOO OOlll LET op-code -- Length 7 O OlOlO OOOlO OOOOO Table op-code -- B
O 00111 00011 00000 .= -- C
O OlOOl OOlOO 11111 + -- FND
O lOlOl OOlOl OOOOO ( -- E
O OOlOO OOOOO OOOOO ) -- null operand O OOOOO OOOOO llllO 30 O 00110 00000 00100 GOTO op-code -- Length 4 1 OlOlO OOOOO OOlOO Table op-code -- integer ~ollows ~, . .

-.

. .
f ~
~ `,~ ", ,, ,. ~
~.... ~
5 .- . :

, ~99~20 ~ 11 oper:~tioll~ pc~ nc(l l~y IIIc calculat;or may be controlled or ini1:iated l)~ tl~e keyl)oar~ pUt unit and/or by l~eycodes entcre(l into tlle calculator from 1hc kcyboal~
input Ullit, the magnetic tapc cassett-e readillg the recording Ullit, or periphelal illpUt UllitS SUCII as tlle marked card rcader alld stored as program steps in the program storage s~ction of the R~, An oper~tiollal description o~ the kcyboard input unit is therefore IIOW giVell ~'iith SpCCi~iC re~crence to the perspcctive view of the calculator as in Figure 1 and the plan view o~ the kcyboard as in Figure 8, except as otherwise indicated.
Line Switch .
An on-o~f line switch 182, which may be consid~red as part of the keyboard input unit, controls the application of powcr to the calculator and hence initiation of the control signal P0P from the power supply.
As shown in Figure 2, the calculator may be operated at 240, 220, 1~0, or 100 volts ~5%, -1070 as determined by a pair of line voltage selector switches mounted at rear panel 34 o~ the calculator housing and at a line frequency witllin the range of 48 to 6G Hertz The calculator is provided with - a 6-amp fuse and ei~her a l-amp fuse ~or operatioll at a line voltage o~ 220 or 240 volts ~5%, -10% or a ~-amp fuse for operation at a line voltage of 100 or 120 volts ~5%, -lO~o.
It is also provided with a threc-conductor pouicr cable 18 which, whcn pluggcd into an oppropriate AC power outlet, grounds the calculator housillg. The m~ximum pouer consumption Or t~le calcu]ator is 150 voll,lmp~. ~'o morc thatl a total ol` ~1() voltamps m~y be drawn from AC powcr outlets ~2 providcd for pcripllcral units.

~ . ()--EX C:C~ T--The E':E-JTZ (often rnferred to as EXL~C) key, when ?resseZ, will'perform the indicatcd operations pre-~iously keyed in, if any, and display the result of anyarithmetic statements on the 32-character display. (Although the display is only32 characters, an 80-character line c~n bs keyed i~ with automatic scrolling both for programs and for keyboard operations.) Most keys, when pressed, immediately cause their ~nemonic to ~e displayed. However, pressing certain ~eys, such as PRT ALL (to be discussed later), allows a particular mode to be in effect till that mode is o~erridden.

PIXED N, FL~AT N
Immediately after either turn-on or SCRATCH EXEC, the user read/write---__ _ memorY area is cleared; numerical calculations that are execu~ed will be displayed in float-nine notation. The values 2 and 12 in ~loat-nine notation would appear as 2.000000000E+OO and 1.200000000E+Ol, respectively. Float 9 refers to the nined gits succeeding the decimal'poin~; ~ sy~bo'izes x lO raised to the power of the t~o diqits followinq the E.
NOTE
In this text, individual ~eyboard operzt~ons will be identi-fied by ~eing und~rlined; s.g., 3 + 2 EY.EC. (On the display would appear 5.0000COOOOE+OO.) You can specify the desired not2tion by pressing FI~ED ~ or FLOAT N followed by the ap~ropriat2 nu~ber ~rom O through ll. ~he designat2d 'N' indicates the r.um~er of di~its to be di~played to the riqh~ of the d~cim21 point lfter execution.

For exa~ple:
~IXED N 7 BEC, then 1 2 ~ 4 5 6 . 7 EX~C, displays 123456.7000000 or, 1 2 3 4 5 6 7 8 9 . 1 2 3 4 5 6 7 8 9 EXEC, displays 123456789.i230000t ' FLOAT N S EXEC, _ _ _ then 1 2 3 . 4 EXEC displa~s 1.23400E+02 or, . 1 2 3 4 5 6 7 BEC displays 1.23457E-Ol~t Tn ~ixed-n notation, a maximu~ of 12 digits will be displayed to the le~t of thedesimal Pcint; beyond that v2 ue the calcula.or reverts to float-n no~ation, with the number of digits displayed to the rig~t o~ the ~acimal point determined y tbe pa_ticula- rixed-n.

~The m~ch~ne c~lculates to 12 signiricant diqits regardle~s of th~ display length.
t~Since onlv five digits c2n be displayed to the right of the decimal poin~ the f i f'ch dic~it is r!unde~

1~399~20 The ~,XED N a~ FLOAT ~I ke~s are no~ progra~ ble; that is, they can be used onlyin ~ey~oard orerations. ~utput fo~atting ur,der pro~ram conlrol is acccm.plishedby a for~at statement, whicll is discussed bQlo~r.

The calculating range of is: -9.99~99999999 x 10 throuqh -10 0, and 10 99 through 9.99999999999 x 10 ~.
.
CLEAR, DELETE LINE
Pressing either CLEAR or DELETE L~NE will erase whatever previously had been dis-played durinq keyboard oparations. Press~ng either key will cause ~- ~the Lazy T~
to appear on the far left of the display, indicating that the calculator is avail-able for new inp~ts. The difference between the two keys occurs when a stored progra~ lin~ is dis~layed; DELETE LINE will erase the line from the stored program, whereas CLEAR will only erase the di~play and not affect the program line itself.
(A ~rogram line can also be deleted by keyinq in the line n~mber follcw~d by END'OF LINE.) ....
P~CALI~ .. .
Pressing RECALL during keyboard operations allows the last line that was executed to be recalled to the display; pressing RECALL during program-inputting operations allows the last program line that was input to be recalled to the display. If an er20r message appears on the dis~lay when an atte~pt is m2de ei~ner io execuie a iine i~
~eyboard mode or to input a program line into memory, pressing 2CALL will allow the original line to be reviewed for editing purposes.

RESULT
Pressing CLEAR RESULT EXEC displays the numerical value of the last arithmetic statement that was executed. The RESULT key not only allows the result of the previously executed stat~ment to be reviewed, but also can function as an "accumulator"
during arithmetic operations~ e.g., by pressing ..
2 T 4 EXrC (in FIXED 2 notation) ~isplays 6.00, then pressing 3 + R25ULT EY.EC displays 9.00, then pressing 4 + ESULT + RESULT EX2C displays 22.00.

Keying in either R E S or R E S U L T has the same effect as Eressing the RESULT key.
, PR}NT ALL ~;
~y pressing PRI~T ALL, you can determine whether or not the calculatcr is in print all mode. If ON appears,~both the expression and the result of ar.y execu~ed cal-culation will-De typed on whichever printing device is plugsed in~o the calculator;
~f OFF appears, the information will appear oniy on the display. Pressing the , -, .

~ .

;-,,,- ~ . .

~996~20 .

PR,~T ALL 1;ey ~ second time causes the ~lte~;ative ~o~e to he in e'~ect. .n tho print all mode, each p_o~r~m stater.~ent i5 prinlcd when E~:D OF LlNE is pLessed.
All error messages arc also prin,ad.

8ACK, FORW~D, INSERT
The ~AC~ and F0~A~D keys can be used to edit expressions on the display. Succes-sive presses of the BACX Xey will move a blinking cursor to the desired locationwithin the display. Editing can then be performed at this location. The FoRtr~RDkey performs the same function as the back ~e~y, but in the opposite direction.
At the location of the blinking cursor, the following editing can be performed:
l. A character can be inserted by pre.ssing INSERT. (This opens up a space to the left of the cursor, thereupon moving tne cursor to the location of the space; additional presses of the INSEP.T ~2y will open ~p more spaces, with the cursor always positioning itself in the left-most space, thus allowing . for the immediate insertion of more than one character.) 2. A ch racter can be changed by overscoring it with another character.
3. A character can be deleted by pressing either the space bar or S~IFT INSERT, ., . ................................ . _ the only difference being that pressing S~I~T INS~RT will close up the space - of the deleted character.

~olding either 8AC.C or ~ORW~RD down for approximately 1.5 seconds will cause the cursor to move in rapid succession in the chosen direction.

Once a line is apDropriately edited, it can be immediately executed without having to move the cursor to the end of the line.

.. . .
~- , +
When a line that is greater than 32 characters (80 characters maximum) is being input, the characters to the left of the`display are pushed out of the display region to make room for the additional characters. To view the beginning of the input, press ' 1the richt arrow)i this operation moves the characters in the dis-play to the right. Pressln~ ~ (the left arrow) per orms the reverse operation.
Either arrow key, when held down for appro~imately l.S seconds, will repeat its operation in rapid succession.

~ ARITRMETIC
~, .
There are five basic numericaL operato s: add ~+), ~ubtract (-~, multiply ~*), di~-d~
~/~, and exponentiate ~). The order of execu'ion, ~nown as the hierarchy, is identical to the BASIC hierarchy de~.c:ibed below. ~.e ~ASIC runctions : . .

-~3-, ... ._ ... _ .
; ,.
r: ~

l~
:
describe.i belo~ are avai able on ~he Calculator simply by keying in the a~propriate mnemonics. In addition,~the value of ~ can he obtain.ed by kaying in P I.

When operating on trigonometric functions, the calculator assumes the angle to be in radians unless otherwise stated. To express an angle in either degrees or grads, fi st clear the display, then press either D E G EX~C or G R A D EXEr, respectively; then key in the expression. To revert to radians, clear the display, then press R A D EXEC. ~adians, dearees, and grads are also program~able com~ands.

VARIABLES .
The sLmple "scalar" variables a-e A through Z and A~ through Z9 t286 total).
Simple variables can be used in keyboard operations; e.g., pressing A 3 - 7 EXECassigns the value of 7 to A3. Unless the value of A3 is then changed or erased from memory, pressing 4 * A 3 E~EC will display 28. If a variable is undefined, an~- attempt to use thLs variable in an expression (other than by assigning a value to it~ will result in an error message.

~n array is an ordered collection of numerical data. An array ~subscripted) variable can nave eitner or.e or two dimensions as inaicated Dy trle YUbS~ t';, which are p~esented as numbers within parenthesas. A(m) is a one-dLmensional array ~or column vector) where m designates the row of the element; A(m,n) is a two-dimensional array where m designates the row and n designates the column of the elemen~.
, ' .
- The maximum size of an array is limited by the available calculator memory. At nor~al 12-point precision, the effective memory limit~tions would be appro~imat~ly a t30, 30) array.
O
Arrays should ~e referenced in either a common statement or a dimension statement before use in a program; if not, the program defaults to eLther a 10 element array for a singly suDscripted array, or a 10 by 10 array for doubly subscripted arrays.

.. , , , , ~ -. .

T~PE CASSETTES
.

The present ~alculator is capahle of opera'ing with 10 tape casscttes:
One cassette is availakle through the built-in (internal) cassette d~ive.
Four ~eriPheral cassette drives c2n be connected directly to the calculator throuqh the four I/O slots in the rear ~anel.
Five more peripheral cassette drives can be added if the user has an I/O ex-pander box(in all, 11 peripheral devices can be added by having an expander bo~).

SYNT~XThe tape cassette commands have general syntactical rules which will be briefly described. T~e general co~and form, with minor variations, is:
-COMMAND 5UNIT~ 1FILE~, or CO~ND 1UNIT] (FILE) rLNX1 [LNX2~ ]

BracXets t ] indicate that the enclosed infor~ation is optionali parentheses ( )indicate that the enclosed information is re~uired with the particular command.

CO.~AND - The various commands will be individually discussed.
UNIT - Individual units are referenced by the number sig~ ~, followed by the select code; the internal cassette is desi~nated by #10 ~if no select code is aiven, the internal cassette is assumed);
the nine periphOE al cassettes are identified by ~1 through #9.
FIIE - Files within individual cassettes are identif~ed by file numbers;
- if no file is identified by num~er, the scratch-pad (or de~ault) file, file 0, is assumed.
1 - indicates the baginning line number to be affected by the command.
LNX2 - indicates either the line number whare program execution is to begin following the command implementation, or the ending line number to be accessed in the command. In any command whose syntax - allows LNXl and L~2~ in order for LNX2 to be designated, LNX
must have been specified.

All information to be input following the command must be separated by commas.

Ir, Xe~boa~d mode, prass ~XE~ a ter ful illing the 5~nt3x requirements of a particular command to implement the command.

_ . . . _ .

. . .

PREPARING A E~ESH CASSETTE
To prepare a fresh cassette (one wh ch has no markinqs), first open the cassette door by pressing downward on the switch on the far right of the keyboard; then insert the cassette tprint-side up) into the slot built into the door; be certain th~t the tane is wound aro~tnd the le~t spindle - if it is not, but you wish to preDare that side of the cassette anyway, sim~ly close the door and press REWIND.

To store information onto the cassette, first mark the files that are to be used.

PROG~ A~LE CO~NDS

The following tape cassette com~ands are programmable: mark, store, load, merge,store key, load key, store data, 1O2d data, load binary, rewind, find, and tlist.
These commands can also be used in the keyboard mode. The secure command, on theother hand, can be used only in the keyboard mode.
.

`
.h~ k c^~.-.nd p~oduc~s ths *ss-~ated r.~ er oZ ile~ and definës ihe fii~
len~ths tby the number of 16-bit words Per fiie).
yntax: MARY ~NIT] (No. of FIL~S) (LENGT~) e.g., M A R ~ ~ 1 0 , S , 1 0 0 0 EXEC - since unit ~10 identifies the internal cassette, incluair.g it is superfluous; the 'S' indicates the number of files to be made available; t~e '1000' signifies the number of 16-bit words per file.
.
Successive files on the tape can be marXed with different word lengths as shown in the followin~ example; MA~X 3, 1000 EXEC then, MARK 2, 2000 EXEC will mark files 0, 1, 2 of the internal casset'e with 1000-word lenqths and will mark files 3, 4 of the same cassette wi'h 2000-word lengths.

The length of a file can be changed; however, changing it will affect all the files followin~ it by distorting their contents. To change the len~th of a particular Cile, firs~ position the cassstte at that file by usins ~ F~.~ will be d' a -cussed more thoroughly, later); then ma-k the file with the desired lensth. For Example: to mark file 12 o~ the internai cassette with 1000 ~ords, press FIND 12 EXEC then press, M~RK 1, 1000 EXEC

~. - .

1~99~20 To mark files not previously marked (~ir~in files), first perform a TLIST; TLISTwill be discussed thorouqhly later; but for now, merely knowing that TLIST ~UNIT3 EXEC will 1 ist all the marked files, is sufficient. To mark virgin files, it isEirst necessary to mark the last file listed in TLISTt. As ~reviously discussed,this file is located by the find command. Beainning ~ith this file, successive virgin files can be marked by the methods previously discussed.

To mark the beginning of a tape, be certain that the tapa is completely rewound.
S~ORE
The store command will take the program line numbers in read/write memory, and put them in the desi~nated tape location where thay will be saved.

Syntax: STORE ~UNIT] rFrLE~ or STORE tUNITl ~F~LE) tLNXl [L~lX2] 1 e.q., S~OR~ ~2 , 3 EXE5: qelect code ~2-desig~ates which cassette is beir.g accessed;the ~rogra~ will then be stored on that cassette in file number 3.

In the store cc~mand, ~NXl and LMX2 are used to store a ~ortion of the program:
LNXl specifies the be~inninq line number to be stored; LNX2 specifies the endinglir.e numher to be stored. If LNX2 is not specified; the last line to be stored is assumed to be the highest-numbered program iine.

For LNX2 to be given, it is always necessary to have LNXl; this is true for any cassette command. In addition, whenever LNXl is to be given, the file to be accessed must be identified; e.g., .
STOQE 3, 60, 150 EXEC: file 3 of the internal cassette is located; program lines 60 through 150 in memory will then be stored into Eile 3.

tThe nu~ber of Eiles referenced in TLIST is always one more than the number marked by the user.

,_ .

Note Once a cassette has been marked, any file that has been marked can be accessed by ~iving its designated file num-ber in a co~and; e.g., if five files are marked, informa-tion can be stored in file 4 even though file 3 is a virgin (empty~ file, by pressing STORE 4 EXEC.

LOAD, LINK
The load co~mand will take a program that is stored on a cassette and put it into the memory area.

.
Syntax: LOPD ~UNIT~ [FI~E] or, LOAD [UNIT] (FILE) ~LNXl rLNX2]

e.g., LOAD EXEC assumes the internal cassette, default file ~file O) is to be loaded into the calculator; any progr1m previously in the 9830A memory will be erased.

LOAD 5 , 40 , 10 EXEC locates file S on the internal cassette; the entire progra~
on this file is renumbered beginnins at iine number 40, and then the prosram is loaded into memory; program execution is initiated at line number 10. All program line num~ers beginning at line 40, that were previously in me~.ory, will be erased and ~eF?aced by the program being loaded; if the memory previously had line numbers 1~, 20, ~0, it will retain them.
.
In both the load and the merge command, the use of L~Xl and LNX2 can have various results. Rules for pred~cting the results are given at the conclusion Or the merge command discussion.

By substituting LINK for LOAD in the previous syntax, the user can implement thelink c = and. This command operates identically to the load command with one exception:
Durinq proqram execution, ~ f a load statement ~ 8 encountered, the calculator f~nctions as though RU~J EXEC were ~ressed - that is, the old symbcl table is destroyed and a ne~ symbol table is built: on the other hand, 'f a link co~and is encountered, the calculator functions as though CONT EXEC were pressed - thatis, all variables retain their previous values.
:
;-78- - - r lW9~1Z~

~ER~E
- The merge cormand attempts to take program linc numbers from the cassette and position them in read/write memory in front of ~he psogram curre?tly there, between consecutive line num~ers in the program currently th~re, or behind the program currently there. However, if any l ne number of the program to be entered matches a line nu~ber currently in the prosram, an error will result. In addition, if the line numbers of the two progr~ms are inter-~oven, an error will occur; e.g., if the program currently in memory has line numbers 10, 20, 30, 40 and if the program to be merged has line numbers 1;, 25, 35, the merge command will cause an error message to occur even though no two line numbers matched.

Syntax: ~ERGE [UNIT~ tFILE] or, ME~GE ~UNIT] ~FILE) tLNXl tLN~2]

e.g., MERG~ ~2 , 1 , 200, 100 EXEC - file 1 of the cassette with select ccde ~2 is located;
the entire program on this file is renDmbered beginning at line number 200 ~LNXl) and then it is combined with the program currently in memory. Following implementation of the command, prog am e~ccution will begin at line number 100 ~LNX2).

Either the merse or the load command can be used for stacking progsa~s in read/write memory. The major di rerence be~ween the two co.~mands is 2s follows: LOAD will erase the line numbers previously in memory, beginning at the designated LNXl;
MERGE, on the other hand, will retain all line n~m~ers previously in 9830A memory.

In both the load and the merge co~mand, LNXl and LNX2 are predictable. Regardless of the-mode, LNXl renumbers the program line nu~bers of the accessed file to begin at LNXl: the spacing between consecutive line numbers remair.s the same; all G0 T0 statements, etc. are properly ad~usted to reflect the new line numbers; this program is then loaded into user memory.

In program mode:
1. If L~X2 is given, program execution will continue at ~NX2.
2. If LNX2 is not given, program execution will continue either at the next higher line number of the original program or at LNXl, whichever comes first.

In keyboard mode:
1. If LNX2 is given, progra~ execution will begir, at LNX2.
2. If L~IX2 is not given, the calculator will halt after loading in the pro~ram.

_79_ ,' ,,. :

1G99~i20 STORE KEY, LGt~D ~EY
The s-ore key command will take 2Il user definahle ~eys (uppar left-hand region of the keyboard) that have been defined and put them on a cassette .ile, which will be tacaed as a key file.

. . ~
The load key command takes the user definable information from the cassette and poeitions it in memory such that each user definable key perfor~s the same opera-tion that it previously did before beina stored on tape.
.
Syntax: ST0RE KEY ~UNIT] (~ILE) LOAD .~EY ~UNIT] (FI1E) Spacing may arbitrarily he left ~etween the words STORE and XEY and the words LOAD and KEY. In general, the HP Basic language ignores blank spaces ~exce~t, of course, in a quote field where every character and space is duplicated).
, STORE DATA, LOAD DATA
The store data co~and takes a block of data from memory and puts it on a cassette.
~c-.all-;, c..l; arrays c&n ~e s'or2d usi..s '.his -c~-~a..d; ~.o~;~vcr, if ..o a_.a~
specified in the com~and, all data in the common statement of the program can bestored. The calculator allows simple variables in the common statemen'-, 25 well i as arrays; in fact, the common statement c~n accept simple variables, arra~ -variables, integer arrays and variables, and sP'it arrays and variablest.

The load data command takes the data that was pr;viously stored on a cassette file, and loads it into mainline memory, If an array has been stored, then W ADDATA m~st specify an array; if LOADDATA does not specify an array, an error will result. If, on the o~her hand, the co~on area will be retrieved by the load data co~manc ~inthis case, no particular array can ~e speci~'ied in the command, lest an error occur).

Syntax: STOREDATA tUNIT~ ~FILE) ~ARRAY~
LOAD DATA tUNITl ~FILE) tARRAY]

tlhe common statement acts li~e a dimension statement ~ith the additional feature tha~ data in common ls saved from program to proa,ram.

,,, . :

lass~zo . ' e.g., STORE D~TA 6 , B EXEC will loca-te file 6 on the 3n~ernal cassette; then the B array in the current program will be stored in ~his file. (A simple vari~ble cannot be stored in this manner.) LOADDAT~ 6 , B ~XEC can then retrisve the 3 array and load it into memory whenever it is needed; ~he following co~and could be given, also:
OADDAT~ 6 , C EXEC: this would retrleve the B array and load it into memo~.~ in place of the C array, provided B and C are the same size and type.
. . .
Assume the com~on statement in a progra~ looks like this: 1 COM A~a) , B(5,5), D3, E.
Pressing: STORE DATA 2 B EC will store all the ccm~on statement variables into file 2 of the internal cassette. Both the array variables and the simple variables will be retrieved by pressing: ~CAD D~I~ 2 EXEC.
Pressing: LOAD D~TA 2 , A EXEC is illegal and causes an error sinss no particular array can ~e retrieved from a file if it ~as stored in co~mon.
.
In all storc and load d~ta co~mands, ehe file to be accessed ~ t be identified, even -if it is the default file (file O). --'LO~D BIN
The load binary command will transfer binary information - assembly language program -frcm the cassette to the user memory. The assembly language program may be a system diagnostic, an I/O subroutine, or a simulated "option block" designed to perform some specific function.

The assembly language program cannot be listéd or displayed.

SyntaY: LOAD BIN ~UNIT~ ~FILE) Note Files on cassettes are tagged as: program files, key filss, data files, or binary files. If an attempt is made to load from a particular file and the load co~mand incorrectly identifies the file tag, an error will oceur; e.g., pressin~ LOAD Y~ 1 rX~C wh~n fi.le 1 is a program file, causes an error m~ssage to appcar.

_. ........................ - :
--81-- r ,. . . .

~99~zo REWI~
Pressiing the RE~IND Xey, located on the right-hand side of the keyboard, i~ediately rewir.ds the internal tape cassette to the clear lea~er.

To rewind any other cassette, R E.W I N D must be ty2ed in, follo~ed by the select code of the particular cassette. (The internal cassette can also be rewound by typing in R E w I N D EXEC.) .
R E W I N D must be typed if the command is to be used in the programm ng mode.
, syntax: REWIND [VNIT]

e.g., R E W I N D ~2 EXEC will rewind the cassette with select code ~2.
_ _ _ _ _ _ _ _ FrND
The find command ~previously mentioned in conjunction with the mark command) is used to locate a particular file. ~hile the cassette is searching 'or the file number, a 'lazy T" appears on the display. During this interval, the cassette is searching under interrupt control, thus returninq control of the calculator keyboa.d to the user.
This feature allows for the execution of one portion of a large program, while another portion is being found - thereby improving access time.

~nen th~ specified file is found, the cassette tape halts.

Syntax: FIND ~UNIT] (FI~E) .
e.g., FIND ~3 , 2 E~EC causes the cassette with select code ~3 to search until file number 2 is located.

TLIST
Beginninq with the current tape location, this co~mand reads all subsequent fileidentifiers and prints out information concerning each file.
. .
Syntax: T~ST ~UNIT]

The information for each file, on the designated cassette, is printed out on one line.
These are no column headers ~dentifying the information in each line; the assumed neaders are~
~ -82-;, . .. . ~

~399~D20 Pite No. File Typ~l Absolute ~ctual Prcqr;~m Line ;los. ConLqon Area (Code No.) Pile Size ~ile Si~e (fie~innirlg) (Ending) (in words) (in words) (in words) (LNX1) (L~X2) tThe code numbers identif7ing the file types are as follows:
1 binary 2 da~a 3 progra~ tsource) 4 key , In addition, if the file is secured, the r.umber 2 appears in front of the code Dumber (this applies only to binary, source, and ~ay files); e.g., if "24" appears in the second colwmn, the file is a secured ~ey file.

lf a file is a data file, LNXl~ is superfluous; in this case the data is described in this column as:
0 full precision -- 1 split precision - 2 integer precision 3 common . .
I the file is r.ot a program file, the last two colu~ns will con~ain no inrormation;

NON-PROGRAM~ABLE C~ANDS

SEC~RE
This command has the capability of concealing program lines from potential users;
that is, your progra~ could be given to another, and that person could load and run it - however, he would not be able to fetch particular program lines fcr viewingpurposes nor could he store the program on any other cassette file.

An attempt to fetch a secured program line will result in the line number appearing on the display, followed by an *; attempts to list the program will result in the secured line numbers appearing followed by an *.

If any lines in a program are secured, the entire program is considered to be secured; -that is, even though ce-tain progra~. statements are ~isible, none or ~ne program can be reproduced onto another ca~sette file.

.. ..... . .

1~9~3iZ~ -Syntax: SEC ~L~ ~EX2J] or SE_U.~ ~LN 1 ~ 2 It is therefore, possible to secure specific lines within a program; e.g., pressing:
SEC 30 , 80 EXEC, followed by STOE~E 2 EXEC secures lines 30 through 80 of the program in memory and then stores both the secu~ed and unsecured portions of the program into file 2 of the internal cassette.

When a proqral~ is initially secured, it can still be reproduced olltO as many ~iles as necessary; however, once the program is scratched froln m_mory, (e~en though it can bs loaded back into memory) it cannot be reproduced onto any cassctte files.
When program lines are secured, the entire calculator is in the secured ~.ode. Therefore, after the secured progra~ is stored away, the user should press SC~AT~E~ A before inputting other programs - thus, avoiding "secured prog a~" errors.

User definable keys (when not being used as t~?ing aids? can be secured,too. Just press FETCE~ (particular ~ey) SEC EXEC and the designated key will be secured.

Note To protect all the information on a particular cassette, b-eak one of the tabs on the top of the cassette; this ~a~es the cassette inacces.ible for further s~orage.

-84- _ ' ~

1Ci~9~20 PROGRA-'r. lING

Th2 prosra~ ing languaqe o~ the Calculator is, with minor variations, BASIC as described beloT~. ' Instructions to the computer within a program are provided by progra~ statements. Each statement in Basic has an associated line number which must appear in the left-most po-tion of the statement.t Statement line num~ers appear in ascending order with 9999 being the largest possible line number.
.
A program statement, which has been correctl~ keyed in, can be àtored in read/write memory by pressing the E~ OF L~NE ~EOL~ key. This key is situated in an area corresponding to the carriage return/line feed key on a teletype keyboard.

AUTO ~
As previously mentioned, state~ent line numbers can be automatically input. In its simplest form, pressing AUTO ~ EXEC causes line number 10 to immediately appezr on ~.~ ~isp;ay ah-a tiils th~ prDs~m stat~-~ ,t. -~a l i-.a ilU~ -5 G~ ad'itio..al s'~t~.,.s will'be in ascending order with a spacing of ten between consecutive line numbers.
Th'e AUTO ~ (AUTO) s-yntax and the examples to follow presen~ some of the alternatives in automatic line nu~bering.

Syntax: AUTO 7 ~LNXl ~Spacing]~ -. . .
LNXl is the beginning li~e nu~ber to be automatically input; the desired spacing bet~een - lines can then be input if LNXl is given. If no spacing is indicated, a s~acing o~ l0 i5 assumed.

e.g., AUTO # 30 EXEC AUTO 7# 40 , 2 EXEC A~TO # EXEC
40' 42 20 5~ ' 44 30 ': ' .....

When AUTO ~ is pressed, A~TO appears in the display.
tThe length of a stat~ent, including the line number and including approp~-iate spacing, can be up to 80 characters.
. _. ._ . . .

.. ..

"- .
.'': ~ - ' 1~9~20 Note Although the CLEAR and DELETE LINE keys have pre-viously been discussed, the following point should be made. If a program line currently being keyed in is found to be totally unacceptable ~not worth salvaging by using the editing keys), it can be erased by using either the CLEAR or the DELETE LINE keys.
However, if the program line numbers have been automatically input, pressing CLEAR not only erases the entire display but also eliminates the AUTO #
mode, whereas pressing DELETE LINE erases only the program statement without affecting the line number itself.
.: .,.~ ,.
PROGRAM VIEWING
There are two methods of viewing a program that is currently in memory:
1. List it on a printing device.
2. Bring it line-by-line to the display.
LIST
~` 20 The list command has two specific applications: it can be used to provide a total listing of the programs in read/
~ write memory, or it can be used to indicate the read/write - memory available for inputting; e.g., LIST EXEC lists all program lines that are in memory on the user's standard printing device.
LIST #3 EXEC lists all program lines that are in memory on the peripheral with select code #3.
LIST 9999 EXEC causes the number of 16-bit words available in memory to be displayed.
. ., _ ~ ,~

If a specific prosram line is in the display, pressing ~ (down arrow) displays the next higher-numbered program line;

t pressing ~ (up arrow), on the other hand, displays - ~6 -.

~9~20 . . . .... .. . . . . .............................. . .. _ .. ... _ _ . .. _ _ .. .

the next lower-n~ered Drogram l ne. ';~en no prosram line is currently irl the displa~f, pressing ~ would display the successively higher line from rhe one most recentlydisplayed, whereas ~ would display the successivel~ lower line.

FETC~ ~
In addition to viewing a program line-by-line, specific prc~ram lines can '~e ir~ediately brouqht to the display by using the fetch command.

Syntax~ FETCH ~l~lXl]

Where LNXl is the specific line nu~ber to be accessed;

e.g., ~ETCH EXEC always displays the lowest-numbered program line.
FETC'd 300 EXEC displays line 3aO if it exists: if line 300 is not available (and there are other higher-numbered lines), the line immed$ately higher than 300 will be displayed; if there are no line numbers as h$sh as 300, the highes~-numbered line available in memory will be d;splayed.
.. . . .
P~CGRAM E~ITI~G
.

Any displayed program line can be edited by using the 2ACR, ~ORh~RD, and INSERT keys.
' ' ' ' - . . ' . ,.

The RECALL key, previously d$scussed, need only be briefly mentioned. A program line is keyed in; if an error message appears on tha display when EOL is p~essed, the pro-gram line can be reviewed by pressing RECALL. Appropriate editing can then be performed on the program line. The previously input l~ne can always be recalled by pressing RECALL wheth~r or not an error appears.

CIEAR and DE~ETE LINE have already been thoroughly discussed. However, to rei~erate, there are two methods of deleting a program line currently in memory:
1. If the line is currently $n ~he display, pressing DELETE L-~NE will erase it from memory ~CLEPR only clea_s the display).
2. Any line in memory can be ~me~iately d~leted by keylr.g in tne apprcpriate line nuL~ker followed by EOL.

-87- r ,,, ,, . ." .

.

~1~99~20 ... , .. . . .. ... . .. . . . . . . . . . . ............................. _ _ . ......

DELETE
The delete com~and (to be distinguished Prom D~LETE LINE) can sel~ctively deleteprogram lines.
.
Syntax: DELETE [L~Xl [LNX2]] or DEL [LNXl rLNX2]]

Where LNXl is the fLrst line to be deleted and LNX2 is the last line to be deLeted:

e.g., DELETE EXEC deletes all program lines;
DELETE 40 EXEC deletes all statements beginning at line number 40;
DELETE 50 , ~0 EXEC deletes all lines numbered 50 through 80.

SCRATCH
The scratch command can erase a variety of things from memory:

- e.g., SC~CH ~XEC erases 211 program lines and variables;
SC~ATC-~ ~ EXEC erases everything from memory - program lines, us2r definable Xeys, ~ variables tidentical to turning the calculator off, then cn again);
SC~ATC~ K XEC erases all user definable keys (user definable keys will be discussed - later);
SC~TC~ V EXEC erases ali varia~les;
SC~ATCH (particular UD key) erases the particular user definable key that was - pressed - pressing EXEC is not required in this case.
Scratch can be accessed either by keying in the seven letters or by pressing SCRATCt~.

RENUM9E~
The renumber command will take all the prcgram line nu~bers and renumber them.
' ~
Syntax: RENUMPER ~LNXi ~SPACING~] or REN 1LN~1 ~SPACI~G] ]

Where LNXl will be the new line n~mber of the first program stater,cnt, and SP~CING
will be the spac ng betw2er consecutive linc numbers:
- - .
I e.g., REN EXEC will renumber all statements by n~mberir.s the firs~ statement '10' with a spacing of 10 between statements;

-88_ .. .. .. ...... . ....

.. .
;
",. ~ .

~99~20 ... ..... . .

RI~UMBER 30 E~EC renumbers the first statement ',0' witX a spacing of 10 between statements;
REN 45 , ~0 EXEC renumbers the first s.atement '45' with a spacinq of ~0 bet~eenstatements.
. _ . . .
All' statements in the p-ogram that reference another line number are appropriately ccrrected ~ith the renumber command; e.g., G0 T0 80 would be corrected to reference the line that replaced 80.
. :
.
PROGR~ DEBUGGING

NORMAL, T~ACE
The T~AC2 kay can be used to dete~mine the order of statement execution for a program that is currently running. Pressing T~ACE during program execution cluses the line nu3bers to be printed in the order in which they are accessed; then pressing NO~L
reverts the calculator to the normal de. Thus, when a program is running, bothTRACE and NOR~L are i~mediate exe ute keys.

When no pro~ram is running' to revert to either trace or nor~al mode requires p-essing the appropriate key followed by EXEC. Trace mode can be set up to trace specific line r.umbers.

Syntax: TRACE [LNXl [LNX2]~
. . . :
Where LNXl is the first line number to be tra~ed, and LNX2 is the last line number to be traced;
.
e.g., TRACE 20 EXEC will trace beginning at line number 20 when the prcgram is running.
IRACE ;0 , 60 EXEC will trace beginning at line number 50 and ending at line number 60, each time these line nu~bers are executed in the program.

STOP
The stop command can be a statement within a p-ogram tto be discussed later) and can be used 2s a debu~ginq tool.

- \
1(~99~20 .. ...... . ._ ,. .

As a debugging tool, STOP is extremely v"luable~ A prcgr~lm that is n2nning car~ be stopped at any time by pressing STOP (thc cu~reni line numher of the program will be displayed~. If any program lines are then edited, the program mnst be rerun from the beginning, using the RUN key. If no edi~ing has been performed, the program can continu where it left off if the CONT key (to be discussed in. detail later) is pressed.
While a program is s~ooped, the values of variables can be checked to determine if the program is doing what was intended; e.s., pressing A EXEC would dete2~ine the present valuP of the simple ~riable A.

While a program is stopped, STOP~, can have another 2unction, Pressing STOP displays STOP; then Xeying in either one line nu~ er or two line numbers separated by a comma - indicates that the calculator-should stop program execution at these line numbers.
Pressing CONT BEC will then start program execution; e.g., STOP 80 EXEC then CONT EXEC or RUN EXEC will cause the progr~ to halt at line num~er 80. Once a program is running under these ccnditions, there is one way to revert to normal program execution: After the program has halted, press STOP EXEC, then CONT EXEC, and the program will no longer stop at the given line numbers.
, STEP
After a program is halted by a stop command, e~ecution can continue by pressing STEP.
STEP is always immedi~te execute; it causas the progra~ to execute the appropriate statement and then to }.alt. Therefore, after each statement is executed, it can be checked to ensure that it performed the required function. When a particular function is considered satisf~ctory, either CONT or S~P can be pressed; CO~ will execute the rest of the program while STE~ will execute the next program statement only.

RUN, CONTINUE
Pressing RUN EXEC causes a program to begin executiGn at the first statement regardless of whether the program had pre~iously been halted by a stop command; however, if the program had been halted by a stop command, pressing CONT EXEC will begin pro~ramexecution where it had previously halted.

~ , .
tWhen a Xey is not being used as ~n i~mediate execute key, w~ether the key itself is pressed or whether the letters disDl2yed on the Xey a-e ndividually X~yed in, is generally arbitrary. r _ ~_ _ _ -go- --r ;'' : ' ::
~ -1~99~9;20 .
As previously mentioned, if a program is edited after it has been halted, program execution is reinitialized at the first line by RUN EXECt. ~owever, iL, during the hait, the values of variables are changcd or other intern~lly-Qrogra~ed conditions are changed, then CONT EXEC must be pressed to ~eep these ne~ly adjusted condit-ons intact. The following things can be done to the progr~m while it is halted if, upon completton, the program is executed by pressing CO~T EXEC:
1. ~ Variables can be changed; e.g., B - S EXEC sets the simple variabie B equal to 5.
2. Angular units in trigonometrio functions can be changed to measu-e in radians, degrees, or grads, depending on the user's requiral~ents; e.g., DEG EXEC will assume all angles to be in degrees.
- Write, print, and dispIay statements can be input from the ~eyboard (these statements will be discussed later).
4. The data pointer, which indicates the next datum to be encountered, can be reset to the beginnir.g of the data by typing R E S T O R E EXEC.
5. The progr_m'can go to a particular statement and be available for executiontheref e.g.. ~0 ro 80 E~C s~t.s the progrA~ l~ne co~n~e~ to 80 for ei~her step-by-step or continuous execution. tIf continuous execution is desired at line number 80, the continue command can be employed, as discussed below.) IF ... T8EN can also access a particular-line number.
6. Any calculator-keyboard statements can be executed A halted program can be executed beginning at any ine number by using the continue command; e.g., CONT 95 EXEC will continue execution starting at line number 95.
_ _ ., .

, tThe initialize command, to be discussed later, is also legitimate.

.

.; ', --91- - r - ,: .

~99~20 .... ..

~ program can be run beginning at any line number; e.g., RUN 110 EXEC will begin progra~ execution at line number llO.

.
NOTE
. . .
The major difference between RUN and CONT is that RUN initializes all variables in the program and reverts to all nosmal program mo~es, while CONT neither affects any variables nor affects any current program modes.
, j PROGRA25 STt~TE~ENTS

L.i3T
As in Basic LET A - 6 is a legitimate statement; however, the implied let state-ment is also allowed. Thus, A - 6 is the same as LET A - 6.

GO TO, GO SUB
The GO TO and GO SU8 statements are the same as in Basic; however, each state-ment has on`e add~tional feature called respectively, the computed GO TO a~d thecomputed GO SUB. In either case an expression is evaluated and the rounded integer valuc of the expression is determined; the integer then acts as a pointer to a particular line number 'rom a parameter listing in the statement. Some e.~amplesshould explain this feahure more clearly:

~In all examples, the present value of T will be 2.) 20 GO TO Tt2-3 OF 250, 350, 4CO

Since the inteqer val~e of the expression is one, the first parameter 'ollowing "OF" will be accessed (line number 250).

80 GO SUB T+2.5 OF 130, 260, 330, 370, 490 The sounded integer value of the expression is 5; therefore, the subroutine beginnin~ a. line n~es 490, the ~ifth paræmeter following "OF", will D9 acces3ed. (Decimal values of .S and above are always rounded) to the next higher integer value.~ `

' -92-. . . . ~ . _ . .... . .
.

Any legit~mate ~Ypression can be used; if the rounded value is either less than 1 or oreater than the number of parameters ~ollo-~ing "OF", then the line numberfollowin~ the G0 T0 or G0 SUB statement is executed.

PRINT ~
The calculator has one 4eature in the print state~ent not generally available in BASIC. Alphabetic information in a quote field can be printed in either upperor lower case letters. Prir.ting in lower case is just the opposite of that on aregular t~ewriter7 wlth shift or shift loc~ pressed, letters inside the quote field will be printed in lower case ~the display, however, will s~ill a~pear in upper case). If the "at" symbol (@) is required, press S~IFT RE:~ULT.
, ~uote fields in both the format and write statements also have this "lower case"feature available.

DISPLAY
The display statement performs the same fun~ion as a print statement; the difference is that the information appèars on e d__pl2y s~~er 'h&~ rrir.~ir.; de--ic8 . ~.k`'_, .-he-. _ perm.-~.enL reco~d of the in40rmation is desised, the print statement should be used. The syntax used is DISP.
FO~T, WRITE
The format statement is a means of siructuring program printouts in a specified ~anner. The write statement defines the variables, constants, etc. that will appear on the printout; it also determines the device to bs printed upon and theparticular format statement to be followed. The followin~ examPles should adequately explain the features in both the format and the write statements:

e .g . , 5 FOR~T F10 . 2 6 WRITE ~15, 5) .7 printout will be ~ 0.70 where the "~" indicates a blan~ space.
10.2 - the "F" refess to ~ixed-point fo~mat; "10" ref~rs to the total ield width resesved for tl-e printout "2" refers to the n ~ber of digits to -he right of the decimal point. Excess space to the right of the dacimal point will be filled with zeros; one space is reser~edfor the decimal _g3_ -.. .. . . . . . . . . .... ,. . ........ _... . .. .__ _ _ ._ .

point; t~o spaces are reserved to the left of the decL~al point, one for a digit preceding the decimal point, another for a sign (however, only minus signs are pr'nted~.

tl5, 5) - in the wQ-ite statement, the information within parentheses is required.
"15" refers to the printing devics to be used (select code 15 refers to the standard printer); "5" refers to the line number of the format statement that is being accessed (in this case line number 5). The format statement, which is bein~ accessed, can appear anywhere in the program lisilng.

.7 - in the write statement, the information following the right parenthesis is to be printed according to the designated formats. The value is always right~iustified within its field width.

e.g., 20 ~ - 62.4 -, 1 1 2 3 4 ; 6,3 5 iG
25 FORMAT ~ , ~ X, ~ , /, ~ , 3X, E9.0 260 ~RITE (15, 25) 231, -61, -12 4, A, ~ , 4, Al3 - 1 2 4 6 7 8 lO
. .
printout will be: 5 I_~ ~ , 2~3lE+02-61.000~-1.2E+Ol ~62~IS~TXE~VALUE~OF~A~0~ 7.E+Ol , The format statement, the write statement, and the printout all have individual fields referenced; interlinking fields are represented by corresponding reference nu~srs.

Since the write statement references the format statement numbered 25, values inthe write statement ~ill be formztted as speci~ied in this fo~mat statement.

_g4-~99~20 R~BEMCES~
1 E12.2 indicates expor.ential (floating-point) notation with a field width of 12 aAd two digits to the right of the decimal point. The printout displays the exact for~. Remember the field width must be large enough to includ_ a ~eading sign, the decimal point and E+~Y. Since printouts from the ~rite s.atement are right justif~ed and since "231" takes up only 8 of the 2 character field wid~h,the four blank spaces are ~o the left of the value.
2 The valie "-61" in the write s~atement totally fills the F7.3 field, therefore there is no space between this value and the previous value in the printout.
Since P7.3 indica.es three digits to tha right of the decimal point, zeros - are supplied in this case.
3 "X" indicates a space between values; therefore, the values supplied for the P7.3 and E8.1 fo~mats will be separated in the prin~out by at least one sp~ce.
4 The value, -12.4 totally fills up E8.1, in fact, the last digit is suppressed since, with this field designation, only one digit can follow the decimal point.
S "~" tells the printing device to skip one carriage return to the beginning of the next line.
6 2F4.0 snocifies tws consos~tive fixsd-point '^~ts of F4.0 to be usod 'or ~alues in the write statement. The first format is for the value of A, which frcm program line number 20 is 62.4; when a fixed-point for~at specifies zero digits to the right of the decimal point, the value supplied is rounded to be an integer and the decimal point is suppressed -- 62, in this case. Since the carriage return ha~ previously been specified, this value is printed on the beginning of the next output line.
7 Quote 'ields are printed in the sequence in which they occur. Since this quote field is in the write statement, it is printed i~m_dia~ely after 62.4 is printedin F4.0 format. Note the space in front of "IS"; without this space, the print-out would read 62IS instead of 62 IS. Quote fields can appear in either the format or write statements.
8 The value, .4 is also to be printed in F4.0 format. The rounded integer value of .4 is 0 -- hence, the printout. _
9 "3X" indicates there should be three spaces between the values supplied for the F4.0 a~d the E9.0 for.~àts.
Expressions can be spec-fied in write statæments. The value of ~3 .s 65.4;
however, with this format, it will be rounded to 7.E~01. The decimal point is not suppressed in floating-point notation w~.en zero is specifie~ as the number of d,gits to the right of the decimal point.
~, -95_ - ~

. ~
.. ~ - ... .... .

:1099~?2~

If there are more vallles presented in the write tatement tl-an there are formats in the referenced format statment, the for~ats will be rrpeated; e.g.,
10 FO~T P6.2, E10.~
20 ~ITE (15, 10) 18, ~1, 19.3, 29.6, .71 .
printout will be:
~18.00~2.10E~01 ~19.30~2.9~E+01 ~0.71 .
After tne first two values are printed according tc the Sp9C' fied formats, the output printer's carriage return is activated, then two more values are printed according to ~he same two specified forntats, etc.
, Format~ing ~ules:
In f~xed-point format, Fm.n, m stipulates total field width and n stipuIates thenumber of digits to tha right of the decimal point. ~f n>0, the minim-~Am field width allowable is m = n + 3; e.g., P4.1 for a value of -.6 would print -0.6, which takes up the total field width of ~. If n - 0, the minimu~ field width is m = 2; e.g., F2.0 for a value of -7 would print -7, thus taking up the allotted field width.
, In floating-point format, E~.n, m and n are the same as in fiY.ed-point fo~at.
However, the minimum field wiath allowaole is always m - n ~ 7.

~he following are all allowed in format statements:
~m.n - fixed-point formats;
E~.n - floating-point foL~ats ~often ,alled exponerAtial or scientific notation);
X - space;
- carriage return ~for printing device);
"****" - quote field;
B - binary format ~where w:ite statement could have octal mlmber, the bir.ary equivalent woula be output~.
., A11 of the above can be duplicated any r.~mbe_ o- t~mes by leadir.g 'ne s~ol with the appropriate number.

~, , ........ _ ,'.' - - ' , .

~9~20 .. . ... .. . . . ~

The follo~-ing ara al allowsd in -~ri~e states~ents: const~nts, varia~les, expressions, and quote fields. It should be noted that a wr~te statement ca~ be input from keyboard mode; that is, the wri~e 3tatement can rererence the line number of a fo~at statement in memory without being i~ the progra~ itself.

The maxim~m ~idth of both the fixed-point and th~ floating-point fields is 9,999.
Y.owever, the programmer is effectively restricted by the allowable characters per line of the printing device.
.
The infor~ation in the format statement must be separated by com~as.

The informztion in the write statement must be separated either by co~mss or sr-~icolons generally it makes no difference. ~owever, one additional feature of the write statement i5 that it can perform the identical operations as the print statement;
the benefit is the ~bility of the write st tement to select the aevice to be printed upon. To write on a punched tape photoreader with select code 2, the wri~e statement could be set up in the following manner:
30 WRI~E (2, ~) A; B; C, D

Tne "~" indicates that no for~at statement is referenced; thus, WRImE acts like a PRINT statement: data will ~e left justified, semicolons pack the output fields,co~mas spread out the fields, etc.
.
P TAPE
- As in BASIC , P~APE c~uses the computer to read in a progra~ from the punched tape photoreader. If the photoreader select code is 5, then pressing either Pm~APE ~5 or PTA #5 will perform this tasX unless no photoreader is connected to the calculator. If a photo~eader is not connected, the calculator will wait till one is hooked up to complete the command. During this time the display '~ill be blank.

During the implementation of this command, lines being lo~ded into memory ha~e their syntax checked; if a line is in error, it will be rejected - thus, only those lines with correct syntax are loaded into the calculator. To obtain a recor~ of the reject~d lines, it is necessary to put the calculator in the prin~-all mode prior to pressing PT~ ~5; in print-all mode, all ~ejactad lines are printed.

~ote - To punch informa~ion onto paper tape, use the list command as discussed earlier.

.

1(~99'~20 .

~iULTIL~NE FUNCTIO'`~S
~Sultiline functions serve the same purpose as single-line functi~ns with the added capability of being able to describe more sophisticated function3.

In single-line f:~nctions the general form of the definingfunction is: ' statement number DEF FN single letter A to Z tsi~DIe variable), - exDressian In multiline functions, the general ~orm is the same aside from the equal sign and tke expression; for in a multiline function, the expression can be spread out over many stztement n~nbers. Thus, an extremely complicated expression can appear in a more simplified manner; additional flexi~ility is also gained in that the value of any variable within the expression can be computed or a given value of the argument of the function; e.g., , 10 W - ;5 When this program is run, D will return a 20 Y ~ 2 value o~ 32. The return statement returns 30 PRINT FNA ~3) the result of FNA (X) which, in this case, 40 STOP is ecual to D. Iine 405 th~ ~to~ st~temen~
50 DE~ FNA (X) is needed to keep the calculator from try-60 Z = X~2 + Yt2 ing to re-execute lines 50 through 90 after 70 Q = Z + 3 D is printed; without STOP in line 40, an 80 D = Q/W error occurs in line 60 since a second pass 90 RETU~N D beginning at line 50, would be made with 100 STOP X undefined.
. _ .
Any variable evaluated in the expression can be returned by the return statement, and multiple retùrn statements are allowed; e.g., 20 INPUT Y 110 Q s 2t2 30 WRITE (lS,900) FNG (Y) 120 IF Q S 100 T~EN lSO
40 END 130 PRINT "Q -"
50 DEF FNG (Y) 140 RETURN Q
60 Y ~ Y + 1 . lSO PRINI "Z IS"
70 Z - Y~2*X 160 ~FTU~ Z
80 IF Z < iOO TI~N 110 900 FOR~AT F12.1 90 PR~lT nZ _~1 1000 END
tThe ~i~nle variable is a dummy varia~le which indicates where the actual argument ~f tne function is used in the defining e:~prcssion.

~L999~20 In this exæmple, a variable can be returned from three di.ferent lines (100, 140~ 160)depending on the initial value of Y; Z can be returned from both lines 100 and 160 i~ the value of Y meets certain criteria.

~Caution must be taXen as to the placement of the statement that call~ the function (in bo'h examples, statement 30), and i~ is generally advisable to put a stop state-ment immediately aft~r this statement ~as in line 40 o~ both examples); otherwise, an undesirable loop may develop.

If cor_,ectly entered, the function of a function can be evaluated.
.
STOP, END
STOP was previously discussed, with emphasis on it~ program debugging capabilities.
Now it wil; be discussed as a progr2m statement, emphasizing the differences bet~leen it and the end statement.

, When the program encounters a stop statement; it halts and is waitingi i' CONT EXEC
is then pressed, the program will continue with the statement following the STOP. This is not rrue if an end statement is encoùntered; tne program wiil nalt, but if C'ON'1' EXEC is pressed, the calculator will revert bac~ to the lowest-num'oered sta~ement in memory. Therefore, the stop statemen. should be used between stac~ed programs that are to be run sequentially. When STOP is used in this manner, the values of simple variables can be passed from program to program. ' pxogram should be terminated by encountering ~ither a STOP or an END.
The _ highest-nu~bered program statement need not be an end statement.

IRPUTTING DATA

~rogram data can be input in three ways: the input statement, the read and data state-ments,and the initialize command. The input-statement and the read and data statements are thoroughly discussed below.

I~ITIAL,ZE
The INITI~LI7E key, ~hen pressed, allocates storage syace in memory for array variables. After the required data is keyed in, the program can be executed by press-ing CON~ EX~C; reme~'oer - RUN EXEC erases the values o~ all variables, thereby ' .

_99 _ .

, . , . . ., . . . . - ~
,. . ~ . ~ . .

- ~99~20 requiring all v~ri2blcs to be defined in ~he program itself.

Simple variables can always be innut in keyboard mode wit~out using the INITIALIZE key, as long as CONT EXEC is pressed ~o run the program. Sinc~ array ~ariables can be input in keyboard mode by using the initialize co~mand, it is not necessary to define any variables.in the program itself. It is still necessary, however, to identify arrays in cither i~ dimenslon or a ~OmmoA statmmgnt.

.
.

. _ . . .

.

~99C~20 USE~ - DEFI~ABLE KEYS

There are ten User_Definable Keys (UDX) in the upper left-hand block of the key-board. T,~re are, ho~:eYer, efEectively 20 accessible UDX's since each key can be access~d normall~ or with the shift ~ey held down.
, To 7nter ~D~ mode, press FETCH (particular UDK); the display will then read, r~
indic ting the mode. To exit from UD~ mode, press CLEAR E N D ~XEC; the scratch CO!~r.all~
can also be used ~o exit from UDK mode - this command will, of course, erase cer.ain information in the process. UD~ mode is automatically exited when certain se~uences are followed; these cAses will be discussed later.

The u=er-defina~le keys can be u~ed effectively in three ways:
1. to represent lext (where text can be used as a typing aid);
2. to represent functions twhere dif erent values can be passed to the function~;
8. To represent programs.

.
RE:P~ESl~N~rING TEXT

If a key represents t~xt, merely pressing the key will i~ediately display the text without erasing anything that was previously on the display. Thus, co.~onlv used wo~ds and phsases can be put on keys to serve as typinq aids. Text can be put on a ~ey n the follow-'ng manner.

Fir t, access a key by pressing F~TCH (~articular UDR). Then, press * followed by a~
'character strin~ and finally EOL.'Besides inputting the ch racter strinq, pre~sir.s EOL in 'his sequence takes the user out of UDK mode. Any time the progræn~.er wishes to usz a character string, he must press the key into which the desired character string was input.

lf ~ for example, a key was accessed by FETCH tparticular UD~); then ~ F0~AT F10E10.1 EOL was input. I' su'osequently progra~ line number ~0 needed this format, ~r~s~-~ng 60 ~artic--12_ ~D-.~ ~0~ wJll pUt line nu~bor ~0 ir.to mQmO~y with the r~cuir ~

tThe maximum length fo' the charactcr string tincluding the ~) is 80 character3, .

~ j.-LOl-,~, .
... . . ., .. , . .. ., , . .
~";
j,i . , . ~
.,-,; ~ ~ . , . ..

~L~99~20 .... ..

A typing-aid key can be u~ed as an ~mediate execute command if an * is placed both in front of the text and follotYing the te~t;

e.g., FETCH (UD~) * LO~DDATA ~4, 6, B * EOL
.
This command will be Lmmediately executed whenever the UD~ is pressed.

To use a key that has text, merely press the key. Pressing FETCH (particular UDK) will display the * wi.h the text: howqver, text can be edited if the fetch com~and is used.
Pressing FETC~ and then * will erase the old character string and then wait for nsw text to be input.

.
REPRESENTING FUNCTIONS

A ~ser definable key can be used to represent functions - either sir.gle or multiline.
In either case, after the key is accessed, the function must be preceded by a line nu~ber - input either manually or automatically.

After a key has been accessed, the following function could be input:
10 DEF FNA ~X) = 7 * X -3 EOL
Whenever a value is to be passed to X ~the argument Gf the function), first press the appropriate key; the display will read FNA. Then ~ey in the appropri2te Yalue of the argument, ~hich can be either a constant or an expression ~e.g., 20), and press EXEC;
the value of the function will then be displayed (in this case, 137). The same result could have ~een achieved by using the fetch command; however, FN~ tYould not appear auto~atically on tt,e display; it would have to be Xeyed in along with the argument;
e.g., FETCH (UDR~ FNA 20 EXEC would also display 137.

If a multiline function, DEF FNB (Z), has been input, pressing the appropriate UDK
causes FN~ to be displayed~ as before, passing a value to tke argument, Z, and then pressing EXEC will compute and display tha value of .he function.
~ .
Functions in ma-nl~ne memo~v and in a UD~ can be calied, regardless of the current operating mod~.
.

. . .
~-102-- -- .. .. . . . ... . .
'. :- : , , . . .

1~99~ZO

If a function in the calculator is ~.efined in more than one place, the first function found with the designated name will be accessed. If the user is in UDK mode, the cal-culator will search for the function in .he following order:
1. The current 'JD~ program will be checked.
2. The first line of each key ~in the order defined) will be checXed.
3. Mainline memory will be checked.

If the user is not in UDX mcde, the order of the search will be steps 3 and 2, respectively.

REPRESENTI~G PR3GR~MS

A UDK can be used to represent an entire program. Program~ing rules in UDK mode are consistent with those discussed above. There is one restriction, howe~er; if a co~on state~ent is used, its size m~st be less tha.~ or equal to the size of the common state.~ent in the mainline program - for there is only one common a~ea allocated to memory.

To run a program that is represented i~ a UDK, it is advisable to prcss ~U~
(particular UDY~) or FETCH (UDX), then INIT ~particular UDK). The program can becontinued merely by pressing the ~particular UD~); but if there are array variables in the program, pressing only the Xey will cause these variables to be undefined~similar in this respect to the continue c c and, which neither destroys the cldsymbol t ble nor builds a new one). After executing the program, the calculator will exit from UDR mode.

Proqrams represented on a UDX generally use only simple variable- for the obvious ease of handling.

~o list program lines on a particular U~, press:
~IST t~artic~lar UDK);
?ressing LIST EXEC in tne UD~ mode will list the program lines on the key currently being accessed. To selec~ively list particular lines on the U~, it is first necessz~
to FETCH a ~ey; then use the li~t com~and as discusset belo~

To load a program from a cassette file onto one particular ~ey, first ~ETCH the key, then gi~e the load command followed by EXEC. Pro~r2m lines cn a particular key can ~c - ~;
.

:~9~20 ~

stored onto the cassette in the same mar.ner; text (as a typing aid), however, cannot 'oe stored in this manner.

STO~E KEY and LO~D KEY can be used for any UDK regardless of the information on the ~ey. The use of ~hese keys is discussed bel~.

,1 04-.. . .. . .. ..... . .. . .. .

99~20 - I
I
~TA ~ l EN rs This is a S~.SlC _~tement: ~

L ~? Iii P~JT A, B, C, D, E

I

COt~iENTS

A statement contains a mdximuln of ~o cnaracters A s_e.~lnt n:ay also be called ~ llne.

,, . ., 1 , I

., ,1 '.

j, .

;:
-1 05 - I ~

~99~ii2~ ~
. _~

STATEM ~ T N U i'A B E: ~S

Each BASIC statement begins with a s~ en~nt_umber (in i this example, 2~):

J

, COMMENTS

1 ~ The number is called a statement number or a line number.

~ The statement number is chosen by you, the programm?r. It `I may be any integer from 1 to 9999 inclusive.

Each statement has a unique statement number. The computer uses the numbers to keep the statements in order.
'' . .' ~ , Statements may be entered in any order; they are usually numbered by fives or tens so that additional statements . can be easily inserted. The computer keeps them in numeri-cal order no matter how they are entered. For example, if l~
statements are input in the sequence 3~,10,2~; the computer arranges them in the order: 1~,2~,30.

, .
.,,.: ,. ;

1(~9~2~ -INSTRl~CT~)NS

The statement then gives an i~_cr~ ion to the computer (in this example, FRINT):

3~ PRINT S w.7~8`C55~==5 =~3 .

I~

I; .

COMM~NTS

Instructions are sometim~s cal1ed statement types because they identify a type of statement. For example, the statement above is a "print" statement.

, - ''"

~9~

O~i~ R~``'DS
.

If the instruction requires further details, o,~_ra~s (numeric details) are supplied (In this example, l0;
on the previous page, "S"):

The o~erands specify what the instruction acts uponi for ' example, what is PRINTed, or where to G0.

., , ' ll~99~ZO

A P~O~ F~A~l .

The sequence of BASIC statements 1~ INPUT A~B~C~D~F
k given on the previous pages is 20 LET S=(A+e+C~D+E)/5 call~d a program. 30 PRINT S
Th last statement in a program, 40 GO TO 10 2s sho~n here, is 50 END
~:' i'.
.~ ., ,. . .
COMMENTS . .
~. ' The last (highest nunbered) statement in a program - must be an END statement.
:, .
' The END statement informs the computer that the program is finished.

.
' ;', ' ' i' , ,. I .

' ' --1 09--'' ' 1~

`` 11~99~1i2~

FREE-FO RMAT L~Nf~ UAt:~ E
t BASIC is a "free format" language--the computer I I
ignores extra blank spaces in a statement. For example, these three statements are equi~alent:

, 30 PRINT S
3~ PRINT S

.~ l l , ;

, ( -COMME~5T5 ~! When possible, leave a space between words and numbers in a statement. This makes a program easier for people to read~ ~

,1.

I, --I

. . ~ - 5 . - ~ .: .,
11~99~ZO

TERM: SIMPL~: VARlA~31........ ~ -' :

i OEFINED IN DASIC AS: A letter ~from A to Z); or a . -letter in~.ediately followed by a digit (from 0 to 9).
EXAMPLES: A0 B .
M5 C2 .

~1 =_ I I
:1 ' . , - ~.
' ~ - . ' i.
- . . ' ' ' ~ COMMENTS

:1 Variables are used to represent numeric values.
3. For instance, in the statement:
10 LET M5 = 96.7 M5 is a variable; 96.7 is the value of the variable ~1 ', M5.
.
There is one other type of variable in 8ASIC, the array (subscripted) variable; its use is explained in Section IV.

.~:
.

- -Ill-...

lW9~Zr~

TERM: N'~Mi3~?

: DEFINED IN BASIC AS: A decimal number (t''e sl~r, is option~.l) he.ween lE-99 and 9.99999999~999E+99 Zero is included in this r~nge~
EXAMPLES: ~ j -10008 5 3.14159 lOE+37 ~! !
126.257 O lO E37 lOE-37 16.01.06784 -lO E37 l.OE+2 E

- TERM: E NOT~TION

DEFINED IN BASIC AS: A means of expressing numbers having more than six decimal digits, ih the form of a decimal number raised to some power of 1~.
EXAMPLES: - 1.0~0~E~06 is equal to 1,0~0,00~ and is read: "1 ~' times 10 to the sixth power" (lx106).
- ~ 1.02~00E+04 is equal to 1~,200 1.020~E-04 is equal to .¢~ Z

COMMENTS

"E" notatlon is used to print numbers ha~iny more than six sign;ficant 1, digits. It may also be used for input of any number.

When entering numbers in "E" nota.ion, leadillg ~nd tr~iling zeroes may be omitted from the number; the + sign and leadir,g zeroes may be omitted from the exponent.

The precision of numbers is 12 decimals digits , I

, ~ . -lW~ 20 -~"E~ 'i EXPRI~SSION

DEFINED IN CASIC AS: ~ con~bin tion of variables, con-; stants end operators which eval-f ~ uatis to a r,unleric value.
EXAMPLES: (P ~ 5)J27 (where P has previously been assigned a numeric value.) Q - (N + 4) f ~ (where Q and N have previously f ff ~ been assigne~ numeric values.) f ' ' .

.1 . , .
TERM: ARITHi'~ETIC EVALU~\TION ~:

DEFINED IN BASIC AS: The process of calculating the value of an expression.

f _ I

, ~99~20 TI~E ASSI~iNMEN~T OPE~TOF~ _ ~; ~ ~r.~,,~
SYMBOL~
EXAMPLES: 1~ LET A = B2 = C =
20 LET A9 = C5 3~ LET Y = (N-(P.~5))/T
4~ LET NS = A + B2 5~ LET P5 = P6=P7=A-8-9~.5 ~ I
¦ GENERAL FORM: LET ~ariable _ ex~ress ~n ~ i PURPOSE
1.
- Assigns an arithmetic or logical value to a variable.

' ( ; COMMEN.TS
.
When used as an assignment operator, = is read i'takes the value of," rather than "equals". It.is, therefore, possible to use assignment statements such as:
LET X = X+2 This is interpreted by 8ASIC as: "LET X take the value of (the present value of) X, plus two."

Several assignments may be made ;n the same statement, as in statements 1~ and S~ above.

See Section V, "Logical Operations" for a description of logical assign~ents.

I

-' . ;

~
!

1ai99C~20 R~:l Q~30N~ ~P~Al0~S

SYt~,BCLS~> ~ < ~= <-EX~ PLES~IF A=6 T~IFN g,v,,~,~, 110 IF A+E ,C THE~I 91~
. 120 IF A~B C+E T~EN 92p 130 IF C>=D*~ r~l'.N 930 14~ IF C9~= G*i~ IhEN 94 15~ IF P2~C9 TIIE~I 95 ¦ 160 IF J ~> K THEN 95 PURPOSE

Determines the logical relationship between two expressions, as equality: =
inequality: # or <>
greater than: >
less than: ~ j -, ~ greater than or equal to: >=
less than or equal to: ~=
.,~ , .

J COMMENTS
.' ' . . , NOTE: It is not necessary for the novice to understand the nature - of logical evaluation of relational operators, at this point.
. The com~ents below are for the exp~rienced programmer.
Expressions using relational operators are logically evaluated, and assigned a value of "true" or "false" (the numeric value is 1 for "true,- and 0 for false).
h'hen the = symbol is used in such a way that ;t might have either an assignment or a relational function, BASIC assum~s it is an assignment operator. For a description of the assignment statement us;ng logical operators, see Section V, "Logical Operations." .
. . .

l~99~ZO

ARIT~I~`"~-TIC OPEI~ O',~'S

SYMeOLS: ~ * / + ~,¦
EXAMPLES: 4~ LET rll = X-5 ~3 50 LET C2 = N~3 ~j i 6p LEJ A = (B-C)/4 7~ LET X = ((P~2)-(Y*X))/~I+Q
.~ =5~_ ~

.

PURPOSE

Represents an ar;thmetic operation, as:
exponentiate: ~ !
multiply: *
. . divide:
add: +
( subtract: -.
COMMENTS

The "-" symbol is also used as a sign for negative numbers.
It is good practice to group arithmetic operations with parentheses when unsure of the exact order of precedence.
The-order of precedence (hierarchy) is:

*, with ~ having the highest priority. Operators on the same level f of prior;ty are acted upon from left to riyht ;n a statement.
See "Order of Precedence" in this Section for examples.

. ?
': . ~ , ..
,.~, .' '.,' , .: ., ~99~20 AF~IT~ETIC OPERAT~ ;, cor~T~ u~D

The symbols + and - are also used tc, indicate unary plus and unary minus. For example, negativc numbers may be expressed in a statement ~ithout using parenthesis: !

10 LET Al= -B
20 LET C2 = D ++E.
30 LET B5 = B --C

See "Order of Precedence" in this section for examples or ho~l unary + and unary - are lnterpreted. .

., , I , i~

,.
.i, ~ ~

, ..-= I

,. . . . .
- ~
.. : .

~99~ZO

THE A~D OPEI~ATO~

MeoL: AN D
EXAMPLES: 6~ IF A9<Bl AND Cir5 THEN 1~0 7~ I F T7ffT AND J=27 THEN 15 80 IF Pl AND R~l AND N AND V2 THEN 10 PURPOS E , Forms a logical conjunction between two expressions. If both are "true," the conjunction is "true"i if one or both are "false," the conjunction is "false."

NOTE: It is not necessary for the novice to understarld how this operator works. The comments ~elow are for experienced programmers.
( '' '.

COMMENTS

The numeric value of "true" is 1, of "false" is 0.

- All non-zero values are "true." For example, statement 90 would print either a 0 or a 1 (the logical value of the expression X AND
Y) rather-than the actual numeric values o`f X and Y.

Control is transferred in an IF statement using AND, only when all parts of the AND conjunction are "true." For instance, example - statement 80 requires four "true" conditions before control is trans- `
ferred to statement 1~. ¦

. See Section V, "Logical Operations" for a more complete description of logical evaluation.
. .

~9~20 - -r ~ R ~ P ~ R ~

SYMBOL: OR -' EXAMPLES: 10~ IF ~\ 1 OR ~5 T~IEII 5 11~ PR:TNT C OR D
. 120 LET D = ~ OR Y .-13~ Ii (X A~l~ Yj OR (P AND Q) THEN 6 PURPOSE

Forms .the logical d;sjunction of two .expressions. If j e;~her or both of the expressions are true, the OR dis-junction is "true"; if both expressions are "false," the ., OR disjunction is "false."

J ' NOTE: It is not necessary for the novice to understar.d how~, this operator works. ~he comments below are for experienced programmers.

COMMENTS

The numeric values are:. "true" = 1, "false" = ~.

. All non-zero values are true; all zero values are false.

. Control is transferred in an IF statement using OR, when I either or both of the two expressions evaluate to "true."

See Section V, "Logical Operations" for a more complete description of logical evaluation.

:
I

--119-- ~ .
-. ..
~ ~ , `~ ~

~L~99~2~
.

THE ~OT OPE~TO~

SYMBOL: NOT
EXAMPL ES: 3~ L ET X = Y = 0 45 IF (NOT C) AND A THEN 4~ -55 LET C5 = NOT P
65 PRINT NOT (X AND Y) ) THEN Spp ~.

PURPOSE

Logically evaluates the complement of a given expression.

i NOTE: It is not necessary for the novice to understand :, how this oper~tor works. The comments below are ' . intended for experienced progranmers.

,'- -~ . ' ' .
COMMENTS

If A = ~, then NOT A = l; if A has a non-zero value, - NOT A ~

The numeric values are: "true" = 1, "false" = ~; for example, statement 65 above would pPint "1", since the expression NOT (X AND Y) is true.

Note that the logical specifications of an expression may - be changed by evaluating the complement. In statement 35 above, if A equals zero, the evaluation would be "true"
(l); since A has a nun~ric value of 0, it has a logical value of "false," making NOT A "true."
, See Section V, "Logical Operations" for a more complete description of logical ev21uation.
I

,, .

.
~99~bZO

O F~ 0 ~ P ~ 3 ~ E

. The order of per,ori,lirig operations is: J
~ nlg~les c ~ecedence NOT unary f Un5r~ ' R l a tional Op~ra tors L OR lowest precederlce '~ ?Z.';~:~:
COMMENTS

, If two operators are on the same level, the order of -~Z execution is left to right, for example:
i . 5 + 6*7 is evaluated as: 5 + (6x7) 7114*215 is evaluated as: (7/1 4~x2 1 Parentheses override the order of precedence in all cases, it for example:
5 + (6x3) is evaluated as: 5 + 18 ~.
and 3 + (6+(Z~2)) is evaluated as: 3 + (6+4) I

Unary + and - may be usedi the parentheses are assumed by BASIC. For example:
A + + B is interpreted: A + (+B) . , C - + D -5 is interpreted: C - (+D)-5 .

Leading unary + signs are omitted from output by BASIC, but remain in program listings :
".

--12i-- , 1~99~20 STRT~,At:~31-S
, .

Statements are instructions to thecaloulator Th~y ar~ contai~-a~
in numbered lines within a program, and execute in the order of their line numbers. Statements cannot be executed without run-ning a program. They tell the ~alculator what to do wh le a p~o-gram is running.

Here are some examples ment~oned in Section I: ¦
, .LET
PRINT
INPUT

Do not attempt to memorize every detail in the "Statements"
subsection; there is too much mater;al to master in a single session. By experimenting with the sample programs and at-tempting to write your own programs, you will learn more qu;ckly than by memorizing.
1.

., ' '.

-122- ~
I

~(~99~20 TH E LET ST~ M ~:~ T

EXAMPLES: 1~ LET A = s.02 20 LET X = Y7 = Z =
30 LET B9 = 5~ !X~2) 40 LET D = (3*C2~;')/(~*~i./2)~ -GENERAL FORM:
statem~n~: numbeF LET _ 5 ~ " "~

PURPOSE
I .
Used to assign or specify the value of a variable. The value may be an expression, a number, or a variable.

COMMENTS

-The assignment statement must contain:
1. A statement number, ~, 2 . LET I s op t i ona 1 3. The variable to be assigned a value (for example, B9 in statement 3~ above), 4. The assignment operator, an = sign, 5. The number, expression or variable to be assigned to the variable (for example, 5*(X~2) in statement 3p above).
. .
Statement 2P in the example above sho~/s the use of an assignment to give the same value (0) to several variables. This is a useful feature for initializing variables in the beginning of a prograln.

' - .. I

, .

~99C~20 REM

EXAMPLES: 10 P~E,l--THIS IS N~ EXAMPEE
2~ REM: OF REM STATEMENTS
3~ REM-----/////*~'* !!!!!
. 4p REM. STATEMENTS ARE NOT EXECUTE~ B~' BASIC
3, GENER ~ r ~ ers PURPOSE

Allows insertion of a line of remarks or comment ~, in the.listing of a program.

,i . 1 (~ . COMMENTS
~' .
Must be preceded by a line number. Any series of characters may follow REM.

REM lines are part of a BASIC program and are printed , when the program is listed or punchedi however, they i are ignored when the program is executlng.
¦ Remarks are easier to read if REM is followed by a I punctuation mark, as in the example statements.

.

,. ',' ~ ', ~, , , , i .

, .

~(~99~ZO

P Rl ~IT

This sample program gives a variety of examples of the PRINT statement.b The results are sho~ln belo~l.
10 LET A=B=C=10 20 LET Dl =E9=2~
30 PRINT A,B,C,Dl ,E9 40 PRINT A/B,B/C/Dl+E9 50 PRINT "NOTE THE PO'.!ER TO EVALUAT~ N EXP~ESSION AND PRINT THE"
60 PRINT "VALUE IN THE SAME STATEM.NT."
7~ PRINT
80 PRINT . .
90 REMi* "PRINT" WITH NO OPERAND CAUSES THE TELEP.`-N^~ER TO SKIP b LINE.
100 PRINT "'A' DIVIDED BY 'E9' =";A/E9 -- 11~ PRINT "11111", "22222", "33333", "44444", "55555", "66666"
120 PRINT "11111"; "22222"; "33333"; "44444"; "55555"; "66666"

___ _-- ------------------- RESULTS -----------------------~ - t RUN
10 1~ 1~ 2JZI 2 . 1 - 20.05 NOTE THE POWER TO EVALUATE AN EXPRESSION AND PRINT THE
YALUE IN THE SAME STATEMENT.
. .

'A' DIVIDED BY 'E9' = .5 111112222233333444'145555566666 . ' ,.
NOTE: ~he "," and ";" used in statements ll~ and 12~ have very dlfferent ~' :

1(~9~2~

PRINT, COI~JTINUED
~,.
GENERAL FOR~:
statement number PRINT exPression , _xpression ~ .................... ~ I

statement number PRINT "an~ text" , expression , ...

statement number PRINT "text'' , exPress~o,,n,, ~ ''t_xt'' ~ ''text'' , ...

statement number PRINT an~ co.7~ination o.f text and/ r exPreSSiOnS ~ .

, _ mber PRINT

~ . .
¦ PURPOSE -~ Causes the exDress ns or "text". to be output to the Printer ¦ ~ Causes the printer to skip a line when used without an operand.
.1' - . I
~l COMMENTS
Note the effects of , and i on the output of the sample program. If a comma is used to separate PRINT operands, five fields are printed per printer r line. If semicolon is used, up to twelve "packed" numeric fields are output -' per printer line (72 characters).
. Text in quotes is printed literally.
. NOT~: A variable name is considered as a simple expression by BASIC. For example, a statement for the first general form shown above might be: ¦
l00 PRINT Al, B2, C3 ; , or llp PRINT A, Z, X, T9 where the variables represent numeric expressions.
Remember that variable values must be defined in an assignment, INPUT, READ
or FOR statement before being ~sed in a PRINT statement.

~99~2~

PRINT, CONTINlJ'ED
Ending a PRINT statement wiih a semicolon causes the output to be printed on the same line, rather than 9en~rdtin9 d return lincfced after the staten~ent is executed. For example, the sequence:
20 LET X = 1 30 PRINT X; . .
40 LET X=X+l produces output in this format:

- Similarly, ending a PRINT statement with a comma causes output to fill all five fields on a line before moving to the next line.
The trailing comma in statement 30 in the sequence:
20 LET X = 1 . . . 30 PRINT X, 40 LET X=X+l .
. produces output in this format:

. ~ 11 12 13 14 15 A PRINT statement without an operand (statements 70 and 80 in the sample progrdm) gererates a return linefeed.

, 1~99~i2C~

GO TO Ar`lD ~,ULT1~3R~ 'C!~ C-Q TO

EXAt~lPLES: 10 LET X = ?~ .
I . . .
4~ GO TO X+Y OF 41~,420,430 ...
5~ GOTO 1 80 GOTO 1~ ! .
. 90 GO TO N OF lQ~,15~,180,190 , GENERAL FOR~
' statement number GO TO stat~.nent n u~ber staternent number C~ TO ex~ression OF sequ~nce of statement numbers .... ,_ i ; .

PURPOSE
GO TO transfers control to the statement specified.
GO TO expression...rounds the expression to an integer n and transfers control ; - i -, to the nth statement number follo~ing OF.

:j COM~lENT5 1, QO TO may be written: GOTO or GO TO.
Must be followed by the statement number to ~hich control is transferred, or ` exPression OF, and a sequence of statement numbers.
GO TO overrides the normal execution sequence of statements in a program. I
j If there is no state~ent nu~ber corresponding to the value of the ex~_ession, the , GO TO is-ignored.

.
Useful for repeating a task infinitely, or "Jumpins" (GGing TO) anotller part of a program jT certain conditions are present. ~ I
s GO TO should not be used to enter FOR-~'rXT locps; doing so may produce unpredicL-able results or fatal errors.
, .

--128-- I .

- j~

1~9~20 , ~ , .
;
~osu~ r~
..~

EX,~lPLE: 5~ READ AZ ' 6~ IF A2~ T.-IEN 8 7~ GOSUB 4~0 3~ STOP (STOP frequsntly precedes the first sta~emen~ o~
a subroutine, to p~event accidental entr~.) i 39~ REM--THIS SUBROUTINE ASKS FO2 A l OR 0 REPLY.
4~ PRINT "A2 IS>10~"
41~ PRINT "DO YOU WANT TO CONTINUE";

43~ IF~ N X~ THEN 45~
~f 44~ LET A2 = ~ -I ~ 45~ RETURN

6~ END
GENERAL FORM: statement nu~ber GOSUB statement nu.~ber starting subroutin~
statement num~er RETURN
: - I
PURPOSE

GOSUB transfers control to the specified statem~nt number.
RETU2N transfers control to th~ state~nt fol-lo~ling the GOSUB
ctatement which ~ransferred control.
GOSUB...RcTURN eliminate; the need to repeat frequently used ~roups of statements ir a program.
... ~ . . . , .

. - , 1(~99~20 ~,lULT1~3P.Ai`~C~ GOSU ~3 EXA~IPLES: 20 GOSUB 3 OF 1~,20~,3~,4~'~,5 . . 6~ GOSUB ~`I+l OF 2~,21~,22 ~ 7~ GOSUB N OF 8P,18~,28~,38~,48~,58 : GE~IE~AL FOR~
sta~Y~ent nur~er GOSUB ex~ression OF soqL~ence of state~ent nu~bo-s ...
:~o.. D~.~.~r.O;~~ r~ ~C
PURPOSE

GOSUB espression rounds the expression to an integer n and transfers control to the nth statement number following OF.

COMMENTS
- . .
Subroutines should be exited only ~lith a RETURN statement.

The expression indicates which of the specified subroutines will be executed. For example. statement 20, above transfers control to the subroutine beginning with statement 3~. The expression specifies which statement in the sequence of five statements is used as the starting one in the subroutine.

The expression iS evaluated as an integer. Non-inteaer values are rounded to the nearest integer.

If the expression evaluates to a number greater than the number of state-ments specified, or less than 1, the COSUB is ignored.
.
Staten!~nt numbers in the sequence follo~ g OF must be separated by comnnas.
. . . . !
' ;;~ I ' ' '1 ' I . ' ' ' .
' . - -130-~ :
' ' ....... . =, ~
` ~ ` - ` '-1~99~20 I F. . .T~

SAMPLE fROGRAM: l0 L ET ~
2~ RE~D X
30 IF X ~a~l T~
40 PRINT "X IS OYFR"i ~l 1 50 GO TO l00 , 60 PRINT "X IS LESS THAN OR EQUAL TO"; r i - 70 GO TO 20 ~ cTnP

~ GENER.~! FORM:

= ~ _~
PURPOSE

- Transfers control to a specified statement if a specified condition is true.

COMMENTS

Sometimes described as a conditional transfer; "GO TO" is implied by IF...THEN, if the condition is true. In the example above, if Xc=l~, the message in statement 60 is printed (statement 60 is executed).
Since numbers are not always represented exactly in the computer, the = oper-ator should be used carefully in IF...THEN statements. Limits, such as ~ =, etc. shoutd be used in an IF expression, rather than =, whenever possible.
If the specified condition for transfer is not true, the program will continue executing in sequence. In the example above, if X~l0~ the message in state-ment 40 prints.
The relational operator is optional in logical evaluations.
1, See Section Y, "Logical Operations," for a more complete description of logical evaluation.

... ..
~, ~ -- - ~ . . .
,;. ~ : , ~ ` '`' l, 1~ ' FOR..!NEXT
i.
EXAMPLES~ FOR Pl = 1 TO 5 110 FOP~ Ql = N TO X
12~ FOR R2 = ~l TO X STEP 2.5 li 130 FOR S = 1 TO X STEP Y

15~ NEXT R2 . ~ 16~ NEXT Ql . 17~ NEXT Pl Sample Program - Variable Number Of Loo~s 40 PRINT "HOW MArly TIMES DO YOU IIANT TO LOOP";
. 50 INPUT A -. . 6p FOR J - 1 TO A -- 7p PRINT "THIS IS LOOP"; J
8~ READ Nl, N2, rl3 9p PRINT "THESE DATA ITEMS WERE READ:" Nl; N2; N3 lp0 PRINT "SUM ="; (Nl+N2+N3) . . llp NEXT J
: 120 DATA 5, 6, 7, 8, 9, 10, 11, 12 130 DATA 13, 14, 15, 16, 17, 18, 19, 20, 21 . 140 DATA 22, 23i 24, 25, 26, 27, 28, 29, 30 ., 15~ DATA 31, 32, 33, 34 .
. 16p END
. GENERAL FORM:
. - statement number FOR simpl v riable -- initial value TO f nal value or statement no. FOR simple var. - initial value _ final value STEP ~tep valun .
' .
. statement number _ XT simple variable l .
1 NOTE: The samc simple variable must be used in both the F~ and NEXT state- I .
, . ments of a loop. ~ :

.
-13,-',' ..

.

1~99~20 F0 F~... N E~T CONTI ~1 U~D
.
PURPOSE

Allows controlled repetition of a group Gf ,~a~ments wlthin a program.
, COMMENTS

~nitial_ alue, inal value and ste~ alue may be any expression.
STE_ and _ te~ value are optional; if no step value is specified, the computer will automatically increment by one each timoi it executes the loop.
Ho~l the loop works:
The simple variable is assigned the value of the initial value; the value of the simple-variable is increased by l (or by the _ e value) each time the loop executes. When the value of the sim.~le variable passes the final value, control is transferred to the statement following the "NEXT" statement.
~he in al, final, and ste~ values are all evaluated upon entry to the loop and remain unchanged after entry. For example, - FOR I = l TO I + 5 goes from l to 6, that is, the final value does not "move" as I increases with each pass through the loop.
For further details ~n the STEP feature, see "FOR...NEXT with STEP" in Section III.
Try running the sample program if you are not sure what happens when FOR...
NEXT loops arc used in d program.

1, .

10~96~20 NESTING I~OP...NE,' ~ LO~PS

Several FOR...NEXT loops may be used in the same program;
they nlay also be nested (placed inside one another). There are two important features of FOR...NEXT loops:

1. FOR...NEXT loops may be nested.
10 FO R ~1 = 1 TO 5 Range of loop Al ~ - 2~ FOR B2 = N TO P
-3,~ FOP~ C3 = X TO Y STEP R
¦ Range of loop B2 . . .
iRange of loop C3, ~ 80 NEXT C3 9~ NEXT B2 NEXT Al ~ 1 2. The range of FOR.... NEXT loops may not .
~ overlap. The loops in the example above i are nested correctly. This example shows improper nesting.
10 FO R I = 1 TO 5 i, .. .' ' . ~ 30 FO R J = 1 TO N
3 The range of loops . .
I and J overlap. _ 50 NEXT I
~............................... . ',' =~ 9~ NEXT J

--.

R~Ai~ AT~ A~JD ~- S~GR~-' ';~
.
:; ' ' ' ' ' .
Sample Program using READ and DATA
j U~~ ~ I ~ ' 15 FOR I=l ro s ! 4~ LET X=At2 45 PRINT A;" SQUARED =";X
5~ NEXT I - !
55 DATA 5.24,6.75,30.8,72.65,89.72 -_____._ ..

~"-~ Each data item may be read only once in this program. I
~ TSB keeps track of data ~Jith a "pointer." ~Ihen the -j first READ statement is encountered, the "pointer"
indicates that the first item in the first DATA state- f ment is to be readi the pointer is then moved to the second item of data, and so on.

In this example, after the loop has executed five ~; times, the pointer remains at the end of the data f list.` To reread the data, it is necessary to reset the pointer. A RESTORE statement moves the pointer back to the first data item. I

!
.~ . .. . .
i .
., .~ , . . .

r~ 3 A AND ~:ST~, CONTINUED

Sample Progr2m Using READ, DATA and RESTORE
i .
2~ FOR I=l TO 5 i 3~ READ A
i 40 LET X=A~2 5~ PRi~T A; "SQUAREO =";X
1 6~ NEXI I
l 80 RESTORE , 1 10~ FOR J=l TO 5 i 110 READ B -120 LET Y=Bt4 130 PP~INT B; "TO THE FOURTH POIIER =";Y

i 150 DATA 5.24,6.75,30.8,72.65,89.72 160 END ,~
GENERAL FORM:
sta ement nu~ber READ variable , variable ,......... . ,.
statement numbQr DATA number or string , number'or strinq ,...

state - ?nt nu~ber RESTORE
~tatement number RESTORE statement nu~b~r PURPOSE

The READ statement instructs T56 to read an item from a DATA statement.
The DATA statement is used for specifying data in a program. The data is read in sequence from first to last DATA statements, and from left to right within the DATA statement.
The RESTORE state.,Ient resets the pointer to the first data item, allowing data to be re-read.
R~STO~E follo~Jed by a statement number resets the pointer to the first data item, beginning at the specified statem~nt.

_ ~(~99~20 3ATI~ Al'~D ,~.S~O~:, COi~lTlNlJc~

) CO;'J'i_NTS
READ statements reqliire at least one OATA
state.nent in the sam2 program.

Items in a DATA statement must be separated by co~nas. String and numeric data may be mixed.

DATA statements may be placed any~lh~re ;n 2 program. The data items will be read in se-quence as required.
- , ' .
DATA~statements do not execute; they merely specify data. ' The RUN command automatically sets the pointer to the first data item.
, - If you are not sure of the effects of REAO, DATA,~and RESTORE, try running the sample programs.
.' ' ' 1, 1.

. ~ ;, ' ' ~
, ,.
.

:: .

1~1996~20 - WAIT

EXAMPLE: 900 WAIT (100~) . 99~ WAIT (30~0) GENERAL PORM: statem.ent numb e3 I~IAIT L x~ession m x__ ) ' ~

PURPOSE

. Introduces delays into a program. WAIT causes the programto wait the specified number of milliseconds (maximum 32767 . milliseconds) before continuing execution. ':
. . . i '.., , ' . ., COMMENTS . ~ .
.
The time delay produced by WAIT is not precisely the number of milliseconds specified because there is no provision to account for time elapsed during calculation or terminal- !
. computer comnlunication.

One millisecond = 1/1000 second. I

I

-138;

i 1~99~2 TEI~ri~: ROUTINE
.

DEFINED IN BASIC AS: A sequence of program staterr,ents which produces a certain result.

PURPOSE
.

Routines are used for frequently peiformed 3 operations, saving the programmer the work of defining an operation each time he uses it, and saving comp~uter memory space.

: i ,~i , i , ~ i ~i A routine may also be called a program, ~' subroutine, or sub-program.

-. The task performed by a routine is defined ' by the programmer.

.
.

; . . ~, ~; ,, .,................ ~

1(~99~ZO

TE :~M: S~RING
~.
DEFINED IN BASIC AS: ~ to 255 printer characters enclosed by quotation marks (one line on a teleprinter terminal).

COMMENTS
.
~ Sample strings: "ANY C~IARACTERS'?*/~
-~ "TEXT l234S67.. "

Quotation mar,~s may not be used w;thin a string.
Strings are used only in PRINT statements.
; !
, The statement number PRINT, and quotation marks are not included in the 65 character count. Each statement may contain up to 72 ~ characters. Maximu!n string length is 72 characters minus 6 i characters for "PRINT", two for the quotation marks, and the num- !
' ber of characters in the statement number.
. . .
TE~M: FUNCTION
v..,~ "~
, DEFINED IN BASIC AS: The mathematical relationship between two variables (X and Y, for example) such that for each value of X there is one and only one value of Y.

CO~lENTS
The independen~ variable in a function is called an argument; 'I
the dependent variable is the function value. For instance, t if X is the argument, the function value is the square root of X, and Y takes the value of the function.
,. i , -140-"' . .
: ~ -. ~

..

99~2~) T E R ~ A F~ P~\ Y 0 ~ T ~ I

DEFINED IN BASIC AS: An ordered collection of nu!lleric data ~!
(nurnbers~.

COM~IENTS
l Arrays are divided into columns (vertical) and rows (hcri~ontal~:
I C ROWS

L . , .
u I N
S 1.

Arrays may have one or two dimensions. For exanlple, t ~' ~ ' 1 0 3~2 lr I ~ ( 4 r I; is a one-dimensional array, while 6 , 5 , 4 3 , 2 , 1 . 0 , 9 , 8 is a two-dimensional array.
~, ' .
Array elements are referenced by their row and column Position For instance, if the two examples above were arrays A anl Z
respectively, 2.1 would be A(2); similarly, 0 would be Z(3,1).
The references to array elements are called subscripts, and set apart with parentheses. For example, P(1,5) references the fifth element of the first row of array P; 1 and S are the sub-scripts. In X(M,N) M and N are the subscr;pts.
. ', .
.

1~99~20 TEF~ WORD

: DEFINED IN BASIC AS: The amount of computer melnory : space occupied by two telcprinter ~ .&=52:
~_ ~;
COMMENTS

Numbers require two words of memory space when stored as numbers. When used within a string, numbers require 1/2 word of space per character in the number.

. ' , . .
~,;' ' , .

', . ' - ' . ..
:, :
.

. .

1, .

' . .
.' ' ' ~ '.

i 2(~

SUE;ROUTINES ~.ND t~Ul~CTIONS

, .
The follo~ing pages expldir, BASIC features useful for r~-petitive opa rd tions -- subroutines programmer-def;ned functions and standard functions.
, The programnler-defined fectures such as GOSUC
FOR...NEXT ~ith STEP and D'F Frl become more usefu1 as the user gains experience and 1earns to usn thenl as shortcuts.

Standard mathematical and trigonometric functions are convenient timesavers for programmers at any level.
ThV are treated es numeric express;ons by CA5lC.

, , '' .. . .
I .

.. I

., , ' -- - ~

lC99~20 F0 R...N EXT 'JV IT~ EP

EXAMPLES: 20 FOR I5 = 1 TO 20 STEP 2 80 FOR P = 1 TO N STEP ~5 90 FOR X = N IO W STEP (N~2-V) GENERAL FORM:
! statement no. FOR simple var. = expression TO expr~ssion STEP expression PURPOSE
:
Allows the user to specify the size of the :~ increment of the FOR variable.

.~,' ,, :i COMMENTS

The step size need not be an integer. For instance, 100 FOR N = 1 TO 2 STEP .01 ! is a valid statement wh;ch produces approximately IOO
loop executions. incrementing N by .Ol each time.
~i A step size of 1 is assumed if STEP is omitted from a FOR statement.

A negative step size may be used, as shol~n in statement 40 above.

.

1~9~1i20 GENE~QL ~ THE~,lATlCAL FU~`ICT~ONS

: EXAMPLES: 642 PRINT EXP(N); ~BS(N) 652 IF RND (0)>-.5 THEN 9 l 662 IF INT (R) ~ 5 THEN 91,~
: 672 PRINT SQR (~); LOG (X) GENERAL FORM: The general mathematical runctions ma~ be used as , expressions, or as parts of an expression.

PURPOSE

Facilitates the use of common,mathematical functions by pre-defining them as:
ABS (ex~ression) the absolute value of the expression';
EXP (express on) the constant e raised to the power of the expression value (in statement 642 above, e~N) ( INT (ex~ression) the largest integer < the expression;
LOG (exDression) the logarithm of the positively valued expression to the base e;
, RND (ex~ression) a random number bet~een l,and 0; the expression is a ' dummy argument;
SQR (exPression) the square root of the positively valued expression.

.
COMMENTS

The RND function is restartable; the sequence of random numbers using RND
: is identical each time a program is RUN.

r . ' ,~

~99~20 TRlGOI~!iOM ETZ:~IC I~UNCTiOI`~S

EXAMPLES: 500 PRINT SIN(~ COS(Y) 510 PRINT 3*SI~ ,); TA~I (C2) ~ 52~ PRIN'r AT~I (22.3) i 53~ IF SIrl (A2) ~1 THEN 80~
54~ iF SIN (B3) = 1 AND SIi'l!X) <1 THEN ~ .

~RC~GSE

Facilitates the use of co~inon trigonometric functions by , -pre-defining them, as~

SIN ~exp~ ) the sine of the expression ' COS ~ Eession) the cosine of the expressicn ! TAN (ex~7ression) the tangent of the expression ATN' (expressi~7n) the arctangent of the expression ~;i I
, , COMMENTS
. 1 _ The function is of the value,of the expression (the value in i parentheses, also called the argument).

i The trigonometric functions may be used as expressions or parts ~ of an expression.
.1 . 1 The angle of the trigonometric functions can be specified as radians, degrees, or grads by executing a RAD, DEG~ or &RAD statement. The calculator assumes radians if not speclfied, ,, .

~.

~ ! I
..... _ ; .

~9g~2 THE T~B A~D SGN FU~C,!QNS _ ., EXAMPLES: 5~ IF SGN (X) ~, ~ THEN
51~ LET Y = SGN(A) 52~ PRII~T TA8 (5); A2; TA~ (2p)"1EXT"
53~ PRINT TAB (N),X,Y,Z2 540 PRINT TAB (X+2) "H~ADING"; R5 . ll GENERAL FORI~: The TAB and SGN may be used as expres3ions, j!
or parts of an expression. The function . for ms are:
.. TA8 ( expre~sion indicating nwnber of spaces to be ~oved ) _ _ ___. _ _ . SGN ( ~p~ession ) I f ~,, PURPOSE
, ~ ;i i . ,TA8 (expression) iS used only in a PRINT statement, and causes the terminal typeface to move to the space i. number specified by the expression (0 to 71). The ~ expression Yalue after TAB is rounded to the nearestl 1 , integer. Expression values yreater that 71 cause a return lirefeed to be generated.

SGN (expression) returns a 1 if the expression is greater than ~, returns a 0 if the expression equals 0, returns a -1 if the expression is less : than ~.

.
. ' .

. ,.

,....
!

:: . , I
.,;, . '.

- l ~

~:W9~20 S E C T~ 3 I~J

I C ~ S
.

.

... . ..
This section expla;ns matrix manipulation. It is intended to show the matrix capabilities of BASIC and assumes that the programmer has some knowledge of matrix theory.
" ., I
. TEF~M: ~A~TI^~'~' (AI~RAY) DEFINED IN BASIC AS: An ordered collection of numeric data ~ ¦

s Matrix elemonts are referenced by subscripts following the ! matrix variable, indicating the row and column of the ele-ment. For exampte, if matrix A is , 4 5 6 . the element 5 is referenced by A(2,2); likewise, 8 is A(8,2).

See Section III,"Vocabulary" for a more complete description of matrices ' .,, ' ' ~
s ,1 . , i .
, '' ~ .
--148-- ~:
, , j~

DlrA

EX~.MPLES~ DIM A (5~), B(2~,2~) 12~ DIr`l Z (5,2~) 13~ DIiM S (5,25) 140 DI~ R ~ ) GENERAL FORM:
Il s~atement number DIM matrix variable ( integer ) _ _ L - ~t ~o r ~IM ~t~r w~ e ~ int~r , integer ) ............... ~ ¦
. . ~ 1 .
PURPOSE

Reserves working space in menlory for a matrix.
' The maximum integer value (matrix bound) is 255.

COMMENTS
The integers refer to the number of matrix elements if only one dimension -is supplied, or to the number of rows and columns respectively, if two dimensions are given.
A matrix (array) variable is any single letter from A to Z.
Arrays not mentioned in a DIM statement are assumed to have 10 elements if one-dimensiondl, or 10 rows and columns if two-dimensional.
The working size of a matrix may be smaller than its physical size. For examples an array declared 9 x 9 in a DIM statement may be used to store fewer than 81 elements; the DIM statement supplies only an upper bound on the number of elements.
The absolute maximum matrix size depends on the memory size of the computer.

' .

., ~.

, ~

~(~9~20 . .
MAT...ZER
- ~
EXAMPLES: 3~5 ~lAT A = ZER ~
3l~ ,lAT Z = ZER (N) d 3l5 MAT X = ZER (3~ ) . 32~ MAT R = ZER (N, P) ! GENERAL FORM:
- stat~me~t-number ~lAT ~3~ ZER

. ~ nt~ nu=ber MAT matrix variable -- ZER ~ expres_ on ) 1 ~c _ e~t number H~T matrix variable - ZER ( eXDrCsS;.On ~ ex_r sslon ).

I PURPOSE

Sets all elements of the specified matrix . equal to ~; a new working size may be established.

i i COMMENTS

The new working size in a MAT...ZER is an implicit DIM statement, and may not exceed the limit set by the DIM statement on the total number of elements in an array.
Since ~ has a log;cal value of "false,"
MAT...ZER is useful in logical initialization.

I

~ -150-.- --- . . I

1~99~20 MAT...CON

EXAMPLES: 205 MAT C = CON
210 MAT A = CON (N,N) 22~ MAT Z = CON (5,20) 23~ MAT Y = CON (5~) GENERAL FORM:
statem~nt number MAT matrix variable = CON
_ _ statement number MAT matrix variable ~ CON ( exp~ession ) stat6ment number MAT matrix varia~Je = CON ( expression , e.Yp~ssion ) . ~

PURPOSE

- Sets up a matrix with all elements equal to l;
a new working s;ze may be specified, wl~hin the limits of the original DIM statem_nt on the total - number of elements.

COMMENTS

The new working size (an implicit DIM statement) may be omitted as in example statement 205.

Note that since 1 has a logical value of "true,"
the MAT...CON statement is useful for logical initialization.
!

The expressions in new size specifications should evaluate to integers. Non-integers are rounded to the nearest integer value.

}

~99~20 PRIN~I~IG SINGLE ~ TF~I~ ELEMEN~S
., EXAMPLES: 8~0 PRINT A(3) 81~ PRI~,T A(3,3);
820 PRI~,T F(X);E; CS;R(N) 830 PRINT G(X,Y) 840 PRINT Z(X,Yj, Z(1,5), Z(X~N), Z(Y~I) GENERAL FORM:
statemeFt number PRINT matrix variable ( expression ) ...

,, statement nu~ ~ PR:NI =~-I- r~ e~ ~D ~ ~i-n ., PURPOSE
, ~ Causes the specified matrix element(s) to be printed.

, COMMENTS

Expressions used as subscripts should evaluate to integers. Non-integers are rounded to the nearest ;nteger value.
, A trailing semicolon packs output into twelve elements per teleprinter line, if possible (statement 810 above). A trailing comma or return prints five elements per line.
Expressions (or subscripts) following the matrix variable designate the row and column of the matrix element. Do not confuse these with new working size specifications, such as those following a MAT -~
IDN statement.

1~99~i20 ~NPUT rl~`lG SEI`-'~;LE ~7ATKI,~ E~E~ lTS
! . ~=~522-~-~=~2~ .~a=====n~cz~SJ--~
EXAMPLES: 6~0 INPUT A~5) 61~ INPUT B(S,S) 62~ INPUT R~X) "N, A(3,3),S,T
63~ INPUT Z(X,Y), P3, '~
. 640 INPUT Z(X,Y), Z(X-l, Y+l), 7tY~R3, Y+~2) GENERAL FORM:
sta t,~,m,en,t n umber ,¦NPU~ rlx_~riah~,e ~ ,,e,~rr~Qa ) .

~nent_number IN UT ~ Y. ~,ar~kl,e, ( e~p ~5 ion ,~ ~xpl~,s~ior~

PURPOSE

Allows input of a specified matrix element f . from the ~eybo~rd.
.('- .

COM~ENTS

The subs ripts (in expre sions) used aft~r the matrix .variable designate the ro~Y and column of the matrix element. Do not confuse these expressions with work-ing size specifications, such as those following a MAT READ statement.
Expression used as subscripts shou1d evaluate to integers. Non-integers are rounded to the nearest integer value.

Inputting, printing, and reading indii~idual array , elements are logically equivalent to s;mple vari- ~ -ables and may be intermixed in INPUT, PRINT, and READ statements.

~99~20 ~gAT P~INT

EXAMPLES: S,~)~l tlAT PRINT A
505 llAT PRI~IT A;
515 MAT PRIt`lr A,B,C
520 ~IAT PRIt`lr A~B~C;
GENERAL FORM:
stat~3ne.~t number MAT PRINT matrix variab].e L = NT matrix variable, matrix variable ...

PURPOSE

Causes an entire matrix to be printed, row by row, with double spacing between rows.

COMMENTS

Matrices may be printed in "packed"
~ rows up to 12 elements wide by us-ing the ";" separator, as ;n example state~ent 5~5.

~99~20 READING ~.'"'~TRI~ ELEMENTC

EXAMPLES: S~ READ A(6) 910 READ A(9,9) 920 READ C(X); Pi R7 93~ READ C(X,Y) 94~ READ Z(X,Y), P~R2, S5), X(4) i GENERAL FORM:
~ta,tem~nt n~n~er READ matrix,variable ( ~xpression ) statement n~nber READ matrix variable ( eXDreSSiOn ~ ex~ression ) . ~
PURPOSE

Causes the specified matrix element to be read from the current DATA statem2nt.

.-~i , .i j COMMENTS
~, .
Expressions (used as subscripts) should evaluate to integers. Non-integers are rounded to the nearest integer.

Expressions following the matrix variable designate the row and column of the matrix element. Do not confuse these with working size specifications, such as those following MAT READ statement.

The MAT READ statement is used to read an entire matrix from DATA stateme;lts. See details in this sectior..

.

~. .

l~9~Z~

M~T RE.~ D

EXAMPLES: 350 ~T READ A
370 MAT READ B(5`,C,D ~ , 3~ MAT READ Z (5,8) ~ !
39~ MAT READ ll (P3,Q~) GENERAL FORM: ~
. statement nuD~ber MAT RE~D matrix variabl~ irl ..~ _ ... ..

statem~nt numb~er MAT READ matrix variable ( expr~ssion ) . .
or I statement number MAT READ matrix variab ( xpress~on ~ ~Ypression ) pURPOSE ¦~

- Reads an entire matrix from DATA statements.
A new working size may be specif;ed, within the limits of the original DIM statement.
. 1 ~
COMMENTS

MAT READ causes the entire matrix to be filled from the current DATA statement in the row, column order: 1,1; 1,2; 1,3; etc. In this case, the DIM statement controls the number of elenents read.

,~

.

.... ~ ~ - .

1~9~20 M AT ~ 5 ~1 C) ~I

EXAMPLES: 3l~ MAT C = B + A
32~ MAT X = X + Y
33~ ~T P = I~ + ll GENERAL FORM:
., stat:em~nt ~lum2~er MAT matrix variable - matrix_riable ~ m ix variable ~, '~ 7.;Fr~ ., PURDQSE

Establishes a malrix equal to the sum of two matrices of identical dimensions; addition is performed element-by-element.

.~' . I
COMMENTS

~ The resulting matrix must be previously - mentioned in a DIM statement if it has more than lO elements, or lO x lO ele-, ments if two-dimensional. Dimensions must be the same as the operand matrices.
.
i The same matrix may appear on both sides i of the = sign, as in example statement 320.
. ' .

~,, , ' . ' _,1 ,~, . ~ ., I -157_ ' ' '' ~ ~, ~ , ' 1~99~20 ' ~ATRI,~ SlJ3 I F~Sr I~IG~' EXAMPLES: 550 MAT C a h - B
560 ~IAl B = B - Z
,~ 570 ~lAT X = X - A
i GENERAL FORM:
~ 7: A~ MAT mat~i_ariable - matri.Y- va_i-b1.e - matriY variable ~, ' PURPOSE

Establishes a matrix equal to the difference of two matrices o~ identical dimellsicns; sub-traction is pe P.ormed element-by-element.

' CO~U~ENTS

The resulting matriY~ must be previously mentioned in a DIM state~ent if it h~s more than lO elements, or lO x lO elements ir two-dimensional. Its dimension must be the same as the operand matrices.

The same matrix may appear on both sides of the = sign, as in exampl~ statemPnt 560.

.--158-.

.

~99uzo r~h~ IUL~IPL~CATION

EXAMPLES: 93~ MAT Z = B * C _ .
94~ MAT X = A *A
. 950 MAT C = Z ~ B
GENERAL FORM:
statenent number MAT matrix variable = matrix variable * matrix variable L = ~

PURPOSE

Establishes a matrix equal to the product of the two specified matrices.

Follo~ing the rules of matrix multiplication, if the dimensions of matrix B = ~P,N) and ma-tr;x C = (N,Q), multiplying matrix B by matrix C results in a matrix of dimensions ~P,Q).

Note that the product matrix must have an appropriate working size.

The same matrix variable may not appear on both sldes of the = slgn.

.1 . 1:
.

I
. . .
. .:

~99C320 S C ~ R ~ ` Tl P L I C J~

EXAMPLES: 110 MAT A = (5) * B
115 MAT C = (1~) * C
12~ ~1AT C - (N/3) * X
13~ MAT P = (Q7*N5) *
GENERAL FORM:
statement number MAT matrix variable = ( expression ) * matrix variable __ ____ _ :

PURPOSE
Establishes a matrix equal to the pro-duct of a matrix multiplied by a speci-fied expression (number); that is, each element of the original matrix is multi-plied by the number.
., . I
COMMENTS f The resulting matrix must be previously mentioned in a DIM statement if it con- ¦
tains more than 10 elements ( 10 x 10 if two-dimensional). I ~ -' The same matrix variable may appear on both sides of the = sign.

Both matrices must have the same working size.
.
I

. .

~99~zu CO~YING A M~TRIX

EXAMPLES:405 ilAT B = A
4l0 MAT X = Y
. 420 ilAT Z = B
I GENERAL FORM:
statemcnt number MAT matrix variabl~: ~ m~tr~x variable I

.
I PURPOSE

Copies a specified matrix into a matrix of the same dimensions;
copying is performed elemPnt-by-1 element.

s , COMMENTS

j . The resulting matrix must be previously mentioned in a DIM statement if it has . more than lO elements, or lO x lO if two-dimensional. It must have the same di-- mensions as the copied matrix.

r I

..

:
.

~9903 I I~ Y~ Y M A T i~

EXA~IPLES: 205 MAT A - IC~I
210 ~T B = IDI`~ (3,3) -215 t~'~T Z = IDII (Q5. Q5) 220 MAT S = IDN (6, 6) GENERAL FORM:
statement number MAT arrau variable ~ IDN

statement number MAT array variable = IDN ( ex~rcssio~ , e~ ression ) .

PURPOSE

i Establishes an identity matrix (all 0's, with a diagonal from left to right of all l's); a new working size may be specified. ¦ .
1 ~.
- ¢~
I COMMENTS
,, . 1~' ., The IDN matr;x must be two-d;mensional and square. l ~:

Specifying a new working size has the effect of a DIM statement.

Sample identity matrix: 1 0 0 0 1 0 .

.

.

., `' '~
, .

.
. .

~W9~2U

~;~ A -r ~ T P~ t~ S P O S 5 T 1 0 5'~ -EXAMPLES: 959 MAT Z = TRN (A) 969 MAT X = TRN (B) c79 ~ T Z = TRN (C ) GENERAL FORM:
= MAT matrix variahl e _ TRN ( matrix va.riable ~ .S ~ 5~r~S

PURPOSE

Establishes a matrix as th~ transposition of a specified matrix (transposes ro~s and columns).
i.

~ . COMMENTS
!
Sample transposition:

Original Transposed ~ 1 2 3 1 4 7 Note that the dimensions of the resulting matrix must be the reverse of the original matrix. For ,. instance, if A has dimensions of 6,5 and MAT C =
TRN (A), C must have dimensions of 5,6.

Matrices cannot be transposed or inverted into themselves.

.

~ ~ .

1Q99~20 l? 5 ~' ~ r`' `~ ? S l ~) EXAMPLES: 38~ ~T A = INV(B) _ 39~ MAT C = INV(A) 400 ~lAT Z = INV(Z) GENERAL FORM:
statement nurn~er MAT ma~rix varic~ble - INV ( matrix variable ) ; . ~ IJ
PURPOSE
.
Establishes a square matrix as the inverse of the specified square matrix of the same dimensions.

~ , i CO~MENTS
~i, The inverse is the matrix by which you multiply the original matrix to obtain an identity matrix.
For example, Ori~inal Inverse Indentity fi o o\ ~1 o o~ ~1 o o~
1 1 0 X I 1 1 o~ = 0.1 0~' 1 1 1~ ~0-1 1/ ~0 0 1/

Number representation in BASIC is accurate to 6-7 decimal digitsi matrix elements are rounded accordingly.
, , .
. _ .

99~20 - . S E C ~ 1 0 ~
L05~C~L ~P~ .TIOI`~S

LOGICAL VALUES AND NUMERIC VALU~:S
A distinction shou1d be made between logical values and the numeric values produced by logical evaluation, when using the logical capability of BASIC.

- The lo~ical value of an expression is determined by defi-nitions established in the user's program. -.
The numeric values produced by logical evaluation are as-signed by BASIC. The user may not assign these values.

Logical value is the value of an expression or statement, using the criteria:
( any nonzero expression value = "true"
any expression value of zero = "false"

When an expression or statement is logically evaluated, it is assigned one of two numeric values, either:
l, meaning the expression or statement is "true", or 0, mean;ng the express;on or stetem~nt ;s "false".

-l65_ ~W9~20 R ELA T 101`3,~L OP~ ATOF~ S

There are two ways to use thei relational operators in logical evalua-tions: ' 1. As a simple check on the numeric value of an expression.

EXAMPLES: 150 IF B=7 THEN 600 2~ IF A9i;i27.65 THEr`l 700 L, ~0 THEN 800 .
~ ""=~, .,j.. ~ , 'I . .
When a statement is evaluated, if the "IF" cond;t;on is currently , true (for example, B = 7 in statement 150), then control is trans-j ferred to the specified statement; ;f ;t is not true, control passes ! to the next statement in the program.
1 - .
Note that the numer;c value produced by the log;cal evaluat;on ;s un- ¦
¦ important when the relat;onal operators are used ;n this way. The user is concerned only with the presence or absence of the cond;tcn ~, indicated in the IF statement.

.

. .
`.
,~. ;

, .

_" ~g~20 ~ I

RELATlO~I,r~L OP~ TORS, CO~`rll! UFD
!

2. As a check on the numeric value produced by logically _ evaluating an,expression, that is: "true" = 1, "false" = 0.

EXAMPLES: 610 LET X=27 615 PRINT X=27 62~ PRINT X~27 630 PRINT X>=27 The example PRINT statements give the numeric values produced by logi-cal evaluation. For instance, statement 615 is ir.terprete~ by BASIC
as "Print 1 if X equals 27, 0 if X does not equal 27." There are only two logical alternatives; 1 is used to represent "true," and 0 "false."

The numeric value of the logical evaluation is dependent on, but dis-tinct from, the value of the expression. In the example above, X equals 27, but the numeric value of the logical expression X=27 is 1 since it descrlbes a "true" condition.

;.

. 6 -99~20 , . . .

.
BO O L ~ l O P E RATO ~ S
.
.j There are two ~lays to use the Boolean Operators.
1. As logical checks on the value of an expression or expressions.

EXAMPLES: 51~ IF Al OR B THEN 670 530 lF NOT C9 THEN 690 ~ 540 IF X THEN 7~0 i Statement 510 is interpreted: "If either Al is true (has a non-zero value) or B is true (has a non-zero value), then transfer control to statement 670 Similarly, statement 540 is interpreted: "If X is true (has a non-zero value), then transfer control to sta~ement 700."

The Boolean operators evaluate expressions for their logical values only: these are "true" = any non-zero value, "false" = zero. For example, if B3 = 9 and C9 = -5, statement 520 would evaluate to "true," since both B3 and C9 have a non-- zero value.

2. As a check on the numeric value produced by logically evaluating an expres-sion, ihat is: "true" = 1, "fa1se" = 0.
.~_. ., EXAMPLES: 490 LET B = C = 7 50~ PRINT B AND C

Statenlents 5~0 - 520 return a numeric value of either 1, indicating that the statement has a logical value of "true", or 0, indicating a logical value of "false".
Note that the criteria for determining the logical values are:
true = any non-zero expression value false = an expression value of 0.
The numeric value 1 or 0 is assigned accordingly. . J
.
.

.. .

~ ~ 1 f 99~20 ` -SEC ï l~
SYl`~T,r~`J~ R~QUIREIV ENTS O,r E~AS5C

.
LEGEND

, ::= "is defined as... "
¦ "or"
> enclose an element of BASIC
i .
.- . .

` LANGUAGE RULES

3 l. The ~com statement~, if any exists, must be the first statement I presented and have the lowest sequence number; the last state- '~
I ment must be an ~END statement>.

I 2. A sequence number may not exceed 9999 and must be non-zero.
3. Exponent integers may not have more than t~o digits.

4. A formal bound may not exceed 255 and must be non-zero.

5. A subroutine number must lie between l and ~3, inclusive.

6. Strings mey not contain the quote character (").

7. A ~bound part~ for an IDN must be doubly subscripted.

8. An array may nct be inverted or transposed into itself.

9. An array may not be replaced by itself multiplied by another array.

.

i " .

- ~-~9~zo ``

S Y N T~ E Q U I 1~ J T S
<basic program> ~ program statement>¦<basic program~<program statement>(1 ) <progrdm statenent> ::= ~sequence number>~basic statement>carriage return ~sequence number> : := <integer>
~basic statement> ::= ~let statement>¦~dim statement>¦~com statement>¦
~def statement>l~rem statement>l~go to statement>¦
~if statement~l~for statement>l~next statement>l :
~gosub statement>¦~return statement~l~end statement>¦
~stop statement> cwait statement~ ~cal 1 statement>l <data statement~ <read statement> ~restore st~tement~¦
~i n put s tatemen t: I ~pri nt s tatemen :> 1 ~mat s tatemen t>
~let statemenb ~ let head>~formula>
~let head~ ::= LET~variable>=l~let head>~variable>= `
~formula> : := ~con junction>¦ ~formul a>OR~conjunction>
<conjunction> ::= ~boolean primary>¦~conjunction>AllD~boolean primary>
<boolean primary> ::= <arithmetic expression>¦~boolean primary>
~relational operator>~arithmetic expression>
~arithmetic expression> ::= ~term>¦~arithmetic expression> + ~term>
~arithmetic expression> - ~term>
cterm> ~ factor>l ~term>*~factor>l ~term>/<factor>
~factor> ~ primary>¦~sign>~primary>¦NOT<primary>
cprjmary> : := <operand> ¦ <primary>~<operand> . .
~relational operator> : := >1 ~ =1=1 #1 <~
<operand> ~ variabl e> l ~uns i gned number> j ~sys tem func tio n> <function> I ~formul a operand>
<variahle> ::= csimple variable>l~subscripted variable>
<s impl e Vâ ria bl e> :: = <1 ette r~ ¦ ~1 ette r~ <di gi b <subscripted variable> ::= ~array identifier>~subscript head>~subscript> .
<right brackeb ~array identifier> : := ~letter>
~subscript head> ::= ~left brackebl<left bracket>~subscript>
csubscript> ::= ~formula>
<letter> ::= A¦B¦C¦D¦E¦ F¦G¦H¦ I¦JIKlLlMlNlOlPlQlRlSlTlUlVl~IlXlYlZ
<digit> ::= o¦l ¦2¦3¦4¦5¦6¦7¦8¦9 <1 eft bracket> : := ( I t . , <right bracket> ::= )l]
<sisn> = +1-<ullsigned number> : := <decimal part>¦ ~decimal part>~exponent~ ¦

. ., ~.

W9~20 -`
i I

SY~!Tr~ REQul~r~r~lFN I S, CONIII'JU~:D

<decimal part~ ::= <integer>¦<integer~,.<integer>¦.<integer~
<integer> ::= ~digit>¦<integer>~digit>
<exponent< ::= E<integer>¦E~sign><integer>~3) <system function> ::= <system function name>cparameterpart>
<system function name> ::= SIN¦COS¦TAN¦ATN¦EXP¦LOG¦ABS¦SQR¦INT¦RND¦SGN
; <parameter part> ::= <left bracket><actual parameter><right bracket>
<actual parameter> ::= <formula>
<function> ::= FN<letter>~parameter part>
<formula operan~> ::= <left bracket><formula><right bracket>
<dim statement> ::= DIM<formal array list>
~formal array list> ::= ~formal array>l<formal array list>,<formal array> .
~formal array> ::= <array identifier><formal bound head><formal bound>
<right bracket>
<formal bound head> ::= <left bracket>l~left bracket><formal bound>, <formal bound> ::= <integer> (4) ~com statemPnt> ::= COM~formal array list>
.. - <def statement> ::= DEF FN<letter>~left bracket>~formal parameter>
<right bracket>=<formula>
<formal parameter> ::= ~simple variable>
<rem statement> ::= REM~character string>
~character string> ::= any teletype character except carriage return, alt moa'e, escape, ruboutl or line feed, or null, control B, control C, left arrow <goto statement> ::= GO TO<sequence number>
<if statement> ::= IF<formula>THEN<sequence number>
~for statement> ::= <for head>¦~for head>STEP~step size>
~for head> ::= FOR<for variable>=~initial value>TO~limit value~
<for variable> ::= <simple variable> .
<initial value> ::= <formula> .
<limit value> ::= <formula>
<step size> ::= <formula>
<next statement~ ::= NEXT<for variable~ ¦
~gosub statement ::= GOSUB<sequence number>
<return statement> ::= RETURN
<end statement> ::= END
<stop statement> ::= STOP
-. .... . . . _.. , .. ~ , 1~a99 SYNTÇ~X ~QUI~ E~`lTS, GONTINUED

. .
, '"'.
~ait statemen b ~ IAIT~parameter part>
<call statement> ::= CAL~<call head~<right bracket>
~call head~ left bracket><subroutine number>¦~call head>, ~actual parameter>
~subroutine number~ inte9er~(5) <data statement> ::= DATA~constant~¦<data statement>,~constant>
~constant> ::- <unsigned number~¦<sign><unsigned number>
<re3d statement> ::= READ<variable list>
I <variable list> .::= ~variable>¦~variable list>, ~variable> .
<restore statemellt~ ::= RESTORE
<input statement> ::= INPUT~variable list> -~print statement> ::= ~print head>¦~print head>~print formula>
~ ~print head> ::= PRINT¦~print head>~print part>
~print part> ~ string>¦~string>~delimiter>¦~print formula>
cdelimiter>l~print formula>cstring>¦
~print formula>~string>~delimiter>
<string> ::= "~character string>"(6) <delimiter> ::= ,¦;
<print formula> ::= <formula>¦TAB~parameter part>
! . ~mat statement> ::= MAT<mat body>
<mat body> ::= cmat read>l<mat print>¦~mat replacement>
<mat rea~> ::= READ<actual array>l<mat read>, <actual array>
~actual array> ::= <array identifier>¦<array identifier><bound part> ¦
<bound part> ::= <actual bound head><actual bound><right bracket>
<actual bound head> ::= <left bracket>l<left bracket><actual bound>, ; ~actual bound> ::= <formula>
<mat print> ::= PRINT<mat print part>¦PRINT<mat print part><delimiter>
I - <mat print part> ::= <array identifier>¦~mat pr;nt part>~delimiter>
<array identifier>
<mat replacement~ ::= <array identifier>=<mat formula>
<mat formula> ::= <array identifier>¦<mat function>¦<array identifier>
<mat operator><array identifier>l<formula operand>*
<array identifier>

- . I
.

, , : :

99~i2U

S Y N ~ ~ 3'. F~ ~ Q ~ ~, C ~ N rl N U E D

<mat function~ mat initidlization>¦~mat initialization~bound part~
INV~array parameter>¦tRN~array parameter>
<mat initialization> ::= ZER¦CON¦IDN(7) <array parameter> ::= <left bracket>~array identifier><right bracket>(8) ~mat operator> ::~ +~

., . I

.

~ .

i I

~ .
-173- .

STRIl`~'GS ~LUG-I~ r.E.~D-O.~'L~-:;'.r.`;O?~ DUL~
The strings plug-ili read-on].y memG~ oduI~ makes ~ailable to tlle user all of the string ~a~ia'~les ~`unctions ard operations associate~ with stand~rd B.~IC pro~rammi~.6 language. Two additioIlal functions not usu~lly provided in ~ost versions of BASIC language have ~een imple~nented.
These include a POS function for determi~ the position of a substring wit~in a string and a `~AL function for deter-mining the position of a substring ~vithin a string and a VAL function for determining the numeric value of a string.
A discussion of these and other string functions and op-erations follows.

String A set of 1 to 255 characters or the null string (no characters).
e.g. "ABCDEF"
- "12345"
" . .
String ~ariable .
A variable used to store strings; consists of a single letter (A to Z) followed by a $.
e.g. A~; B$; Z$
Substring Yariable A single character or a set of contiguous characters from within a string variable. The substring is defined by a subscripted string variable. A single subscript specifies the first character of the substring and implies that all characters lollowing are part of the substring. Two subscripts specify the first and las~ characters o~ the substring.
e.g. A$ ~ "ABCDEF"
A$(4) - DE~
A$(1,3) - ABC .
DI~ State~ent ... .. .. _ General Form:
stmt ~ DI~I strin~ var ( ~ ars in strin~ ?
Purpose:
Reserves storage space for strings longer than 1 charactcr.
____ -174_~
; .. .

~99~

Co~ments:
The nuDIber oE characters specilie~ for a string in its nI!' statemel~t ~nust bc expr~ssed 2S an inte~er ~orm 1 to 255 Strin~s not mentioned in a Dl~l statemc-nt are assumed to have length 1. The len~th mentioned in thc DI~I statement specifies the maximum number of characters which may be assigned 3nd is known as the pllysical length. The actual lengtl is the actual num~er of characters which has been assignedO
e.g. DIM A$(10), B(5,5), B$(255) Source String Semantic Description A source string is an entity from which a string value is extracted. If no substring designator is specifled for a string variable, the value of the source string is the entire logical string currently assigned to it. Substring designator expressions must be at least 1 n value and the second may be no smaller than one less than the first. If one subscript is given, the value is the entire logical string beginning at the character specified by the subscript. The subscript may be no larger than the actual lengt~ of the string plus 1. If two substring expressicns are given, the source string value is t~le substring whose f-rst and last characters are designzted. If the specified substring extends beyond the logical length of the string, spaces are used to fill out the substring.
Assignment Statement General Form:
line # ~LET~ destination_string = source string Destir.ation String:
A dectination string is an e~tire string ~ariable or part of a string variable into wllich a source string is tO be copied. The definition of the action depends on the llumber of substring subscripts specified in the destination string.
If no subscript qualifier is specified, the entire destination variable is replaced by tl~e source string lhe physical length of the destination string must be large enough to accommodate the entire source string~ `
If one substring subscript is specified, the entire value of the destination variable, beginning at the designated charæcter, is replaced by the source string That part of the destination variable preceding the subscript value is unchanged.
The subscript value must be no more than one greater than the actual length o~ the destination variable.
If two subscripts are specified, the first substring subscript must be no more than one greater than the logical len~th of tho destination vari2ble, and the second subscript 5_ .

, . . .

~L~99¢;~ZO

must be llo greater than th~ physical lengtll o tlle destination variable. The spccified section oI the destinatioll s-tring is replaced by the source string. If the source string is longer than the destination, it is truncat~Sd on the ri~ht. If the source string is shorter, as many irailillg blai.ks are appended as necessary. 'rhe new actual length cf the destination string is the larger of the old actual length and tlle second subscript.
String Input StaLemellt General ~orm: ' ' stmt # INPUT string or substring vzriable __ Purpose:
Allows string values to be entered ~rom the keyboard.
Comntents: ' Numeric variables may be used in the s~te input statement as string variables, Placing a single string variable in an input statement allows the string value to be entered without en-closing it in quotation marks. If multiple string variables are u~ed ~ach string vallle m~lST, he ~n~,losct'3 in ~llotation mar~, an~
the values separated by commas.
e.g. 10 INPUT A$, B$, C, Al, A~(1,5) String Print Statement .
General Form-' stmt # PRINT string or substring variable, --. _ . . _ ~
Purpose:
'Causes the current value of the specified string or substring variable to be output on the st~ndard output device.
Comtnents:
Strings and numeric values may be mixed in a print statement.
String variables are specified identicall~ to numeric variables.
They are printed under the same format rules as quote fields '' String and substring v~riables are printed as source strings A maximum o~ 72 characters can be printed using the print statement, i.e,., all strings ~72 ch.lractors are truncated at 72 ch;lractels.

.. .. .
-176-;

~ ~ .

~L~99~2~ ;

Strin~ Read St~tement r~ .
General Form-stmt # READ string or substring variable Purpose:
Causes the value of a spsciIied ~tring or substring variable to be read from a ~ata statement.
Comments:
Mixed string and numeric values may be read. If the wrong data type is given in the data statement an error is given.
e.g. lO RFAD ~, B$(1,10), C$, B
String If Statement General Form:
stmt ~ IF str.var. rel.oper, string THEN stmt Purpose:
- Compares two strings. If the specified condition is true, control is transferred to the specified statement.
Comments:
Strings are compared one character at a time, from le~t to right; the iirst di~ference determines the relatio~. If one string ends before a difference is found, the shortest string is considered the smaller one.
Characters are compared by their ASCII representations.
The relational operators allowed are~ <, >, <~, >~, O
e.g. 10 IF A$ ~ "SAM" THEN 2 String Data Statement General Form:
stmt ~ DATA "string text", ''string text", --. ~ ., .

.

--177--i ~,~
.. - - ;
. , . .
.
- ~ ~ ` , . .

~(~99~i20 Purpose:
Specifies data in a program (string or/and numeric) Comments:
String values must be enclosed by quotation marks and separated by commas.
String and numeric val~les may be mixed in a single data statement.
e.g. 10 DATA "ABC", 1.2, "DEF"
String Write Statement General Form:
stmt # ~ITE ( device # , format stat # ) _ _ _ . _ _ _ _ _ string or substring variable Purpose:
Similar to the print statament but allows the s~ecif L-cation of the output device and format statement. No field specification are made for string variables in the-format statement. Tlley are treated identically to string const~nts (quote fields).
String Display Statement General Form:
stmt # DISP string or substring variable .... . _ _ Purpose:
Identical to print statement except output device is 32 character display, LEN Fur.ction ~eneral Form:
LEN string or LEN (string) Purpose:
Obtain the Ien~th of a string for use in an arithmetic expression.

;_178-.

1~99~20 Comment:
The actual length is found ~Yhich is not necessarily the same as the physical length reserved in the DI~I statcment.
e.g. L~N ("A~CD") -POS Function General Form:
POS strlng , strin~ or POS t string , string ) Purpose:
Determine the poSition of a substring within a string.
Comments:
If the second string argument is a part of the first,the value of the function is the position in the first string at which the second string starts. If the second string in the argument is not a part of the first, the value of the func-tion is zero.
- e.g. POS ~"ABCDt' , "C") = 3 YAL Function General Form:
VAL string or VAL ( string ) Purpose:
Determine the numeric value of a string.
Comments:
The VAL function converts a string of digits into a number. The string is converted into a number by the same rules used in a numeric input statement.
e,g, VAL ("123") = 123 ' ,_179_l t-9~20 'X~;~^~(iE~S 1~01- S'.l ~IN(; OI'~'JO;~ Bl.O(~

, , 70 - stri~ ` e~lror 71 - s1;rinL~ lu~lctioll s~ nt:-x e.l.ro 72 - ne~ativc strill~ le~llgtll 73 - non-conl;i.~tlous strin~ .
74 - strin~ ovcl flow 75 - data is o~ wron~ t~tpe 76 - Y -L f nctio r ume-t no' ~umerlc "

' I, ' "

1.

~99~ZV

.

~NJ. ISY~ ]~ i(`l.Il'TION

<litcl.ll .st~ > ::-"<(~ ct~1 .st~ >"
<charact:cr ~tri~ > ::=<cl~l1r.lctcr>¦<(l1.lractcl~ strin">
<clla.t acter~
<charactcr> ::= an~ A5CII cl1araeter cxccpt NUI.L, LIN~ FE~D, r~I,TUI~N
~ <letter~ ::= A ¦E3 ¦ . . . X ~
<sublist:> =<expression>¦<exprcssioL1>,<expression>
I <string vari.ahlc> ::=<simple s-trin~ varia~le>¦
<sir,lple string variablc>(<sublist>) <simple string variable> ::=<letter>$
<relational operat;or> : =~ 1< > 1>- 1>
<assignment statement> ::-LET<destination stril~>=<source string>
- 1 <destination string>-<source st:ring>
<destination string> :-=<string variable>
<source string> ::=<string variable>¦<literal string~
<IF statcment> ::=IF<dcstination strin~><relational operator><source strin,~>IIIEN<line numl~er> - -~data statement> ::=DATA<constant>¦<data statement>, <constant>
<constant> ::=<numeric constant>¦<literal strin~>
<read statement> ::=READ~variable list>
<variable list> ::<read variable>¦<variable list>, <read variable> ¦
<rcad variable> ::=<numeri.e variable>¦<stri.n~ varia1)l~
<input statcment> ::-INPU'~<varial)le list>
<print state1~c:1t> ::=~print l>¦~pri1lt ~>
<J)1 illt ~> } I~ 3 t I ~.

~99~2 <print ~> :: <pl'.i~lt ~ pl`illt CXpl'l'SSiOIl> ¦
<print 3>
<print 3> : :--(t~pe st:atcmcl-t><litcl al strin~ >
<print expressiol~> :=<expres~;ioll> ¦<source string~ I
; . WRITE and DISl~ statemellts ll~ve the s~me s~nt~x ~s tllc Pl.INT
statemellt .
, <LEN function> ~ L~N<source st.ring~ ¦LI~A~(<SOUrCe Strill~>) 1~ <VAL function> ::=V~L<sourcc string> ¦VAL(<SOUrCe string>) <POS functioll> ::=P~S~source string> <solrce string>l pos ~sour stri ~>~ <so Irce strin~>) --182-- .

~(~99~20 EXTENDED INPUT/OUTPUT PLUG- IN READ-ONL~ hlEMORY MODULE
The extended I/O read-only memory module (hereinafter referred to as the extended I/O ROM) provides additional functions and statements so that the calculator can be made compatible with a wide variety of peripheral devices. Added functions include decimal-to-binary and octal-to-decimal conversion, status code inquiry i'or peripheral devices, control of spacing and line feeds in output records, and others, Use of these functions requires no special programming techniques; once the ROM is plugged in, its functions and statements become a part of the calculator, I
in the same way as, for example, the square root function is part of the calculator.
Some read-only memory units decrease thè amount o~ i, programmable memory available to the user by automatically requiring a portion of that memory for their own internal usage, but the extended I/O ROM has no such requirement and does not afféct memory availability.
The following table describes the extended I/O ROM
functions and statements. Parameters shown underlined in the table are explained immediately following the table.
Parameters shown in brackets may or may not be included as parte o~ a statement I .

1.
,~

-FUNCTION MNEMONIC DESCRIPTION OF FUNCTION SYNTAX
~ . . . ~
BIN Converts decimal expression to its binary BIN exp equivalent. For use in output-to-binary storage device; also provides increased control of print format ~ . . . _ OCT Converts octal expression to decimal OCT exp equivalent, For use in construction of code conversion tables; see "Conversion Tables"
. ._ STAT Returns code of operational status (on, STAT select code off, wait, etc.) for the devlce specified by the select code ., ,, . .
CHAR Returns one byte of data from the device CHAR select code l specified by the select code regardless i of the data structure.
_. ___ . _ ___ _ __ . _ _ ____ _ , LIN Advances printer or typewriter the number LIN exp of lines re esented b the expression.
, pr __ y ~ _ _ 3 SPA Advances printer or typewriter carriage SPA exp the number of spaces represented by the expression.
.. .. _ ............................... . . I
ROT Converts expression l to binary equiva- ROT(exp l,exp 2) lent; performs rotation right the number of positions represented by expression 2; returns decimal equivalent. For use in special input or output code trans-lation 1 , INOR Combines binary equivalents of expres- ` INOR(exp l,exp 2) sion 1 and expression 2 in an "inclusive or" logic operation. Returns decimal equivalent. For use in special input or output code translation.

~;, .
'; : ' ``` ` i ~99C~Z~ `

FUNCTION b~EMONIC;DESCRIPTION OF FUNCTION ¦SYNTAX
. . _. .
BIAND Combines binary equivalents of expression BIAND(exp 1, exp 2) 1 and expression 2 in an "nnd" logic operation. Returns decimal equivalent.
; For use in special input or output trans-i lation ~ .... . .
STATEb~NT SYNTAX ¦ DESCRIPTION OF STATEblENT
ENTER (select code or string name, format[,conversion table]) list L FOR function~
lnpllts data from named device or string with optional conversion to ASCII code; includes capability for iteration.
OUTPUT (~e~ect code or string name, format~, conversion table] ) list _ _ ~
Outputs data to named device or string with optional conversion to ASCII code.
I

- ~.

~ ~ -:- , .

- - - - !
f~9~20 ~ ~

PARA~ETER EXPLANATION
exp Expression select_code A numeric code, from 1 to 15, uniquely representing the input or output device, as follows:
select code 1-9 User assignable.
select code 10 Cassette Memory.
select code 11-13 reserved, select code 14 Plotter.
select code 15 Typewriter or Printer.
string name A single letter followed by a "$". ~alid only when String ROM is also plugged in.
format To reference a FORMAT statement, the line number of that statement is shown; for free-form data, an asterisk (*) ~ is shown.
L ~: conversion table The variable or array name given to a conversion table.
See heading "Conversion Tables".
; list A list of variables, literals, expressions or numerics , , ~;1` separated by commas.
.`
FOR functions To input multiple data items from one record into an array. Syntax as follows:
(FOR var l~exp TO exp, [(FOR var 2= exp TO ~,] name(var l~,var 2])[)] ) , . I

~, , !
.' I .
.

- ~ ~ - ; -.~ ~

ll~99~ZO

CONVERSION TABLES
Using a pre-established conversionrtable, a string of characters or an array of data can be converted fro~ one code to another. The calculator makes use of standard ASCII* codes.
Let us refer to all non-ASCII representation codes used by printers, card readers, paper tape readers, punches, type-writers, etc as "foreign codes."
A conversion table is defined in the BASIC language program DIM statement. Only single-dimensioned integer arrays are considered valid for use as conversion tables In the followlng DIM statements, A and B are valid array structures for conversion tables, but C, D, and E are not.
DIM AI (150), CI(20, 30) DIM BI ( 80), D(200), E(15, 15) In order to insert conversion table information in the array, the foreign code must first be known Suppose your paper tape reader uses EIA~* coded tape. The chart following shows symbols and the equivalent tape punches for EIA code, with the octal code equivalent for each symbol.

* American Standard Code for Information Interchange.
~ Electronic Industr1es AYsoolat10n ~tandard Code.

.

` ~9~z~

STANDARD TAPE .
CHANNEL NU.`18ERS EIA .
! _ _ _ _ _ SYNBOL OCTAL CODE
61~ 61s 4 @ 3 2 1 ~'~
_ O _ _ _ . ~ _ ~ __-C 14643 _ _ _ _ _ _ _ _ --E 165 _ 1~ _ . _ ~! - P 166 _ ~ _ _ _ _ g G _ 147 _ _ _ _ _ _ _ h ~ _ _ 150 _ _ _ _ _ ~ --I 1721 _ _ _ _ _ _ _ Ic --K 122 _ _ _ _ _ _ ~ _ 1 --L ~ 124 _ _ _ _ _ _ o n--N 105 _ _ _ . p - P 127 _ _ . _ _ _ r--R 130 _ _ . _ _ ~I - g 062 _ _ _ _ . _ ~I - U_ 63 _ _ _ _ . _ W - W ' 046 _ _ ~ _ . X_X__ 0!~7 _ _ . _ _ _ _ Y - Y _ 070 _ _ _ . _ _ z - Z 051 1__ _ _ _ _. . _ _ _ . _ _ 061 _ _ _ _ . _ _ _ STOP . 013 -_ _ ~ _ _ ~ ' '- 073_-- I ~, _ ~ ~ ~ _ ~ PUNCD ON ~
_ ~i~t ~ U"PER CASE 174 ' -- ~ ¦ ¦ ¦ TAE 076 .
~ CONTROL 016 _ ~ ~ P~NCII oPP 067 -- ~ - j - DA.~A SELECTDR(AUX.3) 037 I 1~ FORH ''EED (AUX. 4) 117 . ¦
- I l I I . I I ~ I . ___ , _ --1~ AC~ SPACE 062 - 1 1 1 1:! 1 1 _ ! -_ I ~ ADOP.EA5 IDEN.(AUX.8) ~ LOI~ER CASI: 172 ~ t-t~ = =
~ j TAPE PEED 177 ¦ 1 ¦ ~ t CAR. RET. ~00 J '~

.,,.,.,, :

~9~ 2~

The ~ollowing chart shows the ASCII symbols with their octal code equivalents.

Sym~l ¦ ~SCII E~uiYal~ ....... Syn~o~5cll E~U;~
_ ~ ) . ', . _ ,~ cod~

S 5~1 ~ A Ip2 ) ~552 G 112 J~S3 : L 113 _ 035 : M -1 lS
j 057 . 0 11 .2 p~2 . , R 121 ~, ~ ' U 125 . ~5 . V ~2~
. . ~ ~ W 12~
7 ,a~7 . X 13~

, _ _ _ _ 96~Z~ , The following charl; shows the information to be pro-grammed into the conversion t~ble.

~1 ~J~ ~ AhD~ r Cact~ ~ 1) 5 ~ crt~ v~
S;) O ~ ~ !., L~l O , ~q ~ t t . . !
o~ / y ~
.13 C ~?3 . /~,, g_. ..oY~...................... ? 1~...... J~',' !D , OY~ , .. ~ ... . ~5- ,, .,. ,/v ~ , , ._, .. . .~ ~L(o r , j_~

_ __ ~ o 3 !
673 _ G~ M ~ 5~ _;

----- - ~ I ~3 _~5z._~ .~ _ ~.QG~ !.7 ._~ 7_ /2Z _Z _~

~~, cy~ 2? ' , 31 ¦ c ,~ S 6~ ~ Z-- _ _ _ _ _ _ oa 2 __ a6.~ _~ 3 31~23 _ _ ~-6~ 6.
~ o "--~ _ o,~ o ' ' 2~ . ~6~--- -------- --_.-6,_ ~2~ 0~,. . X _ ~Z_ = f~o __ ...... _Z ... ~7... _ ,~G7 ..... _ .Y..... 7Q_.. __i3/....... ... .
/a, _._a.7.~ .... _ Z S7. __ ~3 _ 03~ ~7/ ,, ,_ __ , ! ~ !
~, . ._~ ..... ............ _._.... ... _..... : _ . ,_. _ , _ _, ___ _ , _ . ... !
.. . .... _ _ .. . . . _ _ _ . .. , _ .. _ . . _ . _ . . . _ , , _ .. _ _ _ _ . . , . ..... . . _ . . _ . i ~7~
. _ . . ... u 7~ . .. . . . ...... . . . . ..
Gs7~ . . . ... . ..
? C 7~ `
/c~
,? o~ Ci/2 -- . . . . . . .

;i J
. ~., .

~L~99~2C~
The conversion table portion of a BASIC program is shown on the chart below. Each statement defines one element in the conversion Table A with the use of the OCT function: the octal notation does not need to be translated to decimal. If decimal notation was supplied in the symbol tables, the OCT
function could have been omitted; however, it is common to obtain symbol tables in the octal form rather than in decimal form.

10 DIM AI[l 28]
20 A[OCT20]=OCT40 3,0 A[OCT73]=OCT54 40 A[OCT100]=OCT55 50 A[OCT153]=OCT56 60 A[OCT61]=OCT57 7~ A[OCT40]=OCT60 80 A[OCTl ]=OCT61 9~ A[OCT2]=62 1,O0 A[OCT23]=OCT63 110 A[OCT4]=OCT 64 120 A[OCT25]=OCT65 130 A[OCT26]=OCT66 140 A[OCT7]=OCT67 150 A[OCTl~]=OCT70 160 ArOCT31]=OCT71 170 A[OCT200]=OCT12 180 A[OCT141]=OCT101 190 A[OCT142]=OCT102 200 A[OCT163]=OCT103 210 A[OCT144]=OCT104 220 A[OCT165]=OCT105 23,0 A[OCT166]=OCT106 240 A[OCT147]=OCT107 250 A[OCT150]=OCT110 260 A[OCT171]=OCTlll 270 A[OCT121]=OCT112 280 A[OCT122]=OCT113 290 A[OCT103]=OCT114 300 A[OCT124]=OCT115 310 A[OCT105]=OCT116 320 A[OCT106]=OCT117 330 A[OCT127]=OCT120 34~ A[OCT13,~]=OCT121 350 A[OCTlll]=OCT122 360 A[OCT62]=OCT123 370 A[OCT43]=OCT124 38P A[OCT64]=OCT125 390 A[OCT45]=OCT126 400 A[OCT46]=OCT127 410 A[OCT67]=OCT130 420 A[OCT76]=OCT131 430 A[OCT51]=OCT132 _1 91 _ 99~i2~ ~

ENTER
When a CHAR request is keyed into the calculator for the paper tape reader, conversion is not done and the calculator will display the decimal equivalent of the EIA octal code for the symbol taken from the paper tape. In order to have automatic code conversion, the program must contain an ENTER statement.
410 ENTER (9, 420, A) B
B will be read and its ASCII equivalent found in the conversion table A. If data contained in a string is to be converted to ASCII code, the string name is used instead of the select code, and in this way conversion can be done internally as well as at time of input or output.

.~
OUTPUT
For output of data in a foreign code, automatic code conversion is invoked by use of the OUTPUT statement.
500 OUTPUT (8, 510, A) B
The ASCII B will be found in the conversion table A and changed to the foreign code equivalent before output. Notice that the same conversion table A is used for input and output. The ENTER
- 20 statement causes the calculator to look for ASCII code, (on the right of the equals (=) signs in the table), and assume that it is receiving foreign code; whereas the OUTPUT statement causes the calculator to assume it has AS~II code, and to look for the . ~.. , ~. .
foreign code (on the left of the equals (=) signs in the table) above.
ERROR CODES

. _ Program diagnostic or error conditions found in the Extended I/O ROM:

NUMBER EXPLANATION

ERROR 83 End of data reached or data contains more than ten (10) blanks in a row.

ERROR 84 Invalid format specification: format must be --~ free format (*), E format or F format.

~ . ;

996.~20 ~-ERROR 85 Numeric input syntax error: multiple decimal points, more than one E in E format, etc.
ERROR 86 Conversion table not found. Check for integer initialization in DIM statement.

, - -- :.

- 192a -.

- -: , - ~(99~2V ) TERMINAL PLUG-IN RE:~D~NLY I~IE~IORY MODULE
The terminal plug-in read-only memory module that is available with the calculator allows the user to enter, store, and edit free-text. It also allows the user to communicate, either directly or through an external modem, with another calculator, a computer or a time-sharing computer system.
The calculator may transmit or receive BASIC language programs or free-text.
To put the calculator into terminal mode, the user types in TERM and actuates the EXECUTE key. If he wants to use the calculator for data transmission, he can specify one or two optional parameters following the TERM mnemonic. The first parameter is the select code of the modem interface module. If another select code is not specified the calculator assumes select code four. The second parameter is the baud rate of the transmitted data. If not specified, tbe calculator will assume 110 baud which is the same rate as a standard ASR232 teletypewriter. For example, to transmit or receive on select code six at 300 baud, the user enters TERM, 6, 300 followed by actuation of the EXECUTE key. The selectable baud rate is continuous in integer increments from 3 to 300. The conversion of characters from parallel to serial format is done automatically within the calculator firmware, so the modem interface circuitry is simplified and no switches are required to change baud rate.
While the calculator is operating in the terminal mode, lines of text may be entered from the keyboard and terminated with the END-OF-LINE key. These lines must be preceded by a line number, but there is no syntax requirement for the remainder of the line. All of the line-by-line and ,. . .
. ~,..
. ,~": . .

2~
charRcter-by-character editin~ feat~lres of tl-e calculator are available in tl-is mode These include listin~, backspace, forward space, insert character, delete character, and display shi~t control. Automatic line numbering is also available. In addition, the tape cassette commands, the PTAPE command, the PRINT ALL command, and the LIST command operate normally. The LIST command syntax has been ex-panded to include LISTX, which means list without line numbers, as well as LIST#SC or LISTX#SC where SC is the select code of the modem interface, which means transmit the information through the modem to the remote system.
When the calculator is operating in the terminal mode, five of the user-definable keys take on special meaning.
Key f5 becomes a teletype shift key and f6 becomes a teletype - control key. These keys and the lower case shift key allow the user to generate any seven-bit ASCII code. To generate a teletype shift or control character, the user first actuatesl the f5 or f6 keys and then actuates the appropriate key on ~ ¦
the alpha section of the keyboard. For example, to generate ~ ¦l a ~'control C", the f6 key and the C key are actuated sequen-- tially. No character is entered into the display until after the chosen alpha key is hit. The character ent~red into the display may or may not be the same as the alpha character.
For instance a "shift O" generates the symbol ~ .
Key f8 is used in the terminal mode to select even or odd parity for transmitted characters. When the terminal mode is first entered, even parity is assumed. The user may then convert to odd parity by actuating key f8. The display will then indicate ODD. To revert back to even parity the user actuates key f8 again, and the display indicates EVEN.
.

99~2V

Key ~9 is used in the terminal mode as a t~ansmit key.
To trahsmit a messa,,e through the modem interface, the message is typed into the display from the keyboard, and then the line is terminated by hittin~ key f9. The calculator then serializes the characters entered, and transmits them at the selected baud rate. For example, to obtain a listing of a program from a remote time-sharing computer service, the user enters LIST f9. The transmit key may also be used to enter the responses in a sign-on procedure for a time-sharing service.
Key f7 is used to place the calculator into a mode for saving, in memory, an incoming program. For example, to receive and store a program from a time-sharing computer service, the user actuates key f7 followed by LIST f9. As the program is listed from the time-sharing service, the lines are stored in the calculator's user memory as free-text. If the f7 key is not actuated just prior to entering LIST f9, the program will be printed on the external line printer.
Once a program has been entered as free-text, either from a remote source or from the keyboard, and if it is a BASIC program, it may be checked for syntax errors and con-verted to BASIC program format in memory. This is done by typing COMP followed by actuation of the EXECUTE key Any syntax errors will be listed, and only the lines which have correct BASIC syntax will be translated. Incorrect lines will remain in free-text format. After a program has been trans-lated by the CO~SP command, it may be executed locally using any of the normal execution commands, i.e. RUN, CONT, etc.
An attempt to execute an untranslated line will cause an error message (ERROR 79) to be displayed.

~ ~99C~2~ ~

The receivlng section of tlle modem driver routine operates under interrupt control which allows the user to execute programs locally and remotely at the same time. For example, the user may want to run a program on a time-sharing computer system that may take several minutes to complete.
He may start that program by transmitting a RUN command.
While that program is being executed, the calculator is free for normal keyboard operation or program execution. The only limitation in the mode is that the calculator may not use the display or printer at the same time as it is receiving inior=ation irom the remote pro~ a=.

I' .

I

~g9~20 PLOTTER PLUG-IN RE:I~D-ONLY MEMORY 21ODULE
.
Thc plotter plug-in read-only memory module enables the calculator to control an EIewlett-Packard 9862A calculator plotter, providing permanent graphic solutions to problems solved by the calculator.
In general, the plotter command set can be considered as consisting of two groups: plotting commands and writing commands. The user can specify any plotting units he pleases, the calculator then automatically scales those units to fit the chosen plotting area. Also, the calculator ke'yboard characters can be drawn in different sizes and directions.
The 'plotting' commands enable the system to automati-cally scale user-units; draw X and Y axes of any length, any-where in the plotting area; make any desired tic-marks on the f axes; plot points or functions; lower or raise the pen, either before or after movemff~nt; temporarily translate the established origin to any point within the plotting area and then plot, still in user-units, with respect to the new origin; plot in increments (that is, in user-units, plot any point with respect ~O to the current pen position).
The 'writing' commands enable most calculator keyboard ' characters to be 'printed' on the plotter. The user can specify the position, height and width of the characters, and the ¦ ' direction in which they will be printed. A 'centering' com-mand (CPLOT) enables labels to be centered on some particular point, thus simplifying labelling of axes and of specific points on the graph. The format of labels and numbers - field width, fixed or floating point, the number of digits following f the'decimal point, etc. - is specified by standard FORMAT
statements. In addition, a unique LETTER command establishes --197--.
i ,. 1 9~Z~ ~

a '-type~vli~er' mode enabling the plotter to be controlled and positioned from the ca]culator keyboard, on a character-by-character basis; this allows the user to add extra labelling - or individual comments to his graphs.
INITIALIZING THE PLOTTER
Before plotting, the plotter must be prepared and the physical limits of the plotting area must be established. The front-panel controls on the plotter are used for this purpose.
! LINE AND CHART HOLD
The LINE pushbutton is the power switch ~or the plotter;
press it to apply power, and press it again to remove power;
the white LINE lamp lights whenever the plotter is ON.
Pressing CHART HOLD activates the electro-static paper ¦ hold-down mechanismO Pressing CHART ~OLD again deactivates , ~
it. The plotter will not plot or letter, and the pen holder ¦ -and arm wi~l move freely in all directions when CHART ~OLD is deactivated LOADING PAPER
To load paper, release CH M T HOLD and manually move the pen arm all the way to one side of the plotter. Lay a sheet of paper on the plotting surface and smooth out any ir-regularities in the paper (you may also wish to ensure that the paper is squarely against the ridge at the bottom of the plotting surface); then activate CHART HOLD.
GRAPH LIMITS
The graph limit controls are used to determine the I -physical size of the plot.
LO~VER LEFT and the two knobs to its left are used to determine the physical location of the lower left hand corner ¦
of the plotting area.

-198- s . . 'I
~. . .

99~20 t UPPEn RIGIIT and ttlC two knobs to i~s right are used to determine the physical location of ~he upper right-lland corner of the plotting area. Together, the upper right-hand corner and the lower left-hand corner determine the size of the plotting area.
Also, altering the lower left-hand setting will trans-late the upper right-hand setting by the same direction and amount.
To specify the lower left-hand corner of the plotting area, press LOWER LEFT; the pen will move (without touching the paper) to the lower left-hand corner of the plotting area.
i This point can be set anywhere within the lower left-hand i quarter of the plotting surface (platen) by adjusting the two knobs associated with LOWER LEFT. Once the lower left-hand corner has been set, the upper right-hand corner is set in the same general way by pressing UPPER RIGHT and adjusting the two i knobs associated with it. Once the plotting area has been i determined, it can be relocated by moving the position of the lower left-hand corner - the upper right-hand corner will ~-'track' the-change.
PLOTTING COMMANDS
NOTES: 1. All commands can be activated either from the keyboard or from a program except where noted.
2. All values in the following statements can be numbers, variables or expressions except where noted.
3. Any parameter enclosed in square brackets is optional as far as the statement containing it is concerned. However, program sense may dictate that the parameter be present in specific cases.

; , ` ` !
~99~20 TIIE SCAL~ STATEM~NT
SCALE Xmin, Xm~x, Ymin, Ymax Examples: i SCALE -10, 10, -5, 5 SCALE-~PI, 4PI, .3, 1.1 establishes the full-scale units for the plot. Xmin to Xmax and Ymin to Ymax correspond exactly to the limits of the horizontal and vertical edges, respectively, of the plotting area (the area is established mechanically as previously described). This also establishes the point, on or off the plotting area, where the original of the graph (O, O) is located.
A SCALE statement must be executed before any plotting ; can occur. Once established the scale remains established until one of the following occurs:
A new SCALE statement is executed.
The program is initialized.
A SCRATCH or SCRATCH A or SCRATCH V is executed.
The calculator is switched off.
The parameters (X, Y, etc.) in the SCALE statement must be given in the correct order. If the minimum or maximum values are switched no ERROR message will occur; however, sub- ¦
sequent plotting commands may not be executed properly.
The SCALE statement has no effect on the position of the pen.
THE PEN STATE~ENT
PEN
The PEN statement is a 'stand-alone' instruction re-- quiring no parameter. It raises the pen without otherwise changing its position relative to the plotting area.

' ~9 9 ~ J

Instructions to raise or lower the pen, either before or after movement, can be easily included in several other statements (see PLOT and IPLOT) so there is no special 'lower pen' instruction.
THE OFFSET STATEMENT
.
OFFSET X, Y
Example: OFFSET 3, -3 Temporarily offsets the origin (point 0, 0 established by the previous SCALE statement) by an amount, and in the ¦ 10 direction, determined by the values (in user-units) of X and ¦ Y. All future plotting commands are then made with respect to the new origin until such time as that origin is again changed by means of, for example, a new OFFSET or a new SCALE state-ment.
The OFFSET statements are not accumulative; that is, a I new 'offset' is with respect to the original origin and not with respect to the last offset origin.
Offsetting greatly simplifies plotting, from the user's point of view, when it-becomes necessary to divide the plotting area into several smaller segments and then make a separate plot in each segment. As the plot is made in each segment it is not necessary for the user to 'correct' each point before plotting; instead OFFSET statement moves the origin to some convenient point within that segment so that the calculator automatically makes the necessary 'corrections' for each point plotted.
THE AXIS STATEMENT
X AXIS Y-offset C, itic [, start point, end point]]
or Y AXIS X-offset ~, itic ~, start point, end point]~ '~
X AXIS 3, 1, -4, 4 . -. . .. . I

99~2V
Draws an X-~or Y-) axis according to the param~ters ~iven in the AXIS statement. The pen is automatically raised both be-fore and after drawing the axis.
(NOTE: The following describes the X-axis; the same information is applicable to the Y-a~is if 'left' and 'right' for the X-axis are read as, respectively, 'bottom' and 'top' for the Y-axis ) 1. If no optional parameters are given, draws a straight line from left to right across the complete plotting area (from Xmin to Xmax). The line crosses the Y-axis at a point determined by the value of "y-offset'.
2. If a 'tic' parameter is included then tic marks are made along the axis as it is drawn; the value for 'tic' deter-mines the spacing, in user-units, between tics. The first tic is drawn at the starting point of the line. The tic parameter is usually positive (the sign is not required), but occasionally a negative tic spacing is useful - see 4, below.
3. If the start point/end point parameters are given, then the axis is drawn only between the points specified - from the start point to the end point.
¦ 4. a. A negative tic spacing when no start point/end point parameters are given results in a tic only at the left end (Xmin) of the axis b. If the start point parameter is more poaitive than (i.e., to the right of) the end point parameter, then the axis is drawn from right to left; in this case, negative tic spacing results in normal tic marks i being drawn along the axis.
~ 30 c. With the start point/end point parameters the same as -.

` 1~99~20 l in b above, a positive tic spacing rcsults in a tic only at the right end (Xmax) of the axis.
THE PLOT STATEMENT
PLOT X, Y ~, control pen]
PLOT SIN(X), COS(X), -2 Moves the pen to the co-ordinate specified by the value of X and y.
When no optional 'control pen' parameter is given:
If the pen was raised, it moves to the point specified and then lowers.
If the pen was lowered, it remains lowered while moving to the point specified, thus drawing a line on the plotting surface.
The 'Control Pen' Parameter ¦ The value and sign o~ this parameter in the PLOT
(and IPLOT) statements determines whether the pen will be ¦ raised or lowered before or after it moves to the specified point.
¦ If the parameter is:
1 20 negative - control occurs after movement;
positive - control occurs before movement;
odd - raises pen if it was lowered;
even - lowers pen if it was raised.
The value of the control parameter can be any number I in the range 132767. If the value is not an integer then it is automatically rounded up or down according to the value of ~ the fractional part of the number; that is up for .5 or greater, j or down for less than .5. (Rounding is the same as the standard rounding in the calculator; it is not the same as the INT function, where the value becomes that of the next lower integer.) - ~ . .. - .. . ... . . . .

~9~zo TIIE IPLOT STATEMENT
IPLOT deltaX, deltaY ~, control pen]
IPLOT 2, -3A/4, 1 Moves the pen (frQm its current position) in the X direction and in the Y direction, by the amounts specified by 'deltaX' and'deltaY', respectively.
The 'control pen' parameter is optional and operates exactly as described previously - see the PLOT STATEMENT.
Notice that the action of the IPLOT statement is such that it is as if, during the ex0cution of that statement only, the origin (O, O) of the graph is offset to the current position of the pen. Pen movement is then related to that offset origin.
The IPLOT statement is most useful when drawing regular geometric shapes such as, for example, a swastika (~). In ~ this case each point is more easily plotted with respect to the previous point, rather than with respect to the origin of the graph t THE LABEL STATEMENT
LABEh (FORMAT statement number or *[, character heigth in %, Aspect ratio, angle of rotation [, paper heigth/paper width]]) print list Examples: LA8EL (x, 2, 2, 0, 8.5/11) "PLOTTE~" ¦
LABEL (100) 1, A, SIN(X) The LABEL statement is used to write alpha and numeric characters with the plotter. Several parameters are allowed which can be used to control the size, shape, and angle of rotation of the character printed. The character height can be specified in percent of the paper height. The aspect ratio is the ratio of the character height to the character width before any rotation.

.. . . - - -. ~ ~

~99~2V - ) The angle of rotation o~ cllaracters printed can be given.
This parameter can b~ given in degrees, radians, or grads and is dependent on a previously given DEG, RAD, or GRAD state-ment. A fourth parameter can be specified. This is the ratio of the actual measured height of the plot paper to the measured width as set by the upper right and lower left posi-tions. This parameter is necessary to keep proper aspect ratio of characters printed on an angle on a non-square plot.
If not specified, the calculator will assume character height =
2.5~, aspect ratio = 2, rotation 5 0~ and paper ratio e 1~
The format spec1fication and the print list are the same as a ~ITE statement. If a FORMAT statement number is specified, the print list is written on the plotter using the ¦ specification given in the FORMAT statement. All secifications ¦ are allowed except "B". If an "*" is used, the print list will ¦ be written accordlng to standard format. This includes the I normal definition of comma and semi-colon spacing, string fields, - TAB, etc.
! The LABEL statement will start printing characters at the current pen position. Anytime an end of line is needed, the plotter pen will return to the character position directly il below the first character of the current line, simulating a carriage return, line feed.
If the string variables option block is also plugged into the memory, then string variables are allowed in the print ` list.
THE LETTER STATEMENT
LETTER
When the LETTER statement is executed, the calculator enters a unique 'typewriter' mode with the plotter as the printing device.

... . ' . ' ~

~ ~99I~Z~

While in this mod~ whcn the Iser hits any printillg charactcr ; on the keyboard, that character is immediately printed on the plotter at the current pen position. An EOL or EXECUTE will cause a carriage return, line-feed to be simulated. In ad-dition, while in this mode the t, 1, ~, and ~ keys can be used to position the pen. The t and ~ keys can cause the pen to move up or down one character position. The and ~ keys cause the pen to move left or right one character position.
If the shift key is held down at the same time as a pen control key, the pen will move one-tenth of a character position.
Character size, aspect ratio, and rotation can be specified by giving a LABEL statement prior to the LETTER statement.
THE CPLOT STATEMENT
CPLOT delta X characters, delta Y characters Example: CPLOT 5, -.3 The CPLOT statement is similar to the IP~T statement in that it moves the pen to a position relative to the current pen position. The difference is that the delta X and delta Y
values are specified in charaGter size units. In the example above the pen would move five character position down. This statement is particularly useful in positioning the pen when labeling a plot using the LABEL statement.
One character space is defined as follows:

~ Lower-left corner 1~ r~~~~- I of character above .

.6 ~ __~ The LETTER ~'A" for _- ~ example . .
O ) I -1' ____ Lower-left corner of next character l~99~ZO

Tlle error messages givell by tlle plotter module are:
RROR 80 - No scale statement cxecuted beiore PLOT, IPLOT, OFFSET, or AXIS.
RROR 81 - Character size too large (limited to = 20%) or binary mode not allowed.
RROR 8Z - OFFSET, POINT 1, or POINT 2 out of range during axis execution or tic increment in axis statement is too small.

I

' j ':

. . . . . . . , . . . . ... , . . _ _ _ _ ~
- - . , .. . ~ , , j . i 99~20 MAT~IX PLUG-IN READ-ONL.Y MEMORY MODULE
The Matrix read-only memory module enables the cal-culator to understand the MAT statements of BASIC. These statements f~cilitate the matrix operations of addition, sub-traction, initialization, scalar multiplication, matrix multi-plication transposition, and inversion. A function additional to standard BASIC language matrix operations is provided for computing the determinate of a square matrix. The MAT READ
I and MAT PRINT commands facilitate entering data into an array i 10 and the printing thereof The MAT INPUT command which appears in some versions of BASIC is not allowed. The matrix operations are allowed on split precision or integer arrays as well as full floating point arrays.
The operations performed by this matrix module are summarized below and additional information is provided above on pages 148-164.
A. MAT READ
reads numeric information from DATA statements into an array MAT READ A
MAT READ A(3,5) MAT READ B,W(8),X,Y
B. MAT PRINT
prints complete arrays close packing specified with a semicolon MAT PRINT A
MAT PRINT A;
MAT PRINT R,5;V;W
C. ZER, CON, and IDN operations ZER: initialize an array to all zeros ; 30 CON: initialize an array to all ones IDN: initialize an array to the identity matrix -20~-~99~20 MAT A = ZER
MAT Q = CON(9) MAT I - IDN(4,4) D. MAT assignment statements assign to a matrix the result of a MAT operation 1) MAT A = B
~ssigns elements of A from array B
2) MAT A = B I C
per~orms indicated addition or subtraction and assigns result to A
any of A, B, and C may be the same matrix .
3) MAT A = B * C
performs indicated multiplication and assigns result to A
array A must be distinct from B or C
4) MAT A - (expression) * B

performs the indicated scal~r multiply (each element of B is multiplied by the value of the expression) and assigns the result to A
5~ UAT A = TRN(B) -assigns the transpose of B to A :
array A mu~t be distinct from B
6) MAT A = INV(B) assigns the inverse of B to A
A and B may be the same matrix E. DET operation . .
calculates the determinant of a square matrix MAT D4 = DET(A) i ... .. .
. _, . .

~ 9D~2U

KEY CODES ~ND MNE~IONICS
All of the keys of the keybo~rd input unit and theirassociated mnemonics and binary keycodes are listed in the Table below. Every key has one mnemonic and two keycodes, ~namely, a shifted keycode and an unshifted keycode). Key-codes are applied to the CPU in eight-bit binary form. The first four bits of each keycode are given in the left-most vertical column of the table below and the next three bits of each keycode are given in the uppermost row of the table below. The eighth bit of each keycode is the shift bit and is determined by whether or not the shift key of the key-board input unit is depressed. Keycodes entered into the ' CPU from the keyboard input unit or from the program storage section of the memory unit are processed by the keyboard in-, put routine 204 as generally described above in connection with Figure 9 and as shown in detail in Figures 88A-G.

KEYCODE AND MNEMONIC TABLE
DO Dl D2 D3 D4 D5 D6 D7 1 b6 O O O O 1 1 1 1 b5 O O 1 1 O O 1 1 ~ b4 O 1 O 1 O 1 O 1 - b3b2blbO
.. ___ _ O O O O fO RECALL SPACE 0 P PA
._. .
O O O 1 fl FETCH 1 A Q STOP
. . .. _ ! O O 1 0 f2 BACK 2 B R EOL
. .. _ .. __ ; O O 1 1 f3 FWD 3 C S DL
.
i O 1 0 0 f4 1_ 4 D T FXD
O 1 0 L f5 t _ 5 E U _ FLT
O 1 1 0 f6 , 6 F V SCRATCH
_ . _ O 1 1 1 f7 ~ 7 G W AUTO
. _ . .__.__ . . .~_ 1 0 0 0 f8 LOAD ( 8 H X _ 1 0 0 1 f9 STORE ) 9 I Y _ 1 0 1 0 LIST INIT X * J Z CLR
. . ., 1 0 1 1 EXEC / + ; K RESULI r 1 1 0 0 CONT _ L
1 1 0 1 STEP STD _ = M _ _ l 1 1 0 TRACE NORMAL ? N ~ E TER
1 1 1 1 RUN INSERT /_ O NEXP

_ _ I

~ ~ , 1~99~ZO

BASIC INSTRUCTION SET
Every routine and subroutine of the calculator comprises a sequence of one or more of 71 basic sixteen-bit instructions listed below. These 71 insturctions are all implemented serially by the micro-processor in a time period which varies according to the specific instruction, to whether or not it is indirect, and to whether or not the skip condition has been met.
Upon completion of the execution of each instruction, the program counter (P register) has been incremented by one except for instructions JMP, JSM, and the skip instructions in which the skip condition has been met. The M-register if left with contents identical to the P-register. The contents of the addressed memory location and the A and B registers are left unchanged unless specified otherwise.
Memory Reference Group The 14 memory reference instructions refer to a specific address in memory determined by the address field <m>, by the ZERO/CURRENT
page bit, and by the DIRECT/INDIRECT bit. Page addressing and indirect addressing are both described in detail in the reference manuals for the Hewlett-Packard Model 2116 computer (hereinafter referred to as the HP 2116).
The address field <m> is a 10 bit field consisting of bits O
through 9. The ZERO/CURRENT page bit is bit 10 and the DIRECT/INDIRECT bit is bit 15, except for reference to the A
or B register in which case bit 8 becomes the DIRECT/INDIRECT
bit. An indirect reference is denoted by a <,I> following the address ~m>.
REGISTER REFERENCE OF A OR B REGISTER: If the location <A> or <B> is used in place of <m> for any memory reference instruction, the instruction will treat the contents of A or B exactly as it would the contents of location <m>. See the note below on the special restriction for direct register reference of A or B.
ADA m,I Add to .4. The contents of the addressed memory location m are added (binary add) to contents of the A register, and the sum reamins in the A register. If carry occurs from bit 15, the E register is loaded with OOOl, otherwise E is left unchanged.
ADB m,I Add to B. Otherwise identical to ADA.

~~9~Z~

~emory Reference Group (continued) CPA m,I Compare to A and skip if unequal. The contents of the addressed memory location are compared with the contents of the A register. If the two 16-bit words are different, the next instruction is skipped; that is, the P and M
registers are advanced by two instead of one. Otherwise, the next instruction will be executed in normal sequence.
CPB m,I Compare to B and skip is unequal. Otherwise identical to CPA.
LDA m,I Load into A. The A register is loaded with the contents of the addressed memory location.
LDB m,I Load into B. The B register is loaded with the contents of the addressed memory location.
STA m,I Store A. The contents of the A register are stored into the addressed memory location. The previous contents of the addressed memory location are lost.
STB m,I Store B. Otherwise identical to STA.
IOR m,I "Inclusive OR" to A. The contents of the addressed location are combined with the contents of the A register as an "INCLUSIVE OR" logic operation.
ISZ m,I Increment and Skip if Zero. The ISZ instruction adds ONE to the contents of the addressed memory location. If the result of this operation is ZERO, the next instruction is skipped; that is, the P and M registers are advanced by TWO instead of ONE. The incremental value is written back into the addressed memory location. Use of ISZ with the A or B register is limited to indirect reference; see foot-note on restrictions.
AND m,I Logical "AND" to A. The contents of the addressed location are combined with the contents of the A register as an "AND" logic operation.
DSZ m,I Decrement and Skip if Zero. The DSZ instruction subtracts ONE from the contents of the addressed memory location. If the result of this operation is zero, the next instruction is skipped. The decremented value is written back into the addressed memory location. Use of DSZ with the A or B register is limited to indirect reference; see footnote on restrictions.

. ~

zo JSM m,I Jump to Subroutine. The JSM instruction permits jumping to a subroutine in either ROM or R/W memory. The contents of the P register is stored at the address contained in location 1777 (stack pointer). The contents of the stack pointer is incremented by one, and both M
and P are lcaded with the referenced memory location.
JMP m,I Jump. This instruction transfers control to the contents of the addressed location. That is, the referenced memory location is loaded into both M and P registers, effecting a jump to that location.

Shift-Rotate Group' The eight shift-rotate instructions all contain a 4 bit variable shift field <n> which permits a shift of one through 16 bitsi that is, 1 < n < 16. If <n> is omitted, the shift will be treated as a one bit shift. The shift code appearing in bits 8,7,6,5 is the binary code for n-l, except for SAL and SBL, in which cases the complementary code for n-l is used.

M R n Arithmetic right shift of A. The A register is shifted right n places with the sign bit (bit 15) filling all vacated bit positions. That is, the n+l most significant bits become equal to the sign bit.
ABR n Arithmetic right shift of B. Otherwise identical to AAR.
SAR n Shift A right. The A register is shifted right n places with all vacated bit positions cleared. That is, the n most significant bits become equal to zero.
SBR n Shift B right. Otherwise identical to SAR.
SAL n Shift A left. The A register is shifted left n places with the n least significant bits equal to zero.
SBL n Shift B left. Otherwise identical to SAL.
RAR n Rotate A right. The A register is rotated right n places, with bit O rotated around to bit 15.
RBR n Rotate B right. Otherwise identical to RAR.

~(~99~i20 A1ter-Skip Group The sixteen alter-skip instructions all contain a 5-bit variable skip field <n> which, upon meeting the skip condition, permits a relative branch to any one of 32 locations. Bits 9,8,7,6,5 are coded for positive or negative relative branching in which the number <n> is the number to be added to the current address, (skip in forward direction), and the number <-n> is the number to be subtracted from the current address, (skip in negative direction). If <n> is omitted, it will be inter-preted as a ONE.
<n>=O CODE=OOOOO REPEAT SAME INSTRUCTION
<n>=l CODE=OOOOl DO NEXT INSTRUCTION
<n>=2 CODE=OOO10 SKIP ONE INSTRUCTION
<n>=15 CODE=Ollll ADD 15 TO ADDRESS
<n>=-l CODE=lllll DO PREVIOUS INSTRUCTION
<n>=-16 CODE=10000 SUBTRACT 16 FROM ADDRESS
<n>=nothing CODE=OOOOl DO NEXT INSTRUCTION
The alter bits consist of bits 10 and bits 4. The letter <S>
following the instruction places a ONE in bit 10 which causes the tested bit to be set after the test. Similarly the letter <C> will place a ONE in bit 4 to clear the test bit. If both a set and clear bit are given, the set will take precedence.
Alter bits do not apply to SZA, SZB, SIA, and SIB.
SZA n Skip if A zero. If all 16 bits of the A register are zero, skip to location defined by n.
SZB n Skip if B zero. Otherwise identical to SZA.
RZA n Skip if A not zero. This is a "Reverse Sense" skip of SZ.
RZB n Skip if B not zero. Otherwise identical to RZA.
SIA n Skip if A zero; then increment A. The A register is tested for zero, then incremented by one. If all 16 bits of A were zero before incrementing, skip to location defined by n.
SIB n Skip if A not zero; then increment B. Otherwise identical to SIA.
RIA n Skip if A not zero; then increment A. This is a "Reverse Sense" skip of SIA.
RIB n Skip if B not zero; then increment B. Otherwise identical to RIA.
SLA n,S/C Skip if Least Significant bit of A is zero. If the least significant bit (bit O) of the A register is zero, skip to location defined by n. If either S or C is present, the test bit is altered accordingly after test.

~9~o Alter-Skip Group (continued) SLB n,S/C Skip if Least Significant bit of B is zero. Other-wise identical to SLA.
SAM n,S/C Skip if A is Minus. If the sign bit (bit 15) of the A register if a ONE, skip to location defined by n. If either S or C is present, bit 15 is altered after the test.
SBM n,S/C Skip if B is Minus. Otherwise identical to SAM.
SAP n,S/C Skip if A is Positive. If the sign bit (bit 15) of the A register is a ZERO, skip to location defined by n.
If either S or C is present, bit 15 is altered after the test.
SBP n,S/C Skip if B is Positive. Otherwise identical to SAP.
SES n,S/C Skip if Least Significant bit of E is Set. If bit O of the E register is a ONE, skip to location defined by n. If either S or C is present, the entire E register is set or cleared respectively. -SEC n,S/C Skip if Least Significant bit of E is Clear. If bit O of the E register is a ZERO, skip to location defined by n. If either S or C is present, the entire E register is set or cleared respectively.
Comelement-Execute-DMA Group.
These seven instructions include complement operations and several special-purpose instructions chosen to speed up printing and extended memory operations. ;
CMA Complement A. The A register is replaced by its One's complement.
CMB Complement B. The B register is replaced by its One's complement.
TCA Two's Complement A. The A register is replaced by its One's Complement and incremented by one.
TCB Two's complement B. The B register is replaced by its One's Complement and incremented by one.
EXA Execute A. The contents of the A register are treated as the current instruction, and executed in the normal manner.
The A register is left unchanged unless the instruction code causes A to be altered.
EXB Execute B. Otherwise identical to EXA.
DMA Direct Memory Access. The DMA control in Extended Memory is enabled by setting the indirect bit in M and giving a WTM
instruction. The next ROM clock transfers A~M and the following two cycles transfer B)M. ROM clock then remains inhibited until released by DMA control.

~ ( ~99~20 Note: Special Restriction for Direct Re~ister Reference of A or B
For the five register reference instructions which involve a write operation during execution, a register reference to A or B must be restricted to an INDIRECT reference. These instructions are STA, STB, ISZ, DSZ, and JSM. A DIRECT register reference to -A or B with these instructions may result in program modification.
(This is different from the hp 2116 in which a memory reference to the A or B register is treated as a reference to locations O
or 1 respectively.) A reference to location O or 1 will actually refer to locations O or 1 in Read Only Memory.

Input/Output Group (IOG) The eleven IOG instructions, when given with a select code, are used for the purpose of checking flags, setting or clearing flag and control flip-flops, and transferring data between the AtB
registers and the I/O register.
STF <SC> Set the flag. .Set the flag flip-flop of the channel indicated by select code <SC>.
CLF <SC> Clear the flag flip-flop of the channel indicated by select code <SC>.
SFC <SC> Skip if flag clear. If the flag flip-flop is clear in the channel indicated by <SC>, skip the next instruction.
SFS <SC> H/C Skip if flag set. If the flag flip-flop is set in the channel indicated by <SC>, skip the next instruction. H/C indicates if the flag flip-flop should be held or cleared after executing SFS.
CLC <SC> H/C Clear control. Clear the control flip-flop in the channel indicated by <SC>. H/C indicates if the flag flip-flop should be held or cleared after executing CLC.
STC <SC> H/C Set Control. Set the control flip-flop in the channe1 indicated by <SC>. H/C indicates if the flag flip-flop should be held or cleared after executing STC.
OT* <SC> H/C Output A or B. Sixteen bits from the A/B register are output to the I/O register. H/C allows holding or clearing the flag flop after execution of OT*.
The different select codes allow different functions to take place after loading the I/O register.
SC=OO Data from the A or ~ register is output eight bits at a time for each OT*
instruction given. The A or B register is rotated right eight bits.

_ ~(~99~20 Input-Output Group (IOG), continued SC=Ol The I/O register is loaded with 16 bits from the A/B registers.
SC=02 Data from the A/B register is output one bit at a time for each OT* instruction for the purpose of giving data to the Magnetic Card Reader. The I/O register is unchanged.
SC-04 The I/O register is loaded with 16 bits from the A/B register and the control flip flop for the printer is then set.
SC-08 The I/O register is loaded with 16 bits from the A/B register and the control flip flop for the display is then set.
SC=16 The I/O register is loaded with 16 bits from the A/B register and then data in the I/O register is transferred to the switch ~atches.
LI* <01> H/C Load into A or B. Load 16 bits of data into the A/B register from the r/O register. H/C allows holding or clearing the flag flop after Ll* has been executed.
' LI* <00> The least significant 8 bits of the I/O register are loaded into the most significant locations in the A or B register.
MI* <01> H/C Merge into A or B. Merge 16 bits of data into the A/B register from the I/O register by "inclusive or". H/C allows holding or clearing the flag flop after Ml* has been executed.
MI* <00> The least significant 8 bits of the I/O register are combined by inclusive OR with the least significant 8 bits of the A or B register, and rotated to the most significant bit locations of the A or B register. ~ -.. . . ;

~L~99 MAC Instruction Group A total of 16 MAC instructions are available for operation (a) with the whole floating-point data (like transfer, shifts, etc.), or (b) with two floating-point data words to speed up digit and word loops in arithmetic routines.
NOTE: <Ao 3> means: contents of A-register bit O to 3 AR 1 is a mnemonix for arithmetic pseudo-register located in R/W memory on addresses 1744 to 1747 (octal) AR 2 is a mnemonix for arithmetic pseudo-register located in R/W memory on addresses 1754 to 1757 (octal) D. means: mantissas i-th decimal digit;
most significant digit is Dl least significant digit is D12 decimal point is located between Dl and D2 Every operation with mantissa means BCD-coded decimal operation.
RET Return 16-bit-number stored at highest occupied address in stack is transferred to P- and M-registers. Stack pointer (=next free address in stack) is decremented by one.
<A>, <B>, <E>, unchanged.
MO~ Move overflow The contents of E-register is transferred to A . Rest of A-register and E-register are filled by zeros. 3 <B> unchanged.
CLR Clear a floating-point data register in R/W memory on location 'A>
ZERO~<A>, <A>+l, <A>+2, <A>+3 <A>, >B>, <E> unchanged XFR Floating-point data transfer in R/W memory from location <A> to location <B>.
Routine starts with exponent word transfer.
Data on location <A> is unchanged.
<E> unchanged.

i ~L~99~2~
MRX ARl mantissa is shifted to right n-times. Exponent word remains unchanged.
<Bo 3>= n (binary coded) 1st shift: <Ao-3>~Dl; Dj~j+l; D12 jth shift: ~ ~ Dl; Dj~Dj+l; D12 i nth shift: -~ ~ Dl; Dj'j+l; D12 ~ Ao-3 ~ ~ E, A4_15 each shift: <Bo_3~ Bo_3 <B4 15' unchanged MRY AR2 mantissa is shifted to right n-times.
Otherwise identical to MRX
MLS AR2 mantissa is shifted to left once.
Exponent word remai~s unchanged.
tt ~ D12; Dj ~ Dj_l; Dl 0_3 <B> unchanged DRS ARl mantissa is shifted to right once Exponent word remains unchanged t Dl; Dj ~ Dj+l; D12 ~ Ao-3 ZERO ~ E and A4_15 <B> unchanged -~
DLS ARl mantissa is shifted to left once. Exponent word reamins unchanged.
<Ao 3> ~ D12; Dj t. Dj_l; Dl 0_3 E, A4 15 <B> unchanged FXA Fixed-point addition Mantissas in pseudo-registers AR2 and ARl are added together and result is placed into AR2. Both exponent words remain unchanged. When overflow occurs "OOOl"
is set into E-reg., in opposite case <E> will be zero.
<AR2> + <ARl> + DC ~ AR2 DC = ~ if <E> was OOOO before routine execution DC = 1 if <E> was 1111 before routine execution <B>, <ARl> unchanged : . . .

lW9~2~;J

FMP Fast multiply Mantissas in pseudo~registers AR2 and ARl are added together ~Bo 3>-times and result is placed into ARa.
Total decimal overflow is placed to Ao 3. Both ex-ponent words remain unchanged.
<AR2> + <ARl> * <Bo 3>+DC ~ AR2 DC = O if <E> was 0000 before routine execution DC = 1 if <E> was 1111 before routine execution ZERO ~ E, A4_15 <ARl> unchanged FDV Fast divide Mantissas in pseudo-registers AR2 and ARl are added together so many times until first decimal overflow occurs. Result is placed into AR2. Both exponent words remain unchanged. Each addition without over-flow causes +l increment of <B>.
1st addition: <AR2> + <ARl> + DC ~ AR2 DC = O if <E~ was 0000 before routine èxecution DC = 1 if <E> was 1111 before routine execution next additions: <AR2> + <ARl> ~ AR2 ZERO ) E
.. <ARl> unchanged CMX lO's complement of ARl mantissa is placed back to ARl, and ZERO is set into E-register. Exponent word remains unchanged <B> unchanged CMY lO's complement of AR2 mantissa.
Otherwise identical to CMY
MDI Mantissa decimal increment.
Mantissa on location <A> is incremented by decimal ONE
on D12 level, result is placed into the same location, and zero is set into E-reg.
Exponent word is unchanged.
When overflow occurs, result mantissa will be 1,000 0000 0000 (dec) and 0001 (bin) will be set into E-reg.
<B> unchanged.
NRM Normalization Mantissa in pseudo-register AR2 is rotated to the left to get Dl ~ O. Number of these 4-bit left shifts is stored in Bo 3 in binary form (<B4 15>=) when <Bo 3> = 0,1,2,. . . . 11 (dec) -~ <E> = 0000 when <Bo 3>= 12 (dec)=~ mantissa is zero, and <E> =0001 Exponent word remains unchanged ~A~ unchanged.

¢

1~99~2V
The binary codes of all of the above instructions are listed in the following coding table, where * implies the A or B
register, D/I means direct/indirect, A/B means A register/B
register, Z/C means zero page (base page) (current page, H/S
means hold test bit/set test bit, and H/C means hold test bit/
clear test bit. D/I, A/B, Z/C, H/S, and H/C are all coded as 0/1.
CODING TABLE
GROUP OCTAL INSTR 15 14 13 12 l l 10 9 8 7 6 5 4 3 2 1 0 Ml MORY o AD- Dll 0 0 0 A18 ZIC I MEMORY
REFERENCE 1 CP' Dtl0 0 1 Ala ZIC ADDRESS--GROUP -2 LD- Dll 0 1 0 AIB ZIC
.3.-.. ST- D/l 0 1 1 A/B ZIC
.4.. -. IOR D/l 1 0 0 0 Z/C
4- ISZ Dll 1 0 0 I Z/C
-5 - AND D/l 1 0 1 0 Z/C
DSZ Dll 1 0 I I Z/C
6 JSM D/l I 1 0 0 Z/C
-h.. JMP D/l I 1 0 I Z/C

ROTATE 07 -2S'R 0 1 1 1 A/B - CODE 00 1 GROUP 07 4S-L 0 1 1 1 A/B . . 0 1 0 07.. 6 R'R 0 1 1 1 A/B . .0 1 1 SKIP 07 -~0 RZ' 0 1 1 1 A/B I CODE 0 1 GROUP 07---0 Sl- 0 1 1 1 A/B 0 1 10 0 0 07---0 Rl' 0 I I I A/B I I 1 0 0 0 07 2S'M 0 1 1 1A/B H/S H/C I 0 1 07--3 S'P 0 1 1 1A/B H/S H/C I 0 1 REGlSrER 07 17 ADA 0 1 1 1 AIB D/l 0 0 0 0 1 1 1 REFERENCE 07 -17 ADB o I I I A/B - Dn 0 0 0 1 1 1 1 GROUP 07- 57 CPA 0 1 1 1 A/B D/l 0 0 1 0 j I I
07- 77 CPB 0 1 1 1 AIB - D/l 0 0 1 1 1 1 1 07 -17 LDA 0 1 1 1 A/B .. D/l 0 1 0 0 1 1 1 07--37 LDB 0 1 1 1 AIB - D/l 0 1 0 1 1 1 1 0- 17 IOR 0 1 1 1 AIB D/l 1 0 0 0 1 1 1 (l7 h37 ISZ 0 1 1 1 AIB I 1 0 0 1 1 1 1 07 57 AND 0 1 1 1 AIB- D/l 1 0 1 0 1 1 1 07.h77 DSZ 0 1 1 1 A/R -- I 1 0 1 1 1 1 1 07--37 JMP 0 1 1 1 A/8 - D/l I 1 0 1 1 1 1 ~ ~99~2~
,, I I ., I - 1 , ........ 1 ~ . ! .
., .. _ . . _ _ . .. _ _, ., . . _ _, .. ... _ . , . .. . . . .. .. . . . ~ _ .. .. .
C r~ N G -rfl r;! L ~: - colJ~ l ~J U ~ D

,, û ~ ~ U P ~ y i f, 7 ~ r', ~1 3 1 2 , O
_ .. ____. __. _ _._ ..... .. _ __.. . î -~---- ----¦. l î P . ~ ~ - o I ~i F X ~ I o / / / ' n~
E~JrE 0 7 0 0 ~ ~. P M ~? i O ~ / / O - ~ o ! / /
o 7 - 0s-6 C t~17.~ 1 ~ ~ ~ ~ ^ / O ~ / / o i i ¦ c~ 7 - o 7 G T C ~ o / I ~ n~ _ _ _ _ _ I / I I ~ / ii .. . ~ ~ . ! . __ ~:~If~UT 1 7 2 7 --- 5 rF ~ -- / o i / I I / ~ SELECr_,~
ourPvr 1 7 ~ 7--- C LF I I I I 1- 1 1 / I I I COD~
.~__ G,~OVP ~ 7 - 7- - S ~:C t I ~ ! 1 / l O
1 7 - 5' ~-- S FS I I I I ~ Y.-i ¦ I ~ .
/ 7 ~ C LC / I I l i - I r~C / O I I
,~,, 1 7-- 6---- S T C I ~ C / / O O
. 1 7 - ~ _ _ 0 T X~' I ~ C O O I /
. r 7 - 2--- L I ~ - I I I I j ~ I ~C O / o I .
. 17-- ~ --- l~t I ~ I . I I t ~ ~Ja I ~c o O o ~
, . ._,,. ,. ~ i 1 C 1 7 ~J G ~ P~ ~ r I I I I ~ o c, o I O O, O a O; O I O I
p 1 7 ~ o 2 ~ '1 C~ V I I I I ' O O O: O O O '' O , O I O
1 7 C~ O O O C L R I I I I O r; O O O ¦ C~ O j ~ O O ¦ ~
. ' 1 7 O O O Y X F P~ ~ ~ ~ O r~ O , O O O ! ~ O
S l7Y'~ ~ X / 11) IGO ~U~ OII~ O
. ~7~1Y 7 0 MR ;' I I I 1 : 1 / i I t /; o 1 7 1 '10 c~ 1~ L S I I I I ' 0. 0 1 I o o 0 o C~ O o o i i 170ylt~ D~S I ~ 00 / 100 ! ool 11 .. I -t5L~ ~ 5 I I ~ o I ~ J o o . o o o ' c~oo 1.
1 7t~560 F X fl ~ I I I I . G 00 1 ol I I I 0 oc~o ¦
. ¦ 71 V6 Fl`'l P I I I I C~ r~ I , / 0 1 I I o ¦ o G O 1 .
17~12o FD~ I I / 1 . ~0c7 I c)o G I ~ ! oo~ ¦~
.~ 1 ~L/'10~ ~ / / I /, I ~ t L~ r~ i ~ ' C~ ~ li 70~00 CMY I / ~ I / OGO ~I /Oc~ ~ Oor~l OOO '.
. . 1 7 O S~ ~ ~ ~1 D :1: I / / / / i O ~ ~ , I o / ~ / o O j O O O I
171~o ~IRi~ oo/; I oo lo / I o oo . ' '' ~ ~
. . , . l?
Il . .~
~ . . , ¦ r . - . ; 1 .' . . , '~

.
,, . '~:r~'~'t'.Y~

, ,,;

~o99ozo Each of the 71 basic instructions employed b~ the calculator i~ implemented by one or more of the above-described microinstructions and associated control-signals issued by the microprocessor. The manner in which this is accomplished is shown and described in detail in the flow charts of Figures 2~-~ Each rectangular box of these flow charts represents a state of ROM 300 of the microprocessor and includes the mnemonic of the microinstructions and con-trol signals stored in that ROM state. The number at the upper right-hand corner of each of these ~ectangular boxes represents the number of shift clock pulses required~by the microinstructions of that ROM state. A simplified overvie-~
of these detailed flow charts is shown in Figures 6A-B.
PROGRAMMABLE CLOC~
Given a computing system organized to process binary data serially and under con-trol of microinstructions stored in ROM 300 as shown in Figures 3A-B and 27, the implementation of a general purpose instruction set requires that some number o~ bits be shifted into or out of the storage registers.
Depending on the operation being performed~ the number of bits may vary from zero to n, where n is the number of bits in a single machine word.
If each clock period of the ROM clock corresponds to a one bit shift, a count loop must be employed to provide the desired nu~ber of shifts. A rather large number of such count loops would exist in order to implement an entire instruction set. An alternative method is to provide additional hardware which permits assignment of the desired number of shifts in a single state of ROM 300. Such an arrangement requir2s a variable cycle time for each state of R~M 300, but resul~s -72,-1099C~20 in a very substantive saving in total number of ROM states.
To implement a variable number of shift clocks in a single state of the microprocessor, two scparate clocks are required. The shift clock is applied to the da-ta storage registers in the memory, the shift register block, the arith-metic logic unit and the input/output block. The RO.~I clock is applied to the ROM address flip-flops in the microprocessor, and occurs once for each state in the microprogram. The number of shift clock pulses that occur in any given ROM state is determined by a 4-bit clock code sent to the clock decoder from the microprocessor.
If no shift clocks are desired, a separate signal C~ from the microprocessor inhibits the shift clock output, independent of the clock code issued in that state. In this way, any number of shifts between and including zero and 16 may be implemented with a 4-bit clock code and an inhibit signal.
This inhibit signal offers an additional powerful feature when gated by the qualifier test logic in thelmicro-processor as shown in Figure 3A. The qualifier test logic includes a 4-bit qualifier code from ROM 3 that selects one of 16 qualifier inputs to the data selector. The data selector output QN (qualifier not met) will be high if the selected qualifier input was low. By using the QN signal to gate the inhibit microinstruction, IQN, the shift clock will be inhibited only when the qualifier is not met. Thus, all microinstructions requiring shift cloc~s that are issued in a given ROM state may be either executed or inhlbited, depending on the logical state of the qualifier under test.
The ROM clock is applied to the eight J-K flip flops -72~-~ -: ;~

1099~20 which address the 256 word microprocessor ROM. During any given state, the complemen-ting (J-K) inputs to the 4 pri-mary address flip-flops are set up by the qualifier code or q-register code. The 4 secondary address flip-flop inputs are determined by the ROM 4 outputs, the BRC microinstruc-tion, and the data selector output QN. Where ROM clock goes low, the negative edge-triggered flip-flops will cause transi-tion of the ROM address to the next ROM state.
As shown in the block diagram of Figure 30 and the detailed schematic diagram of Figure 31~-C, a crystal con-trolled system clock output is inverted to generate memory clock, MCK. This signal is again inverted to clock a D
flip-flop having an output (control clock), which will go low if the end-of-count signal (borrow) from the down counter has occurred at the D input. The ROM clock will also go low at this time, initiating a new ROM state in the micropro-cessor. Control clock will normally remain low for one system clock period, and in turn generates a load signal which is delayed a half period from control clock by means of a second D flip-flop. The 4-bit clock code from the microprocessor is preset into t~e counter while the load signal is low.
As the load signal goes high, ROM clock also goes high~ completing the fixed interval protion of ROM clock and shift clock as shown in Figure 3Z. A series of clock pulses are now gated onto shift clock, SCK, until the preset counter has counted down to zero, causing control clock to again go low, completing the ROM cycle.
The inhibit signal, INH, from memory may lenythen the normal fixed interval of ROM clock by clearing the D
flip-flop and holding con~rol clock low. This may occur during memory refresh or external test operations. In this situation, the counter remains preset and the correct number of shifts will be generated when the inhibit goes away.
SHIFT REGISTER UNIT
As shown in the detailed schematic diagrams of Figures 28A-D and 33A-D, A-resister 122, B-register 124, P-register 126, Q-register 128, and E-register 130 of Figures 3A-B
comprise bipolar status registers, the contents of which are re-circulated when data is output to the R-bus or the S-bus. Full control of these registers in use and type of operations per-formed is maintained by the microinstructions from the micro-processor. The number of bits to be shifted in any one ROM
state of the microprocessor is determined by the number of shift clocks from the clock decoder. This shift clock appears at the --~~ shift clock input of each shift register that is enabled by the microprocessor during that ROM cycle.
ARITHMETIC LOGIC UNIT
The development of complex read-only memory arrays on a single chip have made possible a hardware implementation of central processing units (CPUs) and arithmetic logic units (ALUs) with far fewer components than were previously possible.
In this application, two bipolar read-only memory chips are combined with carry flip-flops and adapted to perform one-bit binary logic and arithmetic operations as well as four-bit binary-coded-decimal tBCD) arithmetic operations. The two bipolar read-only memory chips may comprise, for example, Hewlett-Packard 16-pin dual-in-line packaged bipolar ROMs organized into 256 words by 4-bits and of the same type as shown and described in U.S. Patent No. 3,721,9~4.
The binary/BCD Arithmetic Logic Unit consists of five ,. . ~ _ integrated circuits connected as shown in the block diagram .. . . . . .
:
. . :
- , ;

~099~20 of rigure 34 and the detailed schematic diagram of Figures 33A-D. Specifically, the packages consist of two 1024-bit ROMs, a dual D-type flip-flop and two quad two-input NAND
gates.
Internally the desired binary logical function, binary arithmetic operation or BCD operation is selected by the ALU code as shown below.

ALU CODE

BCD AC2 ACl ACO ALU FU~CTION_ DESC~TPTION

~O O O O XOR ExclusiYe OR ..... R ~ S ~ T

lo O O 1 AND Logical A~D ...... R S T

¦0 O 1 O IOR Inclusive OR ,.... R ~ S ~ T

Blnary J O O 1 1 Zlr Zero ~ T-BUS

Functions ~ O 1 O O ZTT-C~C Zero ~ T-BUS, Clear Bin~ry C~rry 1 0 1 O -1 IOR C8C Inclusive OR, Clear Blnary C~rry ¦ O 1 1- O IO~SBC Incluslve OR, Set Bi~ary C~rry ~0 1 1 1 ADD Bin~ry ADD.. ...B.~ S + BC ~ T,C

BCD ~1 O 1 1 BCD ADD BCD ADD..... -To_~ ~ Ao_ ~ ~ _3 Functlons ~1 1 1 1 BCD OO~/ADD lO's Complemen~ and B~D AD~

~ 20 ALU FUNCTION CODE ASSIGNMENTS
.
The function code input "BCD" selects between the binary mode and BCD mode of operation.
In the binary mode, the function code inputs ACO, ACl, and AC2 select the desired logical function or arithmetic operation. The binary input data enters ROM #l on the carry, S-bus and R-bus input lines, and the binary result appears on the T-bus and binary carry output lines. ROM #2 is not used in the binary mode.
In the BCD mode of operation, the two function code _ .

i~99~Z~

lines ~C0 and ~Cl ~re disablcd from th~ Micro-processor and these two lines carry th~ T02 and T03 bits of BCD data from the T-Registcr. The ~LU function code line AC2 is used to select the desired BCD operation. If ~C2 is low, the four-bit output ~0,~ 2,~3 will be the BCD sum of the two BCD data inputs.
If AC2 is high and decimal carry has been set, the four-bit output ~0,~ 2,~3 will be the BCD Tens Complement of the BCD
data from the T-Register. In the BCD mode, the binary carry output will be disabled and the decimal carry output will be enabled to ROM Xl.
Although only one-fourth of the available registers in ROM Xl are required for the eight binary operations, the concept of adding a second 1024-bit ROM to perform the BCD
operations grew from several basic concepts:
1) The least significant BCD sum bit, ~0, is always identical to the bin`ary sum bit; therefore, only three additional outputs,S1,~2, and~3 need be generated. For BCD complement operations, the - decimal carry flip-flop defines whether or not the least significant bit should be complemented.
2) In forming the "nine's complement" of the T-Register BCD data in ROM #1, it can be seen that for 8421 code the second least significant bit T01 is the same before and after forming the complement. Thus only two bits, T02 and T03 need be complemented prior to input into ROM X2.
The ten's complement with add is then found by presetting decimal carry and performing a BCD
sum of the three most significant digits in ROM
~2.

-72~-~o99~o 3) With only ei~ht ROM inputs available, some sharing of inputs is requir~d for ROM ~1.
During binary operations, all four function codes and only one bit of T-Register data is required.
During BCD operations, all four bits of T-Register data and only two function codes are required. Use of two NAND gates in wire-OR
connection with the open collector function codes AC0 and AC1 permits sharing of the two inputs.
This arrangement left one input still available to ROM ~2. By programming this input to always make output DCI
true, the micro-instruction UTR can serve two purposes--placing units on the R-bus and also set decimal carry if BC~
is true. When BCD is false, clock is inhibited to decimal carry. This feature permits saving decimal carry information during all binary operations. Similarly, binary carry is saved during the four binary operations AND, IOR, XOR, and ZTT by connecting AC2 such that when AC2 is false the shift clock is inhibited to the binary carry flip-flop.

In summary, the mode select input "BCD" performs the following functions:

1) Addresses the proper 128 word set of word lines in ROM #1.
2) Enables the T02 and T03 data lines to ROM ~1 only in BCD mode.
3) Enables clock to decimal carry flip-flop only in BCD mode.
4) Selects binary carry or decimal carry into ROM #l as appropriate.
5) Transfers outputs~0,~ 2,~3, to A-Re~ister only in BCD mode.

-~2(J-~ , - ..... - . ~ .

~099~zo The remaining thrce ~LU func tion codes select the proper set of word lines in ROM 1rl to perform the eight ~inary functions. In addition, the AC2 input performs the following functions.
1) Enables clock to binary carry flip-flop only during the four carry-related binary functions and the BCD comp/add function.
2) In the BCD mode, AC2 causes BCD data bit TOO, T02 and T03 to convert to nine's complement form.
The ALU has a total OL 15 inputs which include 8 data inputs, 2 clock inpùts and 5 microinstructions. Four data output lines are required, and two additional output lines from carry flip-flops are available as qualifier inputs to the microprocessor. The ALU and shift register mnemonics are listed in the following table:
- SHIFT REGISTERS & ALU BOARD MNEMONICS
TRE T-Register to E-Register to R-Bus - T00 Bit ~ of T-Register TBE T-Bus to E-Register to R-Bus TTX - TEST T-Bus to A/B-Register from Tester TTX - I/O T-Bus to A/B-Register from I/O
(Board X12) TTX - RO~ T-8us to A/B-Register from ~ Processor (Board #13 ?
TTX Logical "OR" of Three TTX Signals AB Status of AB-Flip-Flop AB = O A-Reg. Operation AB - 1 B-Reg. Operation XTR A/B Register to R-Bus UTR Logical "I" to R-Bus TQR Q-Rcgister to Primary Address Flip-Flop ~B Complcmcnt of AB

-- ~099~20 SHIFT REGISTERS & ALU BOARD MNEMONICS ~Continued) TTP T-Bus to P-Register SCK Shift Clock QP~ Qualifier, Bit 0 of P-Register PTR P-Register to R-Bus QO0 Q-Register Bit 0 QTR Q-Register to R-Bus RCK ROM Clock QAB Q-Register to AB-Flip-Flop, also clears decimal carry.
SCB Set Binary Carry BCD Decimal Arithmetic AC2 ALU Operation Code QBC Qualifier, Binary Carry S-BUS Data Bus ACl ALU Operation Code AC~ ALU Operation Code T02 Bit 2 of T-Register - T03 Bit 3 of T-Register SDR Signal to Disable ROMs T01 Bit 1 of T-Register T-BUS Data Bus ALU Arithmetic Logic Unit ( ) Indicates Negative True Signal The following table gives an example of how the two ALU ROM chips shown in Figures 33-34 can be constructed to implement the above described ALU functions (in thls table each "1" represents a "low" state and each "0" represents a "high"state ):

l ~9~zo ~-ROM ~ 1 / lOoo; lJ 0000; 2/ OOGO; 3/ 1000 4/ ~000; 5/ OOOOi 6/ 0000; 7/ 1000 8/ 0~0; 9/ OOOG; 10/ 0000; . 1,/ 1000 12/ 0000; 13/ 0000; 14/ OOOo; 15/ 7000 16/ onoo; 17/ lOQG; 18/ 1000; 19/ 1000 20/ 00~0; 21/ 1000; 22/ 1000; i~3/ 1000 ~4/ 1000; 25/ 1000; . 26/ 1000; 27/ 1000 28/ 10~0; 29/ 1000; - 30/ tOOO; 31/ 1000 32/ 1000; 33/ 0000; . 34/ 0000; 35/ 1000 36/ 1000; 37/ 0000; 38/ 000~; 39/ ~OoO
40/ OooO; 41/ QOOO; 42/ OOOq; ~3/ 1000 44/ 0000; 45/ 0000; 4~/ 0000; ~7/ 1000 48/ 0000; 49/ 1000; 50/ 1000; 5i/ 1000 52/ 0000; 53/ 1000; 54/ 1000; 55/ 1000 56/ 1000; 57/ 10~0; 58/ 1000; 59/ 1000 60/-' 1000; 61/ 1000; 62/ 1000; 63/ 1000 64/ 1100; 65/ 1100; 66/ 1~00; 57/ 1100 68/ 1100; 69/ 1100; . 70/ 110~; 71/ 1100 72/ 0000; 73/ 0000; 74/ 0000; 75/ lOCO
76/ 0000; . 77/ 0000; 78/ 0000; 79/ lOOn 80/ 0100; ` 81/ 0~00; ~82/ aloo; 83/ 1100 84/ 0100; 85/ 0100; 86/ 0100; 87/ 1100 88/ 0000; . 89/ 1000; 90/ 1000; 91/ 0100 92/ 1000; 93/- 0100; 94/ 0100; 9~/ 1100 96/. 1100; 97/ 1100; 98/ llon; 9g/ 1100 100/ 1100; 101/ 1100; 102/ 1100; 103/ ~100 104/ OOGQ; - ,105/\~ 0000; 106/ 0000; 107/ 1000 108/ OOOG; 109/ ` 0000; 110/ 0000; 111 / 1000 112/ 0100; 113i 0100; 114/ ~100; 115/ 1100 116/ 0100; .117/ 0100; 118/ 0100; 119/ 1100 120/ 0000; ~ 121/ 1000; i22/ ~000; 123/ 0100 124/ 1000; 125/ 0100; 126/ 0100; 127/ 1100 128/ 0000; . 129/ oboo; 130/ 0000; 131/ oooo 132/ 0000; 133/ 0000; 134/ 0000; 135/ ~000 136/ 0010; 137/ .1010; 138/ 10~ 0; 139~ ~110 140/ 1010; 141/ 0110; ~ 142/ 0110; 143/ 1110 144/ 0001; 145/ 1001; ~ 146/ iOOl; . 147/ 0~01 148/1 OG1; . 149/ 0101; 150/ Oli4~; 151 / 1101 152/ 0011; 153/ 1011; 153/ 1011; 155/ 0111 156/101.1; 157/ 0111; . . .158/ 0111; 159/ 1111 160/ 0000; 161/ 0000; 162/ OOOG; 163/ 0000 164/ 0000; 165/ 0000; 166/ 0000; lG7/ 0000 1~8/ OQ10; 169/ 101~; 170/ 1010; 171/ 0110 172/ 1010; 173/ 0110; 174/ 0110; 175/ 1110 176/ 000~; 177/ 0000; .178/ 0000; 179/ 0000 180/ 0000; 181/ 0000; 182/ oooo; 183/ 0000 184/ 0011; 185/- 1011; 186/ 1011; . 187/ 0111 186/ 1011; 189/ Oîll; lgO/ Olil; .191/ 1111 192/ 0000; 193/ 0000; lg4/ 0000; 195/ 0000 196/ 000~; 197/ 0000; ~98/ OOOOi 199/ 0000 200/ 1~13; 201/ 0010; 202/ 0110; 203/ 1010 204/ 0110; 205/ 1010; 206/ 1110; 207/ 0110 208/ 1011; 209/ 0010; 210/ 0111; ~11 / 1011 212/ Glll; 213/ lOlli - 214/ 1111; 215/ 0111 216/ 1001; 217/ 0001; 218/ 0101; 219/ 1001 220/Ol ol; 721 /1001; 222/ 11 ~1 i 223/ 0101 224/ 0000; 225/ 0000; 226/ OOOOi 2~7/ 0000 ~28/- 0000; 229/ 00~0; 230/ 0000; 231/ oooo 232/ 1011; 233/ 0011; 23~/ 0111; 235/ 1011 236/ 0111; 237~ 1011; 238/ 1111; 239/ 0111 240/ 0000; 241/ ~000; 242/ 0000; 243/ 0000 244/ 0000; 245/ OOOOi 246/ OOOG; 247/ 0000 2~8/ 1010; 249/ OOlOi 250/ 0110; 2~1/ 1011 252/ 0110; 253/ 1010; 254/ 1110; 255/ Ol l o - .
,, ~, ~ ~99~ZO
ROM ~2 / 0000; 1/ 0000; 2/ COOO; 3~ 0000 4/ 0000; 5/ 0000; 6/ 0000; 7/ 0000 8/ 0000; 9/ 0000; 10/ 0000; 11/ 0000 12/ 0000; 13/ 0000; 14/ 0000; 15/ 0000 16~ 0000; 17/ oaoo; 18/ 0000; 19/ 0000 20/ 0000; 21/ 0000; 22/ 0000; 23/ 0000 24/ 0000; 25/ 0000; 26/ 0000; 27/ 0000 28/ 0000; 2~/ 0000; 30/ OOOOi 31/ 0000 32/ 0000; 3~/ 0000; 34/. 0000; 35/ 0000 36/ 0000; 3,/ 0000; 38/ 0000; 3g/ 0000 40/ 0000; 41/ 0000; 42/ 0000;- 43/ 000044/ 0000; 45/ 0000; 46/ 0000; 47/ 0000 4&/ 0000; 49/ 0000; 50/ 0000; 51/ 0000 52/ 0000; 53/ 0000; 54/ 0000; ~5/ 0000 56/ 0000; . 57/ 0000; 58/ 0000; 59/ 0000 60/ 0000; 61/ 0000; 62/ 0000; 63/ 0000 64/ 0000; 65/ 0000; 66/ 0000, 67/ 0000 68/ 0000; 69/ 0000; 70/ 0000; 71/ 0000 72/ 0000; 73/ 00~0; 74/ 0000; 75/ 0000 76/ 0000; 77/ 0000; 7~/ 0000; 79/ 0000 80/ 0000; 81/ 0000; 82/ 0000; 83/ 0000 84/ 0000; 85/ 0000; 86/ 0000; 87/ 0000 88/ 0000; 89/ 0000; 90/ 0000: 91/ 0000 92/ 0000; g3/ 0000; 94/ 0000; 95/ 0000 96/ 0000; 97/ 0000; 9~/ 0000~ 99/ nooo 100/ 0000; 101/ 0000; 102/ 0000; 103/ 0000 104/ 0000; 105/ 0000; 106/ 0000; 107/ 0000 108/ 0000; - 109/ 0000; 1,0/ 0000; ~11/ 0000112/ 0000; 113/ 0000; 114/ 0000; 115/ 0000 116/ 0000; 117/ 0000; 118/ 0000; 119/ 0000 120/ 0000; 121/ 0000; 122/ 0000; . 123/ 000~124/ 0000; 125/ 0000; 12~/ 0000;. 127~ 0000 128/ 1171; 129/ 1101; . 130/ 1011; 131/ 1001 132/ 0111; 133/ 0000; 134/ nooo; 135/ 0000 136/ 1101; 137/ 1011; 138/ ~ 001; 139/ 0111 140/ 1110; - 141/ 0000; 142/ OOOOi 143/ 0000144/ 1011; 145/ 1001; 146/ 0111; 147/ 1110 148/ 1100; 149/ 0000; 150/ 0000; 151/ 0000 152/ 1001; 153/ 0111; 154/ 1110' tS5/ 1100 156/ 1010; . 157/ 0000; 158/ 0000; 159/ 0000 160/ 0111; 161/ 1110; ~62~ 1100; 153/ 101016~/ l OOOi 165/ 0000; 166/ 0000; 167/ 168/ 0000; 16~/ 0000; 170/ 0000; 171/ 0000172/ 0000; 173/ 0000; . 174/ 0000; 175/ 0000176/ 0000; 177~ 0000; 173/ 0000:; 179/ 0000180/ 0000; 1~1/ 0000; 182/ 0000; - 183/ 0000 184/ 0000; 185/ 0000; 18~/ 0000; 187/ 0000188/ 0000; 189/ 0000; 190/ 0000; 191l 0000192/ 1101; 193/ 1011; 1~4/ 1001; 195/ 0111196/ 1110; 197/ 0030; ~198/ 0000; 199/ 0000 200/ 1011; 201 / 1001; 202/ 0111; 203/ 1110204/ 1100; 205/ 0000; 206/ 0000; 207/ 00002C8/ 1001; 209/ 0111; 210/ 1110; 211 / 1100212/ 1010; 213/ 0000; 214/ 0000; 215/ 0000216/ 0111; 217/ 1110; 218/ llOQ; 219/ 101022G/ 1000; - 221/ 0000; 222/ 0000; 223/ 0000 224~ 1110; 225/ 1100; 226/ 1010; 227/ 1000228/ 0110; ~2~/ 0000; 230/ 0000; 231/ 00~0232/ 0000; 233/ 0000; 234/ 0000; 235/ 0000236/ 0000; 237/ 0000; 238/ 00~0; 239/ 000024~/ 0000; 241/ 0000; 242/ 0000; 243/ 000~2~4/ 0000; 24~/ 0000; 246/ 0000; . 247~ 0110 24~/ 0000; 249/ 0000; 250/ 0000; 251/ 0000252/ 0000;- 253/ 0000; 254/ 00~0; 255/ 0000 - :

. .
.

20 ~-MEMORY UNIT

The calculator uses an all semiconductor memory system.
Peripheral circuitry is bipolar and the memory consists of n-channel MOS read-only memory (ROM) and p-channel MOS read/write memory (RWM).
Addressing and physical layout of the memory module is done so that the number of words can be increased from 5K in the basic machine to 9K in the largest machine. The smallest increment of memory that can be added is 512 words.
The basic machine contains 9.5K words of memory, organized into 7.5K x 16 ROM, and 2K x 16 R~M. The 16-bit RWM
words are divided into user registers and processor words.
The largest machine contains 15.5K words of ROM and 4K words of RWM.
~ - ,"
Read/Write Memory As shown in Figures 35-37B memory is made up of 102 x 1, dynamics read/write memory chips (Intel* 1103). These - devices are P-channel, MOS using silicon gate technology. To maintain the contents of memory, the device must be refreshed every 2 ms. This is accomplished by performing a read cycle at a given address. On each chip are 32 refresh amplifiers so that each read cycle, 32 cells get refrsshed. The entire chip is ~ then refreshed by cycling through the lower 5 address bits and reading each distinct address. The refresh period is 20 ~us at least every 2 ms.
Logic levels on all input lines to the RI~M chips are 0 to + 16v. This includes the 3 clock lines (chip select, Y-enable or write, and precharge), 10 address lines, and input data. The output data, however, is a current of 600 ~ua or more -_ 30 into lK ohms or less. This low level output is "wire-or able"

* trade mark 990Z~

with other chips to build larger systems.
Read Only Memory - As shown in Figures 35 and 38-40 ROM chips are 4096 bit, n-channel MOS arranged 512 x 8. The devices are static and consume no power when not enabled. Data is retrieved from the ROMs by pulling the chip enable line from 0 to + 12v (turn-ing the chip on), addressing the desired cells (0 or 4v levels) and selecting which output devices are to be enabled (4v or 0v).
The output levels are sufficient to drive one TTL gate directly, and can be "wire or/ed" for large systems.
As further shown in Figures 41 and 42A-D each ROM
chip comprises six input buffers. These input buffers generate both the input and its complement. On the basis of the 64 possible combinations of the 6-inputs Io-I5, one of the 64 lines -~ in the decoder is selected. The selected line enables one of the vertical lines in the 64 x 64 bit storage array. For example, let Io~ I5=0 and I6 ~ I8 be "don't cares". This means line X00 (octal) is selected.
The two 8 out of 32 select decoders must choose 16 lines from the 64 horizontal lines selected by the vertical line X00. (The 8 out of 32 select decoder is actually a 2 out of 8 decoder repeated 4 times in each of the sections A - B).

.. : .
The output from four MOS Fet's a, b, c, and d are "wire or/ed".
MOS devices a', b', c', and d' are also connected similarly.
If I6 and I7 = 0, horizontal lines lXX 2XX, 3XX, 5XX, 6XX, 7XX
are grounded in each of the four sections A-B. This insures that MOS FET's b, c, d, b', c', and d' are non-conductive. This allows signals on lines 0XX and 4XX to pass into the output sections through transistors , ;, .: -l~99Q20 a and a'.
The output section contains the output buffer, l of 2 decoder, and the output drivers s. The output buffcr provides a stage of gain and "wire or 's" 4 lines from the storage array. The 1 of 2 decoder clamps the gates of 2 of the 4 output drivers in each section A-B by enabling either line I8 or its complement ( ~ . This disables l of 2 signals coming from the output buffer. The output drivers then can be tied together with line (e) for a 512 x 8 organi-zation.
Each of the above-listed constants and routines and subroutines of basic instructions employed by the calculator is stored in these ROM chips. The sixteen bits of each constant and basic instruction are stored in the 512lo x 81o ROM chips by organizing the ROM chips into 64 x 64 bit matrices and compu-ting the row and column numbers of each bit of each matrix by operating on each address and the particular bit (15 through 8, or 7 through 0). The column number is computed by subtrac-ting the last two digits of the address from 1008. For ex~
ample, the column number of address 000 = 18 ~ 8 = 100 =
641o and the column number of address 777 = 18 ~ 778 = 1.
The computation of the row number (referred to as IR in the flow-chart of Figure 44) can best be described by referring to the flo~chart of Figure 44 and the associated table of Figure 4~. Once the row and column numbers are found it is a simple matter of storing in that location of the matrix that particular bit (i.e., a "l" or a "0"). A "0" is stored at a designated location by forming a-metal gate to complete a MOS FET device at that location, and a "l" is stored at a designated location by leaving off the metal gate so that a -73~-.. : .. . .

~Ug9~ZO

a MOS FET dcvic~ i~ not form~d at that location.
M-Rcgister ~ s shown in Figures 35 and 49 ~-B included on the M-Register board is the 16 bit ~ddress or M-Register, all chip enable decoding and buffering, and addrcss buffers for both ROM and RWM. The reyister uses four, four bit, serial in and out, parallel in and out shift Registers. Upon receipt of a TTM instruction from the microprocessor, serial data from the T-Bus is accepted into the M-register. Nothing is done with this data until either a read or write instruction is received, then one of two decoders are enabled. These chip Enable decoders uniquely decode which block of 512 words, either ROM or RWM, is being addressed. If ROM is being ad-dressed, the signal is inverted and amplified to ~12v. For RWM the Chip Enable enables a gate, which allows a 16 Volt clock signal to reach the enabled RWM chips. The clock wave-form is generated on the control card.
The dynamic characteristic of the RWM chips, requires that all chips be enabled simultaneously during a refresh cycle, to refresh the entire read/write memory. The buffer circuits in the output of the Chip enable decoders allow the chip select clock to reach al' of the RWM chips during refresh but only those being accessed~ during a read or write çycle.
Totem Pole outputs or gates with resistor pull-ups are used as buffers for the ROM address lines. Using the totem pole output gates, the effects of crosstalk can be minimized while the resister pullup lifts the address lines above the re-quired 4v level. The nand gates are enabled during a memory cycle so that the ROM address lines are inhibited at a Sv level. The RWM addrcss lines must pull from 0v to ~ 16v.

'` . . '~ ';

1~)99~Z1~

I~igh voltage, Opell crllector, invertcrs witll discrete trans-istor pull-ups are used as buffers for all the address bits.
Control .
A memory cycle consis~s of a read or write instruction from the processor accompanied by 12 clock pulses from the shift clock. As shown in Figures 35, 49 A-B and 47A-3, control uses th~se pulses and instructions to generate the clocl.s required by the RWM chips. A synchronous system of flip-flops and gates are used. The outputs from the flip-flops are the bu~fered to become the required clock signals (Pre-charge, Y-enable, chip select)~
Refreshing the read/write memory is also talien care of by the control. An astable multivibrator with a repetition rate of 500 HZ miniraum generates a signal which allows a re-fresh cycle to occur. A flip-flop generates the actual signzl ~EF), but only if the astable multivibrator signal is high, there is no read or write cycle in progress and the procesor signal,CCT, ls high. CCT goes high between processor instruc-tions, thus it is known that nothing is going to be interrupted when REF is generated. REF is then buffered by an open collector inverter and given to the processor I~I. INH halts thG machine and the refresh cycl- begins.
The same s~stem used for a memory cJlce is used during refresh to again generate the necessary clocks (Pre-charge and chip select). When the system returns to state 0 and REF is ~resent, a counter is advanced one count. This counter provides the refresh addresses which go to the RWM
only if REF is present. When this counter returns to state 0, it causes RE~ and INH to return to preset conditions and t'he machine continues normal operation.

-73~-~ . :

1()99~20 ~ llothcl~ functioll of thc control is to provicle Ior extended memoly capability. The control handles any e~tcrnal memory as if it were an extension of the internal memory~
~rom the user's point of view, he dGes not need to know if an extended memory is cGnnected other than the fact that available memory has increased.
In addition, the control has the provision ior e~;-tracting information from or loadillg information into the calculator T-Register through the D-3us (data bus).
Other signals generated Oll the control are employed to direct the flow of data in the T-register.
T-Register Data to and from the memory is temporarily stored in the T-register. As shown in Figuers 35 and 48A-B four 4 bit, serial in and out, parallel in and out shift registers ma~;e up the actual T-register. The registers have a mode control (TMC) which when low, allows serial data flow and whe1l high, allows parallel data flow.
Serial data enters the T-register in the prese1lce of the TTT instruction, and in the presance of a TTS recircu~ated in the T-register to prevent loss of data.
Parallel data is accepted from either ROM or RWM
during a read cycle. The ROM data is buffered by NAND gates and the ~WM ~y sense amplifiers followed by the same NAND
gates. All 16 bits are read from the ROM simultaneously.
Eight bits are read from RWM twice during a read cycle. Th~
eight bits to be written into RWM have their own discrete buffer stage that translates T2L logic levels into 16v logic levels used by the RWM.

~9020 MEMORY SYSTEM MNEMONIC TABLE
SIGNALS GENERATED OUTSIDE MEMORY I/O CONNECTOR
.

CCT - Control clock-not, the inverted envelop of SCK.
SCK - Shift clock.
MCK - Memory clock, a continuous pulse train, used by the memory control for timing of the memory and refresh cycles.
IOD - I/O Data. Goes to control board to be gated to S-BUS.
ITS - I/O to S-BUS, the signal which gates IOD to S-BUS.
SCO & - Coded signals which generate UTS - Units to S-BUS
SCI ZTS - Zero " "
MTS - M-Reg " "
TTS - T-Reg " "
m - T-BUS to R-Reg, OV = True.
T-BUS - Data on this bus acts as inputs to M ~ T registers.
RDM - Read memory, negative true. Lasts for 12 clock pulses.
WTM - Write memory, negative true. Lasts for 12 clock pulses.
INH - Inhibit, negative true. The processor is stopped whenever INH is at zero volts. The memory control generates this signal while a R/W memory refresh cycle is present. I/O
also generates it.
OTHER SIGNALS AT I/O CONNECTOR
Name Source TOO T-Register TOl " "
T02 " "
T03 " "
D-BUS - Data Bus - external data (extended memory data) enters machine via this bus.

EDT - External Data Transfer gates D-Bus data into machine Ov = True.
EMB - Extended memory busy. Signal provided by extended memory that tells memory control a. Extended memory cycle is complete b. Extended memory is present.
SIGNALS GENERATED ON READIWRITE MEMORY CARDS
RWD(XX) - Read/Write data. Output from the 1103 memory.
600~a into lSO~ = ~~1"
O current = O

X

~ 99~3;ZO
OTHER SIGNALS USED BY (RWM) Name Source CEN M-REG
RWI(XX) T-REG
R/W CONTROL
PCG CONTROL

SIGNALS GENERATED ON T-REGISTER CARD
TOO-T15 - T-register data bits. Used as data into memory TOO-TO3 are also outputs to the CPU. (4 bit processing) RWI(XX) - Read/write inputs. T-register data gates to Read/write memory.
+16V ~ GND.

OTHER SIGNALS USED BY T-REGISTER
Name Source ROD(XX) ROM
- TRI CONTROL
TSC CONTROL
TMC CONTROL
TPC CONTROL
RWD(XX) R/W MEM
RWE M-REG

SIGNALSGENERATED ON M-REGISTER CARD
MOO-M15 - M-register data bits. Used to generate address and chip select information. (MOO also is gated out on S-BUS by MTS) IOO-I07 - ROM address bits. Decodes down to two bits available at ROM
output buffers.
I08-I08 Selects which ROM output buffers are enabled.
CS(XX) - Chip enable, basic machine selects which ROM chips are turned on (+12V - ON) AEN - Address enable. AEN = RDM + WTM
AO5-AO9 - Address bits for R/W memory. (+16V & GND) CEN - Chip select, basic machine a negative true clock which selects which R/W chips are turned on. (+16V & GND) ,j,~

---` 1099020 c~ . A ~r)~ r~ y ti~ Y cl ic; .~dd~ lo~ clIillc mclnoI~ ~ycl-m OT~R SIG~ALS USED BY T~IE ~I-REGISTER
N~me Source T-BUS PROCESSOR
- SCK ~' RD.~I "
WT~

VLD CONTROL
~ITS

..
.
SIGNALS GE~ERATED BY CO~TROL
OR - A signal generated half ~ay through the memory cycle to disable the accive pull up devices on the RO~I out-pu~s .
TRI - T-Register input TRI = tT-8US) . (TTT~ + (T00) . (TTS) ~TS - M-register to ~-BUS. Generated from SCO, SCl A00-A04 - Address bits for R/W memory also used during memory refresh.
TSC - T-Register series cloc~. TSC = SCK.(TTS ~ 'rTT + EDT) TPC - T-Register parallel cloc~. (Strobes in data from memory~ only during internal memory read cycle.
R~W Read/Write. A clock ~hich left at ~16V for a read and clocked to GND during a write. (R/~'~ memory only) PCG - Precharge. The 3rd 16V cloc~ required by the 1103 R/~Y
memory chips.

RE~' - Refresh. OV when the mcmory is in ~ refresh cycle.

..

-7~2-.,. l~9~ZO

CEM - Call extended memory. Prevents ROM clock from changing processor states. Given for all read and write commands.
Signal is removed if the memory cycle is not extended memory cycle. If extended memory cycle, CEM is removed after extended memory has completed cycle. OV= True.
S-BUS - Gates I/O register, data, T00, M00 or ones onto S-BUS
and sent to processor. O = True.
INH - Inhibit, negative true. The processor is stopped whenever INH is at zero volts. The memory control generates this signal while a R/W memory refresh cycle is present. I/O
also generates it.
TMC - T-reg mode control. TMC = O; T-reg is set up to accept information from memory. TMC = l; T-reg. is set up to shift serially.
EMC - Extended memory cycle. +sV signal used to signal extended memory to begin its cycle. Ov = True.
VOR - A signal generated half way thru memory cycle to allow data to flow out of ROM.
OTHER SIGNALS USED BY THE CONTROL
Name Source CCT PROCESSOR
TOO T-REG
IOD PROCESSOR
ITS "
SCO
SCI "
TTT "
T-BUS
SCK "
RDM "
WTM "
MCK

AEN M-REG
EDT EXTENDED MEMORY
D-BUS I/O CONNECTOR

EMB EXTENDED MEMORY

, -743-9C~ZO

SIGNALS GENERATED ON ROM BOARD

ROD(XX) - Read Only Data OTHER SIGNALS USED BY ROM
Name Source CS(XX) M-REG

VOR CONTROL

"

,, , ~ . ~
. .

1099~ZO

INPVT-OUTPUT CONTROL UNIT
The input-output control unit allows the calcu-lator to co~municate with the internal input, input-output, and output units and with external peripheral devices. As shown in Figures 31~-C and 49A-D, the input-output control unit is contained on two printed circuit boards, the "control and system clock" board and the "I/O register and gate interface" board. A third board, shown in Figure 50, is an I/O motherboard providing room for connecting four ex-ternal interface cards to the calculator.
The internal input, inp~t-outpu~, and output units are distinguished from peripheral devices by the fact that the I/O language set addresses them directly. ~ence, each I/O instruction contains an internal peripheral address as part of its makeup. The four internal directly-addressable - input, input-output, and output units are the I/O register, the magnetic card reading and recording unit, the output printer unit and display unit.
The external peripheral devices are indirectly addressable and are connected via cable to an interface card which is plugged into the I/O motherboard at the rear of the calculator. The term indirectly addressable is de-fined here to mean the external peripheral devices are addressed by lines leading from the four most significant bits in the I/O register, thereby requiring an address word to be loaded into the directly addressable I/O register.
I/O CONTROL AND SYSTE`~I CLOCX SECTION
- The function of the I/O control and systcm clock section is to provide control to the I/O register and gate interface section. This is accomplished by use of an I/O

-7'15-- ~99~

instruction set stored in the main memory of the calculator.
The micropro~essor causes instructions from the memory unit to be loaded into the T-Register and then to be transferrcd to the Q-Register. The microprocessor deter-mines the type of instruction and causes the proper execution of the instruction. If the instruction is an I/O type, con-trol is transferred by the microprocessor to the I/O control and system clock section.
The microprocessor remains in a two-state waiting loop while the I/O control section is active. Time in the wait loop is between .72 micro seconds and 6.5 micro seconds.
Bits S through 10 from the Q-Register are connected to the I/O control section and remain constant during an I/O instruction execution time. Bits 5 through 8 repre-senting the I/O ins~ruction code are gated to the I/O
address ~lip flops and entered on each cloc~ time while the I/O is inactive. The four outputs of the address flip flops are connected to the address input of a 1 of 16 de-coder and represen~t the starting state address of the I/O
- instruction to be executed. When the I/O control section is enabled, the input gates passing bits S through 8 to the I/O address 1ip flops are closed and the 1 of 16 de-coder enabled. This allows the starting state I/O micro instructions to come from the 1 of 16 decoder. The next state address coming from the closed input gates will be the exit state (1111=178) unless modified by reopening the yates to let the original starting state code through or by modifying the output of one or more of the input gates using a "wire or" connection coming from the 1 of 16 de-coder ou-tput. This address is sent to the I/O addrcss -7~G-~99~21 _ -flip flops inputs an~ clocked in on the leading edye of the first half clock cycle. The first half clock cycle turns off the 1 of 16 decoder and the address changes. The second half clock cycle enables the 1 of 16 decoder, allowing the next sta-te micro instruction to appear. (See Figure 51 for the timing dcscribed above). This process continues until the exit state is encountered. On the exit state, the I/O
Control is disabled and control is returned to the micro-processor.
The I/O instructions involving the transfer of data between the I/O and the CPU (OT, LI, MI), require 16 passes through the same state (1 pass for each of 16 bits). This is achieved by checking the output of a 16 bit down counter and then decrementing after each pass through the state.
If the counter indicates "O" has not been reached, it causes the starting state address to be reloaded into the address flip flops by opening the input gates. When 16 passes have been indicated-by the counter, the input gates are not allowed to open; however, the next state (1111) is modified by the output of the 1 of 16 decoder through a "wire or"
connection on the-2nd bit to give state 1101. This address is input to the I/O address flip flops as in the preceeding paragraph.
The above-described operation of the I/O control section is also illustrated and further described in the flow chart of Figure 52.
Bit 9 is called a hold/clear bit. It allows a clear flag (CLF) to take place or not to take place after e~ecution of the other I/O instructions (STF excepted).
Bit 10 is used in conjunction with the micro instructions -7~7---` 1099020~
PTl~ and XTR to give control to th~ I/O.
The I/O control and programmable clock mnemonics are given in the following table:
I/O CONTROL BOARD MNEMONICS
CC0 Clock Code Zero CCl " " One CC2 " " Two CC4 " " Four CC8 " " Eight CCT Control Clock to Tester CEM Call Extended Memory CLC Clear Control CLF Clear Flag DRC Data Register Clock EBT Eight Bit Transfer EOW End of Word IIO Inhibit Internal OSC
INH Inhibit Clock IPS Inhibit Primary/Secondary ITS Input to S-Bus MCK Memory Clock POP Power On Pulse PTR P-Reg to R-Bus QFG Qualifier Flag Q5 - " Five Q6 " Six Q7 " Seven Q8 " Elght Q9 " Nine Q10 " T~n QRD " ROM Disa~le RCA ROM Clock Address -7~

~ , ..

99~

I/O CONTROL BOARD MN~MONI~S (Continucd) RCF - ROM Clock Flip Flop SCB Set Carry Bit SCK Shift Clock SCT " " to Tester SRA Service Request Acknowledge STC Set Control STF Set Flag TCK Tester Clock TTO T-Bus to Output TTX T-Bus to A/B Reg.
XTO External OSC
XTR A/B Reg. to R-Bus Note: .
( ) indicates negative true signal I/O REGISTER AND GATE INTERFACE SECTION
As shown in Figures49 A-D, the directly addressable I/O register (address 01) is a 16 bit universal parallel in/out, serial in/out) register that is connected to the calculator processor by the serial-in S-Bus and the serial-out T-Bus. Information is passed non-inverted from the A
or B registers bit serial to the I/O register with the I/O
instruction OTX ~1. Sixteen lines connected to the parallel outputs of the I/O register provide data out to the internal input, input-output, and output units and to the external output interfaces. (NOTE: each I/O unit or interface may place only 1 TTL load on the output lines.) Parallel entry to the I/O register is through 12 party lines connected to the 12 least significant parallel inputs. The input lines are negative true with all input -71~-99~20 , in~erfaces tying to tllc lines througll open collectors.
Care must bc ta~en to insure there is no disturbance to the lines while an interface is inactive. Input informa-tion is passed inverted to the A or B register bit serially with the I/O instructions LIX ~1 or MIX ~1. (The inversion puts positive true information into the A or B register).
Input information is entered into the I/O register in three ways:
a) Service Re~uest.
Entry by the service request method is con-trolled by a service inhibit flip flop. When the service inhibit flip flop has been cleared with the I!O instruction CLF ~1, a service re-quest may be initiated by returning the SSI
(Service Strobe Input) party line to ground through an open collector on the interface.
This signal causes the parallel inputs to be strobed into the I/O register and sends a re-quest for service ~QNR) to the microprocessor.
The microprocessor prior to receiving a request for service would have-been cycling through various instruction paths and checking for a service request after execution of each instruc-tion. Upon receipt of a request for service, the processor interrupts the sequence of instruc-tions it was doing and loads an address into the M-Register which contains the starting address of the service routine. At the same time a sig-nal, SRA (Service Request Acknowledge), turns -30 off the service inhibit flip flp and also sets : .:. ' '~' .

- /
1()99~ZO

the single scrvice flip flop which permits only one service intcrrupt to thc proccssor per ser-vice strobe input. The single service flip flop is rcset when the service strobe is removed.
All lines from an interface using the servicc re-quest method for entering information are inhib-ited when the service inhibit flip flop is set.
b) Return of Channel Flag After Command is Given .....
_ an External Peripheral Device.
This method implies the calculator must control the peripheral. That is to say the calculator transmits the indirect address and control en-able (CEO) from the "I/O Register and gate inter-face" section to the interface with the expecta-tion of information being returned by the peri-pheral through the interface to the I/O register.
Because of this expectation, only limited instruc-tions may be performed by the calculator while waiting. The service request method must be inhibited during this wait so that input informa-tion is not destroyed by another peripheral using service request.
- When a controlled peripheral responds, its flag and data are processed at the interface. The signal C~I (Channel Flag In) causes the loading of parallel data from the interface into the I/O
register and clears the control enable flip flop so that the CEO signal is removed from the inter-face. The calculator can interrogate the control enable flip flop with the ins'tructions SFS ~1 or SFC ~1 to determine when data has been loaded in.
c) Givin~ the I/O Instruction STF ~1.
The instruction STP 01 as described in (a) sets the service inhibit flip flop inhibiting the service request mode of entry. The STF 01 instruction also causes a parallel load of the input lines into the I/O register.

The output display (address 08) receives information from the I/O register. A 16 bit word is transferred to the-I/O register with the instruction OTX
08. The address ~8 allows the display enable flip flop to be set with the micro-instruction EOW after the 16th bit has been transferred. The display enable flip flop sends a signal DEN to the display indicating information is ready in the I/O Register. The display enable flip flop is cleared with the I/O instruction CLF 08.
The keyboard operates as described below. 7 bit ASCII assigned keycodes are entered into the calculator by an interrupt process. When a key on the keyboard is depressed the keyboard interface card requests service. Input data is 1~9~(~ZO

storcd along with th~ request f()r service on the kcyboard intcrface card. The stored signal for service is gated with the Prevent Interrupt si~nal through an open collector N~ND gate onto the Service Rec~uest party linc (SSI = Low ~or service) The giving of Service Request causes the I/O register to be loaded. EIowever, input data from the keyboard interface card is not enabled yet. Thus alL status and data inputs are high. This indicates to the CPU that a keyboard is interrupting. An OT x 16 instruction is given by the firmware. The select code of 16 enables the gate of the data input lines by a STF 1 instruction and data is loaded into the I/O register. LIA 0 allows data to be taken from the I/O register.
All external peripheral interfaces are indirectly addressed from the four most significant bits in the I/O
register. Thus to communicate with an external peripheral, an address (~000 excluded) must be loaded into the I/O
register. Data and status will b e loaded at the same time if the peripheral is to act as a receiver. If the peripheral is to act as a transmitter, only the address and status need be loaded. Next, the I/O instruction STC 01 sets the Control Enable Out flip flop. This flip flop sends a signal CEO
to all external interface slots. The CEO signal and the decoded (from the 4 bit address) address allow the interface to command the peripheral. After the peripheral has responded, information given back to the interface by the peripheral is processed to the I/O register in the manner described above under (b) "Return of Channel Fla~ After Command is Given to an External Peripheral Devicc"
The I/O register and gating control circuit mnemo-nics are givcll in the followin(3 ~ablc:

-75';-`-` lV99CP20 I/O REGISTER AND GATE BOARD
CEC Control Enable Out CFI Channel Flag In CLF Clear Flag CO0, 1,2,3 Code Out DEN Display Enable DI0, 1,2,3,4,5,6,7 Data In DO0, 1,2,3,4,5,6,7 Data Out DRC Data Register Clock EBT Eight Bit Transfer EOW End of Word IOD I/O Data KLS Key Lights Strobe MCR Mag Card Reset MFL Mag Flag MLS Mag Latch Strobe PEN Printer Enable POP Power On Pulse PTF Printer Flag Q0 Qualifier Bit 0 Ql " "
Q2 " " 2 Q3 " " 3 Q4 " " 4 QFG " Flag QNR " Not Request ..
SIH Service Inhibit SI0, 1,2,3 Status In SO0, 1,2,3 Status Out SRA Service Request Acknowledge SSI Service Strobe In STC . Set Control STP Stop STF Set Flag X

~ r~l~ ANn C,~ J,~ Lill~lccl) 1099~20 ~r-13~l~ T~
~ro T Bus to Out~ut NOT~:
( ) indicates ncg~tivc tr~le signal As shown in Figure 53, when addrcssing a peripheral device, bi-ts loaded into the 4 most significant locations in the I/O register from the CPU constitute the peripheral address code. ~s part of the output party line system the address code is routed to all I/O interfâce slots. Each I/O inter-face card decodes the 4 line address code to a unique single line for use on that particular I/O card. The binary codes 10 through 15 have been reserved for dedicated peripheral addresses which are used by dedicated keys (from the key-board) and dedicated I/O drivers. Binary codes 1 through 9 are for general use. Code "0" is a non-addressing code and is used in operations that do not involve addressing a specific peripheral. The following table summarizes the address code assignments:

ADDRESS COD~ ASSIG~/E~TS
~DD-- ¦ 4-8IT ¦ ASSIG~iED PERIPHERAL
RESS CODE
15HH~IH TYPEtl~/ ITER
14HH~LL PLOTTER

. , __ ..
12IUILL XEYBOAElD ~: KE5'80.MD-LIKE pERIPH~ tLS
.

._ .
lOHLHL
_ . ._ .

9IILJ~I GE~iER.~L liSE; ONE OF NINE SFLECTABLE
8LLLL ,.
7 . ..
6 LELHL ~.
. .
LILLH ..
_ .1 LHLL ..
. . . __ 3 LLHH ..
.
2 LL.IIL ..
. . . _~
l LL.I.I I ..
__._.___ US~.I) O~ '0 I~ n~-~cl, C~
IJ ¦ LLLI. 1~ 1 Tlll` l tlTl:lH~ T n~:Co~l}:S E`:~lll,LD

1~)99(~20 The gcneral us~c codes (1-9) are dccoded outputs ~rom a line to 1 of 10 decoder (SN 7~2 for example). It is in-tendcd that the codes 1 through 9 be jumper selectable. This would allo~v the user to select a code ~or his system peripherals or allow him to use more than one of the same peripheral by selecting diffcrent address codes.
Since the I/O register is used to communicate with the i~ternal input, input-output, and output units as well as peripheral de~ices, a given peripheral's address code will appear randomly in the I/O register address field ~ith there being no intention of expecting the peripheral to respond:
Therefore, a second piece of information is necessary for the I/O inter~ace card to form a unique signal which will indicate to the peripheral to respond. This second piece of informa-tion is control information and is described hereinafter.
The I/O interface cards contain TTL compatible logic for manîpulatin~ control ànd data from the calculator and/or the peripheral. All I/O interface cards ~hich are intended to be used with the calculator must provide storage either on the I/O interface card or in the peripheral. Thus data bein~
transferred f20m the calculator to the I/O card must be stored at the instant the peripheral is requested to respond. Like-wise data coming from a peripheral must be stored until the calculator accepts it. This requirement is important and must be considered on all compatible interface cards.
The calculator can supply up to 100 ma maximum at ~5 volts to each I/O interface card. Power exceeding this abso-lute m~ximum must be supplied by the peripheral.
The following ~able lists the pin assignments for all I~O lines at the plug-in slots on the calculator back plane, -75~-1~99~20 as viewed Erom thc rcdr oE tlle calculato.r, ].cft to right.
~XTERNAL IjO INT~RFACE
PIN ASSIGNkll:NTS
L A L
2 +5 B +5 USED E USED

~ 10 DO 4 L DI 4 \~ 11 DO 5 M DI 5 Q~
- c 12 DO 6 N DI 6 ~`
13 DO 7 . P DI 7
14 SO 0 R SI 0 SO 1 . S SI 1 ~I X SIH

The chart below lists all I/O lines with brief defini-- tions and specifications and Figure 50 shows the source ancl re-lative relationship of the I/O lines. The output address data lines (Co 0-3) trans~it the address code along the party lines to all interface slots. These lines will go high and low ac-cording to information being shifted in or out oE the I/O
Re.cJistcr. At anytime a pcriplleral is address~d the lin~s will . ,. , ~

1/0 Line Spec1fication Chart Nan~e o~ Voltaqe No. of Line Line Definition Direction L~ad/LoadingHigh Low Lines 1 Address Data Transmits a 4 bit address from the Out 1 TTL (1 6ma) _ 2.4v < 4v 4 1/0 Register to be recogni~ed by allowed per inter-(CO 0-3) an interface card. (Data = High) face.
2 Device Ready Indicates calculator is ready for in- Out 1 TTL (1.6ma) > 2.4v < .4v formation interchange with an ad- allowed per inter-dressed peripheral. face.
(Active State = Low) 3 Device Request Acknowledges receipt of data by a In Loading of 6.6 ma 1~ re- Must ~e peripheral from the calculator or to the interface sistor driven indicates data is to be input to the card. to ~ 5~ below (~F~) cd k ulator.
(Active Stage = Low) collector 4 Halt Status Indicates stop key has been de- Out 1 TTL (1.6ma) > 2.4v < .4 pressed. Al~owedtinter-(~r~) (Active State = Low) face.
S Input data Receives input data to I/O register. In Loading of 6.~ma lk Res. Driven 12 (DI p-7 To + 5v < .4v (SI ~-3) (Data = Low) 6 Output Data Transmits Data from the 1/0 register. Out 1 TTL (~.6 ma) > Z.4v < .4v 12 (DO ~-7 Allowed/lnter-SO 0-3~ (Data = High) face.
7 Prevent Inter- Indicates data cannot be entered under Out 1 TTL (1.6 ma) 2.4v .4 ruDt service request. (Interrupt) Al~owed/inter-( ~ ) (Active State = Low) face 8 Service Re- Indicates a CPU interrupt is to In Loading of lk Res. Driven quest (Lo) take place to allow data to enter. 6 6ma to + Sv .4 (SS') (Active State = Low) become steady 1 instruction time ( 8 ~s) before control information is passed to the I/O interface card or before data or status is taken from the I/O interface card and will remain constant until the control in-formation is removed. After the control information is removed, the state of the I/O lines become unpredictable until the next addressing takes place. Address data coming to the I/O interface card is positive true and each interface may place 1 TTL load on each address line.
The output data lines (DO 0-7) output data from the A or B
accumulator in 8 bit bytes from the 8 least significant locations in the I/O register to all interface card slots. The logic state is positive true (Data = 1 = High). Each interface card may place 1 standard TTL load on each data line.
The output data status lines (SO 0-3) output status data from the A or B accumulator and are driven from the next ~i , ~ -758-- ~099C~ZO

four locations above the data ou~ posi~ions in the I/O
re~is-ter. (DO positions - 0 thru 7; SO positions = 8 tllru 11). These lines arc used for sending additional information to a peripheral. The logic state is positive true. One - standard TTL load may be placed on each output data status line. (Special drivers, fast data transfer, and interrupt do not make use of SO 3).
The input data lines (DI 0-7) transmit input data in 8 bit bytes to the 8 least significant bit positions of -the I/O
register (Locations 0 thru 7) from the I/O interface card.
Each "Data In" line has a lK pu11 up resistor to +5 volts and under the party line system must be driven low for a logical 1 from open colLector gates on each addressed I/O interface card_ The logic state is negative true.
The input data status lines tSI 0-3) receive informa- -tion from the I/O inter~ace cards and transmit it to location 8 through 11 in the I/O register. Each line has a lK pull us resistor to ~5 ~ol~s These lines are used to provide additional information to the calculator about the state of a peripheral. The logic state is negative true.
The negative true "Device Ready'i output line (CEO) transmits a control signal, which when combined with an ad-dress code will initiate a peripheral response on the ad-dressed I/O interface card. "Device Ready" is controlled by the I/O inter~ace driver and therefore may look different depending upon the driver. For example, when the calculator wishes to transmit data to the I/O interface card or to init-iate a peripheral response prior to receiving data from the peri-pheral, the calculator causes the "Device Ready" output line to go low and stay low until the peripheral response is ovcr and the calculator rcccives thc signal "Device Requeit" (~

j ~ . . . . . . . . . . .
- : .. -: .

~099~20 from the I/O interace card. The "Device Ready" flip-flop always rcceivcs a clear si~nal whenever thc I/O register com-pletes a parallel load.
The "Device Re~uest" party line CFI when driven low from an open collector gate on the I/O interface card will cause the loading to parallel input information into the 12 least significant locations of the I/O register. The active state of the line is low (negative true).
The peripheral flag, indicating to the I/O interface card the peripheral has received data/control or is ready to input data, is gated through an open collector nand gate onto the "Device Request" (CFI) party line. The open collector gate is enabled by the I/O interface card's address and "Device Ready" (CEO). The "Device Request" line is pulled up inside the calculator by a lK resistor to +5 volts.
The "Device Request" (CFI)signal must stay low until "Device Ready" (CEO) has been cleared (goes high). At this time data transfer has terminated and peripheral's flag and control must be cleared in preparation for the next pass.
Since a parallel load in the I/O register causes the "Device ~ Ready" flip-flop to receive a clear signal, when a "Device __ request" (CFI) is entered, a parallel load takes place and afterward i'Device Ready" (CEO) is cleared. The calculator uses "Device Request" in its general mode of data transfer.
The "Halt Status" output line (STP) is a line that goes low when the STOP key on the calculator is depressed. I-t will stay low for the duration of the key depression. One standard TTL load may be placed on this line by each I/O
interface card.
The "Prevent Interrupt" output line (SIIl), w~len low in-, 1~99nz~_ dicates to the I/O intcrface card that a request for service must not be ~iven to the calculator. One standard TTL load may be placed on this line by each I/O interface c~rd.
The "Service Request" (Lo) line (SSI), when driven low causes the loading of parallel input information into the 12 least significant locations of the I/O register and causes a CPU interrupt for service. The peripheral's request for ser-vice is gated with the "Prevent Interrupt" (SI~I) line onto the ~'Service Request" party line through an open collector nand gate. A lK pull-up resistor to +5 volts is connected to the line inside the calculator.
The general format for all data transfer consists of 8 bit parallel bytes. Other data formats are handled by specially developed drivers, such as the ROM plug-in module employed for driving the typewriter.
The state of a peripheral is generally checked before attempting an output. This is done by first inhibiting the interrupt system. The address of the I/O interface card is shifted into the I/O register. The decoded address code en-ables the open collector gates on the I/O interface card. The status of the peripheral is passed to the "Status In" lines and loaded into the I/O register with an I/O instruction issued by the calculator.` The I/O register information is trans-ferred to the A or B accumulator and processed. If the peri-pheral is ready, the output data word consisting of the ad-dress code, output status (if necessary) and the eight bit data byte i5 formed in the A or B accumulator. The output data word is transferred to the I/O register after which the "Device Ready" tCEO) flip-flop is set. The I/O interface card receives the data, address code and "Devicc Ready' and a peri--7Gl-~ ~99~;~0 pheral response is initiated. The calculator interrogates the state of the "Dcvice Ready" flip-flop to determinc when the I/O interface card has received the information and the peripheral response is done. The peripheral I/O interface card signals the calculator it is done by transmitting the "Device Request"
(CIF) signal to the calculator. The output waveforms are shown in Figure 54.
Before inputing data from the I/O interface card it is necessary to determine if the peripheral has responded and is ready to input data. After a peripheral response has been initiated, as described previously, the calculator waits for the "Device Request" (CFI) which loads the data into the I/O register and clears the "Device ~eady" (CE0). The calculator checks the state of "Device Ready" and when it goes -false (CEO = HIGH), the calculator knows data is present in the I/O register and proceeds to shift it into the A or B
accumulators for processing. The input waveforms are shown in Figure 61.
- When blocks of data are to be transferred between a peripheral and the calculator, the interrupt is turned off, and transfer rates as high as 100,000 bits/sec may be pos-sible. Be~ore either input or output of a block of data can start, it is necessary for the calculator to check the status of the peripheral to see if it is turn~d on and ready.
The address locations of the I/O register will remain unchanged during the block transfer. A single I/O instruction shifts the 8 bit byte of data from the 8 least significant loc~tions in A
or B to the 8 data locations in the I/O register; gives :Device Ready (CEO goes low) 120 nanoseconds after the shift is co~pleted and shifts the 8 most significant bits in A or B to the 8 -7~2-i~9g~Z~

least significant locations in A or ~ in preparatioll Eor the next transfer. (Note the address and status field in tlle I/O register are no-t disturbed in the shifting).
"Device Ready" s-tays true (low) until the peripheral has received the data and is ready for more. The I/O interface card then returns "Device Request" (CFI) to the calculator.
The receiving the "Device Request" (CFI) to the calculator causes loading of the parallel input party lines into the input status and input data locations of the I/O register, and clears the "Devic- Ready" signal (CEO goes high). The logic sense of "Device Ready" is observed by the calculator and when it goes false (CEO = High) the CPU proceeds to output the next 8 bit byte of data.
If the output I/O interface card is not returning information on the input lines all input lines will be high when the loading, described in the preceeding paragraph, takes place. Therefore, if at the beginning the code in the output status field is being used by the I/O interface card and must remain something other than all high it will be necessary for the I/O interface card to receive the output status from the calculator and return it back to the status inputs so that when."Device Request" occurs the status field does not get changed in the I/O ~egister.
Input: After determining if the peripheral is ready to start transferring a block of data the calculator turns off the int~rrupt and shifts the address code into the I/O
Register. (The address code remains unchanged during the block transfer). The "Device Ready" is given (CEO = Low) to the calc~lator when the 8-bit data byte is ready for input. The "Device R~quest" signal causes th~ input data and -. - . . . , ~ ~ : ~

1~39~ZO

status to be ]oaded into the I/O register and causcs "Device Ready" to go false (CEO = High). The calculator by checking when "Device-Ready" yoes false knows the data has been loaded.
single I/O instruction shifts the 8-bit data byte from the I/O register-into the 8 most significant locations in the A or B accumulators (Shifting the previous information in A or B 8 places to the right) and causes "Device Ready"
to go true (CEO = Low) 120 ns after the last bit has been ~hifted into A or B. As before if output status is to be retàined on the I/O interface card it must be returned to the I/O register upon each input data transfer. Wave forms illustrating high speed operations are shown in Figures 56 and 57.

The calculator software makes use of the interrupt system in two.different manners. The first is for remote keyboard llke peripherals.
These are those peripherals which logically re-semble the calculator keyboard. Only 7 bit ASCII assigned keycodes are recognized by the calculator. The interrupt takes place by the peripheral indicating to the I/O interface card that a request for service exists. Input data must be stored along with the request for service on the I/O inter-face card or in the peripheral itself. The stored signal for service is gated with the "Prevent Interrupt" signal through an open collector NAND gate onto the "Service Request"
party line (SSI = Low for service). The giving of "Service Request" causes the I/O register to be loaded. However, input datà from the I/O interface card is not enabled yetO
Thus all status and data inputs are hiyh., This indicates to the CPU that a keyboard-like peripheral is interruptiny -7~-.~
.::
. . .

and addre~s code 12 is shlf~od into the I/O rc~ister. Thc decoded ~ddress 12 on the I/O interface card enables thc gates to the data in lines and data is now loaded into the I/O
register. After the data has been ta~en from the I/O reg-ister address 12 is again put into the I/O register and "
Device Ready is given as a 360 nanosecond pulse to clear all stored keyboard-like requests for service. This implies all keyboard~ e peripherals must be user controlled such that only one interrupt at a time is taking place.
The second is nonkeyboard-like peripherals.
These peripherals will output or enter standard ASCII codes for data by using a special ROM (other ROMs may be developed to handle di~ferent codes). When a request for service is given to the I/O interface card by a peripheral the request and all data must be stored until serviced by the calculator. The interface card may have any of 9 addresses ~ 1 thru 9). The stored request for service is gated with "Prevent Interrupt" through an open collector NAND gate onto the "Service Request" party line. At the time "Service Request" is recognlzed address "~" is gated with the stored request for service through an open collector onto an input data or status line which corresponds with the address of the I/O interface card. For example, "Data In" 0 which is the 1st position in the I/O register represents card address 1, and 2nd position is card address 2, etc. When the I/O
register is loaded as a result of the "Service Request" the interrupting I/O car's address is loaded into the I/O reg-ister and "Prevent Interrupt" enabled (SIH - Low). The con-tents of the I/O register are processed by the CPU which then shifts the interrupting card's address into the I/O

`:

. . .

lW9~ZU
register. Tl~ address enable~ tll~ gates to the data-Ln lines and da~a is loadcd int:o the I/O registcr. After the data is processed by the CPU the intcrrupting card's address is shifted from the CPU into the I/O register and a 360 nanosecond "Device Ready" pulse (CEO = Low) ~Iven to clear the stored request for service on the I/O interface card, after which the "Prevent Interrupt" is disabled and the next interrupt allowed to take place. Under this system, multiple interrupts may take place without consequence. Each will be serviced in turn from low to high address psotion. An interrupting peripheral may also interrupt to request output data from the I/O register. The interrupting process is the same as above except the calculator transmits data rather than receives data. Figure 58 shows waveforms ill-ustrating the interrupt.
The following table lists the general I/O in-struction set and the associated codes:

lW9C?Zo I/O INSTRUCTION S~T

N~r~lE INSTr~UCTION INSTRUCTION COD~
I:XI:CIJTION
TI~I~ 15 1~ 13 12 11 10 9 8 7 6 5 4 3 2 1 . . ~ ~
STF 9 ~s ~ H ~ I L ~ H II ~I S~LECT CD
CLF 9 ~s ¦ ~I H ~I H - ~ I H H ~I "
SFC 9 lls H ~ H H - H EI/C H H H L "
_ . .
SFS 9 ~s H H H H - H H/C H L H L '' CLC 9 ~s H ~ H H - H H/C H L H EI "
.
STC 9 ~s H H H H - H H/C ~I H L L "
..
OT* 15 ~s H H H X A~B X H/C L L H ~I "
. _ LI* 15 ~s H H H H A/B H H/C L II L H
_._. .
'II*15 ~s ¦ H H ~ H A~B H H/C L L L H
... ..
The following describes the function of each I/O
instruction wIth the 5 allowable select codes.
STF CSC> Set the flag. STF is a 240 nanosecond positive true pulse which accomplishes the I following with the various select codes.
STF 00 Not used by the calculator.
STF ~1 a. Sets the "Service Inhibit" flip-flop to the true state (SIH = Low; interrupt not allowed).
b. Causes parallel inpu-t data and status to be loaded into the I/O register.
STF 02 Generates a 240 nanosecond positive true MCR
pulse.
STF ~4,~8,16 Not used by the calculator.
CLF ~SC~ Clear the flag. CLF is a 240 ns posi~ive -7~7-1~)990Z0 _ . -true pul~e ~VhiC~ ~ccomplishes tlle follo~-in~ ~vitll tllc various selcct codcs.
CLF ~ Not used by the calculator ,.
CLF ~ Cle~rs ~lle Service Inhibit flip-flop to the f~lse state. (~ = High;
interrupt allo~Yed.) b. Loads address locations in ~/O regis ~r ~ister with ~ Low) c. Cle~rs De-vice Ready ~lip-flop (C~'O
H~h).
CLF 02 Cle~rs MCR fl~ ~lip-j j ~lop.
CLF ~4 Clears PEN flip-~lop (P~
Low)..
.. . .. . . .. ..
CLF ~8 Cle~rs DEN flip-~lop (~
. ~igh). . .

CLF lG Generates a 2~0 nanosecon~ positive true KLS pulse. ¦
S~C <SC> H/C Ship i~ flag cle~r. SFC is a 240 ns positlve true pulse which accomplishes the ~o lowing ~Yith the various select codes. If C is given. ~ 240 nanosecond CLF, pulse is given after SFC.
S~C ~ Causes tile next instruction to be s~ipped i~ the STOP ~ey has not been .
depressed.
SFC ~1 Causes the next instruction to be s~ipped i~ Device Ready is true (CEO = Lo-v).
S~c Ç~2 C~l!S~S +hl~ nc~+ i nS tructi~n tr~ he ~k i nnR
if the MCR fl~g flip-7~

--- 1099~0 flop is clc~r.
S~C ~4 Causes the next instruction to ~e skipped if the PEN flip-flop is clear.
(~ER = Low).
SFS <SC~ ~/C Skip is flag set. SFS is a 24onanosecond positive trtle pulse which accomplishes the following with the various codes.
If C is giYen then a 240nanosecond CLF Pulse;
is issued a~ter SFS.
SFS 0~ Causes the next instruction to be skipped if the STOP key is depressed.
SFS 01 Causes the next instruction to be skipped i~ Device Ready is false (~E~ ~ High).
SFS ~2 Causes the next instruction to be skipped . ii~ the MCR fl~g :elip--flop - . is set.

SFS ~ C~uscs the next instructioll to bc slsipped if the PE~ flip--10p is s~t (PEN = IIigll). `
~F <SC> H/C Clear Control. ~ is a 240nanosecond negati~-e true pulse and is not used b~ the calculator.
Ii C is given then a 240nanosecond positive true j .
CL~ pulse is givcn after CLC.
STC <SC> H/C Set the Control. STC is a 240nanosecond posi- ;
tive true pulse which accomplishes the following with the various select codesO
I~ C is given a 240nanosecond CLF pulse is issued a fter STC.' STC ~ Not used bythe calcul~tor.

STC 01 Sets the Device Ready flip-~lop (~55 -7~9-:. ~

Lo~v) 1~990Zo STC 02 Generatcs a 2~ nc)~ cor~ osi.tiv~ tru~ M~.S
~ pulse for tlle ma~nc-tic card rcader.
STC ~4, ~S, 16 Not used by the calculator, ~ OTX <SC> ~/C Output ~ or B ~auses data bits from A or B to be shifted to the I/O register and accomplishes the following ~vith the YarioUS select codes. If C if ~iven, a 240 nanosecond CLF pulse is given after OTX
. is e~ecuted., OTX 00 The 8 least sig~i~icant bits in the A
or B register are shifted non-inverted to the 8 least significant locations in the I/O register,.and 12~nanosecond after the 8th shift tlle Device ~eady~flip-flop is set (~E~ ~.Low). The 8 most si~nific~nt . ,-' - .

bits are shi~tcd rigl-t 8 pl~ces and tl~e least ~ significan~ bits are recirculated to tllc S most si.~nif~cant loc~tions in the A or B registcrs. Tlle ~ most si~ni-ficant bits in tlle I/O register are un- -touchcd.
OTX ~1 Sixt.ccn ~its ~rom tlle A or B re- . I
gistcr are slliFted non-illverted ~i to tlle I/O register. The dat~ in A or B recirculat~s. . I -OTX 02 Not used by the calculator OTX ~ Same as OTX 01 and in additioll, 120 ng aIt~r the l~th bit has been shlftcd nanoseconds prin~cr cn~ble 1ip-flop is set.

` lW9(:~20 -' OTX 08 S.~r,le ~s OTY. ~1 ~nd in aCI~it:iOll, 120.nanoseconds aftcr tllc lG~h bit;llas b~cn shiftcd thc display ena~lc flip-~lop is set.
OTX lG S~me as ~TX ~1 and in ~ddition, 120 nanoseconds after the 16th bit has been shifted the 24~ nanosecond KLS signal is generated LIX <SC> ~ C Load into A or B. Loads data bits from the I/O register into the A or B registér and accomplisI1es the following with the various select codes. r~ c is given; a 240 nanosecond CL~ pulse is given after LIX is executed.
. LIX 00 The eight least signi~icant bits in the ItO register are shift~d i~ver~ed to the . . eight most significant locations of A or B,- ~ld 12~ nanoseconds after the 8th shi~t the . -.

D~vicc Ready ~lip-flop is set (~ = Lo-v).
A or B is shiftecl righ-t eight places as the I/0 register'data comes in. The 8 most sig~ icant bits in the I/O register I ~.
are untoucIled. I
LIX ~1 The 16 bits of thc I/O register are tralls-ferred inverted to the A or B rcgister, D~ta in the I/O register.;is lost.
LIX ~2, ~ 8, 16 Not used by the calcula~o~.

~IX <SC~ II/G r.lcr~c into 1~ Cl` B. ~cl. ~eS clata fl'Om t IIC
I/O register into ~ or B rc~istcrs a accolllplisllcs thc follo~ViIl~ with v~rious solcct codes. I:~ C is ~ivcn, a 2~onanosel-ond CLI~ ulse is ~ivcn ~f l;cr ~.IIX is cxccu~c(l.

.

.. .. . ... ..

10990ZO ) , MIX ~ T~le ci~ht lcast si~ni~icant bits in the I/O rcgistcr are mer~ed Wi th the ei~ht leas-t si~ni~icant bits of the A or-~re~ister and shifted to the 8 most signi-~icant loc~tions o~ ~ or B; 120 nanosecond the mer~e takcs pl~ce the Device Ready ~lip-flop is set (~~5 = Low)O A or B
shifts right 8 places as the data is merged and shifted to the most significant , - . . .. ..
lo locations. The 8 most significant bits of t~e I/O registerl are untouched~
~IIX ~1 The 16 bits o~ the I/O register are merged with the 16 bits of thc A or B
re~i~ter and contained in the A or B
- register.

MIX 02, 04, 08, 16 Not used by the calculator.
Examples o~ various drivers which trans~er data are given below: ;
E~rplc 1 T~pical Subroutine to Get Status of I/O Device.
C~llin~ Sequcnce LDB Selcct Code JSM Stat St~t STF 1 Turn o~ the interrupt system.
OTB 1 Load I/O register ~ith select code.
STF 1 Load I/O register with status of I/O
device .
- LIA 1 Load A~Rcgister with status inform~tion.
CLF 1 Turn on intcrrup R~T Rcturn, --. .

---'` 10990~0 Ex~mple 2: Typlcal Su~routin- t~ o~t-~ an B bit charactor.
Calling Sequence: ~
OT~ 1 Output 16 bits to th~ I/O register, SFS 1 Loop until I/~ flag is set by the J~n *-1 output device, Ex~mple 3: Hi~h Speed Output Where the Calculator is Faster than~
'Ou~ut Device, Calling Sequence:
:~ST* I -(Number o~ 16 bit words to be output) : - ST* J Address o~ first word in the array.
LDB SC Select Code ouTa JSM ST~T Get status o~ ou~put device RA~ 9 . and position it. ; . ~ .
,' Fx.o!lJ~le ~: Typical Subroutine to Input an 8-bit Character.
Call~ng sequence is^
LDB Select code JS~.I In ... Return is made ~Yith the d~t~ in the ~ Re~ister.
In STF 1 Turn o~f interrupt system OTB 1 Load I/O register.~qitll the se~.ect code STC 1, C Pulse the ~lag ~ turn interrupt system on JS.~.I ST~T Get status o-~ the input device .
RAR 9 and posi~ion it.
S~P *-2, C If device is busy thcn continue to loop S M 7 else pOSitiOIl data bits RET Return.
3~ S~P 0UT2 I~ device is ~usy, continue to loop ~99~
STI~` l Turn o~f interrup~t systcln.
. Orl'B 1 O~ltpUt sclcct code LDB 1 B~Countcr for number of words to be out~ut L~ J, I . Load ne~t d~.t~ word SEC *~1, C
OTA ~ OUtpUt 8 bits from ~
SFS 1 Loop until device sets J~ *-1 ~lag.
SEC *-3, S If ~T~ and ~J then loop to output last . 8 bits .
.ISZ J . Increment array address pointer - RIB *-7 Increment count and loop if not ~inished.
CLE 1 Turn on interrupt system RET ~eturn Example 3B: If the Output Device is Faster than the Calculator thenn Fewer Instructions can be Used.

OTA ~ Output first ~ bits OTA ~ Output second ~ bits.

Example 5A: High speed input where the calcul~tor is faster than the input device.
Calling sequence:
ST* I -tN~ )er of 16 bit words to be input) ~ 1 ST* ~ Addrcss LDB SC Select code JSll In2 In 2 JSr~l ST~T Get status of input device R~R 9 and position it.
SAP In2 I~ device is busy, continue to loop -77~-~9~zo l STF 1 Turn off interrupt system OTB 1 Output select code STC 1 Command device to read LDB 1 R ~Counter for number of words to be input SEC *+1, C E ~0 SFS 1 Loop until input JMP *-1 Device sets flag LIA 0 Load 8 bits from l/O register 10 SEC *-3, S If E=0 and E~1 then loop to input last 8 bits STA J, I ~ Save data word in array ISZ J Increment array address pointer `
RIB *-7 Increment count and loop if not ....
~ finished . .
CLF 1 Turn on interrupt system RET Return Example 5B: If the input device is faster than the calculator then the number of instructions can be reduced.
LIA 0 Input first 8 bits LIA 0 Input second 8 bits All output I/O interface cards which are to be fully ; interchangeable with both the present and other calculators must have storage either on the I/O interface card or in the peripheral to which information is being transmitted.
Blocks (A) and tB) are the storage latches which store information coming from the I/O register. When the output of gate (C) goes high, data is latched; when low, the outputs of the latch irack the inputs. Gates (D) decode the address code 30 (14 = 1110) and pass it positive true to gate (E). "Device Ready" (CEO) is also passed positive true to gate (E). Gates (H) are open collector and pass status and "Device Request"
.,. ~ _., 20-~

(CFI) onto the input part~ lines.
An example of a calculator output would be: Output the address 14 which enables status gates (H) and see if the power is on. If on, output address, status, and data to gates (A), (B), and (D). The output of (C) is low allowing data and status to pass. Next give "Device Ready" (CEO = Low); this enables flip-flop (G), clocks flip-flop (F) which causes (A) and (B) to latch, and sends control to the peripheral. The peripheral acknowledges receipt of control by returning FLAG
(FLAG = High) in a busy state this continues to keep (A) and (B) latched and clears control flip-flop (F). When the peripheral is done acting, the FLAG is returned to the not busy state (FLAG = Low) which clocks flip-flop (G) and causes output at (C) to go low enabling (A) and (B). The output of (G) drives - the CFI gate which has been enabled from (E) and CFI goes low.
CFI is received by the calculator which responds by returning CEO high. This causes the output of (E) to go low, clearing flip-flop (G) and returning CFI high. This completes 1 output cycle.
All input I/O interface cards which are to be fully interchangeable with both the present and other calculators must have storage either on the I/O interface card or in the peripheral from which information is being received.
Block (A) is used to store information coming from the peripheral. (B) stores status coming from the I/O

l~Q "

register wllich may be needed by the peripheral. The output trac~s the input whenever the enable on the latch is low.
~lock (C) decodes the address code into one of 10 addresses which are jumper selectable. An eY~ample of a calculator input would be as follows: the address code would be decoded by (C); the calculator would load status through the open collector input status gates (D). If the peripheral is on and ready, the address code and output status (if necessary) would be sent to (B) and (C). The decoded address is passed, positive true, to gate (E). The enable at (B) is low so that status is passed to the peripheral. The "Device Ready"
is given (OE O = Low) and comes to (E) positive true. The output of (E) clocks flip-flop (F) through gate (H). The output of (F) gives control to the peripheral and also enables (A) to receive data. The peripheral responds in a busy state (FLAG = High). When data is ready to be input the FLAG is driven low. Data is latched when the FLAG goes - low in (A). Also when FLAG goes low, (G), having been enabled by the output of (H)j is clocked driving (J) from its Q output. (I) is enabled by the output of ~H~
and so CFI is driven low. Data is loaded into the I/O
register from open collector gates (I) and CEO driven high as a result o~ the calculator receiving CFI. This clears flip-flop (G) and disables the input gates (I) completing an input cycle.

10990Z~
Figur~ 5~ st:rates the logic requlre~ on an I/0 interface modu1e to interEace the calculator with an external X-Y plotter.
Figure 60 illustrates the logic required on an_I~O
interface module to lnterface the calculator with an external line printing unit.
Figure 61 illustrates the logic required on an I/0 interface module to interface the calculator with an external modem for transmitting and receiving information via telephone lines.
Figure 62 illustrates the logic required on an I/0 interface module to input or output any eight-bit code.
A power preset circuit is employed on interface modules using the interrupt system to prevent an interrupt when the peripheral power is turned off or on. This can usually be done by sensing the peripherals' +5 volts and presetting when the voltage drops below 3 to 4 volts.

An example of a calculator interrupt would be as follows: (B) may be clocked at any time storing the data is (E) and (F). The calculator enables the interrupt to take place by making "Prevent Interrupt" false (SIH = Eligh) and outputting address 0 to decoder (L). (G) is enabled when SIH goes high through gate (M) causing SSI to be driven low. The calculator responds by loading the I/O register.
Gates (H) are inhibited by gates (N) and (J) and gate (K) is enabled because of address 0, thus DI0 is the only true signal loaded into the I/0 register. The calculator inter-prets this to mean the I/0 interface card at address 1 has caused the interrupt. The calculator outputs address 1 -77~-~099~ZO ~' to the decoder which enables gates (~I) with (N) and (~) and then loads the data. After the data is stored the calculator outputs address 1 and sends "Device Ready"
(CEO = Low) as a 360 nanosecond pulse which is used to clear (B) through gates (O) and (D). This completes an input cycle.

-77~-KEYBOARD INPUT UNIT
The keyboard input unit is shown in Figure 63 and is designed around a 12~-position matri~. Each position is scanned sequentially. When a key is depressed, the counter, which drives the scanner, is stopped. The address of the 7-bit counter corresponds to the ASCII code of the key depressed. The entire scan period is four milliseconds.
Two key rollover is incorporated in this design.
When a key is depressed, SSI is generated unless in-hibited by either ~ or KLS. As soon as the service re-quest is acknowledged, the CPU will give a select code of 12 which will gate the ASCI~ keycode onto the data lines.
Another feature of this keyboard is automation re-peat. If a key is depressed for more than 1.5 seconds, the keycode will be entered repeatedly at a rate of 15 entries per second until the key is released.

-7~0-., .

OUTPUT DISPL~Y UNIT
Referring to Figures 72A-B and 73A-B, there is shown the hardware associated with the calculator display. The dis-play comprises a single register 400 of thirty-two alphanumeric characters, each character position of which is a seven row by five column matrix of light emitting diodes (LED). In addition to the display hardware illustrated, the complete calculator display system comprises a firmware display routine which is detailed on page 35 of the basic system firmware listing and an I/O register shown in Figures 49A-D. The firmware display routine delivers a sixteen-bit word to the display circuitry.
L~ Four of these bits 402 and 404 are decoded into one of sixteen character positions. The remaining twelve bits 422 are two six-bit ASCII coded characters which are alternately decoded in ROM
.. .~ ,.
~- 430 into their row and column information. A seven-bit data latch 432 is provided to allow the ROM 430 to decode both the nth and the (n = 16)th characters which are displayed simultan-eously.
An assymmetrical clock circuit 426 drives input gating circuitry 436 and counter-decoder circuitry 434 to decode the row information of the nth and the (n + 16)th characters.
Protection circuitry 428 is provided to blank the display in *-.~ case of failure of either logic signal DEN 424 or CA0 438.
Three-bit column data 410 and three of the four-bit character position bits 402 are applied to a one-of-four de-coder circuit 420. The output of circuit 420 is fed to the column drivers 418. Four columns eight emitting diodes 400 are driven by each of the forty column driver. Thus, all one hundred SiY.ty columns of the display can be scanned. The remaining _haracter position bit 404 enables alternate sections of row .. ..
drivers 416 to complete the one-of-sixteen character position decoding.
, . . .

.

1(~99~20 MAGNETIC T~PE CASSETTE
~EADING AND RECORDING UNIT
The magnetic tape cassette reading and recording unit is shown in the block diagram of Figure 64 and in the detailed schematic dia~ram of Figures 65-69. Operation of the magnetic tape cassette reading and recording unit is largely automatic.
It is only necessary to specify the type of operation to be performed and the limits desired. The commands for doing this may either be entered directly from the keyboard input unit or as part of a program. The calculator then determines-the necessary commands required to cause the magnetic tape cassette reading and recording unit to perform the desired operation.
Seceral modes of operation are possible. Secure and unsecure programs, data, and sets of user definable key de-finitions may be recorded on the magnetic tape and subsequently loaded back into the calculator.
Referring now to Figures 64 and 65, the operation of the interface portion of the magnetic tape cassette reading and recording unit will be described.
I. Address Decoder IC 6 and IC 7 are used to detect a select code of 10 when the cassette is accessed. When a select code of 10 is detected, and the control line CEO is true the cassette is enabled.
II. Enabling Input Data Bits The open collector nands in IC 2 and IC 3 allow the input data bits (ID 0 through ID 7) to be gated onto the calculator input bus when the card is selected by the ad-dress and control line as described in Section I.

-78~-1099~2~

III. Enabli1l~ Input Status Bits The open collector na11ds in IC l allow the input status bits (IS 0 through IS 3) to be gated onto the cal-culator input bus when a select code of lO is given and the control line is true.
IV. Flag D type flip-flop lO is the flag flip-flop. It is held cleared except when the I/0 card is selected as described in Section I. When the I/0 card is selected the flip-flop is set by the trailing edge of the flag pulse from the cas-sette. In addition, the flag flip-flop is held preset (at pin 5) when the cassette do~r is open, clear leader is de-tected, or an interrupting character is read. A simultaneous preset and clear results in a true output from the flip-flop.
The flag flip-flop signal is gated to the calculator (CIF, pin 2-m) by the open collector nand gate only when the I/0 card is selected.
VO Interrupt D-type fl1p-flop 13 is the interrupt flip-flop. It is held cleared whenever the I/0 card is selected as de-scribed in Section I The interrupt is allowed only if the cassette is in control mode (pin 2-3). An interrupt signal comes whenever the cassette goes onto clear leader, the cas-sette door is opened, or an interrupting character is read.
An interrupting character is a character with data bits 2, 3, 4, 5 all ones, read when the cassette is in control mode.
When the signal Service Interrupt Inhibit is false (SIH = l, pin 2-l) the interrupt signal is gated through IC 4 pin 6 and 8 to the calculator. The data bit SI l, (Pin 1-4) is pulled low to tell the calculator the address of the peripheral which interrupted.

1~99~Z(~
RcLcrri~ o Fiuurcs G~l, 6~A-B, alld ~' tlle o~ration oL the control lo~ic portion Or the ma6netic tape cassette reading and recordillg unit will be described.
I.l Power on Preset Transistor ~1 and diodes CRl and CR2 are part of the power on circuit which makes sure that the cassette powers up in the proper modes.
I.2 Control Signal The control signal (YCNT on pin 11) comes from the Interface card as a positive true signal telling the Logic card to process the command on the output lines. The positive going edge of the control signal fires the one-shot (IC 7) giving a 300 nsec. control Pulse used to strobe storage elements.
I.3 Decode and Storage of Commands The l-of-10 open collector decoder (IC 19) is strobed on its D input by the control pulse. (See Section I.2) On the A, B, and C inputs of the decoder are output status bits OS0 through OS2. Those output status bits contain commands for the transport as follows:

OS2 OSl OS0 Command ~s-e)(Reverse) (~t) 0 0 0 Read-Forward-Slow 0 0 1 Read-Forward-Fast 0 1 0 Read-Reverse-Slow 0 1 1 Read-Reverse-Fast 1 0 0 Write-Forward-Slow 1 1 0 Continue Present Command 1 1 1 Continue Present Command Output status bit 3 (OS3) indicates if the cassette should be in control mode or data mode. Control mode is explained in Section I.12.
If when the decoder is strobed, the command on the -7~-. ... , ~ ,.

lO990ZO

output status lines is other ~llan ~STOP~ or ~CONTINUE~
the open collector wircd-or decoder outputs ~ througll 4 are low for the width of the control pulse. This wired-or output pulse strobes the command on the output status bits into the Quad Latch, IC20, and preset the run flip-flop 15-2.
The command on the run lines are gated off the logic card to the motor control card, and cassette motion begins.
If the command is "STOP', the decoder output 5 (pin 6) goes low, which clears both the run flip-flop (15-2) and the Quad Latch (IC20). If the command is "CONTINUE", both the Quad Latch and the run flip-flop remain unchanged.
The run flip-flop and the Quad Latch are also cleared by power on preset.
I.4 Run Flip-Flop The run flip-flop (1502) is preset by the issuing of a command as described in Section 6.3. It is cleared by an interrupt signal from the I/O card, a stop command, power on preset, or a cassette not being in place. The run flip-flop is also cleared by the clear leader signal on its clock input, whenever the cassette runs into clear leader. Since the clock input of the flip-flop is edge sensitive, the transport is stopped only when it first goes onto clear leader, and tape motion is allowed by the issuing of a new command even when on clear leader.
The Schmidt-triggered gates 1-1 and 1-2 are used to filter noise on the interrupt, clear leader, and cassette in place lines.
I.5 Rewind Mode D type flip-flop 15-1 is the rewind flip-flop. It is held preset as long as the rewind button is held inu It -7~5-., ~ , .

~w9~

is cleared by clear l~adcr detection, cassctte not in place, power on preset, stop command, or on interrupt Lrom the I/O card. The rewind flip-flop is also clcared through its clock input, whenever a new command is issued. A
simultaneous preset and clear results in the Q output of the flip-flop being true. ~rhen the transport is stopped (flip-flop 15-2 cleared) and the rewind flip-flop is set the output of gate 16-3 will be true, which will force the NOR gates 17-1, 17-2, and 17-3 to 0 outputs. These outputs will cause the tape to be rewound in high speed reverse to clear reader, unless the rewind flip-flop is cleared as described above.
I.6 Transport Status Input status bits, YIS3 (pin F), YIS2 (pin 6), YISl (pin E), and YIS0 (pin 5), reflect the status of the trans-port as follows: O
YIS3 - Negative true, cassette in place YIS2 - Positive true, clear leader detected ~ISl - Negative true, writing on cassette permitted YIS0 - Positlve true, control mode I.7 Internal Clock The internal clock used for writing data is generated by the two one-shorts IC6 and IC13. The clock is not sym-metrical, but IC6 is true for 133 ~sec and IC13 is true for 220 ~sec. Padding resistor R10 is then used to adjust the total time of 333 ~sec for a 3KC clock rate. The internal clock is enabled only when the cassette command is write as detected at pin 5 of IC13.
I.8 Nine Bit Shift Register A nine bit shift register is made from IC3, IC4, and flip-flop 5-2. In write operations this register is loaded parallel by a pulse from gate 16-1, and then shifts the data -7~-lQ99~ZO
selially to IC3 pin 10 ror writing on tllc tnpc. In rcad mocle tlle data is clocl~ed from t~le tape, serially, to IC5 pin 12 where it is serially loaded into the register. From the shift register it is read as parallel data, at the flag, by the calculatorO
I.9 Data Clock Mark Sequence During write operation a write clock, a write data, and a write mark signal are sent from the logic card. During read operations a read clock, a read data, and a read mark signal are received by the logic card. The data lines are NRZ; clocked by the appropriate clock. When clock pulses and marker pulses are properly sequenced they constitute a character. The sequence is 9 data bits per character, sepa-rated by marks.
Mark - 9 data bits - mark - 9 data bits - mark.
BIT-M M K-SEQUENCE CODE
Three types of information Track -.. l.t A

B

"0" A

B

Mark A

B

10 bit character 8 data bits 1 marker l-control bit I.10 Divide by 10 Counter During Write -The diyide by 10 counter (IC14) is used to sequence the -7~7-ZQ

- clock alld m~l k pul.~cs cl~lrin~ writc (See section 6.9 Lor sequcnce ~cscription). When the counter is at counts 0 through 8 the internal clock pulscs generated by IC6 and IC13 are gated through gate 18-4 from where it goes off the card as the write clock, alld through gate 18-2 to shift the shift register. When the divide by 10 counter is at count 9, the internal clock pulse is inhibited at gate 18-4, but is enabled at gate 10-2 from where it passes off the board as a write mark pulse. Since the counter ~wraps around" from count 9 to count 0, we get the repeating sequence, marker -9 bits - marker.
Each time the counter goes to 9, a character is completed and the write mark pulse, in addition to going off the board, is gated through gate 12-3 to make up a flag, telling the calculator that the character has been written. The calculator will then send another parallel character to the shift register and the sequence will be repeated.
Special conditions prevail for the writing of the first of a string of characters. When the transport goes from read to write mode, fli-flops 8-1 and 8-2 are set in their edge sensitive clock inputs. Flip-flop 8-2 presets the counter to count 9, making sure the sequence begins with a mark pulse~
The same flip-fiop 8-2 is cleared by this first mar~ pulse, after which the counter continues its "wrap around~' sequence.
Flip-flop 8-2 being set, inhibits this first leading write mark pulse from passing through gate 12-3 and becoming a flag.
Flip-flop 8-2 is cleared by the first write ~pulse, after which the write sequence continues as normal.
I.ll Divide by Ten Counter During Read Only a sequence of 9 data bits followed by a mark is -7~-. . ~ ~ .. .

l~99~ZO

to be recogni~e~ as a chalac~el durlllg read. The divide ~y 10 counter is used to detect this sequence.
Whenever the transport is stopped, flip-flop 5-1 is held preset. The output of flip-flop 5-1, presets the counter to a count of 0. Flip-flop 5-l is cleared with the leading edge of the read data clock and the counter counts on the trailing edge. The read data pulses are counted by the counter and also pass through gate 18-2 to shift the shift register. When the counter has counted 9 read pulses, its count of 9 puts a true signal on pin 13 gate 19-1. If a read mark pulse comes next, pin 1 of gate 19-1 is true for the width of the read mark pulse. These two signals make up part of the flag signal which tells the calculator a valid character is in the shift register. The trailing edge of the read marker pulse, sets flip-flop 5-1, which presets the counter to 0 and the sequence is ready to be repeated.
If a marker is read when the counter is at a count other than 9; no flag is given, flip-flop 5-1 is set, and the counter is preset to 0. If 10 read pulses come in a row, the counter wraps around to 0 and no flag is given. Thus nothing but 9 read clock pulses, followed by a read mark pulse, gene-rates a flag and is recognized as a character.
I.12 Control Mode and Flags Each character contains 8 data bits. The middle bit of the 9 bit character is a control bit. If the center bit is a 1, the character is a control character. If the center - bit is a 0, the character is a data character. If the trans-port is in control mode during write, the center bit is loaded as a 1 at IC4 pin S, and the character is written as a control character. In data mode the center bit of each character written is 0.

If the transport lr reading in control mode, flags are sent to the calculator only when a control character is in the shift register. If the transport is in control mode, and a data character is in the shift register, the read flag is in-hibited at IC9-1 pin 2. This IC9-1 pin 2 is always true, except when the cassette is in control mode and the center bit of the shift register is 0. In data mode, flags are sent to the calculator for both data and control characters.
The flag circuitry on the interface card is trailing edge sensitive, making sure the character is completely written or completely read before the calculator is flagged.
Referring now to Figures 64 and 67A-B, the operation of the read/write portion of the magnetic tape cassette reading and recording unit will be described.

.... , ~, .
~- ~ I. General Description The read/write board has two main functions. In the WRITE mode it encodes bit serial data into two-channel Bit-Mark-Sequence (BMS) data to be fed to the head driver and written on tape.
In the READ mode it decodes the two-channel analog BMS
data from the head preamplifier into clock, mark, and bit-serial data pulses from the tape signals.
II. WRITE Mode When Write Permit is true (YWPT = 1) and Write Command is true (YWTC = 1) then Write Enable is true (YWEN = l; Q7 on) - and writing on the tape is allowed. The 3-input NAND gates of IC2 are used to encode the bit-serial data (YWDT) into BMS.
Logic l's (YWDT = 1) are written on Channel A. Logic 0's (YWDT = 0) are written on Channel B. A mark is written when Write Mark ls true (YWMK = 1). The data and marks are clocked ~ ., _ in my means of the Write Clock (YWCL).

III. READ Mode .. .. _ The two amplifiers of IC6 and their associated circuit-ry comprise two threshold detectors that convert the analog signals from the head (ARA, ARB) to digital signals. The amplifiers switch between their positive and negative saturated states. The thresholds are adjusted so that the amplifiers switch states when the analog signal is approximately 30% of its peak value measured near BOT, moving forward.
The head signal amplitude is proportional to tape speed. Therefore, the thresholds are adjusted high for fast tape motion and low for slow tape motion by switching Ql and `~ Q2 with the Fast Command (NFTC) line. The positive and negative references for the thresholds are derived from the 12 volt power supplies.
The two channels of digital data are gated to the decode circuitry through ICl. The decoder consists of IC3, IC5, IC8, and IC9.
- IC8 is a 0.5 ,us one-shot that is fired once for each data bit or mark that is gated in from the threshold detectors.
This one-shot pulse comprises a read clock signal that is gated to NRCL by IC5 when the bit associated with the pulse is not a mark.

..,...;....
IC9-1 is a flip-flop that serves three functions.
First, it provides a Read Mark pulse (YRMK) whenever a mark is read from the tape. Second, it controls IC5 to allow the one-shot pulse to appear as Read Clock (NRCL~. Third, it controls IC3 and IC5 to allow data to be gated through to the data out-put flip-flop, IC9-2.
Referring now to Figures 64 and 68A-B, the operation of the motor control portion of the magnetic tape "~

1099~ZO `
.

cassette reading and lecording unit will be described, I'. Speed Reference Resistors Rl, R2, and R3 are used to generate a reference voltage proportional to the desired motor speed.
The voltage seen at the positive input of U3 is about 3.0 volts for low speed and 8.0 volts for high speed.
II'. Comparator-Amplifier Op Amp U3 compares the speed reference with a signal representing the actual motor speed (see Item IV'be~ow). The difference signal is amplified and fed to the driver circuitry which increases or decreases the drive voltage available to the motor, Resistor R8 and capacitor Cl create negative feed back around Ul, resulting in a DC gain of 26 db and a single pole at about 100 Hz. This 'ttailors" the servo loop frequence response to provide stable operation with rapid error cor-rection.
III'. Motor Driver Diode Dl shifts the DC drive level by about 7 volts.
Transistors Ql, Q2, and the Motor Pass Transistor (located on the Regulator Board) furnish current gain to drive the motor.
Resistor R7 ensures turnoff for the Motor Pass TransistorO
Transistor Q3 is used to dynamically brake the motor if its speed is greater than desired.
Diode D3 reduces the maximum voltage at the motor when on clear leader. This voltage limit effectively reduces the motor torque, preventing damage to the motor, friction drive, or tape cassette should the tape be pulled against the hub.
Diode D2 prevents damage to Ql during this reduced torque condition.

, 99~ZO - \

I~. Back-E~lF ~mpli~ier The motor termillal voltage is composed o~` two parts -the ~IR" voltage drop in the motor armature resistance, and the motor generated voltage, or Back-EMF. Back-EMF is directly proportion~l to motor speed, and is used as the motor speed feedback signal Sense resistor R9 produces a voltage proportional to the motor armature current, and therefore proportional to the "IR" voltage drop Op amp U4 and resistors R10 thru R14 subtract the ''IR" voltage drop from the motor terminal voltage, resulting in a voltage proportional to the motor speed. This signal is about 3 0 volts for low speed and 8 0 volts for high speed; it is fed back and compared with the reference voltage, as described in Item II' above The process of sensing the "IR't voltage drop, as described above, is accurate only for a single winding tem-perature Because lower armature resistances (caused by lower temperatures) could cause instability in the servo, this ~perfect compensation~ point is placed at the bottom of the operating range - O~C in this case. Increasing temperature causes reduced load regulation (greater motor current causes reduced speed), but servo operation remains stable V'. Motor and Solenoid Selector The selector circuitry activates the proper motor and solenoid~ When in "Run Fwd" mode, Q4, Q5, and Q8 are saturated "on"; in "Run Rev" mode Q6, Q7, and Q9 are saturated. When in "Stop~' mode, all devices are off.
Referring now to Figures 64 and 69, the operation of the interconnect portion of the magnetic tape cassette reading and recording unit will be described.

1~99V~V

I. Connection From Tralls~ort to Motller Bo~rd The main function oL the Interconnect Board is to electrically connect the trallsport mechanism to tl~e Mother Board. There are four groups of wires coming from tlle trans-port: the Motor wires, the Solenoid and Switch wires, the Head Board wires, and the Photosensor wires. Each group of wires is terminated on a Pin Board which plugs into the Inter-connect Board; this partitioning allows for ease of assembly and service.
II. Clear Leader Signal Most of the circuitry on the Interconnect Board is used to generate the "Clear Leader" signal. The photosensor as-sembly on the transport contains an incandescent lamp and a photoconductive cell. When magnetic tape is over the photo-sensor, no optieal eoupling oceurs, resulting in a high photo-eonductor impedanee. When elear leader is over the photosensor, light is reflected off the light colored plastic of the cassette and onto the photoconductor, resulting in a low photoconductor impedance.
Integrated circuit Ul and resistors R4, 5, and 6 form a comparitor which switches when the photoconductor impedance is approximately 25k~. Capaeitor C5 filters the oul-put of Ul to eliminate false signals of less than 5ms. duration;
transistor Ql amplifies this signal.
Under eertain conditions when the tape stops or changes direction a tape loop may form over the photosensor; a re-flection can result which causes the same photoeonductor im-pedanee as a clear leader. IC's U2, 3, and 4 are used to prevent a "tape loop~' from giving a false clear leader in- ~
dication. Flip-flop U4 stores the clear leader signal; this -79~-:

Because hystercsls llas ~een added to the circuit, a significant ripple signal (at switching frequency) must be present on the feedback signal to the amplifier. This need fo a ripple signal limits the amount of capacity that can appear between the output of inductor 450 and ground. Inductor 452 serves to isolate this point from the rest of the system. The amount of capacity that can appear between the output of inductor 452 and ground is essentially unlimited and significantly reduces power supply ripple, and greatly improves response to load transients.
The second winding of inductor 452 is a path for the feedback from the remote sensing. The required ripple signal is added to the feedback signal by transformer action in inductor 452.
The power supply also includes an overvoltage crowbar circuit comprising transistor 458, diode 460, and resistor 462 and a short circuit shut-down circuit (using transistor 464).
In the event that the +5 volt bus is grounded, or the crowbar is triggered, transistor 464 saturates and locks integrated circuit 448 off.
The resistor 4G6 makes a current generator of integrated circuit 448. Resistors 468 and 470 discharge the bases of transistors 450 and 452, respectively. Integrated circuit 472 and its associated components generate a "power on pulse", POP , to initialize the instrument. Integrated Circuit 448 is referenced and powered from an external +12 volt supply.
Powering the IC from +12 rather than the unregulated +19 reduces power dissipation in IC 448.

... .
: ,. . . .

~0990ZO

The +12 volt supply of Figurcs 75A-B refercnces the -12, +5, and +16 supplies directly. The +12 ampli~ier 448 may be biased either from the unregulated supply for the +12 volt supply or from the operating +16 volt supply. Diodes 474 and 476 determine the appropriate source. This provides a greater power supply margin for the +12 volt supply.
All supplies except the +20 volt supply are current limited. All supplies except the +20 volt supply are crowbar protected against over-voltage.

-79~-1~)99~20.

mYPEWRIT~R INTERFACE
This interfac couples the Facit-Odhner_model 3841 output typewriter to the calculator.
The unit mounts directly on the back of the'type-writer. Communications with the calculator are made through about five feet of cable which is terminated by the I/O
plug containing a board for buffering and some logic.
Referring to Figures 76-~2~ characters from the calculator appear on the data lines as ASCII codes.
These codes are recoded by a ROM into the six bit Facit type-writer code for the 46 type bars, and one bit for upper case shi~t. Functions such as space, tab, line feed, etc. are re-coded for easy recoglition in the interface since each function must be driven by a separate line. A data latch -after the RO~I holds codes for processing. If new data arrives during this processing, the two codes are compared to determine if they both drive the same type bar and if they are both numbers. Non-repeating numbers can be typed at 14.5 characters per second, other,wise typing speed is 12 characters per second (reduce these speeds 17~ for 50HZ
operation). Codes in the latch are gated to the program solenoids or the function solenoids by the control logic.
To understand the coding, notice that two blocks of code,s on the Facit typewriter code map are empty. If all function codes are put in these blocks, they can be idcntified by control logic by testing for t6 ~). Each function code puts a 1 on one OL five lines and this line opens the correct solenoid yate. Bit 8 is used to discriminate between two sets of function gates. In the case of a program solcnoid code, -7'39-, ,, - - - - -;
..

w9ozo bit 8 identifies numerals.
The control clock is provided by a synchronizing pulse which is generated in the typewriter by a vaned wheel attached to the end of the main drive shaft. The vanes interrupt a light beam. When a type cycle is initiated, a modulo eight counter counts synchronizing pulses and the count is decoded by a l-of-8 decoder. At each of the eight states, combinational logic can enable solenoid gates, set or clear flag flip-flops or change the counter to state zero, or state 6, or inhibit the counter.
The tables' below contain a guide for interpretation of bit pattern data as well as the actual bit patterns for ROM ~10 and ROM #11 as shown in Figure 81.

.. ..

, ,~rr-ff - - 800 - ~;

~990ZV

INTERPRETATION OF BIT PATTERN DATA
(Bipolar ROM of Figure 102) 1. FORMAT
The bit pattern information is in the following format:
X X X -X X X B B XlOXllxl2xl3 B Xl5x16xl7xl8 B--- 45 46 47 48 A. XlX2X3 - Three digits indicating the address (decimal) of the first word of that line. *l B. X5X6X7 - Three digits indicating the address of the last word in that line. *l C. XgXloXl~X~2 - Four characters indicating the output states of the first word of that line (corresponding to address XlX2X3). *2 Xl5xl6xl7xl8 through X40X41X42X43 indicate successive output staties. *2 E. X45X46X47X48 - Four characters indicating the output states of the last word of that line (corresponding to address X5X6X7). *2 F. B = Blank or space between group of characters.
2. TRUTH TABLE
Logic level definition L - Output Low (Logic 0) H - Output High or Open Collecter (Logic 1) X - Don't Care - Output may be High or Low *1. Addresses are the digital equivalent of the binary address A7A6A5A4A3 A2AlA. Where a low input address equals a binary ~ and a high input equals a binary one.
*2. Groups of output states are listed 432l respectively.

:,^

- -, , ., 1~99a~ 20 - BIPOLAR RO~il 10 OF FIGURE 8i 008-a15 HLLL LLLL LHLL LLHL LLLL LLHL LLLL LLLL

080-087 LLLL LLLH l.LHL l.l.HH LHLL l.Hl.H LHHL LHHH
088-095 HLLL HLLH HLHL HLHH LLLL HHI.H HHHL LLLL
Og6-103 LLLL LLLH LLHL LLHH LHLL LHI.H LHHL LHHH

112~119 LLLL LLLH LLHL LLHII LHLL LHLFI LHHL LHHH

128-135 LLLL ~LLL LLLL LLl.L LLLL I LI L LLLL LLLI
136-143 LLLL LLLL LLLL LLLL LLLL l LLL LLLL LLLL
144-151 LLLL "lLLL LLLL LLLL LLLL LLLL LLLL LLLL

. 168-175 LLLL LLLL LLLL LLLL LLLL LLLL LLLL LLLL
- 176-183 .LLLL LLLL LLLL LLLL LL L LLLL LLLL LLLL

Z08-215 LLLL. LLLL LLLL LLLL LLLL LLLL LLLL LLLL
216-223 LLLL LLLL LLLL HIILI1. HLHH LLLL HHHL HHHL

240-247 LLLL LLLL LLLL LLLL LLLL LLLL LLLL LLLL.
248-255 LLL~ LLLL LLLL LLLL LLLL LLLL LLLL LLLL

.

~ , . .

- -8i)2-109gOZO

BIPOLAR RO~ ll OF FIGURE 81 . , , - .

016-023 LLLL LLLL !LLL LLLL LLLL LLLL LLLL LLLL

032-039 LLLL LHLH LHLH LHLH .LHLH LHLH LHLH LHLH

072-079 LHHL LH'HL LHHL LHHL LHHL LHHL LHHL LHHL

104-111 . LLHL LLHL LLHL LLHL LLHL LLHL LLHL LLHL

128-135 LLLL ~LLL LLLL LLLL LLLL . LLLL LL.LL LLLL
; 136-143 LLLL LLLL LLLL LLLL LLLL LLLL LLLL LLLL
144-151 LLLL .LLLL LLLL LLLL LLLL LLLL LLLL LLLL

168-175 LLLL LLLL LLLL LLLL LLLL` LLLL LLLL LLLL

184-191 'LLLL LLLL LLLL LLLL LHHL LLLL LLLL' LLLL

216-223 LLLL .LLLL LLLL' LHHH LHHH. LLLL LLHH LHHH

232-239 LL~L LLLL LLLL LLLL LLLL LLLL, LLLL LLLL
240-247 ,LLLL LLLL lLLL LLLL LLLL LLLL LLLL LLLL
248-255 LLI.L LLLL LLLL LLLL LLLL LLLL LLLL LLLL
. . , ,' .. . ~ .

.

-803- .

. - .?.

,, .

Claims (50)

CLAIMS:
1. An electronic calculator comprising:
keyboard input means with a plurality of alphameric keys for entering BASIC language commands into the calculator and with an execute key for initiat-ing execution of BASIC language commands entered into the calculator;
storage means, coupled to said keyboard input means, for storing BASIC language commands entered into the calculator; and processing means, coupled to said keyboard input means and storage means, for immediately executing a BASIC language command in response to entry of that BASIC language command into the calculator followed by actuation of said execute key.
2. An electronic calculator as in claim 1 wherein:
said keyboard input means is operative for entering one or more lines of one or more alphameric characters each into said electronic cal-culator;
said electronic calculator includes keyboard buffer means, coupled to said keyboard input means, for storing a line of one or more alphameric characters entered into said electronic calculator;
said storage means is operative for storing one or more lines of one or more alphameric characters each entered into said electronic calculator;
said keyboard input means includes a plurality of keys, each representative of a single alphabetic or numeric character, for entering a representation of every alphabetic character of a selected alphabet and every numeric character from zero through nine into said electronic calculator;
said electronic calculator includes read-only memory means for storing routines and subroutines for recognizing particular strings of alpha-meric characters entered into said electronic calculator as being commands; and said processing means is operative for selectively performing the routines and subroutines stored in said read-only memory means and for executingthe commands recognized thereby.
3. Electronic data processing apparatus as in claim 2 wherein said keyboard input means includes one or more additional keys each representa-tive of a fixed string of alphameric characters representing a command.
4. An electronic calculator as in claim 1 wherein:
said keyboard input means is operative for entering lines of one or more alphameric characters each into said electronic calculator;
said storage means is operative for storing lines of one or more alphameric characters each entered into said electronic calculator;
said electronic calculator includes output printing means, coupled to said keyboard input means and storage means, for printing lines of one or more alphameric characters each;
said keyboard input means includes memory listing means for initi-ating the listing of any designated number of lines of one or more alphameric characters each then stored in said storage means; and said electronic calculator includes logic means, coupled to said keyboard input means, storage means, and output printing means, for causing said output printing means to selectively print out the designated lines of one or more alphameric characters each in response to actuation of said memory listing means.
5. An electronic calculator as in claim 1 wherein:
said keyboard input means is operative for entering lines of one or more alphameric characters each into said electronic calculator;
said storage means is operative for storing lines of one or more alphameric characters each, every stored line of one or more alphameric characters being associated with a separate line number;
said electronic calculator includes buffer storage means, coupled to said keyboard input means and storage means, for storing a line number and for storing a line of one or more alphameric characters entered into said electronic calculator;
said electronic calculator includes display means, coupled to said buffer storage means, for visually displaying the contents thereof;
said keyboard input means includes a control key for designating an automatic line numbering mode; and said electronic calculator includes a line number counter for storing a current line number, temporary storage means for storing a line number increment and logic means coupled to said keyboard input means and buffer storage means, said logic means being responsive to actuation of said control key, followed by actuation of one or more alphameric keys designating both a starting line number and a line number increment, for storing the starting line number in both said buffer storage means and said line number counter and for storing the line number increment in said temporary storage means, said logic means being further responsive to completion of each entry of a line of one or more alphameric characters into the electronic calculator for combining the contents of said line number counter and said temporary storage means and for storing the result in both said line number counter and said buffer storage means.
6. An electronic calculator as in claim 5 wherein:
said keyboard input means includes a delete key; and said logic means is responsive to actuation of said delete key during entry of a line of one or more alphameric characters into the electronic calculator for deleting from said buffer storage means all of the characters previously entered as part of that line, while retaining the associated line number stored in said buffer storage means.
7. An electronic calculator as in claim 1 wherein:
said keyboard input means is operative for entering lines of one or more alphameric characters each into said electronic calculator and having a plurality of keys that may be associated with user-defined functions;
said storage means is operative for storing a program of one or more lines of one or more alphameric characters each and for storing user-defined functions associated with said plurality of keys;
said keyboard input means includes memory erase means for selectively initiating the erasure of said program and/or said user-defined functions that are stored in said storage means; and said electronic calculator includes logic means, coupled to said keyboard input means and storage means, for selectively erasing a portion or all of said program, any one or all of said user-defined functions, or all of said program and all of said user defined functions as specified by actuation of said memory erase means.
8. An electronic calculator as in claim 1 wherein:
said keyboard input means is operative for entering lines of one or more alphameric characters each into said electronic calculator for later execution;

said storage means is operative for storing lines of one or more alphameric characters each entered into said electronic calculator, every stored line being associated with a separate line number;
said processing means is operative for executing lines of one or more alphameric characters each stored in said storage means, said keyboard input means including a halt execution key for designating the line number associated with a line at which execution is to be halted;
said electronic calculator includes a program counter, coupled to said processing means, for storing the line number associated with the line currently being executed;
said electronic calculator includes temporary storage means, coupled to said keyboard input means and storage means, for storing the line number associated with the line at which execution is to be halted; and said electronic calculator includes logic means, coupled to said keyboard input means, processing means, program counter, and temporary storage means, for storing the line number associated with the line at which execution is to be halted in said temporary storage means in response to actuation of said halt execution key, followed by actuation of one or more alphameric keys designating that line number, prior to execution of the lines stored in said storage means and for subsequently halting the execution of those lines in response to the occurrence of a condition of equality between the contents of said program counter and said temporary storage means.
9. An electronic calculator as in claim 1 wherein:

said keyboard input means is operative for entering lines of one or more alphameric characters each into said electronic calculator, said keyboard input means including a first program control key;
said storage means is operative for storing a program of one or more lines of one or more alphameric characters each entered into said electronic calculator, every stored line being associated with a separate line number;
said processing means is operative for executing the program stored in said storage means; and said electronic calculator includes logic means, coupled to said keyboard input means and processing means, said logic means being responsive to actuation of said first program control key, followed by actuation of one or more numeric keys designating the line number of a starting line of the program stored in said storage means, for initiating execution of the program stored in said storage means at that starting line.
10. An electronic calculator as in claim 9 wherein:
said keyboard input means includes a second program control key;
said storage means stores variables employed in the program stored in said storage means;
said logic means is responsive to actuation of said first program control key for setting all of the variables of the program stored in said storage means to an initial state prior to initiating execution of the program;
and said logic means is further responsive to actuation of said second program control key, followed by actuation of one or more numeric keys designating the line number of a line in the program stored in said storage means, for initiating execution of the program at that line number without altering the variables stored in said storage means.
11. An electronic calculator as in claim 1 wherein:
said keyboard input means is operative for entering lines of one or more alphameric characters each into said electronic calculator, said keyboard input means including an initialize key;
said storage means is operative for storing a program of one or more lines of one or more alphameric characters each entered into said electronic calculator and for storing variables associated with that program;
said processing means is operative for executing the program stored in said storage means; and said electronic calculator includes logic means, coupled to said keyboard input means and storage means, for setting all of the variables of the program stored in said storage means to an initial state in response to actuation of said initialize key.
12. An electronic calculator as in claim 11 wherein:
said keyboard input means includes array means for defining an array of program variables to be stored in said storage means;
said logic means is responsive to actuation of said array means for storing an array definition command in said storage means; and said logic means is responsive to said array definition command, when encountered during a program execution mode of said electronic calculator, for dedicating a portion of said storage means as storage for the previously defined array.
13. An electronic calculator as in claim 12 wherein said logic means is responsive to actuation of said initialize key for executing an array definition command previously stored in said storage means.
14. An electronic calculator as in claim 1 wherein:
said keyboard input means is operative for entering lines of one or more alphameric characters each into the electronic calculator;
said storage memory means is operative for storing a program of one or more lines of one or more alphameric characters each entered into the electronic calculator, every stored line being associated with a different line number;
said processing means is operative for executing said program;
said electronic calculator includes magnetic reading and recording means, coupled to said storage means, for transferring lines of one or more alphameric characters between said storage means and a magnetic record member, said keyboard input means being operative for entering control commands into the electronic calculator to control the operation of said magnetic reading and recording means; and said electronic calculator includes logic means, coupled to said keyboard input means, storage means, and magnetic reading and recording means, said logic means being responsive to one of said control commands for securing any portion of said program designated by a beginning line number and an ending line number, said logic means thereafter being responsive to another of said control commands for inhibiting transfer of the secured portion of said program from said storage means to a magnetic record member.
15. An electronic calculator as in claim 1 wherein:
said keyboard input means includes a plurality of definable keys and control means for associating designated alphameric characters with a designated definable key;
said storage means is operative for storing groups of alphameric characters associated with said definable keys;
said electronic calculator includes buffer storage means, coupled to said keyboard input means and storage means, for storing a group of alpha-meric characters;
said electronic calculator includes display means, coupled to said buffer storage means, for visually displaying the contents thereof; and said electronic calculator includes logic means, coupled to said keyboard input means, storage means, and buffer storage means, said logic means being responsive to actuation of said control means, a selected one of said definable keys, and selected ones of said alpahmeric keys for associating the alphameric characters designated by said selected ones of said alphameric keys with the selected one of said definable keys and for storing those alpha-meric characters in said storage means, said logic means thereafter being responsive to actuation of the selected definable key for transferring the alphameric characters associated therewith from said storage means to said buffer storage means.
16. An electronic calculator as in claim 15 wherein:
said keyboard input means includes a key for designating a line termination character that may also be associated with the selected definable key; and said logic means is responsive to actuation of a definable key, whose associated group of alphameric characters includes the line termination character, for immediately terminating the group of alphameric characters associated with that definable key.
17. An electronic calculator as in claim 15 wherein:
the alphameric characters associated with any of the definable keys may represent an executable command; and said logic means is responsive to actuation of such a definable key for immediately executing the command represented by the alphameric characters associated with that definable key.
18. An electronic calculator as in claim 1 wherein:
said keyboard input means includes a first plurality of keys for entering lines of one or more alphameric characters each into the electronic calculator;
said storage means is operative for storing a program of one or more alphameric characters each;
said processing means is operative for executing lines of one or more alphameric characters each;
said electronic calculator includes output means, coupled to said processing means, for providing an output indication of selected calculations performed thereby;
said keyboard input means includes a second plurality of keys,each of which may be associated with a function of one argument, and further in-cludes storage control means for selectively initiating the storage of a function previously associated with one of said second plurality of keys as part of the program stored in said storage means; and said electronic calculator includes logic means, coupled to said keyboard input means, storage means, and processing means, for associating a selected function with a selected one of said second plurality of keys in response to sequential actuation of selected ones of said first and second pluralities of keys designating the selected function and the selected one of said second plurality of keys and for storing the selected function as part of the program stored in said storage means in response to actuation of said storage control means.
19. An electronic calculator as in claim 18 wherein:
said keyboard input means includes an execute key; and said logic means is responsive to actuation of said execute key, following actuation of a selected one of said second plurality of keys with which a selected function has previously been associated, for initiating execution of that selected function by said processing means.
20. An electronic calculator as in claim 1 wherein:
said keyboard input means is operative for entering lines of BASIC
language program statements into the electronic calculator and includes a plurality of definable keys, each of which may be associated with one or more lines of BASIC language program statements;
said storage means is operative for storing lines of BASIC language program statements associated with selected ones of said plurality of definable keys;
said processing means is operative for executing lines of BASIC
language program statements stored in said storage means; and said electronic calculator includes logic means, coupled to said keyboard input means, storage means, and processing means, for initiating execution of the BASIC language program statements associated with a selected one of said definable keys in response to actuation thereof.
21. An electronic calculator as in claim 1 wherein:
said keyboard input means is operative for entering lines of one or more alphameric characters each into the electronic calculator;
said storage means is operative for storing lines of one or more alphameric characters each entered into the electronic calculator; and said processing means is operative for defining a square matrix in response to a matrix command entered into the electronic calculator from said keyboard input means, for thereafter storing the matrix elements in said storage means as designated from said keyboard input means, and for thereafter evaluating the determinant of the previously defined square matrix in response to a determinant command entered into the electronic calculator from said keyboard input means.
22. An electronic calculator as in claim 21 wherein said processing means includes a read-only memory in which routines and subroutines for definingthe square matrix, storing the matrix elements, and evaluating the determinant of the defined square matrix are stored.
23. An electronic calculator as in claim 1 wherein:
said keyboard input means is operative for entering lines of one or more alphameric characters each into the electronic calculator, said keyboardinput means including a line termination key for terminating lines of one or more alphameric characters each entered into the electronic calculator and a print control key for designating a print-all mode of calculator operation;
said storage means is operative for storing lines of one or more alphameric characters each entered into the electronic calculator;
said processing means is operative for executing lines of one or more alphameric characters each stored in said storage means;
said electronic calculator includes output display means, coupled to said keyboard input means, storage means and processing means, for visually displaying lines of one or more alphameric characters each;
said electronic calculator includes logic means, coupled to said keyboard input means, storage means, processing means, and display means, for initiating the display of lines of one or more alphameric characters entered into the electronic calculator, alphameric error messages generated during execution of lines of one or more alphameric characters by said processing means, and executed display commands; and said electronic calculator including printing means for printing lines of one or more alphameric characters, said logic means being responsive to actuation of said print control key for initiating the printing of lines of one or more alphameric characters entered into the electronic calculator and terminated by said line termination key, error messages generated during execution of lines of one or more alphameric characters by said processing means, and executed display commands.
24. An electronic calculator as in claim 1 wherein:
said keyboard input means includes a plurality of keys for entering ines of one or more alphameric characters each into the electronic calculator, each of said keys being representative of a single alphabetic or numeric character;
said storage means is operative for storing lines of one or more alphameric characters each entered into the electronic calculator;
said electronic calculator includes one or more modular plug-in memory units, each of which stores a read-only table of commands, each of said commands comprisng a string of alphameric characters;
said electronic calculator includes logic means, coupled to said keyboard input means, storage means, and read-only memory unit, for recognizing one or more particular strings of alphameric characters entered into the electronic calculator as being one or more of said commands; and said processing means is operative for executing the commands recognized by said logic means.
25. An electronic calculator as in claim 1 wherein:
said keyboard input means is operative for entering lines of one or more alphameric characters each into the electronic calculator, said keyboardinput means including a terminal transmit key;
said storage means is operative for storing a program of one or more lines of one or more alphameric characters each entered into the electroniccalculator;
said electronic calculator includes buffer storage means, coupled to said keyboard input means and storage means, for storing a line of one or more alphameric characters entered into the electronic calculator;
said processing means is operative for executing the line of one or more alphameric characters stored in said buffer storage means or the program stored in said storage means;
said electronic calculator including a modem for transmitting lines of one or more alphameric characters each from the electronic calculator to a remote receiver over telephone lines and for entering lines of one or more alphameric characters each into the electronic calculator as they are received over telephone lines from a remote source; and said electronic calculator includes logic means coupled to said keyboard input means, storage means, buffer storage means, and processing means, said logic means being responsive to actuation of said terminal trans-mit key for transmitting through said modem the line of one or more alpha-meric characters then stored in said buffer storage means, said logic means being further responsive to an interrupt signal, during entry of lines of one or more alphameric characters from said keyboard input means or execution of lines of one or more alphameric characters by said processing means, for interrupting such entry or execution to receive alphameric information through said modem from a remote source.
26. An electronic calculator as in claim 25 wherein:
said keyboard input means includes a plurality of keys for entering BASIC language program statements into the electronic calculator to be selectively stored in said storage means and executed by said processing means, and further includes terminal save means for initiating storage of BASIC language program statements received through said modem; and said logic means is responsive to actuation of said terminal save means for storing in said storage means BASIC language program statements received through said model from a remote source.
27. An electronic calculator as in claim 1 wherein:
said keyboard input means is operative for entering statements of one of more alphameric characters each into the calculator;
said storage means is operative for storing statements entered into the electronic calculator;
said processing means is operative for executing statements entered into the electronic calculator or stored in said storage means;
said electronic calculator includes magnetic tape reading and re-cording means for reading information from and recording information onto an external magnetic tape; and said electronic calculator includes logic means coupled to said keyboard input means, storage means, processing means, and magnetic tape reading and recording means, said logic means being responsive to execution of a mark statement, entered from said keyboard input means or stored in said storage means, for electrically partitioning the external magnetic tape into one or more files.
28. An electronic calculator as in claim 27 wherein said logic means is responsive to a specification of file length associated with said mark statement for electrically partitioning the external magnetic tape into one or more files each of the specified length.
29. An electronic calculator as in claim 27 wherein said logic means is responsive to a specification of file length given as an arithmetic expression with said mark statement for evaluating said arithmetic expression and for electrically partitioning the external magnetic tape into one or more files each of a length equal to the result of that evaluation.
30. An electronic calculator as in claim 28 including:

means for detecting an end of tape condition; and means for preventing creation of a file of specified length if an end of tape condition is detected before file creation has been completed.
31. An electronic calculator as in claim 1 wherein:
said keyboard input means is operative for entering program state-ments and data into the electronic calculator;
said storage means comprises separate program and data sections for storing program statements and data, respectively, entered from said keyboard input means;
said processing means is operative for executing program statements entered into the electronic calculator or stored in said storage means;
said electronic calculator includes a magnetic tape reading and recording means for transferring programs statements and data between said storage means and an external magnetic tape;
said electronic calculator includes first logic means, coupled to said magnetic tape reading and recording means, for creating and identifying separate files on the external magnetic tape and second logic means, coupled to said keyboard input means, storage means, processing means, and magnetic tape reading and recording means, said second logic means being responsive to execution of a store program statement for transferring program statements from the program section of said storage means to a specified file on the external magnetic tape and for storing in the specified file an electrical indication that program statements are stored therein, said second logic means being further responsive to execution of a store data statement for trans-ferring data from the data section of said storage means to a specified file on the external magnetic tape and for storing in that file an electrical indication that data is stored therein.
32. An electronic calculator as in claim 31 wherein said second logic means is responsive to execution of a load program statement for trans-ferring program statements from a specified file on the external magnetic tape to the program section of said storage means, is responsive to execution of a load data statement for transferring data from a specified file on the external magnetic tape to the data section of said storage means, and is further respon-sive to execution of said load program and load data statements for interrogating the stored electrical indication of the contents of the specified file and for providing an error signal to the user if an attempt is made to load program statements from a file containing data or if an attempt is made to load data from a file containing program statements.
33. An electronic calculator as in claim 1 wherein:
said keyboard input means is operative for entering statements of one or more alphameric characters each into the electronic calculator;
said storage means is operative for storing statements entered into the electronic calculator;
said processing means is operative for executing alphameric state-ments entered from said keyboard input means or stored in said storage means;
said electronic calculator includes a magnetic tape reading and recording unit for reading information from and recording information onto an external magnetic tape; and said electronic calculator includes logic means, coupled to said keyboard input means, processing means, and magnetic tape reading and recording means, for electrically partitioning the external magnetic tape into one or more files and for storing on each file a file identification code, said logic means being responsive to execution of a file access command, including specification of a file identification code, for accessing the file specified by that file identification code.
34. An electronic calculator as in claim 33 wherein said file identification code is a number.
35. An electronic calculator as in claim 34 wherein said logic means is responsive to specification of a file identification code in the form of an arithmetic expression for evaluating the arithmetic expression and for employing the result of that evaluation as the file identification code.
36. An electronic calculator as in claim 1 wherein:
said keyboard input means is operative for entering statements of one or more alphameric characters each into the electronic calculator;
said storage means is operative for storing statements entered into the electronic calculator;
said processing means is operative for executing statements entered into the electronic calculator or stored in said storage means;

said electronic calculator includes printing means for printing lines of alphameric information;
said electronic calculator includes magnetic tape reading and recording means for reading information from and recording information onto an external magnetic tape; and said electronic calculator includes logic means, coupled to said keyboard input means, storage means, processing means, printing means, and magnetic reading and recording means, for electrically partitioning an external magnetic tape into one or more files and for storing in each file a file heading containing file identification information, said logic means being responsive to entry of a tape list statement, entered from said key-board input means or stored in said storage means, for reading and file identification information associated with each file and for transmitting that information to said printing means for printing thereby.
37. An electronic calculator as in claim 1 wherein:
said keyboard input means is operative for entering lines of alpha-meric information into the electronic calculator;
said storage means is operative for storing a program of one or more lines of alphameric information entered into the electronic calculator, every stored line being associated with a line number;
said processing means is operative for executing lines of alpha-meric information entered into the electronic calculator or stored in said storage means;

said electronic calculator includes magnetic tape reading and re-cording means for reading lines of alphameric information from and recording lines of alphameric information onto an external magnetic tape; and said electronic calculator includes logic means coupled to said keyboard input means, storage means, processing means, and magnetic tape reading and recording means, said logic means being responsive to execution of a merge command for inserting, after a specified line in a program stored in said storage means, one or more lines or alphameric information previously recorded on the external magnetic tape, without thereby erasing any alpha-meric information then stored in said storage means.
38. An electronic calculator as in claim 37 wherein:
the lines of alphameric information read from or recorded onto the external magnetic tape are each associated with a line number; and said logic means is responsive to execution of said merge command for renumbering the lines of information transferred from the internal magnetic tape to the program stored in said storage means so that the numbers of the transferred lines correspond to the line number sequence of that pro-gram, said logic means being further responsive to execution of said merge command for modifying all references to line numbers within the transferred lines to reflect the line number sequence of the program after the transferred lines have been renumbered.
39. An electronic calculator as in claim 1 wherein:
said keyboard input means for entering lines of alphameric information into the electronic calculator;
said storage means is operative for storing a program of one or more lines of alphameric information entered into the electronic calculator, every stored line being associated with a line number;
said processing means is operative for executing lines of alpha-meric information entered into the electronic calculator or stored in said storage means;
said electronic calculator includes magnetic tape reading and re-cording means for reading information from and recording information onto an external magnetic tape; and said electronic calculator includes logic means, coupled to said keyboard input means, storage means, processing means, and magnetic tape reading and recording means, for transferring a selected portion of the program stored in said storage means to the external magnetic tape in response to execution of a store command.
40. An electronic calculator as in claim 39 wherein:
said store command includes a specification of starting and ending line numbers inclusively designating a portion of the program stored in said storage means; and said logic means is responsive to execution of said store command for transferring the designated portion of the program stored in said storage means to the external magnetic tape.
41. An electronic calculator as in claim 1 wherein:

said keyboard input means is operative for entering alphameric information into the electronic calculator and includes a plurality of definable keys, each of which may be associated with selected alphameric information;
said storage means is operative for storing alphameric information entered into the electronic calculator and for storing the selected alphameric information associated with each of said plurality of definable keys;
said processing means is operative for executing alphameric in-formation entered into the electronic calculator or stored in said storage means;
said electronic calculator includes magnetic tape reading and re-cording means for reading alphameric information from and recording alphameric information onto an external magnetic tape; and said electronic calculator includes logic means, coupled to said keyboard input means, storage means, processing means, and magnetic tape reading and recording means, for transferring the selected alphameric in-formation associated with all of said plurality of definable keys from said storage means to the external magnetic tape in response to execution of a store command.
42. An electronic calculator as in claim 41 wherein said logic means is responsive to execution of a load command for transferring the selected alphameric information associated with said plurality of definable keys from the external magnetic tape to said storage means.
43. An electronic calculator as in claim 1 wherein said keyboard input means is operative for entering lines of one or more alphameric char-acters each into the electronic calculator and includes a plurality of control keys for controlling operation of the electronic calculator and a plurality of definable keys, each of which may be associated with one or more lines of one or more alphameric characters each;
said storage means is operative for storing a mainline program com-prising lines of one or more alphameric characters each entered into the electronic calculator and for storing the line or lines of one or more alpha-meric characters each associated with each of said plurality of definable keys;
said processing means is operative for executing lines of one or more alphameric characters each entered into the electronic calculator or stored in said storage means;
said electronic calculator includes magnetic tape reading and recording means for transferring selected lines of one or more alphameric characters each between said storage means and an external magnetic tape; and said electronic calculator includes logic means coupled to said keyboard input means, storage means, processing means, and magnetic tape reading and recording means, said logic means being responsive to actuation of one of said control keys and a selected one of said definable keys for initializing the electronic calculator so that subsequent calculator commands operate on the lines of one or more alphameric characters associated with the selected one of said definable keys.
44. An electronic calculator as in claim 1 wherein:
said keyboard input means is operative for entering lines of one or more alphameric characters each into the electronic calculator;
said storage means is operative for storing a program of one or more lines of one or more alphameric characters each;
said processing means is operative for executing lines of one or more alphameric characters each;
said electronic calculator includes magnetic tape reading and re-cording means for reading lines of one or more alphameric characters each from an external magnetic tape and for recording lines of one or more alphameric characters each onto the external magnetic tape; and said electronic calculator includes logic means, coupled to said keyboard input means, storage means, processing means, and magnetic tape readingand recording means, said logic means being responsive to execution of a store data command for transferring all common data defined in a program stored in said storage means to the external magnetic tape without the necessity of specifying individual variables.
45. An electronic calculator as in claim 1 wherein:
said keyboard input means is operative for entering lines of one or more alphameric characters each into the calculator;
said storage means is operative for storing lines of one or more alphameric characters each;
said processing means is operative for executing machine language instructions to perform commands represented by one or more alphameric char-acters entered into the electronic calculator or stored in said storage means;
said electronic calculator includes memory loading means, coupled to said storage means, for loading into said storage means tables of alphameric characters representing commands, together with associated machine language instructions for performing each of those commands; and said electronic calculator includes logic means coupled to said keyboard input means, storage means, and processing means, said logic means being responsive to a request for execution of a string of alphameric characters, entered into the electronic calculator from said keyboard input means or en-countered in a program of one or more lines of one or more alphameric characterseach stored in said storage means, for recognizing that string of alphameric characters as one of the commands of said tables stored in said storage means and for initiating execution of the machine language instructions associated with that command by said processing means.
46. An electronic calculator as in claim 45 wherein said memory loading means comprises magnetic reading and recording means for loading said tables of alphameric characters and the machine language instructions for performing the commands represented by those alphameric characters into said storage means from an external magnetic record member.
47. An electronic calculator as in claim 1 wherein:
said keyboard input means is operative for entering lines of alphameric information into the electronic calculator;
said storage means is operative for storing lines of alphameric information;
said processing means is operative for executing lines of alpha-meric information entered into the electronic calculator or stored as a program in said storage means;
said electronic calculator includes magnetic tape reading and re-cording means for reading alphameric information from and recording alpahmeric information onto an external magnetic tape; and said electronic calculator includes logic means, coupled to said keyboard input means and magnetic tape reading and recording means, for electri-cally partitioning the external magnetic tape into one or more files and for storing in each file a file identification code, said logic means being respon-sive to a find command, including specification of a file identification code entered from said keyboard input means or encountered during execution of a program of one or more lines of alphameric information stored in said storage means, for enabling said magnetic tape reading and recording means to search theexternal magnetic tape for the file specified by that file identification code and to locate the specified file in an operation position relative to said magnetic tape reading and recording means.
48. An electronic calculator as in claim 1 wherein:
said keyboard input means is operative for entering one or more BASIC
language statements into the calculator, said execute key is operative for initiating execution of a BASIC language statement entered into the electronic calculator, and said keyboard input means further includes a store control key for initiating storage of a BASIC language statement entered into the electroniccalculator;
said electronic calculator includes buffer storage means, coupled to said keyboard input means, for storing a BASIC language statement entered into the electronic calculator;
said storage means is operative for storing a program of BASIC language statements entered into the electronic calculator;
said processing means is responsive to actuation of said execute key, following entry of a BASIC language statement into the electronic calculator, for executing that BASIC language statement, said processing means being further responsive to actuation of said store control key, following entry of a BASIC
language statement into the electronic calculator, for storing that BASIC
language statement as part of a program in said storage means; and said electronic calculator includes output means, coupled to said buffer storage means, for providing an output indication of the result of exe-cution of a BASIC language statement.
49. An electronic calculator as in claim 48 wherein:
said processing means includes a read-only memory for storing a plurality of routines and subroutines to be selectively performed by the elect-ronic calculator in executing and storing one or more BASIC language statements;said processing means is responsive to actuation of said execute key, following entry of a BASIC language statement into the electronic cal-culator, for selectively performing one or more of the routines and subroutines stored in said read-only memory to execute that BASIC language statement; and said processing means is responsive to actuation of said store control key, following entry of a BASIC language statement into the electronic calculator, for selectively performing one or more of the routines and sub-routines stored in said read-only memory to store that BASIC language statement in said storage means.
50. An electronic calculator as in claim 48 wherein:
said keyboard input means includes a space key; and said processing means is responsive to actuation of said space key during entry of a BASIC language statement from said keyboard input means for introducing a blank character at selected locations within that BASIC language statement.
CA316,026A 1972-07-07 1978-11-09 Programmable calculator Expired CA1099020A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CA316,026A CA1099020A (en) 1972-07-07 1978-11-09 Programmable calculator

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
US26989972A 1972-07-07 1972-07-07
US269,899 1972-07-07
CA174,483A CA1046644A (en) 1972-07-07 1973-06-19 Programmable calculator
CA316,026A CA1099020A (en) 1972-07-07 1978-11-09 Programmable calculator

Publications (1)

Publication Number Publication Date
CA1099020A true CA1099020A (en) 1981-04-07

Family

ID=27162873

Family Applications (1)

Application Number Title Priority Date Filing Date
CA316,026A Expired CA1099020A (en) 1972-07-07 1978-11-09 Programmable calculator

Country Status (1)

Country Link
CA (1) CA1099020A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112084388A (en) * 2020-08-07 2020-12-15 广州力挚网络科技有限公司 Data encryption method and device, electronic equipment and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112084388A (en) * 2020-08-07 2020-12-15 广州力挚网络科技有限公司 Data encryption method and device, electronic equipment and storage medium
CN112084388B (en) * 2020-08-07 2024-04-30 广州力挚网络科技有限公司 Data encryption method and device, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
US4180854A (en) Programmable calculator having string variable editing capability
EP0254387A2 (en) Device for modifying operation of computer keyboard
CA1046644A (en) Programmable calculator
US3839630A (en) Programmable calculator employing algebraic language
CA1094690A (en) Programmable calculator
Mooers et al. Programming languages for non-numeric processing—1: TRAC, a text handling language
CA1099020A (en) Programmable calculator
US4126898A (en) Programmable calculator including terminal control means
Klerer et al. An experiment in a user-oriented computer system
US4322816A (en) Programmable calculator having structure for controlling an x-y plotter
US4366553A (en) Electronic computing apparatus employing basic language
CA1052911A (en) Automatic writing systems and methods therefor
US4127897A (en) Programmable calculator having extended input/output capability
CA1058767A (en) Programmable calculator with printout of key actuation
CA1058760A (en) Programmable calculator with definable keys
US4566072A (en) Programmable calculator including means for digitizing the position of an X-Y plotter pen
Pyle Data input by question and answer
East FOCAL LSL PROGRAMMING MANUAL.
CA1058766A (en) Programmable calculator with external magnetic record member
CA1058761A (en) Electronic calculator with editing capability
Douglas et al. A selected glossary of terms useful in dealing with computers
JPS61120270A (en) Document processor
Moyd FORTRAN Implementation of Tutorial Input
Eads et al. A highly integrated desktop computer system
Holst HYBRID—a user-developed hybrid interpretive language

Legal Events

Date Code Title Description
MKEX Expiry