Manual / Guide · 1970
Wang 720A/B Reference Manual (1970)
The reference manual for the programmable Wang 720A and 720B, with Nixie display.
Manual / Guide · 1970
The reference manual for the programmable Wang 720A and 720B, with Nixie display.
on cow re en rw ewe ere ewe ewe 720A/B REFERENCE MANUAL © WANG LABORATORIES, INC., 7970 Tewksbury, Mass. 01876 Telephone (617) 851-7371 TWX 710 343-6769 W. A NG LABORATORIES, INC. 836 NORTH STREET, TEWKSBURY, MASSACHUSETTS 01876 , TEL. (617) 851-7311, TWX 710 343-6769, TELEX 94.7423 PREFACE Wang Laboratories, America’s leading manufacturer of electronic calculating systems would like to take this opportunity to thank you for your purchase of Wang calculating equipment. As a company we are committed to a total program of services to meet the needs of our customers. We maintain an extensive library of programs and technical services. Our worldwide service organization complemented by trained personnel assures downtime to be at a minimum if at all. Wang equipment is designed around our renowned modularity cancept, which allows a user to expand his system as his requirements expand. Add-on optional items such as, a printer, display, extra storage, programming, and special function keys are available that can be installed easily and efficiently. These features and many more are designed especially to meet the needs of any calculating requirements that may arise. When the calculator arrives it is simply a matter of plugging the unit into a power source, turning it “ON”, depressing the Clear button, and start the calculating. This manual provides operating instructions for the Wang Model 720A/B Programmable Electronic Calculator. IHustrations are typical and show the principal design features of the unit. These instructions have been prepared as a service to our customers and are offered as suggested methods for the customers to follow so that the equipment may be installed, operated and maintained properly. Wang Laboratories is dedicated to manufacturing the finest calculating equipment in the world. We are ready to serve you in any way that will best meet your requirements. For further information, contact your local sales office or Wang Laboratoreis, Inc. 836 North Street, Tewksbury, Massachusetts 01876. Remember “‘We do more so you can”. SECTION I — INTRODUCTION SECTION Hi — EXPLANATION OF KEYS SECTION Ill — PROGRAMMING SECTION IV — PROGRAM CONCEPTS SECTION V — DECISION COMMANDS SECTION VI — PROGRAMMING TECHNIQUES USING A TAPE CASSETTE SECTION Vil — ADDITIONAL COMMANDS NOT FOUND ON THE 720 KEYBOARD SECTION VIIt — TRIGONOMETRIC PACKAGE PROGRAM, STATISTICAL PACKAGE PROGRAM SECTION IX — SAMPLE PROGRAM SECTION X — WARRANTY, SERVICE AND MAINTENANCE ee te! TABLE OF CONTENTS SECTION I — INTRODUCTION Introduction . SECTION II — EXPLANATION OF KEYS Modes of Operation . Run Mode Learn Mode . Learn-Print Mode. List-Program Mode . Turning the 720 ON Non Programmable Keys . Prime Program Coiifiter and Set PC Step. : Verify Program Record Program The Display . X-Register ‘ Entering a Number . Set Exponent Y-Register 5 Program-Error Indicator s Data Storage Registers . Direct Addressing . . Toggle Switches and Special Function Keys Store Direct . Recall Direct Exchange Direct . ; . Add, Subtract, Multiply, anid Divide Direct j Indirect Addressing . coke Indirect Keys , Advantages of Indirect Addressing : Recall Residue . . . Addition, Subtraction. Multiplication . Division Write Commands . Group 1 — Group 2. SECTION HI — PROGRAMMING Coding . Generating a Code Using Special Function Key s and Togele Switches Core Memory i Number of Registers Occupied By a Program ; SECTION IV — PROGRAMMING CONCEPTS Programming Concepts Mark and Search Commands Branching Looping Subroutine Multi-Level SaETAREAeS (Or. a SuBIBUtiie with a Subroutine) . v Table of Contents — L —_ Pr a a a Da —$ OWA DH HhWW Nl | Table of Contents | 4 TABLE OF CONTENTS (Continued) SECTION V — DECISION COMMANDS DECISIONS. . . Skipif Y=X . Skip if Y2X . SkipifY¥<xX . Skip if Error . . PROGRAMMING TECHNIQUES Looping Using a Counter . Looping Without a Counter . Scanning a Table . Go SECTION VI — PROGRAMMING TECHNIQUES USING 5 TAPE CASSETTE. Tape Cassette . . Tape Drive Operations . Machine Error indicator . Protection of Program on Tape What is a Tape Block? . End Program How to “Learn” a Program Into Core From the Keyboard . How to Transfer a Program From Core to Tape . How to Load a Program From Tape Into Core Bypassing Program Blocks . Procedure For Correcting Single Program Steps ; Procedure For Inserting Extra Program Steps . Programming Techniques Using Tape Cassette . Creating a Multi-Block Tape SECTION VII — ADDITIONAL COMMAN DS ‘NOT FOUND ON THE 720 KEYBOARD Pause Command . Write a Pause Storage Commands (Direct Access To and From the Y- Register) Additional Commands for Addressing the 720 Register . Decisions . Cee ee ee ee ee X-Register Y-Register Shifting Commands . SECTION VIII — TRIGONOMETRIC AN D ‘STATISTICAL PACKAGE PROGRAMS The Trig Pack . Speed and Accuracy To Load the Trig Package Using the Trig Package . Program Use . . Design of the Trig Package . Statistical Package Program . . Assignment of Special Operation Keys for a ‘User’ S Own Subroutines . vi : 2Pyn t Ooo nb hWWhre AAAAMANY 6-1 6-2 6-2 / ce OO 9O Nunb BWN NM OH ~ Table of Contents TABLE OF CONTENTS (Continued) SECTION IX — SAMPLE PROGRAM Algebra of Complex Numbers +, --, x, > (Program) 9-1 SECTION X — WARRANTY, SERVICE AND MAINTENANCE Warranty . . am ew RR OR RO ew 10-1 Post-Warranty Service ARMSBY . Wg ew Rw ew ww oR me 10-1 Annual Maintenance Contract. . . ee ep nek 3 10-1 Post-Warranty Service Calls Without Maintenance Contract kG © Rom R 3 10-1 In-House Maintenance Capability 10-2 APPENDIX Typing Conventions for 700 Series Program Library A-1 Index vii NOILVYISNTT GYVOSAI» 9/VvOzZ “901 * dais HOURS ~ . 0 + 19auio wlan! () x 90 x 05 90ud z MOA 2 auooau | snow al £ z L - a93ua | MtONI u x01 | aL alas - - oa l MEA ix! x 3! 4018 3 * Loawig | YIN! | anaisaY” 4393 13s anow | 3) $ x | x x V1v03" an XZA xiL 3 S0u¢ 7 yuniay il 90ud 6 a L 193uI0 | 1O3uId HIONI BIONI Lim AAIMIA ON3 ° aNOLS 4 ; BHO1S dis t + yous 19310 7 YIQNI vHdW | vHaly DOud x NOIS 4oau1d IONI awida fav Pt | von uvata | ™ 2h 1 aonvio vwoae | ama | me | voy ona | 340m — a x x x x x x gagd93d O2 e030 O T-HNWL {HSOD TLHNIS XHNWL XHSOD XHNIS LOBHOL HVIOdOL T-nvi = {soo TNIS XNWL xsoo XNIS sxvlavd Er youu 4ouya aNIHOVA «WY DOHd Ol of oF oe O O SL rl tl 2 LL ot 60 90 i) 90 20 0 eo zo +0 % 00 00 | ONIM3Y | | Aqvay 3evi | | duvMHO4 | | asva1ay WVHDOWd INIdd = -NUVST nnd isl Nuv31 Section / introduction SECTION | INTRODUCTION The Wang 720 is the ultimate solution to many calculating needs. Simple or complex calculations can be done right at the desk. The 720 keyboard is extremely simple to operate. Once the fundamental operations have been mastered, programming the 720 is easy. The Wang 720 is a self-contained programmable electronic calculator constructed with integrated circuits on snap-in replaceable printed circuit modules. The 720 is composed of three basic elements: 1. The Central Processing Unit 2. Read-Only Memory 3. Core Memory The Central Processing Unit (CPU) is the hardware which performs the arithmetic operations. The Read-Only Memory guides the CPU in all its operations. In effect, the Read Only Memory is “the brains” of the Wang 720. It directs all arithmetic and logical operations on the 720 and has been programmed to perform all the functions found on the 67 keys of the 720 keyboard. The 720 Core Memory is organized into 249 data registers; plus a nixie display of the two work registers X and Y; 248 registers can be used for data storage or program storage. All user programs are executed from core memory. The trig functions are also executed from core memory. Section If explains the modes of operation on the 720, as well as the five non-pro- grammable keys; discusses the dual nixie-type display readout and the basic arithmetic operations; explains direct and indirect addressing of the data storage registers: explains the RECALL RESIDUE key — a unique Wang feature that makes double-precision arithmetic a simple operation on the 720. The usefulness of the Wang 720 comes from its programming capabilities. A program is simply a logical sequence of steps which the calculator can perform automatically over and over again on different variables. If the calculation is to be pertormed only once, it probably is simple enough to do it manually on the keyboard. However. if the same calculations are to be done repeatedly, it is beneficial to record and save the steps of the calculation in the form of a program and let the calculator perform these repeated operations. The program is loaded into core and executed from core. Programs can also be stored on magnetic tape for later use. Sections IL], IV, V, VI, and VII discuss various techniques to be used in programming the Wang 720, They explain how to introduce a program into core memory and how to save it for later use on tape cassettes. Also, they explain how several parts of a program can share the same part of core memory. Section VIII discusses the TRIG functions of the Wang 1-1 Section f introduction INTRODUCTION 720. Section IX gives an example of a 720 Program and further illustrates the concept of indirect addressing. Section X contains warranty, service, and maintenance information. An appendix is included in this manual which covers typing conventions and contains an index to help the user locate with ease certain items of interest. . 720A — 720B b PROGRAM _ STEPS REGISTERS be 720A 1984 000-247 Ps 248* (Scratch Pad Only) 5 Level Subroutine a Drives 701 Output Writer i. hes 720B 1984 000—247 248* (Scratch Pad Only) 5 Level Subroutine Drives 701 Output Writer 702 Plotter wee OLA Meer ee *The 720A register 248 and the 720B register 248 may be used as scratch pads only if subroutines 00-00 through 01-15 are not accessed. When these subroutines are called upon, the Y register is automatically stored in this register. ik Cn a dal a a ha Eck ys 1-2 Section ff Explanation of Keys SECTION II EXPLANATION OF KEYS MODES OF OPERATION LEARN LIST RUN LEARN PRINT PROGRAM CoOCIC ICH ti eeoof TTT {TIT TITITI ite. fol 1°] The 720 has four different modes of operation. The four lock-in switches located above the toggle switches on the keyboard are used to put the 720 into a desired mode of operation. RUN MODE The RUN MODE is used for most 720 operations. All keyboard calculations are done in the RUN MODE. In fact, practically all operations except introducing a program into core memory from the keyboard are performed on the 720 in the RUN MODE. LEARN MODE The 720 is put into LEARN MODE when a program is to be written into core. Every programmable key which is indexed while the 720 is in LEARN MODE is “learned” or recorded in core. In LEARN MODE the Y-Register is blanked and the X-Register displays the program step number and the program code stored at that step. LEARN-PRINT MODE The LEARN-PRINT MODE and the LIST PROGRAM MODE are used only when the output writer is available. In the LEARN-PRINT MODE, each key indexed is “learned” into core and is also listed on the output writer. As each key is indexed, the program step number and the program code of the key are listed on the output writer, giving the user a hard copy of his program as he writes it! 27 Section ff Explanation of Keys LIST-PROGRAM MODE When the 720 is put in the LIST-PROGRAM MODE and the GO key is depressed, it automatically lists the program steps and program code in increments of 1000 steps until it encounters an END PROGRAM code. The LEARN-PRINT and LIST-PROGRAM modes are discussed in greater detail in the 701 OUTPUT WRITER MANUAL. TURNING THE 720 ON The procedure for turning the 720 on consists of three steps: J. Turn power switch ON. (located on the rear panel.) 2. Index PRIME to initialize the system. 3. Select mode of operation. (In most instances the RUN mode will be selected. Depress RUN button.) The Wang 720 is now in RUN MODE ready to perform your calculations. NON PROGRAMMABLE KEYS Because of their function, there are five keys which cannot be programmed on the Wang 720. Each of these commands is discussed briefly in this section. All of their functions and uses will become clear after reading the entire manual. The five non programmable keys on the 720 are: PRIME WUQO ——— PROG qe CET = SET PC RECORD lL PROG STEP PRIME The PRIME key initializes the 720 system and should always be depressed when the 720 is first turned on. It also performs the following operations: |. Clears Y-Register to zero. 2. Clears X-Register to zero. 3. Sets the program counter to Step 0000. 4. Resets the program-error and machine-error indicators. 2-2 Section If Explanation of Keys The PRIME key should be depressed when the 720 is first turned on. NOTE The PRIME key should not be depressed when any operation is being executed. If the program is to be stopped during execution, the STEP key should be used. This will stop the program after the current step is executed. Also, indexing the PRIME key when RECORD PROGRAM or LOAD PROGRAM commands are being executed will cause difficulty with the tape. If the PRIME key is indexed accidentally during a RECORD PROGRAM or LOAD PROGRAM operation, the operation will be terminated immediately. However, the tape should be rewound before executing any other tape operations. PROGRAM COUNTER AND SET PC The program counter or PC is a counter which counts from 0000 to 1983. It indicates which program step is about to be executed. At all times, it points to the next program step. Thus, when the machine is performing step 0108, the PC is already on step 0109. The SET PC key allows the user to address and set the program counter with the next three keystrokes. SET PC 0018 This instruction sets the program counter to program step number 0018. To set the program counter requires five keystrokes: SET PC followed by four numeric keys. PRIME auto- matically sets the program counter to step number 0000. STEP The STEP key allows the user to step through his program one step at a time. If the program is running when the STEP key is indexed, the program stops at the step it is about to execute. In the RUN MODE. depressing the STEP key will cause the 720 to perform the next step in the program. Each time the STEP key is indexed. the next program step will be executed. The GO key will take the 720 out of the stepping mode and put it in the continuous mode executing the remaining steps in the program until a STOP command is encountered. NOTE In any 2-step command such as DIRECT ADDRESSING aid WRITE ALPHA commands, the GO key should not be depressed in the middle of the 2-step command, The entire 2-step command should be executed in step mode before switching to the continuous mode. This stepping feature is of tremendous value for debugging programs. The programmer can step through his program and locate his difficulty immediately. By switching to LEARN 2-3 Section If Explanation of Keys MODE he can see the step number and the code of the operation he is about to execute. When stepping through a program in LEARN MODE, the program step number (the PC) and the program code of the operation are displayed in the X-Register. However, in LEARN MODE, the operation is not executed. VERIFY PROGRAM The VERIFY PROGRAM key decimaily adds the high-order and low-order digits of the program codes in core beginning at step 0000 until it encounters an END PROGRAM code. The sum is displayed in the right-most digits of the mantissa of the X-Register. EXAMPLE If this program is located in core and the STEP KEY CODE VERIFY PROGRAM key is depressed, the sum displayed in X is 59. 0000 MARK 0408 0001 0700 07005 04 0002 x? 0713 jo! 0003 STOP 0515 07 0004 END PROG 0512 i 00 07 13 05 15 59 After performing this operation. the PC is set at the step where the END PROGRAM command is located. (Step 0004 in this example.) Notice the code for END PROGRAM is not added into the sum generated by the VERIFY PROGRAM key. RECORD PROGRAM This key transfers a program from core to magnetic tape. The PC is set to a specific step and the program steps starting at this step are transferred to the tape until an END PROGRAM command is reached. The END PROGRAM command is the last step transferred to the tape. After transferring the program to tape, the PC is set to where it was originally set (i.e., the first program step to be transferred to the tape). The five keys, PRIME, SET PC, VERIFY PROGRAM, RECORD PROGRAM and STEP are the only keys on the 720 which cannot be used in a program. Therefore, when any of these keys are indexed it doesn’t matter whether or not the machine is in LEARN or RUN MODE. THE DISPLAY The display consists of two work registers, X and Y. Both the X and Y Registers are displayed simultaneously by easily readable half-inch nixie-type tubes. Each register has a + sign and twelve digit mantissa followed by a two-digit exponent with a range of —99 to +99, 2-4 Section ff Explanation of Keys +.-XXXXXXXXXXKXKX «££ XX (Y-Register) *.XXXXXXXXXXXX + XX (X-Register) \ mantissa ‘exponent floating decimal sign of exponent sign of mantissa For numbers in the range .1 < |N| < 1 000 000 000, the decimal point retains its natural position. When a number fies outside this range. the decimal automatically relocates to the extreme left, and the exponent of the power of 10 is indicated correctly in modified scientific notation. This property will become clear after a few minutes familiarization with the keyboard. (A few numbers and how they appear in the display are given below.) X-REGISTER The keys 0, 1, 2, . . .9 and decimal point (.) are used for entering a number into the X-Register. The SETEXP key is used to set the exponent value of X. The CH SIGN key changes the algebraic sign of the mantissa or exponent of X. Indexing a number into the 720 keyboard is as simple as writing the number down on paper. The normal! sequence of steps is to key in the mantissa followed by the SETEXP key and the value of the exponent. ENTERING A NUMBER Index the following few numbers on the 720 keyboard. After indexing the number into the X-Register, move it to the Y-Register by depressing the t key. NUMBER SEQUENCE OF STEPS DISPLAY a) 152. x 10?! 15 2 SETEXP 21 1 .152000000000+ 21 b) 6.62517x10 2” [| 6 6 25 1 7 SETEXPCHS 2 6 1 | .662517000000-26 c) 2534.5 2534. 5CHS 4 Or ~2534,50000000 25 3.4 SCHSSETENP 4 ft d) .0075 ~OO7 5+ Or | +.750000000000 ~02 Index c and d both ways. Does the display appear ditterently? Notice example b. Why is 26 entered as the value of the exponent? SET EXP The SETEXP key is used to set the exponent value of X with the next two successive keystrokes. The SETEXP key automatically aligns the decimal point in the left-most position of the X-Register: however, it does not blank out the mantissa. This allows us to change the value of the exponent of a number without having to key in the entire number again. 2-5 THEME Gea te! Section If Explanation of Keys EXAMPLE Index 1.75 x 107? Suppose the following sequence of steps is used: 1. 7 5 SETEXP 2 3 Notice what happens to the decimal point when the SETEXP key is indexed. It is not necessary to index the decimal point, as the SETEXP key automatically aligns it in the left most position. The value of the exponent will also have to be indexed correctly. If the number is in proper scientific notation, the value of the exponent is simply increased by 1. Thus, the correct sequence of steps would be: CLEAR X 1 7 $5 SETEXP 2 4 All numbers indexed after the SETEXP key simply changes the value of the exponent. Since the range of the exponent is -99 to +99, normally only | or 2 numbers are indexed after the SETEXP key. However, if more than 2 numbers are indexed. the exponent takes on the value of the last 2 numbers entered. EXAMPLE If the following sequence of steps is performed: 1] 2 SETEXP 2 3 4. the value of the exponent is 34. For SETEXP CHS 3 5 7. the value of the exponent is —57. For SETEXP 5 0 2. the value of the exponent should be 2. However, on the display the exponent would be blanked out and the decimal point would assume its natural position. [> The 720 will remain in the SETEXP mode until a non numeric key or the decimal point key is depressed. Y-REGISTER The Y-Register is another work register used in conjunction with the X-Register for basic arithmetic operations and data transfers. A number in the X-Register can easily be trans- ferred to the Y-Register by indexing the 1 key or At key. KEYSTROKE OPERATION CLEAR X Clears X-Register t X into Y. X unchanged } Y into X, Y unchanged tt X and Y exchanged + Y+X into Y, X unchanged — Y -X into Y. X unchanged x YX X into Y, X unchanged 2-6 IXI INT X 1/X Vx LOG, X 10* LOG..X Section Explanation of Keys Y+X into Y, X unchanged Absolute value of X into X, Y unchanged Disregards decima! part of number in X and puts integer part of number in X, Y unchanged 1/X into X, Y unchanged x? into X, Y unchanged Vx into X, Y unchanged LOG,, X into X, Y unchanged 10* into X, Y unchanged LOG. X into X, Y unchanged X into X, Y unchanged na into X, Y unchanged Step through the following examples to familiarize yourself with these keyboard operations. EXAMPLE |. Calculate .083 + 17.86 + 32.2 = +50.1430000000 1 PR 2. $34 3. 1 ° 86+ 4 3 2.2 + (Answer in Y, 32.2 in X) EXAMPLE 2. Calculate (5)? — (20)? + (1/15)? +70 = - 366.628955291 1. CLEAR X 2. 5 x? ' 3. 20 x? — 4, 15 1/x x? + 5. 70 Vx + (Answer in Y.VW70 in X) EXAMPLE 3. Calculate Sl x 6.2 = +62.0119219307 V 26 1 65a ft 1.51 4 2. 6.2x 726Vx + 3. 2 6Vx + 3.6.2x (Answer in Y,VW26in X) (Answer in Y, 6.2 in X) EXAMPLE 4. A=ar? r=.568 x 10° = +.101355318827 -11 1. 5 6 8 SETEXP 6 CHS 2. x? f T- 3. xX (Answer in Y,7 in X) 27 Section If Explanation of Keys EXAMPLE 5. Calculate (12.8)’?% = +383.256852976 1. 12.8 LOG.Xx 1.12.8 LOG,,X 2 $7 or (2 | 7x 3. 3 + 3.3 + 4 i ex (Answer in X) 4. } 10x (Answer in X) EXAMPLE 6. Reduce the angle 865° to an equivalent angle less than 360°. Formula f 865 — INT [eo 360 = equivalent (145) 360 360 value 865} 360 } INT(X) 3 wWRWY 6 0 x (Answer in Y, 360 in X) EXAMPLE 7. Calculate the following: a. c=2arwhere r= .347 xX 107° =.21802..x1074 b, M = 90+ 87+ 68+77 = 80.5 4 1 c. s/fM+ where M is the answer of 7 (b) ./M Answer = 8.984... Hint: Use} 4 key . e334 105.7 +2? = $01397.4.. e. Log (—2) What happens? Why? PRIME and find V-3. What happens? Why? PROGRAM-ERROR INDICATOR There are two lights located to the right of the Special Function Keys on the 720 keyboard. These two lights are used as error indicators. The one on the right indicates MACHINE ERROR; the one on the left PROGRAM ERROR. The MACHINE ERROR INDICATOR is discussed later. The PROGRAM ERROR INDICATOR is turned on whenever an illegal operation is performed (i.e., taking the logarithm or square root of a negative number, or dividing by zero). Also, if a calculated result is greater than 10°°, the PROGRAM ERROR INDICATOR will be turned on. Whenever the indicator is on, the arithmetic sign of the X-Register also flashes. OPERATIONS WHICH TURN PROGRAM ERROR INDICATOR ON Calculated result greater than 10° ° (Overflow condition) Division by 0 4/-X LOG, ox where x < 0 2-8 Section Ht Explanation of Keys Log e* where x <0 Searching Non-Existent Flag (See page 4-3). Addressing AlJ Ulegal Data Register (Any Register Greater than 249). Program Overlaps Core (See BYPASSING PROGRAM BLOCKS page 6-8). Program Block is Missing An END PROGRAM Instruction (See Definition of PROGRAM BLOCK page 6-4). The PRIME key or SKIP IF ERROR key is used to turn the PROGRAM ERROR INDICATOR off. In programming, a SKIP IF ERROR command is available to test for this condition. Performing this test will also turn the indicator off. DATA STORAGE REGISTERS In addition to the X and Y work registers, the Wang 720 has up to 249 storage registers. Each register has a 12-digit mantissa with sign and a two-digit exponent with sign. The registers are numbered consecutively from 000 to 248 and can be addressed both directly and indirectly for maximum convenience. Numbers are stored from and recalled to the X- Register. Each register can be used to add, subtract, multiply and divide. Any number in storage can be exchanged or swapped with any number in the X-Register. DIRECT ADDRESSING Direct addressing of registers requires a two-step command. The first keystroke indicates the operation (i.e., to Store, Recall, Add, Subtract, Multiply, Divide, or Exchange). The second keystroke indicates the register in which the operation is to be performed. Ta store a number, simply index the control key STORE DIRECT followed by a second keystroke identifying the register number. For direct addressing of registers above 165 see Section VIL. TOGGLE SWITCHES AND SPECIAL FUNCTION KEYS Each register is represented by a combination of toggle switch settings and special function keys. 0000 | co] 01} o2 | 03 | 04] 05 | os | oF | o8 | O9 | 10] 11 | 12] 13) 14 | 15 8040 20 10 ~ a ! pore : Soil =a —— 10 fo] lo} 2-9 Nn a Section ff Explanation of Keys The toggle switches are set to the OFF (down) position. When the toggle switches are in the down position, the special function keys designate the registers 000 to O15. The 4 toggle switches are labeled 80, 40, 20 and 10. When one of these toggle switches is switched to the ON (up) position and a special function key is indexed, the register designated is the sum of the values of the toggle switches and the special function key. (1) oo | 01 | 02 | o3 fea} 05 | o6 | 07 | 08 | 09 | 10 | 11 J 12 | 13 | 14 | 15 WOO ———— eeee 9 Co Depressing the special function key 04 while switch setting (20) is flicked ON designates register 24 (20 + 4). (2) ao ° Lh o0 ND o art ran HOU ——— eose fone) Notice the toggle switch setting. When the 07 key is indexed the register designated is 117 (80 + 20 + 10 + 7). When the 00 key is indexed the register designated is 110 (80 + 20 + 10 + 0). 2-10 Section ff Explanation of Keys (3) Designate Register 32 in two different ways: o4 | o5 | 06 | G7 | o8 | O9 | 10 | 11 12>] 43 | 74°) 175 5088 [oo] ao ssopetas One way of doing this would be to set toggle switches 20 and 10 to the ON (up) position and press the special function key 02. Another way is the following: oO oo | 01 02 | 03 | 04 |] o5 | 06 | O07 } 08 | O9 | 10 |} 11 42 13.414 ] 15 Set toggle switch 20 in the up position and press the 12 key. Notice both combinations 20 + 10+ 2 and 20 + 12 designate register 32. Thus, different combinations of toggle switch settings and special function keys can be used to identify a particular register. However, in 2-11 Section ff Explanation of Keys LEARN MODE the program code designating Register 32 would be 0302 or 0212, depend- ing on which method was uscd. STORE DIRECT To store a number in a register, simply index the number into the X-Register, press the STORE DIRECT key followed by the register number. EXAMPLE lL: Store x? into register 14 * Toggle switclies down Index 7 x? STORE DIRECT 14 7? is now stored in register |4 and is still displayed in the X-Register. EXAMPLE 2: Store .57 x 10 '® into Register 32 *Togegle switches 20 and 10 UP Index 5 7 SETEXP 1 8 STORE DIRECT 02 57x 10'® is now stored in Register 32 and is still displayed in X. *NOTE For problems requiring less than 17 storage registers and for general usage, the toggle switches are kept in the OFF (down) position and the Special Function Keys are used to address Registers 000 to 015. RECALL DIRECT RECALL DIRECT recalls the number from the designated register into the X-Register. The number appears in the X-Register and also remains in the storage register. The sequence of steps to follow is the same as with STORE DIRECT. EXAMPLE: Recall 7? from register 14 Index RECALL DIRECT 14 x? appears in the X-Register and is still in storage register 14. 2-12 ™ DIRECT we Section ff Explanation of Keys The > DIRECT key is a handy command which allows the operator to exchange a number in the X-Register with a number in any of the storage registers. The command simply swaps the values of the X-Register and the internal register. Again the sequence of steps to foilow is “ DIRECT followed by the desired register. w EXAMPLE: Suppose 27.8 is in the X-Register and 7? is in Register 14. To store 27.8 in Register 14 and recal} 7? to the X-Register in one operation: Index 3 DIRECT 14 What happens if the same operation is performed again? ADD, SUBTRACT, MULTIPLY, AND DIVIDE DIRECT (The X and Y Registers Remain Unchanged.) In addition to storing a 12-digit mantissa and a 2-digit exponent, the registers can be used as accumulators to add, subtract, multiply and divide. With cach of these operations the result is stored in the designated register and the X-Register and Y-Register remain unchanged. The four arithmetic operations are: +DIRECT Adds number in X-REGISTER to value stored in register designated by next keystroke. The X and Y Registers remain unchanged. “DIRECT Subtracts number in X-REGISTER from value stored in register designated by next keystroke. The X and Y Registers remain unchanged. XDIRECT Muitiplies number in X-REGISTER by value stored in register designated by next keystroke. The X and Y Registers remain unchanged. =DIRECT Divides number in X-REGISTER into number stored in register designated by next keystroke. The X and Y Registers remain unchanged. A simple example will illustrate how each of these commands works. EXAMPLE: | Perform the following in Register 001 13 x2)+4 1 3 STORE DIRECT O1 Places 13 in Register O1 and the X-Register ie 2 X DIRECT O1 This sequence of steps places the product equal to 26 in Register 0! and 2 remains unchanged in the X-Register. 4+ DIRECT 01 Adds 4 to the Answer. 30 is now in Register 01, 4 is in X-Register. 2-13 Section If Explanation of Keys 4. 3 +DIRECT 01 Divides result by 3 7 _ putting 10 in Register 01, 3 remains in X-Register, 5. — DIRECT Q1 Since 3 is in X when the command is given, 3 is subtracted from 10 putting 7 in Register 01, 3 in X-Register. 6. RECALL DIRECT O1 Recalls final answer to X. = 7 The fact that the result is put in the storage register rather than the X-Register can be extremely useful if we are using a constant multiplier or divisor. INDIRECT ADDRESSING In addition to providing direct access to the internal storage registers, the Wang 720 offers an indirect mode of address. Both display regtsters are utilized for indirect addressing. The Y-Register designates the register being addressed. As with direct addressing, the X-Register is used as the work register. The command is performed on the number in X and the resuit is placed in the internal storage register. Indirect addressing is a valuable programming tool for saving program steps, especially in repetitive matrix-type operations. Remember. indirect addressing requires only one step -- the operation itself. The register on which the operation is performed is identified by the number in Y. INDIRECT KEYS The indirect commands are identical to those used in direct addressing. They consist of the following: KEY OPERATION STORE INDIRECT Stores number in X into Register designated by number in Y. RECALL INDIRECT Recalls number to X from register designated in Y. Number also remains in register. <> INDIRECT Swaps number in X with number in register designated by Y. + INDIRECT Adds number in X to number in register designated in Y. The sum ts placed in internal register. Number in X remains unchanged. 2-14 —~ INDIRECT Section tf Explanation of Keys Subtracts number in X from number in register designated in Y. The difference is placed in internal register. Number in X remains unchanged. X INDIRECT Multiplies number in X by number in register designated in Y. The product is placed in internal register. Number in X remains unchanged. + INDIRECT Divides number in X into number in register designated in Y. The quotient is placed in internal register. Number in X remains unchanged. The following example illustrates how each of these commands would be used, Example Perform the following in Register 002 using Indirect mode of address. 3 E (5.8) - 7.2 “5 |P+a= 12695110 KEY OPERATION |r - Places the register numiber in Y (The register number is usually computed in the program) |~ ST INDIR Stores 7 in register O02. The value is now in both register O02 and the X Register. 5.8 X INDIR Multiplies the value (7) in Register 002 by $.8.putting the result in OO2 and 5.8 remaining in X. 7. 2 INDIR Subtract 7.2 from the value in Register 002 and places result in Register 002. 7,2 remains in X. Divides the value in Register O02 by 3. The result is put in Register 002 and 3 remains in X. <= S INDIR Exchanges 7(5.8) — 7.2 in Register 002 3 with 3 in the X-Register. Squares the value in X. 2-15 Section if Explanation of Keys 3 002. The result is placed in Register 002 and 7(5.8) — 7.2]? remains in X. + INDIR Adds Ee ~7.2 \ to 3 in Register 3 RECALLINDIR Recalls final answer = 126.951111110 ADVANTAGES OF INDIRECT ADDRESSING Two advantages of the indirect mode of addressing are: 1. It requires only one keystroke to perform the indicated operation. 2. By constructing a loop, a given program step sequence can operate on many different sets of registers. A saving of many program steps can result from this technique. The illustration below is a simple program which illustrates the advantage of indirect addressing. The program stored 0 in the first 100 registers. Using direct access a minimum of 200 steps would be required. (Two keystrokes per register - STORE DIRECT followed by each register number.) In contrast, this program requires only J3 steps to accomplish the same thing. A savings of 187 steps! OPERATING PROCEDURE: PRIME GO STEP KEY CODE 0000 MARK 0408 0001 0700 0700 0002 0 0700 0003 ST IND 0504 0004 I 0701 0005 + 0600 0006 l 0701 0007 0 0700 0008 0 0700 0009 SKIP IF Y=X 0509 0010 SEARCH 0407 0011 0700 0700 OO1L2 STOP 0515 RECALL RESIDUE The RECALL RESIDUE key is a unique Wang 720 feature which can be of great value to users who need greater than 12 digit accuracy. The RECALL RESIDUE key gives the 2-16 Section if Explanation of Keys user the option of double precision arithmetic for addition, subtraction, multiplication, and division performed in any of the storage registers or the X and Y registers. By indexing the RECALL RESIDUE key directly after performing one of these operations, another 12 digits of accuracy is acquired. ADDITION, SUBTRACTION, MULTIPLICATION When the RECALL RESIDUE key is indexed after performing an addition. subtraction or multiplication, a residue is displayed in the X-Register, which if added to the first 12 digits of the result, gives an additional 12 digits of accuracy. Examples are given to show how the RECALL RESIDUE key is used for addition, subtraction, and multiplication. EXAMPLE 1: OPERATION DISPLAY ADD ON 720 5024873058.28 §024873058.28 | (45024873058.28 ' +6.85 20987 + 6.8520987 | 6.8520987 5024873065. 1320987 Ht +.502487306513 +10 +6.85 20927 RESIDUE +.§02487306513 +10 +.209870000000 -02 By indexing the RECALL RESIDUE key. the significant digits which would ordinarily be lost in the shifting process are retained. The final result is always the algebraic sum of the values displayed. In subtraction. however. the residue might be opposite in sign to the answer. This should not cause any difficulty since the residue is always algebraically added to the result. EXAMPLE 2: SUBTRACT OPERATION DISPLAY ON 720 $024873058.28 5024873058.28 | (45024873058.28 ' +6.8520987 6.8520987 | 6.85 20987 5024873051.4279013 |i — +.502487305143 +10 +6.8520987 ee Section If Explanation of Keys RESIDUE +.502487305143 +10 -- .209870000000 —02 In this example, the residue is opposite in sign to the result. If these two numbers are added together, the correct result is generated. An easy way of performing this addition is to decrease the 12th digit of the result by 1 (.502487305143 becomes .5024873051 2), subtract each digit of the residue from 9 so .20987 becomes .79012, and add | to the last significant digit (.7901 3). Multiplication works the same way as addition. EXAMPLE 3: OPERATION MULTIPLY ON 720 DISPLAY 31415.9254998 31415.9254998 ] 431415,9254998 728645297326 +.728645 297326 t ne +22891.0663764 +.728645297326 +22891.0663765 22891 .0663765 732361535348 RESIDUE +.732361535348 —O07 | The answer is |x The first twelve digits of the product are in Y: the last 12 digits are in X. DIVISION Using the RECALL RESIDUE key in division is slightly different from addition, subtraction, and multiplication. In division, indexing the RECALL RESIDUE key gives us a remainder, Using this remainder and the original divisor, 12 more digits of accuracy can be obtained by performing the division again. Study the following example illustrating the technique: 2-18 Section tf Explanation of Keys EXAMPLE 4: DIVIDE 22 OPERATION DISPLAY 7 ON 720 3.14285714285 22 +22,000000000 7 (220000000 ' +7 2] - 10 1 = 30 s +3.14285714285 28 +7.00000000000 30 RESIDUE 14 Gunes ) 60 +.500000000000 11 56° 40 35. 50 49 10 , “30, 28 20 14_ 60 56, 40 35 5 Remainder? 7 The +.500000000000 — 11 displayed in X after the RECALL RESIDUE key is pressed indicates a remainder of 5 after the first 12 digits of the quotient are generated. Notice the proper decimal position is retained (i.¢., .5 x 107''). Since the decimal position is retained automatically, the original divisor should be expressed with the decimal point in the left most position and an exponent value of 0 before performing the second division. Thus, .7 is divided into the remainder .5 x!0-11 and 12 more digits of the quotient are generated. To preserve the first 12 digits of the quotient, the second division is performed in Register 000. 2-19 Section If Explanation of Keys Since the remainder is now in X STDIR 00 7 SETEXP* =DIR OO RE_DIR 00. *This command automatically aligns the decimal point and exponential value of the divisor. Read .714285714285 — 11] in the X-Register which if added to 3.14285714285 yields 24 digit accuracy for 22/7. If greater accuracy is desired, simply touch the RECALL RESIDUE key to obtain the remainder (5000000000000 - 23) and repeat the process. This example illustrates the fact that the RECALL RESIDUE key performs the same function when any of the 249 internal registers are used to add. subtract. multiply and divide. The RECALL RESIDUE key is NOT limited to use solely with the X and Y registers. {1T SHOULD ALSO BE NOTED THAT THE RESIDUE MUST BE SAVED AFTER EACH OPERATION IF IT 1S TO BE USED IN FURTHER CALCULATIONS. WRITE COMMANDS The 701 Output Writer provides the user with completely formatted alpha-numeric output of his calculated results. NUMERIC output consists of a two-step command. The WRITE key followed by a format command will print the contents of the X-Register. The format command specifies the number of digits to be printed out before and after the decimal point EXAMPLE WRITE 02 03 The HIGH ORDER digit _— Note LOW ORDER digit of the code specifies of the code specifies the number of digits the number of digits before the decimal point. after the decimal point. The above command would print two digits before the decimal point and three digits after the decimal point. An option to always print in modified scientific notation is available. 2-20 Section ff Explanation of Keys EXAMPLE Display: +.12345678123 — 40 Command: WRITE 0015 Output will appear as: .123456789 1 23ex — 40 ALPHABETIC output can be printed under program control by using the WRITE ALPHA command. Indexing the WRITE ALPHA key places the 720 in alpha mode so that alpha characters can be printed. The END ALPHA command takes th