Manual / Guide · c. 1969
Wang 700 A/B Manual
The 96-page manual for the programmable Wang 700A and 700B calculators.
Manual / Guide · c. 1969
The 96-page manual for the programmable Wang 700A and 700B calculators.
REFEREN~E M:ANUAL © WANG LABORATORIES, INC., 1970 Tewksbury, Mass. 01876 Telephone (617) 851-7all • TWX 110 343-6769 I I ,, t, FOREWORD This reference manual is designed to provide the user with a basic understanding and practical guidance in the use of Wang's 700A/B Electronic Calculators. The aim has been to assist the user by presenting the most useful technique, concept and method for utilizing the 700 to its best advantage. For further information, contact your local sales office or Wang Laboratories, Inc., 836 North Street, Tewksbury, Massachusetts 01876. SECTION I - INTRODUCTION SECTION II - EXPLANATION OF KEYS SECTION III - PROGRAMMING SECTION IV - PROGRAM CONCEPTS SECTION V - DECISION COMMANDS SECTION VI - PROGRAMMING TECHNIUUES USING A TAPE CASSETTE SECTION VII - ADDITIONAL COMMANDS NOT FOUND ON THE 700 KEYBOARD SECTION VIII - TRIGONOMETRIC PACKAGE PROGRAM, STATISTICAL PACKAGE PROGRAM SECTION IX - SAMPLE PROGRAMS SECTION X - WARRANTY, SERVICE AND MAINTENANCE Table of Contents TABLE OF CONTENTS SECTION I - INTRODUCTION Introduction . . . . . . • • • • • • • • • • • • • • • • • • • SECTION II - EXPLANATION OF KEYS Modes of Operation. . . . . . . . . . . . . . . . . . . . . . . Run Mode v . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1 . 2-1 .' 2-1 . 2-1 . 2-2 . 2-2 . . . . . . . . . . . . . . . . . . . . . . . . . . . Learn Mode'. . . . . . . . . . . . . . . . . . . . . . . Learn-Print Mode. . . . . . . . . . . . . . . . . . . . . List-Program Mode . . . . . . . . . . . . . . . . . . . . Turning the 700 ON. . . . . . . . . . . . . . . . . . . Non-Programmable Key . . . . . . . . . . . . . . . . . . Prim e . . . . . . . . . . . . . . . . . . . . . . . . . Program Counter and Set PC . . . . . . . . . . . . . . . . S t e p. . . . . . . . . . . . . . . . . . . . . . . . . . Verify Program . . . . . . . . . . . . . . . . . . . . . Record Program . . . . . . . . . . . . . . . . . . . . . The Display. . . . . . . . . . . . . . . . . . . . . . . X- Register . . . . . . . . . . . . . . . . . . . . . . . Entering aNumber . . . . . . . . . . . . . . . . . . . . Set Exp . . . . . . . . . . . . . . . . . . . . . . . . Y- Register . . . . . . . . . . . . . . . . . . . . . . . Program-Error Indicator . . . . . . . . . . . . . . . . . . Data Storage Registers. . . . . . . . . . . . . . . . . . . Direct Addressing . . . . . . . . . . . . . . . . . . . . Toggle Switches and Special Function Keys . . . . . . . . . . Store Direct. . . . . . . . . . . . . . . . . . . . . . . Recall Direct . . . . . . . . . . . . . . . . . . . . . . Exchange Direct . . . . . . . . . . . . . . . . . . . . . Add, Subtract, Multiply, and Divide Direct. . . . . . . . . . . Indirect Addressing. . . . . . . . . . . . . . . .. . . . . Indirect Keys . . . . . . . . . . . . . . . . . . . . . . Advantages of Indirect Addressing . . . . . . . . . . . . . . Recall Residue. . . . . . . . . . . . . . . . . . . . . . Addition, Subtraction, Multiplication. . . . . . . . . . . . . Division . . . . . . . . . . . . . . . . . . . . . . . . Write Commands. . . . . . . . . . . . . . . . . . . . . Group I - Group 2. . . . . . . . . . . . . . . . . . . . SECTION III - PROGRAMMING Coding. . . . . . . . . . . . . . . . . . . . . . . . . Generating a Code Using Special Function Keys and Toggle Switches Core Memory . . . . . . . . . . . . . . . . . . . . . . Number of Registers Occupied By a Program . . . . . . . . . . SECTION IV - PROGRAM CONCEPTS Programming Concepts . . . . . . . . . . . . . . . . . . Mark and Search Commands . . . . . . . . . . . . . . . . Su brou tine . . . . . . . . . . . . . . . . . . . . . . . Double-Level Subroutines (or a Subroutine within a Subroutine) . . 1-1 • . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . • • • • . . . . . . . . . . . . . . . . . . . . . . . . 2-2 2-2 2-3 2-3 2-4 2-4 2-4 2-5 2-5 2-5 2-6 2-8 2-9 2-9 2-9 2-12 2-12 2-13 2-13 2-14 2-14 2-16 2-16 2-17 2-18 2-20 2-21 3-1 3-2 3-3 3-5 4-1 4-2 4-5 4-7 Table of Contents TABLE OF CONTENTS (Continued) SECTION V - DECISION COMMANDS DECISIONS. . . . . . . . . . . . . . . . . . . . . . . . . . . 5-1 Skip if Y = X . . . . . . . . . . . . . . . . . . . . . . . . 5- 1 Skip if Y > X . . . . . . . . . . . . . . . . . . . . . . . . 5-2 SkipifY<X 5-3 Skip if Error . . . . . . . . . . . . . . . . . . . . . . . . 5-3 PROGRAMMING TECHNIQUES . . . . . . . . . . . . . . . . . . 5-4 Looping Using a Counter. . . . . . . . . . . . . . . . . . . . 5-4 Looping Without a Counter. . . . . . . . . . . . . . . . . . . 5-6 Scanning a Table. . . . . . . . . . . . . . . . . . . . . . . 5-8 Go . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-9 SECTION VI - PROGRAMMING TECHNIQUES USING A TAPE CASSETTE Tape Cassette . . . . . . . . . . . . . . . . . . . . . . . . . . 6-1 Tape Drive Operation . . . . . . . . . . . . . . . . . . . . . . . 6-2 Machine-Error Indicator . . . . . . . . . . . . . . . . . . . . . . 6-2 Protection of Program on Tape . . . . . . . . . . . . . . . . . . . 6-3 What is a Program Block? . . . . . . . . . . . . . . . . . . . . . 6-3 End Program . . . . . . . . . . . . . . . . . . . . . . . . . . 6-4 How to Learn a Program Into Core From the Keyboard. . . . . . . . . . 6-5 How to Transfer a Program From Core to Tape . . . . . . . . . . . , 6-6 How to Load a Program From Tape into Core. . . . . . . . . . . . . . 6-7 Bypassing Program Blocks . . . ... . . . . . . . . . . . . . . . . 6-8 Procedure for Correcting Single Program Step. . . . . . . . . . . . . . 6-8 Procedure for Inserting Ex tra Program Steps . . . . . . . . . . . . . . 6-9 Programming Techniques Using Tape Cassette. . . . . . . . . . . . . . 6-9 Creating a Multi-Block Tape . . . . . . . . . . . . . . . . . . . . 6-11 SECTION VII - ADDITIONAL COMMANDS NOT FOUND ON THE 700 KEYBOARD Pause Command . . . . . . . . . . . . . . . . . . . . . . . . . 7-1 Write Alpha Pause . . . . . . . . . . . . . . . . . . . . . . . . 7-1 Storage Commands (Direct Access to and from the V-Register) . . . . . . . 7-2 Decisions. . . . . . . .'. . . . . . . . . . . . . . . . . . . . 7-2 X-Register . . . . . . . . . . . . . . . . . . . . . . . . . 7-3 V-Register . . . . . . . . . . . . . . . . . . . . . . . . . 7-3 Shifting Commands. . . . . . . . . . . . . . . . . . . . . . . . 7-4 SECTION VIII - TRIGONOMETRIC PACKAGE PROGRAM STATISTICAL PACKAGE PROGRAM Trig Pack. . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-1 Speed and Accuracy . . . . . . . . . . . . . . . . . . . . . . . 8-2 To Load the Trig Package . . . . . . . . . . . . . . . . . . . . . 8-2 Using the Trig Package . . . . . . . . . . . . . . . . . . . . . . 8-3 Program Use . . . . . . . . . . . . . . . . . . . . . . . . . . 8-4 Design of the Trig Pack . . . . . . . . . . . . . . . . . . . . . . 8-4 Statistical Package . . . . . . . . . . . . . . . . . . . . . . . . 8- 5 Assignment of Special Operations Key for a User's Own Subroutines. . . . . 8-6 • VI Table of Contents TABLE OF CONTENTS (Continued) SECTION IX - SAMPLE PROGRAMS Algebra of Complex Numbers (Program) . • • • • • • • • SECTION X - WARRANTY, SERVICE AND MAINTENANCE Warranty. • • • • • • • • • • • • • • • • • • • • Post-Warranty Service Availability • • • • • • • • • • • Annual Maintenance Contract. • • • • • • • • • • • • Post-Warranty Service Call Without Maintenance Contract • • In-House Maintenance Capability • • • • • • • • • • • APPENDIX Typing Conventions Index • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • !'.- ", 1,_- C o to, , , t. t:->· ~:<: o .. Vll 9-1 10-1 10-1 .10-1 10-1 10-2 A-I A-4 RUN LEARN LEARN PRINT i LIST PROGRAM , I 0000 BC 40 20 00 01 03 02 04 07 06 05 06 09 II RELEASE 10 11 FORWARD 12 II TAPE Rl!ADY 13 II 14 REWIND 15 10 0 TO RADIANS WRITE INTEGER X RADIANS TO DEGREES SINX END ALPHA RECALL INDIR l/X STORE INDIR RECALL RESIDUE Ixi COSX TANX ,. .... ,. ~ ... ,. ..... INDIR SIN-1 X COS-I X TAN-X1 TANHX SINH-X1 COSti~ TANW'X CLEAR X LOAD PROG SKIP IF ERROR MARK PRIME 9 END PROG SKIP IF RETURN VERIFY PROG GROUP SET PC TO RECT SINHX X' COSHX ,. DIRECT RECALL DIRECT CHANGE SIGN INDIR • • DIRECT STORE DIRECT - X INDIR X DIRECT ...• TO POLAR l • • X {X 7 4 B 5 6 STOP Y~X SKIP IF Y=X LOG,.X 1T - INDIR DIRECT 1 -+ , lOx - 1 2 SKIP IF Y<X 3 GROUP 2 RECORD PROG GO eX o PROGRAM ERROR DEGREE WRITE ALPHA I LOG.X 0 + + INDIR DIRECT + 0 • SET EXP 700A/B KEYBOARD ILLUSTRATION SEARCH STEP 0 MACHINE ERROR 0 Section I Introduction SECTION I INTRODUCTION • The Wang 700 is the ultimate solution to many calculating needs. Simple or complex calculations can be done right at the desk. The 700 keyboard is extremely simple to operate. Once the fundamental operations have been mastered, programming the 700 is easy. The Wang 700 is a self-contained programmable electronic calculator constructed with integrated circuits on snap-in replaceable printed circuit modules. The 700 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 700. It directs all arithmetic and logical operations on the 700 and has been programmed to perform all the functions found on the 67 keys of the 700 keyboard. The 700 Core Memory is organized into 121 or 122 data registers; plus a nixie display of the two work registers X and Y; 120 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 II explains the modes of operation on the 700, as well as the five non-programmable 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 700. The usefulness of the Wang 700 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 performed 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 III, IV, V, VI, and VII discuss various techniques to use in programming the Wang 700. 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 I Introduction INTRODUCTION 700. Section IX gives an example of a 700 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. 700A -7008 PROGRAM STEPS . REGISTERS 700A 960 000-119 120-121 * (Scratch Pad Only) 2 Level subroutine Drives 701 output writer 700B 960 000-119 120* (Storage Only) 5 Level subroutine Drives 701 Output writer 702 Plotter *The 700A register 121 and the 700B register 120 may be used as scratch pads only if subroutine 00-00 thru 01-15 are not accessed. When these subroutines are called upon the Y register is automatically stored in these registers. 1-2 Section II Explanation of Keys SECTION II EXPLANATION OF KEYS MODES OF OPERATION RUN LEARN LEARN PRINT LIST PROGRAM I ••• 0000 !lflllll o 0 The 700 has four different modes of operation. The four lock-in switches located above the toggle switches on the 700 keyboard are used to put the 700 into a certain mode of operation. RUN MODE The RUN MODE is used for most 700 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 700 in the RUN MODE. LEARN MODE The 700 is put into LEARN MODE when a program is to be written into core. Every programmable key which is indexed while the 700 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 Or the output writer. As each key is indexed, the program step number and the program code of the key is listed on the output writer, giving the user a hard copy of his program as he writes it! 2-1 Section II Explanation of Kevs LIST-PROGRAM MODE When the 700 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 100 steps until it encounters an END PROGRAM code. The LEARN-PRINT and LIST-PROGRAM modes are discussed in greater detail in the 70 1 OUTPUT WRITER MANUAL. TURNING THE 700 ON The procedure for turning the 700 on consists of three steps: 1. Turn power switch ON. 2. Index PRIME to initialize the system. 3. Select mode of operation. (In most instances the R UN mode will be selected. Depress R UN button.) The Wang 700 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 700. 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 700 are: PRIME DODD I II II II VERIFY PROG I 0 0000 0 EJ G SET PC . RECORD PROG STEP PRIME ,, The PRIME key initializes the 700 system and should always be depressed when the 700 is first turned on. It also performs the following operations: 1. Clears V-Register to zero. 2. Clears X-Register to zero. 3. Sets the program counter to Step 000. 4. Resets program-error and machine-error indicators. 2-2 Section /I Explanation of Keys The PRIME key should be depressed when the 700 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 000 to 959. It indicates which program step is about to be executed. At all times, it always points to the next program step. Thus, when the machine is performing step 108, the PC is already on step 109. The SET PC key allows the user to address and set the program counter with the next three keystrokes. SET PC 018 This instruction sets the program counter to program step number 018. To set the program counter requires four keystrokes: SET PC followed by three numeric keys. PRIME automatically sets the program counter to step number 000. 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 700 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 700 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 and 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 II 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 is displayed in the X-Register. However, in LEARN MODE the operation is not executed. VERIFY PROGRAM The VERIFY PROGRAM key decimally adds the high-order and low-order digits of the program codes in core beginning at step 000 until it encounters an END PROGRAM code. The sum is displayed in the right-most digits of the mantissa of the X-Register. EXAMPLE STEP # 000 001 002 003 004 KEY MARK 0700 x2 CODE 0408 0700 0713 STOP END PROG 0515 0512 If this program is located in core and the VERIFY PROGRAM key is depressed the sum displayed in X is 59. 04 08 07 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 004 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 700 which cannot be used in a program. Therefore, when any of these keys are indexed it doesn't matter whether 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 /I Explanation of Keys XXXXXXXXXXXX + . XXXXXXXXXXXX \ I mantissa I floating decimal sign of mantissa +. X X (Y-Register) + X X (X-Register) \ 'exponent sign of exponent + For numbers in the range .1 ~ INI < 1 000000000, the decimal point retains its natural position. When a number lies outside this range, the decimal automatically relocates to the extreme left, and the exponent of the power of lOis 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 700 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 700 keyboard. After indexing the number into the X-Register. move it to the Y-Register by depressing the t key. SEQUENCE OF STEPS NUMBER 21 a) .152 x 10 b) 6.62517x 10 -27 c) -2534.5 5 2 SETEXP 2 1 t 1 -- --- DISPLAY . 7 SETEXP CHS 6 6 2 5 1t 2 6- .0075 .662517000000-26 2 534 -. 5 CHS t -Or d) .152000000000 + 21 - 2534.50000000 2 5 3 4 5 CHS SETEXP 4 t .0 5t -0 -7 -+.750000000000-02 Or 2 7 5 SETEXP CHS t -- Index c and d both ways. Does the display appear differently? 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 agam. • 2-5 Section II Explanation of Keys EXAMPLE Index 1.75 x 10 23 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 I 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. 1 2 SETEXP 2 3 4, the value of the exponent is 34. 2. For SETEXP CHS 3 57, the value of the exponent is -57. 3. 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 700 will remain in the SETEXP mode until a non numeric key or the decimal point key is depressed. V-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 transferred to the Y-Register by indexing the t key or ~ t key. KEYSTROKE OPERATION CLEAR X + Clears X-Register X into Y, X unchanged Y into X, Y unchanged X and Y exchanged Y+X into Y, X unchanged x Y-X into Y, X unchanged Yx X into Y, X unchanged f ~ U 2-6 Section 1/ Explanation of Keys Y+X into Y, X unchanged • • !XI Absolute value of X into X, Y unchanged INTX Disregards decimal part of number in X and puts integer part of number in X, Y unchanged l/X 1/X into X, Y unchanged x 2 into X, Y unchanged vx v'X into X, Y unchanged LOGloX lOx LOG lo X into X, Y unchanged LOGeX x e rr LOGeX into X, Y unchanged eX into X, Y unchanged lOx into X, Y unchanged rr into X, Y unchanged Step through the following examples to familiarize yourself with these keyboard operations. EXAMPLE 1. Calculate.083+ 17.86+32.2= +50.1430000000 1. PRIME 2.·.083~ 3. 1 7. 8 6 + 4.3 2 . 2 + (Answer in Y, 32.2 in X) EXAMPLE 2. Calculate (5)2 - (20)2 + (1/15)2 +V'70 = - 366.628955291 1. CLEAR X 2 2. 5 x 3.20 x 2 4. 1 5 l/x x 2 + 5.70 + (Answer in Y,v'70 in X) t vx EXAMPLE 3. Calculate 51 x 6.2 = + 62.0119219307 y'26' t 1.51 2. 6 . 2 x 3. 2 6-vx + (Answer in Y,v126 in X) EXAMPLE 4. A=rrr2 t 1.51 2. 2 6 + 3.6 . 2 x (Answer in Y, 6.2 in X) vx r=.568x 10- 6 = +.101355318827-11 1.5 6 8 SETEXP 6 CHS rr 2. x 2 3. X (Answer in Y, rr in X) t 2-7 Section II Explanation of Keys EXAMPLE 5. Calculate (12.8)?/3 = + 383.256852976 1. 1 2 . 8 LOGeX 2. 7 x or 3.3 + 4. eX (Answer in X) 1. 1 2 . 8 LOG! 0 X 2.' 7 x t 3.3+ 4. ~ lOX (Answer in X) t EXAMPLE 6. Reduce t~e angle 865 0 to an equivalent angle less than 360 0 . Formula 865 - INT ~865'; 360 = equivalent (145) 360 360 value '. / 1. 865 t 2.3 6 0 + 3. tINT (X) - 4.5.3 6 0 x (Answer in Y, 360 in X) EXAMPLE 7. Calculate the following: a. c = 2 T( r where r = .347 X 10- 5 = .21802 .. xlO- 4 b. M = 90 + 87 + 68 + 77 = 80.5 4 c. y'"M + 1 where M is the answer of 7 (b) , \ , , y'M Answer = 8.984 ... t Hint: Use + key d. e 5 .3 + 10 5 . 7 + T(2 = 501397 .4 ... e. Log (-. 2) What happens? Why? PRIME and find vC3. What happens? Why? ;i PROGRAM-ERROR INDICATOR . • There are two lights located to the right of the Special Function Keys on the 700 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 99 , 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 1099 Division by 0 (Overflow condition) y:::x LOG! oX where x< 0 2·8 Section II Explanation of Keys Log e where x< 0 Searching Non-Existent Flag (See page 4-3). Addressing An Illegal Data Register (Any Register Greater than 121) 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 is used to turn the PROGRAM ERROR INDICATOR off. In programIlling, a SKIP IF ERROR command is available to test for this condition. Performing this il'st will also turn the indicator off. DATA STORAGE REGISTERS [n addition to the X and Y work registers, the Wang 700 has up to 122 storage registers. I ':ach register has a 12-digit mantissa with sign and a two-digit exponent with sign. The registers are numbered consecutively from 000 to 121 and can be addressed both directly ;Ind indirectly for maximum convenience. Numbers are stored from and recalled to the XRegister. 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 lile 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. To store a nllmber, simply index the control key STORE DIRECT followed by a second keystroke Identifying the register number. TOGGLE SWITCHES AND SPECIAL FUNCTION KEYS Eqch register is represented by a combination of toggle switch settings and special III nction keys. 0000 00 01 02 03 04 05 06 07 08 09 10 11 12 80402010 DODD It •••• o 2-9 0 13 14 15 .... -_ ~-- -" .. ''- " .. -- ' Section II 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 0 15. 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) :;:::::;:::::::::: 0080 00 01 02 03 Wf 05 06 07 08 10 09 11 12 13 14 15 ;.:.;.:-:.:.:<.:. 80402010 DODD IltllllJ •••• o 0 Depressing the special function key 04 while switch setting (20) is flicked ON designates register 24 (20 + 4). (2) BoBO gg 80402010 01 02 03 04 05 06 09 ••.•· .•0•. :.1.................. 08 12 11 10 13 14 15 .................. _---L_-'--_I....-..--L_--l.-_~=_---L_-'--_I....-__l._----L_..l.-----'L---' DODD •••• . I ~ , Ii II , . II • • a ..... -~..., o 0 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 /I Explanation of Keys (3) Designate Register 32 in two different ways: oong 00 01 80402010 :j!,III! 03 04 05 06 07 0000 08 09 10 :::J £=Ji 11 CI 11 12 13 14 15 1 •••• o 0 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: oogo 00 01 02 03 •••• DODD . . 04 05 07 06 08 09 10 i~~[·i:1 3 11 1 80402010 ...... ~ I - . ..',., I[ II 14 15 Il~ . . o 0 J:' - _.' ,,,. ';~ , -,< '- 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 II Explanation of Keys LEARN MODE the program code designating Register 32 would be 0302 or 0212, depending on which method was used. 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 1: Store 1r 2 into register 14 * Toggle switches down Index 1r x 2 STORE DIRECT 14 1r 2 is now stored in register 14 and is still displayed in the X-Register. EXAMPLE 2: Store .57 x 10 18 into Register 32 *Toggle switches 20 and 10 UP Index ---5 7 SETEXP 18 STORE DIRECT 02 .57 X 10 18 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 i 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: Recall1r 2 from register 14 Index RECALL DIRECT 14 I 1r 2 appears in the X-Register and is still in storage register 14. 2·12 Section 1/ Explanation of Keys ~ -..... DIRECT, 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 follow is -: DIRECT followed by the desired register. EXAMPLE: Suppose 27.8 is in the X-Register and 1f2 is in Register 14. To store 27.8 in Register 14 and reca1l1f 2 to the X-Register in one operation: Index ~ DIRECT 14 What happens if the same operation is performed again? ADD, SUBTRACT, MULTIPLY, AND DIVIDE DIRECT (The X and V Registers Remain Unchanged.) In addition to storing a l2-digit mantissa and a 2-digit exponent, the registers can be lIsed as accumulators to add, subtract, multiply and divide. With each of these operations t he result is stored in the designated register and the X-Register and Y-Register remain ullchanged. The four arithmetic operations are'• +DIRECT -DIRECT XDIRECT -:-DIRECT Adds number in X-REGISTER to value stored in register designated by next keystroke. The X and Y Registers remain unchanged. Subtracts number In X-REGISTER from value stored In register designated by next keystroke. The X and Y Registers remain unchanged. Multiplies number in X-REGISTER by value stored in register designated by next keystroke. The X and Y Registers remain unchanged. 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 -3=7 3 1 3 STORE DIRECT 01 1. -- 2. 2 X DIRECT 01 - 3. 4 + DIRECT 01 - Places 13 in Register 01 and the X-Register This sequence of steps places the product equal to 26 in Register Oland 2 remains unchanged in the X-Register. Adds 4 to the Answer. 30 is now in Register 01, 4 is in X-Register. 2-13 Section II Explanation of Keys 4. 3 -;.-DIRECT 01 - 5. - DIRECT 01 6. RECALL DIRECT 01 Divides result by 3 putting lOin Register 01, 3 remains in X-Register. Since 3 is in X when the command is given, 3 is subtracted from 10 putting 7 in Register 01, 3 in X-Register. 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 700 offers an indirect mode of address. Both display registers 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 result 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: OPERATION KEY Stores number in X into Register designated by number in Y. Recalls number to X from register designated in Y. Number also remains in register. Swaps number in X with number in register designated by Y. Adds number in X to number in register designated in Y. The sum is placed in internal register. Number in X remains unchanged. STORE INDIRECT RECALL INDIRECT :> INDIRECT , + INDIRECT 2-14 Section /I 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. Multiplies number in X by number in register designated in Y. The product is placed in internal register. Number in X remains unchanged. Divides number in X into number in register designated in Y. The quotient is placed in internal register. Number in X remains unchanged. - INDIRECT X INDIRECT -;- INDIRECT The following example illustrates how each of these commands would be used. Example Perform the following in Register 002 using Indirect mode of address. 7(5.8)-7.2 2+ 3 = 126.951111110 3 KEY , OPERATION 2 t -- Places the register number in Y (The register number is usually computed in the program) 7 ST INDIR - Stores 7 in register 002. The value is now in both register 002 and the X Register. 5 . 8 X INDIR Multiplies the value (7) in Register 002 by 5.8,putting the result in 002 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. 3 -;- INDIR Divides the value in Register 002 by 3. The result is put in Register 002 and 3 remains in X. ~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 II Explanation of Keys ,< " • + INDIR Adds RECALL INDIR Recalls final answer = 126.951111110 7(5.8) - 7.2 2 to 3 in Register 3 002. The result is placed in Register 002 and 7(5.8) - 7.2 2 remains in X. 3 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 setll of registers. A saving of many program steps can result from this technique. ~.o: ·-;,., < Figure L 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 betequired. (Two keystrokes per register - STORE DIRECT followed by each register nufnber.) In contrast, this program requires only 13 steps to accomplish the same thing. A savings of 187 steps! , .e. - , FIGURE 1 ·,.' OPERATING PROCEDURE'• PRIME GO • ., " • ,. "~ .,.. · · ~. · or· - ~. ~ .. ... ,-~ -"'~ ~, . ' '.., .'. " · .} .'.). ~k' . ·.,......- ".- STEP KEY CODE 000 1 2 3 4 5 6 7 8 9 10 11 12 MARK 0700 0 STIND 1 0408 0700 0700 0504 0701 0600 0701 0700 0700 0509 0407 0700 0515 + 1 0 0 SKIP Y=X SEARCH 0700 STOP . :t. . ~ --. ,-" :;.::-' RECALL RESIDUE The RECALL RESIDUE key is a unique Wang 700 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 11 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: ADD 5024873058.28 OPERATION ON 700 DISPLAY 5024873058.28 ------------t "+5024873058.28 +6.8520987 - + 6.8520987 5024873065.1320987 . 6.8520987 - - - - - - - -"+.502487306513 +10 -+ • ~6.8520927 RESIDUE +.502487306513 +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 ON 700 DISPLAY ,. '. " . 5024873058.28 -5024873058.28 - - - - - - - - -- - t - - 6.8520987 5024873051.4279013 6.8520987 --------- 45024873058.28 ~6.8520987 tf..502487305143 + 10 ~6.8520987 2-17 Section II Explanation of Keys RESIDUE +.502487305143 +10 -.209870000000 -02 In this example, the residue is opposite in sign to the result. If these two numbers aIT 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 .50248730512), subtract each digit of the residue from 9 so .20987 becomes. 79012, and add 1 to the last significant digit (.79013). Multiplication works the same way as addition. EXAMPLE 3: OPERATION ON 700 MULTIPLY 3 141 5.9254998 31415.9254998 .728645297326 ------------- DISPLAY +31415.9254998 +.728645297326 t .728645297326 ------------- • The answer IS x - 22891.0663765732361535348 RESIDUE /+22891.0663764 +.728645297326 /+22891.0663765 +.732361535348. -07 ~ I ~ ~ The first twelve digits of the product are in Y; the last 12 digits are in X. DIVISIO