Home

Wang 700 A/B

image

Contents

1. 700 A B REFERENCE MANUAL WANG LABORATORIES INC 1970 Tewksbury Mass 01876 Telephone 617 851 7311 TWX 710 343 6769 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 lnc 836 North Street Tewksbury Massachusetts 01876 SECTION 1 INTRODUCTION SECTION EXPLANATION OF KEYS SECTION 111 PROGRAMMING SECTION IV PROGRAM CONCEPTS SECTION V DECISION COMMANDS SECTION VI PROGRAMMING TECHNIQUES 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 EXPLANATION OF KEYS Modes of Operation Run Mode Learn Learn Print Mode List Program Mode Turning the 700 ON Non Programmable Key Prime 2 Program Counter and Set PC Step i Ate 7 Verify Program Record Program The Display X Register Entering a Number Set Exp
2. Notice the program is simply the steps the user would perform if he doing the calculation manually on the keyboard However the program needs some sort of command to tell the calculator where to start and where to end its calculation This is the purpose of the SEARCH and MARK commands Section IV Programming Concepts MARK AND SEARCH COMMANDS Flags names or marks in a program are set by the MARK key followed by a second keystroke To set a flag requires 2 keystrokes MARK followed by any of the 256 legal codes Thus there are 256 different names or flags which can be used in a Wang 700 program For the simple program we have written to evaluate Y 20x 5x 7 2 the number key 1 is used as a distinguishing flag Thus the program is preceded by the 2 keystrokes MARK 1 To end the calculation simply add a STOP command The complete program thus becomes OPERATION CODE REMARK Flags tell the 700 where to start its calculations They indicate the destination of a SEARCH command In the SEARCH command 2 keystrokes are required SEARCH followed by a second keystroke which identifies the flag or mark to find Thus the operating procedure for the above program would be Key X SEARCH 1 and the operations between MARK 1 and the STOP command would be executed in sequence Section IV Programming Concepts Generally the numeric keys 0 1 2 9 are used as flags or markers for starti
3. SEARCH 0402 END PROG If the above program were loaded in core the program would execute properly However if the program were to be transferred from core to tape the END PROGRAM instruction would not be recognized as an END PROGRAM command All of core would be transferred to tape and the PROGRAM ERROR INDICATOR would be turned on indicating there was no END PROGRAM terminating the program block Section VI Programming Techniques HOW TO LEARN A PROGRAM INTO CORE FROM THE KEYBOARD A program is recorded into core by the following 1 Place the 700 in LEARN MODE 2 SET PC at the desired step where the first program command will be stored 3 Index the program commands Remember to always end your program with an END PROGRAM instruction This instruction is required for transferring the program from core to tape M OT AEROS l EXAMPLE Program to find C b Pythagorean Theorem STEP KEY CODE 000 MARK 0408 Keya 001 0 0700 SEARCH 002 x 0713 Key b GO 1 003 t 0604 Read cin X 3 004 STOP 0515 3 005 xz 0713 006 0600 007 0605 008 Vx 0612 009 STOP 0515 010 END PROGRAM 0512 The following instructions will introduce the above program into core 1 Place 700 in LEARN MODE 2 SET PC to the step you want the first program command to occupy To put the first program command at Step 000 SET PC 0 0 0 NOTE An easy way to set the PC at 000 is by depressi
4. ES 2 9 Section il 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 015 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 8 80402010 Depressing the special function key 04 while switch setting 20 is flicked ON designates register 24 20 4 2 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 11 Explanation of Keys 3 Designate Register 32 in two different ways 8 8 80402010 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 following ooo 80 40 20 10 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 differ
5. 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 RUN mode will be selected Depress RUN 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 VERIFY PROG RECORD PROG 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 Y 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 PRIME 2 2 Section I Explanation of Keys The PRIME key should be depressed when the 700 is first turned on m 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 c
6. ee os o RE DIR Section IX Sample Programs ALGEBRA OF COMPLEX NUMBERSNO 1004A MA6 Pag 2 of 2 Comment 4 5 6 7 6 7 8 sj 2 um s 6 7 8 9 0 2 3 4 5 6 7 sl LABORATORIES INC 836 NORTH STREET TEWKSBURY MASSACHUSETTS 01876 9 4 Section X Warranty Service and Maintenance SECTION X WARRANTY SERVICE AND MAINTENANCE WARRANTY Wang electronic equipment is warranted to be free from defects in workmanship and materials for 90 days from delivery to the original purchaser parts only are warranted for one year exclusive of labor Readout tubes transistors and fuses are subject to the RETMA guarantee substituted tubes should be returned to Wang Laboratories This warranty is in lieu of all other warranties expressed or implied except as specifically modified in writing by a document signed by an officer of WANG LABORATORIES INC Except for such a document no representative or other person is authorized to represent or assume for WANG LABORATORIES INC any warranty liability beyond that set forth herein Use limits and time between overhaul hours may be specified for mechanical and rotary elements of a Wang system During the warranty period Wang equipment is serviced free of charge except for occasion
7. LOAD PROGRAM The steps saved on the tape are now loaded into core beginning at Step 024 The extra steps have been inserted and the program is ready to be executed The program appears in core as illustrated Ud STEP KEY CODE 020 MARK 0408 021 1 0701 022 1 0701 023 0600 024 STOP 0515 025 DIR 0400 026 REG 28 0208 027 x 0713 028 DIR 0400 029 REG 29 0209 030 SEARCH 0407 031 1 0701 032 END PROGRAM 0512 PROGRAMMING TECHNIQUES USING TAPE CASSETTE An interesting feature of the LOAD PROGRAM key is that it is programmable This allows different parts of a program to use the same place in memory at different times When a LOAD PROGRAM instruction is encountered in a program the next program block is loaded into core beginning at the step immediately following the LOAD PROGRAM command Immediately after the END PROGRAM instruction is loaded control switches to the first instruction loaded and the program is executed To take advantage of this command a loop has to be formed An example illustrates this idea 6 9 Section Programming Techniques EXAMPLE Step 000 001 002 003 004 005 006 This program will PROGRAM IN CORE COMMAND MARK 0 LOAD PROG END PROG PROGRAM ON TAPE ST DIR REG 00 SEARCH 0 END PROG 3 DIR REG 00 STOP END PROG s illustrate how to use the LOAD PROGRAM instruction in programming and also
8. 3 SET PC to first step in core that program will occupy 4 Index LOAD PROGRAM Since ten program blocks can be saved on one side of a tape cassette what happens if the third block is desired If the third block is to be loaded beginning at Step 000 1 Place 700 in RUN MODE 2 Insert tape cartridge REWIND tape completely push TAPE READY button 3 PRIME Sets PC to Step 000 4 Index LOAD PROGRAM loads 1st block and sets to 000 LOAD PROGRAM loads 2nd block and sets PC to 000 LOAD PROGRAM loads 3rd block and sets PC to 000 The third block on the tape is now loaded into core and is ready to be executed Normally the sequence of steps to follow in loading the nth block of the tape into core fs to index the LOAD PROGRAM key n times As a final check the VERIFY PROGRAM 6 7 Section VI Programming Techniques key can be indexed and the verify program number checked to be completely sure the correct program is loaded The VERIFY PROGRAM key starts summing from Step 000 until it encounters an END PROGRAM instruction BYPASSING PROGRAM BLOCKS In some instances loading the preliminary program blocks on a tape will destroy parts of core which must be saved The problem arises as to how to bypass a program block without loading it into core and destroying data which will be needed for later calculations If the PC is set to 944 and the LOAD PROGRAM key indexed the program will only load into Steps 944 to 959 If t
9. If the angles are unequal the command SR 0002 tells the program to execute the sine subroutine Upon completion of the subroutine the program branches back to step 004 At this point we do not wish to perform any operation because the SKIP command will skip two program steps if the condition is met We want to perform the same calculation on the variable in X whether it is the sine of the angle or the angle itself Therefore a GO command is placed in step 004 which simply tells the program to continue on to the next step In this way the GO command can be used as a no operation command which simply causes the program to continue on without changing or destroying any values x x 1 4 i i 1 4 i i Section VI Programming Techniques SECTION VI PROGRAMMING TECHNIQUES USING TAPE CASSETTE TAPE CASSETTE Programs are saved on standard 4 x 2 1 2 x 1 2 magnetic tape cassettes for later use Up to 20 blocks of programs can be saved on one tape cassette The tape cassette consists of two tracks and each track can accommodate ten program blocks INSERTING TAPE CASSETTE Section VI Programming Techniques TAPE DRIVE OPERATIONS pavo s HH There are four basic buttons associated with the tape drive mechanism 1 The RELEASE button allows the operator to remove or insert his tape cassette 2 The FORWARD butt
10. For example a user may only need SINX COSX and TAN X for his calculations By setting the PC to the step number following these functions the rest of the TRIG PACK can be deleted and more core storage for other programs and data storage can be gained Section VIII Trig and Stat Programs STATISTICAL PACKAGE PROGRAM In the same way statistical users will load into core the STATISTICS PACK rather thun the TRIG PACK The STATISTICS PACK will consist of the following functions and will be loaded into core in the same way as the TRIG PACK FUNCTION KEY Mean Variance Standard Deviation ungrouped 00 Mean Variance Standard Deviation grouped 01 Normal Distribution 02 Inverse Normal Distribution 03 X Statistic 04 X Distribution 05 Error Function 06 Binomial Distribution 07 N 08 Linear Regression 09 Gamma Function 10 Negative Binomial Distribution 11 Poisson Distribution 12 Random Number Generator 13 Section VIII Trig and Stat Programs ASSIGNMENT OF SPECIAL OPERATION KEYS FOR A USER S OWN SUBROUTINES The concept of a subroutine was discussed briefly in Section IV page 4 5 Sixty four codes are reserved for subroutines on the WANG 700 A subroutine is addressed by a single keystroke or a single program step It is prefixed by a MARK XXXX chosen from the 64 reserved codes and terminated by a RETURN command The TRIG and STATISTICS packages use the first 16 subroutine codes listed on page 4 5 and are easily add
11. If the program is 35 steps long 6 data registers are being used for program steps To determine how many registers are being utilized 1 Divide the number of program steps by 16 2 Round the answer to the next whole number Example 33 Ie 2 0625 becomes 3 3 Multiply the whole number by 2 to find the equivalent number of registers being used 3 5 Section III Programming Data Storage Registers 116 CORE MEMORY 12 Digit Mantissa EX 2 pose 2553 Program Program Step Numbers Example Accommodates Prog Steps 016 to 031 Accommodates Prog Steps 000 to 015 7008 register 121 not available Program of 88 steps occupies 12 registers 88 1275 5 6 2 12 registers 16 See Section V Page 5 4 for short program to perform this calculation Section IV Programming Concepts SECTION IV PROGRAMMING CONCEPTS PROGRAMMING CONCEPTS To exploit the full programming capability of the 700 a few basic programming concepts must be discussed These are the concept of a branch a subroutine a loop and a decision Usually the main part of a program advances one step at a time in a linear and continuous fashion Each operation is performed consecutively one after the other A program to evaluate the polynomial y 20x 5x 7 2 for different values of x would be OPERATION CODE REMARK 20x 5x in y 20x 5 7 2
12. REG 00 RE DIR REG 00 DIR REG 01 3 DIR REG 01 RE DIR REG 01 RETURN When the first 0200 command is encountered at step 002 the program branches to MARK 0200 At the RETURN command the program branches back to step 003 and continues on with the program At the second 0200 command the program again branches to the subroutine defined by MARK 0200 However at the RETURN command the program branches back to step 007 There is no limit to the number of times a subroutine can be addressed and executed The SR preceding the command in the KEY column is simply a mnemonic device indicating to the reader that a subroutine is being addressed t should be noted that the subroutine addressed through one of the 64 designated codes in Table 1 is preceded by a MARK of that same code and terminated by a RETURN command otherwise the calculator will not know when to return to the spot from which it originally branched The 64 codes listed in Table 1 do not necessarily have to define a subroutine They can be used as regular marks and would then be addressed by the 2 step command SEARCH XXXX However it is generally considered wiser to reserve these codes exclusively for defining subroutines Section IV Programming Concepts MULTI LEVEL SUBROUTINES Or a Subroutine within a Subroutine On the WANG 700 multi level subroutines are possible What does this mean An example will best illustrate this concept In the polar conversion
13. are executed in the program A To find Index SEARCH 1 The program starts by squaring r and putting the result in Y it then branches to MARK 2 ignoring all commands until it encounters the designated flag and then multiplies r for the final result in Y B To find C 2 Index SEARCH 3 The program ignores the commands preceding MARK 3 and starts by putting r in Y and multiplying it by 2 It then branches to MARK 2 ignoring all commands until it encounters the designated flag and then multiplies 2r by z for the final result in Y As this program demonstrates the SEARCH command can be part of a program or can be keyed in by the operator or both In either case upon encountering this command the program branches immediately to the designated k MARK and SEARCH commands can be located at any point or step in the program OPERATING INSTRUCTIONS PRIME SEARCH 1 2 Key X GO ST DIR Repeat 2 for all x REG 00 3 SEARCH 2 ST DIR Read Zx in X REG 01 Read N in Y MARK 4 GO 0808 I Read Ex in X STOP t DIR REG 00 Ex x t DIR REG 01 Ex 1 SEARCH 0808 MARK 2 RE DIR REG 00 STOP Ex RE DIR REG 01 STOP Initialization Loop Results Section IV Programming Concepts The program on the preceding page further illustrates the idea of branching and intro duces the important concept of looping The program computes the statistical sums 2x and Ex for any number o
14. in the TRIG PACK the following formula is used to find Therefore the polar conversion subroutine addresses the X subroutine This means the 700 must remember what step to branch back to after each of the two RETURN commands are executed The 700A is capable of remembering 2 return addresses Thus it has a double level subroutine capability 700B is capable of 5 return addresses thus it has a five level sub routine capability Figure 2 illustrates this concept graphically The program branches to subroutine it immediately branches to this routine executes it and on encountering the RETURN command branches back to the polar conversion routine which it continues to execute When the second RETURN command is encountered control branches back to the main program and the remaining steps are executed USER PROGRAM To Polar Subroutine MARK TO POLAR L ago MARK u CY TAN X ET _ SUBROUTINE TAN X7 WITHIN SUBROUTINE 3 RETU T RN Pi 5 FRO RETURN Section V Decision Commands SECTION V DECISION COMMANDS DECISIONS The Wang 700 has four decisions it can perform They are used to check for the existence of certain conditions If the condition is met the program skips the next two steps If the condition is not met the program executes the next step The four commands are SKIP IF Y X SKIP IF Y gt X SKIP IF Y lt X and SKIP IF ERROR 1 Skipif Y X This command checks to see i
15. key 026 DIR 0400 027 29 0209 028 SEARCH 0407 The correct step DIR is now located 029 1 0701 at Step 023 In similar way 030 END PROGRAM 0512 step in core can be directly assessed using the SET PC key and the correct step keved in 6 8 um crt qc Section VI Programming Techniques PROCEDURE FOR INSERTING EXTRA PROGRAM STEPS Suppose a 400 step program has been introduced into core and three steps which occur in the middle of the program have been omitted These steps can be inserted without having to key in the entire program again Using the same program as on the previous page suppose the two steps 1 should appear between Steps 021 and 022 to indicate which x is about to be entered The procedure for inserting the steps is as follows 1 Insert a tape cartridge REWIND tape completely and push TAPE READY 2 SET PC 0 2 2 RECORD PROGRAM This instruction saves the second half of the program Steps 022 to 030 by transferring these steps to tape The PC is set to Step 022 when the instruction is completed 3 Be sure 700 is in LEARN MODE and index the steps to be inserted 1 Loaded at Step 022 PC increases to 023 Loaded at Step 023 PC increases to 024 Notice that the added steps are loaded into core at the proper place because the PC is set to the first instruction transferred to tape by the RECORD PROGRAM instruction Put 700 in RUN MODE REWIND tape and push TAPE READY
16. points out the importance and need for the END PROGRAM instruction The program consists of three parts or blocks The first part is loaded into core and consists of four instructions The program is started by a SEARCH 0 from the keyboard The LOAD PROGRAM is the first instruction The 700 immediately starts loading the next program block into core After the LOAD PROGRAM instruction is executed core will look li STEP 000 001 002 003 004 005 006 007 008 COMMAND MARK 0 LOAD PROG 2 ST DIR REG 00 6 10 e the following Section VI Programming Techniques 009 SEARCH 010 0 011 END PROG The program will immediately add 2 2 and store the sum in Register 000 The program then encounters a SEARCH 0 Control switches back to MARK 0 and the LOAD PROGRAM instruction is encountered causing the next block to be loaded in replacing the last block Notice the END PROGRAM instruction was never used in executing the program however it was needed when the LOAD PROGRAM instruction was first executed If an END PROGRAM command had not been located after the SEARCH 0 command the 700 would have continued to load programming steps into core The END PROGRAM instruction tells it where to stop COMMAND 000 MARK 001 0 002 LOAD PROG 003 3 004 t 005 006 1 007 DIR 008 REG 00 009 STOP 010 END PROG The program adds 3 3 and adds the sum to Register 000 and stops The program is only u
17. step 2 t ST DIRECT 00 SEARCH 0 END PROG B Transfer this block t tape l 2 PRIME SET PC to first step RECORD PROG To create the third block A Key third program block into core t 2 PRIME or SET PC to first step 3 DIR 00 Toggles down STOP END PROG B Transfer block to tape T 2 SET to first step RECORD PROG 6 12 Section VI Programming Techniques Torun the program 1 PRIME 2 REWIND the tape to beginning 3 Set TAPE READY 4 LOAD PROG 5 SEARCH 0 The program will stop with a 6 in X and Y To recall the sum RECALL DIRECT 00 and 10 will appear in X NOTE The tape is not moved manually while creating the multi block tape If an entirely unrelated program were to be added to this tape as the fourth block initializing the tape would consist of bypassing the first three program block as discussed in Section VI page 6 8 EXAMPLE Suppose a program for calculating the t test for paired variates were located in core from step 100 to 155 and it is to be recorded as the fourth block on the multi block tape just created Insert tape cassette REWIND Set TAPE READY Set RUN mode 9 4 4 LOAD PROG bypasses first three program blocks LOAD PROG LOAD PROG 6 PRIME to turn PROGRAM ERROR INDICATOR off SETPC 100 RECORD PROG Un Q on The t test for paired variates is no
18. 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 1 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 PO and the program code of the operation is displayed in the X Register However in LEARN MODE the operation is not executed VERIFY PROGRAMI 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 If this program is located in core and the VERIFY STEP KEY CODE PROGRAM key is depressed the sum displayed in 000 MARK 0408 X is 59 001 0700 070 M 002 52 0713 an 003 STOP LE 004 END PROG 0512 p 13 15 5 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 PRO
19. 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 700 5024873058 28 5024873058 25 4 5024873058 28 6 8520987 502487305143 10 6 8520987 1 5024873065 1320987 6 8520987 502487305 1 4279013 Section 11 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 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 MULTIPLY ON 700 DISPLA Y 31415 9254998 31415 9254998 31415 9254998 728645297326 728645297326 22891 0663764 728645297326 22891 0663765 22891 0663765732361535348 RESIDUE 732361535348 07 m The answer is 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 remainde
20. 000 WANG 700 0243 Printed in U S A 10 69 Section IX Sample Programs PROGRAM TITLE NUMBER ALGEBRA OF COMPLEX NUMBERS x 1004A MA6 i PAGE 2 If 5i 4 3i 4 SEARCH 5 Read Y 2 0000000000 x 8 0000000000 If 2 5i x 4 3i 4 SEARCH x 5 Read 423 0000000000 x 5 2 5i bs 4 5 Read For chain operations repeat steps 3 4 5 EXAMPLE Y 280000000000 X 1 04000000000 1 21 3 41 6 91 3 4 4i 4 amp 1 2 0201 344 SEARCH x Read Y 5 00000000000 X 10 0000000000 Key 0201 649 CH SIGN SEARCH Read Y 1 00000000000 X 1 00000000000 Key 0201 344 SEARCH Read Y 280000000000 X 1 400000000000 01 SWANG LABORATORIES INC 83 NORTH ST TEWKSBURY MASS 01876 TEL 617 851 7311 9 2 Section IX Sample Programs 700 PROGRAM ALGEBRA OF COMPLEX NUMBERS NO 10044 MA6 Pagel of 2 step ewe commen Sen Key comment 040 Key MARK 0201 ST DIR REG 00 STORE Y REG 01 ST DIR REG 003 A jw gt e jov REG 002 RE DIR jo jo ja jw N 2 O o REG 02 LABORATORIES INC 836 NORTH STREET TEWKSBURY MASSACHUSETTS 01876 9 3 700 PROGRAM seo
21. 012 A 014 015 016 MARK 0 Initializes Register 1 Nin Y STORE DIR REG 00 MARK Inner Loop 0800 Calculates 2 2 X DIR REG 00 1 WRITEA 2Step Command WRITE SKIPIF Y X SEARCH Exits When 0800 Y 0 OPERATING PROCEDURE Key N SEARCH 0 Read 2 in X RE DIR REG 00 RECALLS ANSWER STOP TOX Section VII Additional Commands SHIFTING COMMANDS The following two step commands give the user an easy way to shift the decimal point of the X Register from 1 to 10 places left or Tight The first group shifts the decimal point n places to the right and effectively multiplies the X Register by 10 ALPHA Multiplies X by 10 WRITE ALPHA Muttiplies X by 102 1 Multiplies X by 103 WRITE ALPHA Multiplies X by 10 ALPHA Multiplies X by 10 WRITE ALPHA Multiplies X by 10 WRITE ALPHA Multiplies X by 107 ALPHA Muttiplies X by 108 WRITE ALPHA Multiplies X by 10 wae ALPHA Muitiplies X by 1019 The second group shifts the decimal point n places to the left and effectively divides the X Register by 10 WRITE ALPHA Divides X by 10 DIRECT WRITE ALPHA Divides X by 102 X DIRECT WRITE ALPHA Divides X by 103 1 DIRECT WRITE ALPHA Divides X by 10 STORE DIRECT j WRITE ALPHA Divides X by 10 RECALL DIRECT WRITE ALPHA Divides X by 10 EXCHANGE DIRECT WRITE ALPHA SEARCH WRITE ALPHA MARK WRITE ALPHA GROUP I WRITE ALPHA DIRECT EXAMPL
22. 1111110 OPERATION 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 35 8X INDIR Multiplies the value 7 in Register 7 002 by 5 8 putting the result in 002 and 5 8 remaining in X 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 002 by 3 The result is put in Register 002 and 3 remains in X Exchanges 7 5 8 7 2 in Register 002 3 with 3 in the X Register Squares the value in X 2 15 Section 11 Explanation of Keys 3 002 The result is placed in Register 002 and 7 5 8 12 2 remains in X INDIR Adds 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 Figure 1 is a simple program which illustrates the advantage of indirect addressing The program stored O 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 re
23. 7 End Program 2 2 6 4 6 5 Exchange 2 13 Go 2 3 5 9 Group 1 2 21 Group 2 2 21 High Order Digit 3 2 Indirect Addressing 2 14 Indirect Keys 2 14 Learn Mode 2 1 2 4 2 12 6 5 6 6 Learn Print Mode 2 1 Learn a Program Into Core From the Keyboard 6 5 List Program Mode 2 2 Load Program 2 3 6 4 6 7 Looping With a Counter 5 4 Looping Without a Counter 5 6 Low Order Digit 3 2 Machine Error Indicator 2 8 6 2 Mark 4 1 4 3 4 4 Mark Assignment 4 2 Mode of Operation 2 1 Non Programmable Keys 2 2 Number of Registers Occupied by a Program 3 5 Pause 7 1 Prime 2 2 2 3 6 5 Procedure for Inserting Extra Program Step 6 8 Program Block 6 3 INDEX 4 Program Counter Set PC 2 3 Program Error Indicator 2 8 2 9 4 1 6 2 5 3 Programming Concepts 4 1 Read Only Memory 1 1 Recall Direct 2 12 7 2 Recall Residue 2 16 2 20 Record Program 2 3 2 4 Return 4 6 4 7 Rewind 6 2 Run Mode 2 1 6 6 Scanning a Table 5 8 Search 4 1 4 3 4 4 Set Exp 2 5 Shifting Commands 7 4 Special Function Keys 2 9 Starting Address 8 4 Statistics Functions 8 6 Statistical Pack 8 6 Step 2 3 Stop 4 2 Storage Assignment 3 5 Storage Commands Direct Access to and from the Y Register 7 2 Store Direct 2 9 2 12 7 2 Subroutine 4 5 Tape Cassette 6 1 Tape Drive Operation 6 2 Tape Ready 6 2 Toggle Switch 2 9 Trig Functions 8 5 Trig Pack 8 1 8 3 Turning the 700 On 2 2 Typing Conventions A 1 Verify Program 2 4 6 4 Wor
24. 80 40 20 and 10 for convenience in selecting the data storage registers discussed in Section II THEY CAN ALSO BE VISUALIZED AS REPRESENTING THE NUMBERS 08 04 02 AND 01 FOR THE PURPOSE OF GEN ERATING THE HIGH ORDER DIGIT OF ANY LEGAL CODE When a special function key is indexed the operation executed by the calculator is the command whose high order digit is defined by the setting of the toggle switches and whose low order digit is the special function key indexed 80 40 2010 If the toggle switches are set as in the above figure and the special operation key 12 is indexed the square root of the number in the X Register will be generated since the code for square root is 0612 Naturally the square root of a number would rarely be found using this technique however this example is included to explain how to generate any of the 256 codes This technique is used most often with the Store Y and Recall Y commands CORE MEMORY Core Memory is organized into 121 or 122 data registers numbered consecutively from 000 to 121 or 122 Registers 000 119 are used for storing either program steps or data 16 program steps occupy 2 data storage registers Register 120 and 121 are used exclusively for data storage 700B data register 121 not available As stated previously each programmed operation is represented by a four digit code The four digit code consists of two halves a high order two digit number and a low order t
25. AlN eja a 106 107 108 109 110 111 112 113 114 115 116 117 118 119 PROGRAM STEP NO Section III Programming A Program code step occupies two digits of storage one digit in each of two adjacent registers the high order digit of a code occupying one register the low order digit the other register Program steps 000 to 015 occupy registers 118 and 119 The following routine to add 2 2 is loaded into Registers 118 119 as illustrated STOP END PROG FIGURE 1 Registers ns 1 order 1 order 015 014 013 012 011 010 009 008 007 006 005 004 003 002 001 000 PROGRAM STEP NUMBERS The high order digit of the program code is loaded into Register 118 the low order digit of the code in Register 119 Each pair of registers can accommodate 16 program steps The program steps are numbered 000 to 959 Step 000 is located in Data Registers 119 and 118 Step 959 is located in Data Registers 000 and 001 See Page 3 4 It shows exactly what program steps are located in each register It is advisable to use registers 000 001 002 003 etc for data storage and registers 119 118 117 etc for program storage In this way data will be stored in one end of core and program operations will be stored in the opposite end of core NUMBER OF REGISTERS OCCUPIED BY A PROGRAM If a program is 7 steps long 2 data registers are being utilized for storing the program
26. CORD PROGRAM or LOAD PROGRAM instruction Therefore each program must be terminated by an END PROGRAM command if it is to be transferred onto tape It is recommended that only one END PROGRAM instruction be loaded into core at any one time The primary reason for this is due to the VERIFY PROGRAM instruction When the VERIFY PROGRAM is indexed the 700 always starts summing at step 000 and continues until an END PROGRAM instruction is encountered Therefore if additional programming instructions are located after the END PROGRAM they will not be included in the sum generated by the VERIFY PROGRAM instruction Therefore when adding additional programming steps write over the END PROGRAM instruction This can be accomplished quite easily if it is remembered that the PC is sct to the step that the END PROGRAM instruction occupies after a VERIFY PROGRAM has been executed Therefore after indexing VERIFY PROGRAM simply index LOAD PROGRAM to load the additional steps or switch to LEARN MODE and start indexing them Always remember to end your program with an END PROGRAM instruction This instruction is required for transferring the program from core to tape NOTE An END PROGRAM command must not be preceded by a program code whose high order digit is 04 Logically an instruction whose program code is 04XX would never precede an END PROGRAM command See code listing page 3 1 One instance which might occur is the following PROGRAM
27. COUNT 0 to 10 0 11 to 25 10 26 to 50 13 over 50 15 When given the number of items to be purchased this program calculates the discount figure which if multiplied by the unit price calculates total cost m MARK Key N number of items to be purchased SEARCH 0 1 Read discount figure in Y number ST DIR of items in X REG 00 1 1 SKIP Y gt X SEARCH 0800 BRANCH lt 10 1 DIR REG 00 2 6 SKIP Y gt X SEARCH 0800 BRANCH For 11 lt N 25 0 3 DIR REG 00 5 I SKIP Y gt X SEARCH 0800 BRANCH For 26 lt N lt 50 1 5 8 DIR REG 00 MARK RE DIR REG 00 STOP 0800 Section V Decision Commands N gt 50 Go The GO key is used to continue the program at the next step after the STOP instruction One important technique that should be pointed out is the idea of using the GO command as a do nothing or no operation instruction oS following Executes subroutine ify x and returns to Step 004 If two angles are unequal we want to find the sine of the angle in X and use the sine of this angle in future calculations If the two angles are equal the angle itself will be used for future calculations The program would be similar to the EXAMPLE 001 0700 002 SKIP Y X 003 SR 0002 sinx 004 GO Jumps to Step 005 005 IXI Dy 006 t 007 008 009 Section V Decision Commands
28. DIR 4 0505 RECALL INDIR 5 0506 INDIR 6 0507 SKIP if Y gt X 7 ENTERED BY TOGGLE SWITCH SETTING 3 1 dbs Sauna i SRA Section 111 Programming SKIP if Y lt X 8 SKIP if Y X 9 SKIP if ERROR SET EXP RETURN CHANGE SIGN END PROG DECIMAL POINT LOAD PROG x GO RECALL RESIDUE STOP CLEAR X The four digit code consists of 2 halves a high order 2 digit number and a low order 2 digit number XX XX t HIGH LOW ORDER ORDER Each of these halves can assume the values 00 01 02 up to 15 Thus there are 16 different high and low order digits and a total of 16 x 16 256 codes The 64 codes used in the above table are set aside for the keyboard operations They consist of all possible combinations that can occur when the high order digit assumes the values 04 05 06 and 07 and the low order digit assumes the values 00 to 15 a total of 64 codes 16 combinations are in each of the 4 categories GENERATING A CODE USING SPECIAL FUNCTION KEYS AND TOGGLE SWITCHES While this procedure is not recommended for any of the operation keys any legal code can be generated using the toggle switches and the special function keys The special function keys are used to define the low order digit and a combination of toggle switches is used to define the high order digit 80 40 20 10 Section III Programming The toggle switches are labeled
29. E Section Vit Additional Commands Divides X by 10 Divides X by 10 Divides X by 10 Divides X by 1019 If X contains 12 3456781245 and the command WRITE ALPHA 3 is given X will then contain 12345 6781245 If the command WRITE ALPHA SEARCH is given X will contain 123456781245 02 These commands are extremely useful in applications where scaling of input and or output must be accomplished 7 5 Section VIII Trig and Stat Programs SECTION VIII TRIGONOMETRIC AND STATISTICAL PACKAGE PROGRAMS THE TRIG PACK The TRIG PACK on the WANG 700 consists of the following 16 trigonometric functions T der ict TRIG FUNCTION INPUT RANGE 00 DEGREES TO RADIANS x lt 109 01 RADIANS DEGREES x 10 02 SINE X lt 10 03 COSINE X lt 10 04 lt 10 05 SIN X xl 1 06 COS X xi 1 07 X 1 lt 10 08 TO POLAR xI lt 10 jy lt 1099 0 09 TO RECTANGULAR O lt R lt 1099 101 lt 10 10 SINHX xl lt 227 9 11 COSHX xl lt 227 9 12 TANHX x lt 227 9 13 SINH X 107 lt x lt 10 14 COSH X gt 1 15 TANH X xl 1 These functions are loaded into core memory from a tape cassette which is provided with the machine The standard TRIG PACK consists of 384 program steps or 48 Data Registers NOTE The TRIG PACK also uses five data registers 700A are 000 001 002 120 and 121 700B are 000 001 002 005 and 120 registers Car
30. E CASSETTE Tape Cassette 4 Tape Drive Operation Machine Error Indicator Protection of Program on Tape What is a Program 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 Step Procedure for Inserting Extra Program Steps Programming Techniques Using Tape Cassette Creating a Multi Block Tape SECTION VII ADDITIONAL COMMANDS NOT FOUND ON THE 700 KEYBOARD Pause Command Write Alpha Pause Storage Commands Direct Access to and from the Register Decisions X Register Y Register Shifting Commands SECTION TRIGONOMETRIC PACKAGE PROGRAM STATISTICAL PACKAGE PROGRAM Trig Pack Speed and Accuracy To Load the Trig Package Using the Trig Package Program Use Design of the Trig Pack Statistical Package Assignment of Special Operations Key for a User 8 Own Subroutines vi CA Qn CA Cn Cn CA QA CA G NO ON I d Q tS tS OOo q q e nw 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 Co
31. E OFF DOWN POSITION WHEN ADDRESSING THE TRIG FUNCTIONS FROM THE KEYBOARD EEEFELEEEEEEEEELI TAM TOMLAR TORECT pinx como Tamur 0000 Section VIII Trig and Stat Programs PROGRAM USE It should be clear that the TRIG PACK is using the special function keys to address the first 16 subroutine codes discussed in Section IV page 4 5 For instance the SINE routine is prefixed by a MARK 0002 and terminated by a RETURN command If the subroutine is addressed within a program the RETURN command transfers control back to the main program If the subroutine is addressed from the keyboard control is transferred back to the keyboard The following shows a user s program utilizing the SINE and COSINE routines EXAMPLE Find Y 2 sin cos0 KEY CODE 0408 OPERATING INSTRUCTIONS 0 0700 Key 0 in Degrees 0604 STORES inY _ Read 2 sin 0 in Y 44 066 SINEQinY0inX 0602 Y sin cos 0 X X 0602 STOP The program makes use of the fact that the Y Register is preserved by storing 0 in Y and then the SIN 0 in Y DESIGN OF THE TRIG PACKAGE The TRIG PACK has been designed to give the user greater flexibility Since the TRIG PACK resides in core memory and is not a hardware feature certain functions which are not used often can be easily deleted
32. GRAM 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 trans ferred io the tape After transferring the program to tape the PC is set to where it was originally set 1 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 ar indexed it doesn t matter whether the machine isin 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 24 Section Explanation of Keys XXXXXXXXXXXX XX Y Register XXXXXXXXXXXX XX X Register mantissa exponent floating decimal sign of exponent sign of mantissa For numbers in the range 1 lt N lt 1 000 000 000 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 10 is indicated correctly in modified scientific notation This property
33. P IF ERROR SKIP ERROR 0510 RETURN RETURN 0511 Appendix END PROG END PROG 0512 LOAD PROG LOAD PROG 0513 GO GO 0514 STOP STOP 0515 0600 0601 0602 0603 n 0604 0605 T 0606 ixi Ixi 0607 INTEGER X INT X 0608 0609 LOG X LOG oX 0610 LOGeX LOGeX 0611 0612 10x 10x 0613 ex ex 0614 1 x 1 0615 0 0 0700 1 1 0701 2 2 0702 3 3 0703 4 4 0704 5 5 0705 6 6 0706 T 7 0707 8 8 0708 9 9 0709 SET EXP SET EXP 0710 CHANGE SIGN CH SIGN 0711 A 0712 X x 0713 RECALL RESIDUE RESIDUE 0714 CLEAR X CLEAR X 0715 NOTE For typing convenience the exchange keys _ gt DIRECT and 5 INDIR will be typed as EX DIR and EX INDIR SKIP IF ERROR has been shortened to SKIP ERROR In designating the 120 data registers in the KEY column the register numbers will be preceded by REG Appendix EXAMPLE To store into register 58 the coding sheet will appear as follows ST DIR REG 58 A subroutine will be designated in the KEY column by a SR preceding the subroutine code EXAMPLE To address a subroutine beginning with MARK 0303 the KEY column will appear as follows SR 0303 Bypassing Program Blocks 6 8 Central Processing Unit 1 1 Change Sign 2 5 Clear X 1 1 Coding 3 1 Core Memory 3 3 3 6 Data Storage Registers 2 9 Decisions 5 1 Skip if Y X 5 1 Skip if Y Zx 5 2 Skip if Y lt Y 5 3 Skip if Error 2 9 5 3 Direct Addressing 2 9 Display 2 4 Double Level Subroutines 4
34. R 1969 BLOCKS NO OF STEPS NO NO OF STEPS DATA REGISTERS MARK USED 084 VERIFY NUMBER 084 000 005 0201 0600 0601 0603 0602 000 24122 ROGRAM TO RECORD PROGRAM TO LQAD PROGRAM keyboard to core core to tape tape to core 1 Set LEARN mode 1 Insert tape cartridge 1 Set RUN mode 2 SET PC to desired step 3 Index keys in program 4 Index END PROGRAM as last step in program REWIND if necessary 2 Set TAPE READY 3 SET P to first step of program 4 Index RECORD PROGRAM 2 Insert tape cartridge REWIND if necessary 3 Set TAPE READY 4 SET PC to desired step number 5 Index LOAD PROGRAM PROGRAM DESCRIPTION This program can perform simple x and as well as chain operations This is because the answer of the previous operation is saved the real part in storage 001 and imaginary part in storage 000 When reading the answer the real partis in Y register and imaginary part in X register Same formula is used for entering the complex numbers OPERATING PROCEDURE EXAMPLE 1 PRIME VERIFY PROGRAM 1 PRIME VERIFY PROGRAM 2 Iudex first number real part 2 2 5 CH SIGN in y and imaginary part in x Set the Toggle Switches to 20 Set the Toggle Switches to 20 Key 01 Key 01 3 Index second number the same way 443 4 SEARCH addition 4 SEARCH if subtraction if multiplication if division 5 Read answer 5 If 2 51 4 31 0000000000 00000000
35. XAMPLE 6 Reduce the angle 8659 to an equivalent angle less than 3609 Formula f 865 INT 1865 360 equivalent 145 360 360 value EXAMPLE 7 Calculate the following c 2 where r 347 1075 21802 107 b 90 87 68 77 80 5 4 1 c VM where M is the answer of 7 b VM Answer 8 984 Hint Use key d e5 3 105 7 501397 4 e Log 2 What happens Why PRIME and find 3 What happens Why 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 1 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 LOG where x lt 0 2 8 Section I Explanation of Keys Log e where x lt 0 Searching Non Existent Flag See paee 4 3 Addressing An Illegal Data Register Any Register Greater than 121 P
36. Y Register Program Error Indicator Data Storage Registers Direct Addressing 2 Toggle Switches Special Function Keys Store Direct cd Recall Direct Exchange Direct Add Subtract Multiply and Divide Direct Indirect Addressing i us iue Indirect Keys Advantages of Indirect Addressing Recall Residue Addition Subtraction Multiplication Division 5 a Write Commands Group 1 Group 2 2 SECTION III PROGRAMMING Coding Generating a Code Using Special Function and Toggle Switches Core Memory 3 2 4 Number of Registers Occupied By a Program SECTION IV PROGRAM CONCEPTS Programming Concepts Mark and Search Commands Subroutine Double Level Subroutines or a Subroutine within a Sabreujiaey D t t2 tp RO RO en CA CA O0 00 T2 TO mn mme O G O Q t t t t t gt t gt t t t t gt F2 p e i Cn OQ PRPP Q D Table of Contents TABLE OF CONTENTS Continued SECTION V DECISION COMMANDS DECISIONS Skipif Y X Skipif Y gt X Skipif Y X Skip if Error PROGRAMMING TECHNIQUES Looping Using a Counter Looping Without a Counter Scanning a Table Go SECTION VI PROGRAMMING TECHNIQUES USING A TAP
37. al freight cost to and from a service center if equipment is located beyond a 75 mile radius POST WARRANTY SERVICE AVAILABILITY Wang Service Centers are located in many major cities throughout the world It is a product service policy to restore the operation of a customer s unit within 24 hours of the service call For remotely located users equipment turnaround is normally within one day after arrival at the center Spare parts as well as circuit board repair capability are available at all service centers ANNUAL MAINTENANCE CONTRACT An annual maintenance contract is available that consists of adjusting replacing parts when required and keeping the equipment in first class operating condition The contract includes all necessary service calls It does not include repair necessitated by accident fire current fluctuations abuse or negligence POST WARRANTY SERVICE CALLS WITHOUT MAINTENANCE CONTRACT All service calls made to customers facilities not having service contracts will be charged on an hourly basis point to point between the Wang Service Center and equipment focation Automobile charges per mile and material costs will also be included 10 1 Section X Warranty Service and Maintenance NOTE Users who attempt to repair Wang equipment without receiving prior Wang equipment training run the risk of causing further damage to their equipment Also and more important internal equipment voltages are present th
38. at could cause severe electrical shock IN HOUSE MAINTENANCE CAPABILITY Wang Laboratories offers free product familiarization lessons for customers who desire to build up an in house capability for maintaining their equipment The customer of course is expected to defray the travel and living expenses of his service representative while in training at Wang Laboratories Tewksbury Massachusetts 10 2 Appendix APPENDIX TYPING CONVENTIONS Program 1015A MA3 VECTOR ANALYSIS is a sample of a 700 library program and is included here to give an example of a program using indirect addressing TYPING CONVENTIONS FOR 700 PROGRAM LIBRARY Certain keyboard instructions have been abbreviated for typing convenience The follow ing is a listing of the keyboard instructions and their abbreviations KEY ABBREVIATION CODE DIRECT DIR 0400 DIRECT DIR 0401 X DIRECT X DIR 0402 DIRECT DIR 0403 STORE DIRECT ST DIR 0404 RECALL DIRECT RE DIR 0405 lt gt DIRECT EX DIR 0406 SEARCH SEARCH 0407 MARK MARK 0408 GROUP 1 GROUP 1 0409 GROUP 2 GROUP 2 0410 WRITE WRITE 0411 WRITE ALPHA WRITE A 0412 END ALPHA END A 0413 STORE Y STORE Y 0414 RECALL Y RECALL Y 0415 INDIR INDIR 0500 INDIR INDIR 0501 X INDIR X INDIR 0502 INDIR INDIR 0503 STORE INDIR ST INDIR 0504 RECALL INDIR RE INDIR 0505 LZ INDIR EXINDIR 0506 SKIPIF Y 2 X SKIP IF Y gt X 0507 SKIP IF Y lt X SKIP IF Y lt X 0508 SKIP IF Y X SKIP IF Y X 0509 SKI
39. ause 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 SETPC 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 auto matically 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 In 2
40. c covering shown in Figure I When this small plastic covering is removed nothing can be recorded onto or erased from one side of the tape Once the plastic is removed a piece of tape can be used to cover the opening if the tape is to be used for recording other programs WHAT IS A PROGRAM BLOCK A program block consists of any part of a program up to 960 steps which can be loaded into core at one time It must be terminated by an END PROGRAM instruction If an END PROGRAM instruction is not given and the RECORD PROGRAM key is indexed the PROGRAM ERROR INDICATOR will go on after transferring all of core to the tape In this instance the PROGRAM ERROR INDICATOR goes on because there is an error in programming 1 no END PROGRAM and not a machine malfunction A program block must contain 1 960 program steps or less 2 An END PROGRAM as final instruction NOTE If a program is 960 steps the END PROGRAM is located at step 959 Even though the END PROGRAM command is not missing the PROGRAM ERROR INDICATOR will go on when this program is transferred to tape If this is the case i e a 960 step program simply PRIME and ignore the PROGRAM ERROR INDICATOR 6 3 Section VI Programming Techniques END PROGRAM The END PROGRAM key defines a program block It is used to signal the end of a RECORD PROGRAM or LOAD PROGRAM operation An END PROGRAM command is the last instruction to be transferred in a RE
41. ch 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 120 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 IT SHOULD ALSO BE NOTED THAT THE RESIDUE MUST BE SAVED AFTER EACH OPERATION IF IT IS 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 i k 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 arid three digits after the decimal point An option to always print in modified scientific notation is available 2 20 Section Explanation of Keys EXAMPLE Display 12345678123 40 Command WRITE 0015 Ou
42. e 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 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 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 Progra
43. e To x Key n The program starts the sum with x counter in Y and uses the recursive formula x x07 1 to calculate each successive term N is used as a counter The x program performs the same calculation n times Each time the loop is executed the counter is decreased by 1 When N 0 the loop is terminated and the x x1 1 final sum is displayed xxn Decrease N by Exits from loop when N 0 Section V Decision Commands Another slightly different counter is found in the program which stores 0 s in the first 100 storage registers In this example the counter is constantly increasing until it reaches a value of 100 It also serves to designate the storage register being addressed MARK PRIME 0 SEARCH 0 0 ST INDIR Looping Without a Counter Often there is no way to predetermine exactly the number of times a loop is to be performed Other criteria have to be used EXAMPLE In calculating the following sum for X gt 1 1 1 1 1 1 tuw bob 3 for specified accuracy the number of terms to be calculated depends on the value of x However it is obvious that each successive term gets smaller and smaller and eventually approaches zero If 12 digits of accuracy are needed the calculation can be carried out until the last term gets so small that it does not materially affect the overall sum This occurs when the term becomes smaller than 10 1 and the overall sum on the 700 n
44. e should be taken in using these registers information stored in these five registers would be lost after an execution of one of the trig functions Section VIII Trig and Stat Programs The Y Register is always preserved and remains unchanged except in the POLAR and RECTANGULAR conversions When the entire TRIG PACK is loaded into core core storage for the 700A is as follows CORE MEMORY USAGE BY THE TRIG PACK Three Storage Registers Used for Data Storage Steps or Registers available for the user Used for TRIG PACK Programs STORAGE ONLY FIGURE 1 SPEED AND ACCURACY The speed for each function varies In the worst case it is no longer than 250 milliseconds Accuracy is 10 significant digits TO LOAD THE TRIG PACKAGE Like any other tape to core operation the TRIG PACK is loaded as follows 1 Insert trig tape REWIND 2 Set RUN 3 Set TAPE READY 4 PRIME LOAD PROGRAM By following these steps the TRIG PACK is loaded into core starting at Step 000 and utilizes core as indicated in Figure 1 It is recommended that the TRIG PACK always be loaded starting at Step 000 In addition to the TRIG PACK most users will want to load their own programs into core In order not to erase any of the TRIG PACK other programs should be introduced into core beyond the TRIG PACK The VERIFY PROGRAM key allows us to bypass the TRIG PACK quite easily After depressing the VERIFY PROGRAM key the PC is set to
45. emain unchanged A simple example will illustrate how each of these commands works EXAMPLE Perform the following in Register 001 13 2 4_ 3 3 7 1 1 3 STORE DIRECT 01 Places 13 in Register 01 and the X Register 2 2 X DIRECT 01 This sequence of steps places the product equal to 26 in Register 01 and 2 remains unchanged in the X Register 3 4 DIRECT 01 Adds 4 to the Answer 30 is now in Register 01 4 is in X Register W 2 13 Section Il Explanation of Keys 4 3 DIRECT 01 Divides result by 3 putting 10 in Register 01 3 remains in X Register 5 DIRECT 01 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 01 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 too
46. ent combinations of toggle switch settings and special function keys can be used to identify a particular register However in Section 11 Explanation of Keys LEARN MODE the program code designating Register 32 would be 0302 or 0212 depend ing 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 z2 into register 14 Toggle switches down Index z x STORE DIRECT 14 is now stored in register 14 and is still displayed in the X Register EXAMPLE 2 Store 57 x 101 into Register 32 Toggle switches 20 and 10 UP Index 5 7 SETEXP 1 8 STORE DIRECT 02 57 x 1018 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 from register 14 Index RECALL DIRECT 14 appears in the X Register and is still in storage register 14 Section 11 Explanation of Keys w DIRECT The 3 DIRECT k
47. er without having to key in the entire number again 2 5 Section 11 Explanation of Keys EXAMPLE Index 1 75 x 1023 Suppose the following sequence of steps is used 1 75 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 17 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 1 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 5 7 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 Y REGISTER The Y Register is another work register used in conjunction with
48. ey 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 D DIRECT followed by the desired register EXAMPLE Suppose 27 8 is in the X Register and z2 is in Register 14 To store 27 8 in Register 14 and recall 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 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 each 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 Multiplies 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 r
49. f the value in the Y Register and X Register are equal If Y X the program skips the next two steps If Y does not equal X the program continues with the next step As a simple example Path for Path for Y X Y X Executes SKIPS STEPS Steps 3 amp 4 3 amp 4 This program will put 3 in the X Register if Y is not equal to X and a 4 in X if Y X NOTE In testing for the condition Y X the programmer should keep in mind the necessity for absolute equality of the numbers in X and Y A condition which is not ordinarily found in analytical computations Discrepancies often occur between the true value and the calculated value of a number Tilustration Calculate Y d 321 3 Section V Decision Commands If a 1 is placed in X and the command SKIP IF Y X is given the calculator will treat the numbers as being unequal Any good book on numerical analysis gives a full discussion on these discrepancies which occur in approximation theory 2 Skip if Y gt X This command checks to see if the value in the Y Register is equal to or greater than the value in the X Register In the program below If Y gt X the value x is calculated If Y lt Xthe value Y X is calculated Path MARK ForY2X 0 SEARCH 0800 x x STOP SKIP Y gt Path Y lt X x Section V Decision Commands 3 Skip if Y lt X If the value in Y is less tha
50. f x values The first set of instructions initializes the registers by storing 0 in Y Register 000 and Register 001 The second part of the program forms a loop which accumulates the x in Register 000 Ex in Register 001 and the number of points entered in the Y Register The same operations are performed on each x value The program exits from the loop when a SEARCH 2 command is given The final set of instructions recalls the answers to the display SUBROUTINE Another idea closely related to branching is the concept of a subroutine A subroutine is a part of a program a sub program which appears several times within the overall program Subroutine capability allows the program to branch to a specified routine perform the calculations and then return from where the program originally branched On the 700 a single keystroke is needed to branch to a subroutine A set of 64 operation codes is reserved for this purpose They consist of the 64 combinations which occur when the high order digit of the 4 digit code assumes the values 00 01 02 and 03 A complete list of these codes is given in Table 1 TABLE 1 EXAMPLE Calculate the following for Z _ 5x t 6x t 3 ay Sy 3 OPERATING INSTRUCTIONS INDEX X SEARCH 0 Y GO Read Z inY 4 5 Section IV Programming Concepts SUBROUTINE MARK 0200 12 N ST DIR SR 0200 gt t CLEAR X 2 5 0515 INDEX Y b 5 0200 0200 X DIR s REG 01 6 x DIR
51. gister number In contrast this program requires only 13 steps to accomplish the same thing A savings of 187 steps FIGURE 1 OPERATING PROCEDURE PRIME GO m 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 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 OPERATION DISPLAY ON 700 5024873058 28 5024873058 28 5024873058 28 6 8520987 6 8520987 502487306513 10 6 85 20927 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
52. he first step of the program For the above example simply depress PRIME key 4 Index RECORD PROGRAM key and all the steps from where the PC is set up to and including END PROGRAM will be loaded onto the tape For this example Steps 000 to 010 are transferred to tape NOTE RECORDING DATA Pairs of data storage registers can be recorded on magnetic tape for later use See diagram page 3 4 To transfer data from core to tape 1 Place 700 RUN MODE 2 Insert Cassette push TAPE READY 3 SET PC to program step number corresponding to the data registers An END PROGRAM command must be located immediately following the data 4 RECORD PROG The same procedure to load the data in any pair of registers is used except LOAD PROG replaces RECORD PROG in step 4 HOW TO LOAD A PROGRAM FROM TAPE INTO CORE The LOAD PROGRAM key transfers a program block on magnetic tape to core The procedure is to set the PC and index the LOAD PROGRAM key The first program command located on the tape is then stored in the step designated by the PC and the program continues loading until an END PROGRAM instruction is encountered The END PROGRAM instruction is the last step to be loaded into core When the loading is termi nated the PC is automatically set to the first step just loaded into core Jn general four steps are required for loading a program 1 Place 700 in RUN MODE 2 Insert Tape Cassette push TAPE READY button
53. he program is greater than 16 steps it will continue loading within those steps 944 to 959 In other words when a program exceeds Step 959 in core the remaining part of the program is simply loaded over itself in the first two data registers 000 and 001 The PROGRAM ERROR INDICATOR will go on when this occurs Therefore by destroying only the contents of Registers 000 and 001 the first three blocks of tape can be bypassed 1 Load tape and place 700 in RUN MODE 2 SET PC 9 4 4 3 LOAD PROGRAM bypasses Ist block LOAD PROGRAM bypasses 2nd block LOAD PROGRAM bypasses 3rd block PRIME to turn off PROGRAM ERROR INDICATOR SET PC to first step that the desired program will occupy If the program is to be loaded beginning at Step 000 PRIME will have already set the PC to 000 The fourth block of tape is now stored in core and only registers 000 and 001 have been altered PROCEDURE FOR CORRECTING SINGLE PROGRAM STEPS It is quite easy to correct any part of a 700 program Suppose the following program to accumulate the sum Xx in Register 28 and in Register 29 is loaded into core as shown STEP KEY CODE Notice at Step 023 the DIR key has 020 MARK 0408 been entered by mistake Correcting 021 1 0701 this error requires three steps 022 STOP 0515 1 Place 700 in LEARN MODE 023 DIR 0401 2 Set PC at step to be corrected 024 REG 28 0208 SET PC 023 2 5 2 029 0113 3 Index correct
54. hes and special function keys DECISIONS In addition to the four decisions available from the keyboard See Section V page 5 1 there are eight other conditions which can be tested These commands require two instructions They are each preceded by a WRITE ALPHA command and use an existing key on the 700 keyboard for the second half of the command They are listed as follows They test for a positive negative zero and non zero value in the X and Y Registers ee ae X REGISTER Y REGISTER WRITE ALPHA SET EXP WRITE ALPHA LOG X WRITE ALPHA CHANGE SIGN WRITE ALPHA LOG X WRITE ALPHA SKIP IF ERROR WRITE ALPHA GROUP II WRITE ALPHA RETURN WRITE ALPHA WRITE Section VII Additional Commands Skips next 2 instructions if X is negative Skips next 2 instructions if X is positive Skips next 2 instructions if X is not zero Skips next 2 instructions if X is zero Skips next 2 instructions if Y is negative Skips next 2 instructions if Y is positive Skips next 2 instructions if Y is not zero Skips next 2 instructions if Y is zero If the condition is met the next 2 programming instructions are skipped If the condition is not met the program continues with the next step EXAMPLE The following program calculates 2 and illustrates the two step command WRITE ALPHA WRITE which checks for Y equal to zero 000 001 002 003 004 005 7006 4 007 008 009 010 011
55. king Storage Area 3 5 Write Alpha 2 3 2 21 7 1 7 2 Write Alpha Pause 7 1 Write Command 2 20 X Register 2 5 Y Register 2 6
56. l 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 lt 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 is placed in internal register Number in X remains unchanged 2 14 Section 1 Explanation of Keys INDIRECT 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 _ 2 263 72 3 126 95
57. mmands In addition to the various commands found on the 700 keyboard there are several powerful commands which have not been assigned special keys on the Wang 700 These commands are used primarily in programming applications One of these commands PAUSE was discussed above These special programming commands can be divided into three basic categories 1 Storage commands 2 Decision commands 3 Shifting commands STORAGE COMMANDS DIRECT ACCESS TO AND FROM THE Y REGISTER It is possible to transfer data directly to and from the Y Register and any of the 122 data storage registers The two step command is similar to the RECALL DIRECT and STORE DIRECT commands except that the Y Register is used in the data transfer rather than the X Register The first instruction specifies whether to store or recall the second instruction designates the internal data register STORE Y 0414 Stores the number in Y into the data DATA REGISTER XXXX register designated by the next key stroke Y unchanged X unchanged RECALL Y 0415 Recalls to Y the number from the DATA REGISTER XXXX register designated by the next key stroke Designated register unchanged X unchanged Since the results of the arithmetic operations using X and Y are placed in Y the STORE command saves the program step 4 of moving the number down into the X Register when the result is to be saved NOTE The program codes 0414 and 0415 must be entered by using the toggle switc
58. ms 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 Section 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 700B 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 sub routine 00 00 thru 01 15 are not accessed When these subroutines are called upon the Y register is automatically stored in these registers Section Explanation of Keys SECTION 1 EXPLANATION OF KEYS MODES OF OPERATION LEARN LEARN PRINT The 700 has four different modes of operation The f
59. n the value in X the program skips the next two steps If the value in Y is equal to or greater than X the next program step is executed MARK Calculate N for N gt 0 0 Key N SEARCH 0 This program calculates the value N for all N gt 0 N is used 1 as a counter and is also used to generate the product N N 1 ST DIR N 2 1 N REG 00 MARK r 0800 X DIR Loop REG 00 1 SKIP lt When SEARCH 0800 from RE DIR Loop REG 00 STOP 4 Skip if Error The final decision command SKIP IF ERROR can be used in a variety of ways to check for certain conditions see page 2 8 to review what operations turn the PROGRAM ERROR INDICATOR on Testing for these conditions turns the program indicator off The following program distinguishes between positive and negative numbers If the number in X is positive the program will branch to MARK 0800 If it is negative the program finds the and stops Section V Decision Commands 0 SKIP IF ERROR Path for x gt 0 Path SEARCH Branch to MARK 0800 a 0 0800 Note If x lt O value in x IXI remains unchanged command simply STOP turns PROGRAM ERROR INDICATOR on LL The following program uses thc SKIP IF ERROR command to calculate the number of data registers a program occupies on the Wang 700 It also illustrates the INTEGER X command MARK OPERATING INSTRUCTIONS 0 1 Key
60. ng general programs However any programmable key on the 700 keyboard can be used as name or marker A program can start with a MARK eX and to locate this mark simply SEARCH eX It should be clear that when the MARK and SEARCH keys are indexed the calculator interprets the next keystroke as a name or flag and not as any other type of operation When a SEARCH X command is given the 700 searches through core to locate the designated marker If on scanning core it doesn t find the mark the program stops and the PROGRAM ERROR INDICATOR goes on indicating there is no such mark in core The program for evaluating the poly nomial follows a linear sequence of steps The program executes step 000 then 001 then 002 and so on through to the last step However the Wang 700 does not have to follow a linear sequence of steps It is possible for the 700 to start executing commands from step 025 and go through to step 052 then jump to step 075 ignoring all the commands between step 052 and 075 To break out of a linear sequence of steps and to jump about in a program is called branching Both conditional and unconditional branching are possible on the 700 The SEARCH and MARK commands are used respectively for branching and for defining the destination of a branch SEARCH 2 4 3 Section IV Programming Concepts The program on the preceding page evaluates A or 2ar depending which steps
61. ng the PRIME key Section VI Programming Techniques 3 Now simply index the program commands MARK STOP END PROGRAM Notice while the program is introduced into core the PC displays the program step number and program code currently located at this step Indexing a key causes the program code of the keystroke to replace the existent code The PC is increased by one and display the next step and current code To see what is now loaded into core beginning at step 000 PRIME and step through your program KEYSTROKE READ IN X The above indicates that MARK is now stored at Step 000 0 at Step 001 x at 00 or To execute the program place the 700 in RUN MODE 3 SEARCH 0 Key b 4 GO Read c 5 in X By stepping through the program RUN MODE each step will be executed one stepa time In LEARN MODE the program is not executed While stepping through the provi es in RUN MODE one can see the step number and program code of the instruction about be executed if the 700 is placed in LEARN MODE Simply remember to put the 00 1 RUN MODE before indexing the STEP key otherwise the instruction will nor executed HOW TO TRANSFER A PROGRAM FROM CORE TO TAPE RECORD PROGRAM A program can be stored for later use on a magnetic tape To transfer a program from core to tape 1 Place 700 in RUN MODE 2 Insert the Tape cassette push TAPE READY button 6 6 Section VI Programming Techniques 3 SET PC to t
62. ntract Post Warranty Service Call Without Maintenance Contract In House Maintenance Capability APPENDIX Typing Conventions Index vii Table of Contents 9 1 10 1 10 1 10 1 10 1 10 2 1 4 LEARN LIST RUN LEARN PRINT PROGRAM ronwano Tare neay PROGRAM MACHINE ERROR ERROR DEGREE RADIANS 1 1 1 1 I TORADIANS DEGREES SINX SIN X cos x TOPOLAR 5 COSHX COSH WRITE END RECALL we RECALL LOAD ALPHA ALPHA INDIR pinect DIRECT PROG STORE STORE END VERIFY INOIR DIRECT DIRECT RETURN INTEGER RECALL SET za Laine Mi LOG x RECORD EM LoG x i o 700A B KEYBOARD ILLUSTRATION Section Introduction SECTION 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 th
63. number of program steps 1 SEARCH 0 2 Read number of data registers 6 occupied in Y INT X 1 If there is SKIP IF ERROR Path if there is a remainder a remainder of 0 after dividing by 16 after divid Division by 0 turns PROGRAM ing by 16 5 ERROR INDICATOR on the number 2 Indicator is turned off when in Y must SKIP IF ERROR command is be increased STOP executed by 1 PROGRAMMING TECHNIQUES Looping Using a Counter Looping is an important programming tool The decision commands are most frequently 5 4 Section V Decision Commands used to set up loops within programs Counters are set up to count the number of times a calculation is performed Suppose the sum Y x x x is to be calculated for various values of x The program below sets up a loop to calculate this sum for any number of terms The value of n determines how many terms in the sum will be calculated 0 ST DIR REG 00 1 ST DIR REG 01 0 ST DIR REG 02 s m MARK 0800 RE DIR REG 00 X DIR REG 01 RE DIR REG 01 DIR REG 02 1 SKIP lt SEARCH 0800 RE DIR REG 00 Calculates x and gt x Loop is performed n times RE DIR REG 02 MARK STOP Key X OPERATING INSTRUCTIONS Key x SEARCH 0 Initializes Key N GO Registers Read x in Y Register x in X Register To understand the method used in the program Rewrite the sum as Tp T Th wher
64. o longer changes its value when a term is added to it To write the program it is convenient to rewrite the series as S T T T T where Ty 1 T a To Section V Decision Commands Ta Tia um Key X SEARCH 0 0 x ST DIR REG 02 1 ST DIR REG 01 MARK 0800 vi RE DIR 8 REG 02 a DIR T REG 01 REDIR amp REG 01 Exchanges and to save 3 m previous S S SKIPY X Exits D SEARCH from loop 0800 when addition of term no STOP longer affects sum k The program calculates the sum X x to 12 significant digits neo for any value of x The loop is performed many more times for a smaller value of x than it would be for a larger value of x simply because the series converges faster for large values of X In all cases when T lt 107 the loop is terminated and the final sum is displayed in x and y If only three digits of accuracy were needed each successive term could be compared to 10 3 and when lt 10 3 the loop could be terminated Section V Decision Commands Scanning a Table Another frequent use for the decision command is to scan a table or schedule In many situations calculations or formulas vary with the class or range the input variable lies in A typical example is the pricing of articles Discounts are often allowed according to the number of articles purchased Below is a schedule for quantity discounts QUANTITY DIS
65. on moves the tape in a forward direction when depressed 3 The TAPE READY button should be pushed when the 700 is to execute a tape instruction This button places the head of the tape reader in contact with the tape 4 The REWIND button rewinds the tape when depressed MACHINE ERROR INDICATOR A MACHINE ERROR INDICATOR is located just to the right of the PROGRAM ERROR INDICATOR If data is not transferred properly from or to the tape the light will go on and the sign of the X register flashes This indicates that the information has not been transferred properly and the operation should be repeated This flashing light should NOT be confused with the PROGRAM ERROR INDICATOR located just to its left See page 2 8 PRIME will turn both error indicators off 6 2 Section VI Programming Techniques HOW CAN A PROGRAM BE PROTECTED ONCE IT IS PUT ON TAPE There is no need to erase the tape A new program will simply write over the old program To insure that a good program stored on tape is not written over or lost accidently each track of tape can be protected TAPE PROTECTOR FOR SIDE REMOVAL OF PLASTIC INSERT PROTECTS SIDE 1 OF THE TAPE TAPE PROTECTOR FOR SIDE 2 REMOVAL OF PLASTIC INSERT PROTECTS SIDE 2 OF THE TAPE Figure Figure I shows a top view of the tape cassette There are two small openings with a small plasti
66. our 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 m 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 is listed on the output writer giving the user a hard copy of his program as he writes it Section 1 Explanation of Keys 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 701 OUTPUT WRITER MANUAL
67. r 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 1 I NAMPLE 4 DIVIDE 22 7 OPERATION ON 700 Section 11 Explanation of Keys DISPLA Y 3 14285714285 220000000 21 10 A 30 28_ 20 14_ 60 55 40 35_ 50 49_ 10 is 30 28_ 20 14_ 60 56_ 40 35 p Remainder RESIDUE 22 000000000 7 3 14285714285 7 00000000000 3 14285714285 500000000000 11 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 e 5 x 10711 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 10 11 and 12 more digits of the quotient are generated preserve the first 12 digits of the quotient the second division is performed in Register 000 2 19 Section 1 Explanation of Keys Since the remainder is now in X STDIR 00 7 DIR 00 RE DIR 00 This command automatically aligns the decimal point and exponential value of the divisor Read 714285714285 11 in the X Register whi
68. ressed by the SPECIAL FUNCTION keys when the Toggle Switches are all in the OFF DOWN position If Toggle Switch 10 were placed in the ON UP position indexing the 03 key would cause the 700 to look through core for the subroutine beginning with MARK 0103 Remember there are 64 codes which can be used as subroutines not merely 16 The SPECIAL FUNCTION keys can be used to address the user s own custom made functions rather than those found in the TRIG and STATISTICS PACKS Any subroutine which requires only one piece of input data can be addressed by any of the SPECIAL FUNCTION keys While in LEARN MODE the user simply presses MARK followed by one of the SPECIAL FUNCTION keys This will set the MARK flag in core for direct access to the assigned routine At the end of the subroutine a RETURN is given For example assigning 12 to y RETURN To call for this function simply index r into X and press 12 The answer will be given in Y The subroutine can also be addressed under program control in the same way as the TRIG functions In this way the user may assign and label any of his own functions to the special operation keys 8 6 Section IX Sample Programs SECTION IX SAMPLE PROGRAMS 700 PROGRAM DESCRIPTION PROGRAM TITLE NUMBER 1004A MA6 PROGRAMMED BY ALGEBRA OF COMPLEX NUMBERS x PROGRAM ABSTRACT M TANG x and complex numbers DATE Xe SEPTEMBE
69. rogram 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 program ming a SKIP IF ERROR command is available to test for this condition Performing this est will also turn the indicator off DATA STORAGE REGISTERS In addition to the X and Y work registers the Wang 700 has up to 122 storage registers Fach 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 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 ie 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 number simply index the control key STORE DIRECT followed by a second keystroke identifying the register number TOGGLE SWITCHES AND SPECIAL FUNCTION KEYS Each register is represented by a combination of toggle switch settings and special function keys 8040 20 10
70. sed to demonstrate how to program the LOAD PROGRAM instruction This technique of a LOAD PROGRAM within a program should only be used in long programs which require many program steps and data registers A valid example might be in a multiple regression analysis where registers are needed for storing sums In addition a program for generating the sums and solving simultaneous equations is needed Therefore the first program block could initialize all registers and generate the numerous sums needed When the routine was finished the second block to solve the simultaneous equations and find the coefficients could be called and loaded into the same part of memory that the first block occupied In this way memory can be shared and utilized to its fullest extent CREATING A MULTI BLOCK TAPE The idea of sharing core storage presents the problem of creating a multi block tape The simplest way to explain this procedure is by creating the 3 block program 6 11 Section VI Programming Techniques I To create the first block A Key the first program block into core 1 2 3 Set LEARN mode PRIME more generally SET PC to location of first program step MARK 0 LOAD PROG END PROG B Transfer this block to tape 1 Insert tape cassette REWIND 2 Set TAPE READY 3 4 RECORD PROG PRIME or SET PC to first step II To create the second block A Key second program block into core T 2 PRIME or SET PC to first
71. the step the END PROGRAM instruction occupies Since it is advisable to have only one END PROGRAM instruction in core at any one time additional programs should start at this step where the END PROGRAM instruction is located Section VHI Trig and Stat Programs TWO CASES exist 1 Indexing additional programming steps from the keyboard 2 Loading another program into core from another tape In each case the procedure is basically the same CASE 1 Adding Steps from the Keyboard 1 After loading the TRIG PACK place 700 in LEARN MODE 2 VERIFY PROGRAM 3 Key program steps desired The first step indexed most likely a MARK will replace the END PROGRAM command of the TRIG PACK Therefore after completing your own program an END PROGRAM command has to be given This will complete a new block consisting of the TRIG PACK plus your own program The VERIFY PROGRAM number will then total the codes of the TRIG PACK and your own program CASE 2 Loading Another Program into Core from Tape 1 After loading the TRIG PACK insert TAPE CASSETTE which has desired program 2 Leave 700 in RUN MODE Set TAPE READY 3 VERIFY PROGRAM bypasses TRIG PACK 4 LOAD PROGRAM The program will be loaded into core directly following the TRIG PACK USING THE TRIG PACKAGE The TRIG PACK consists of 16 subroutines which can be addressed from the keyboard or under program control See page 8 6 KEYBOARD USE BE SURE THE TOGGLE SWITCHES ARE IN TH
72. 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 t key or 4t key KEYSTROKE OPERATION CLEAR X Clears X Register 1 X into Y X unchanged Y into X Y unchanged H 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 Section Explanation of Keys Y X into Y X unchanged IXI Absolute value of X into X Y unchanged INT X Disregards decimal part of number in X and puts integer part of number in X Y unchanged 1 X 1 X into X Y unchanged x x into X Y unchanged Vx vx into X Y unchanged LOG X X into X Y unchanged 10 10 into X Y unchanged LOG LOG eX into X Y unchanged eX into X Y unchanged T 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 Answer in Y 32 2 in X EXAMPLE 2 Calculate 5 20 1 15 4770 366 628955291 1 CLEAR X 2 5x 4 3 20 x 4 1 5 1 x x 5 70 Vx Answer in Y VW70 in X EXAMPLE 3 Calculate 51 x 6 2 62 0119219307 v 26 Answer in Y 6 2 in X EXAMPLE 4 Answer in Y 7 in X 2 7 Section II Explanation of Keys EXAMPLE 5 Calculate 12 8 383 256852976 1 12 8 LOG X 1 12 8 LOG X 2 7 3 3 4 V 10X Answer in X E
73. tput will appear as 123456789123ex 40 ALPHABETIC output can be printed under program control by using the WRITE ALPHA command Indexing the WRITE ALPHA key places the 700 in alpha mode so that alpha characters can be printed The END ALPHA command takes the 700 out of alpha mode EXAMPLE WRITE ALPHA Places 700 in alpha mode 0101 0205 0109 0109 0209 END ALPHA Takes the 700 out of alpha mode The above example would print the word HELLO Other control commands such as shifting to upper and lower case carriage return line feed spacing backspace and tabulation are all available on the Output Writer All these features are discussed in the 701 OUTPUT WRITER MANUAL GROUP 1 GROUP 2 These two keys are reserved for addressing optional peripheral equipment 2 21 Section 111 Programming SECTION III PROGRAMMING 1 1 1 CODING All programmed operations are represented by a 4 digit code list of the keyboard operations and their respective codes is given below 700 PROGRAM CODES DIRECT DIRECT x DIRECT DIRECT STORE DIRECT RECALL DIRECT 0605 t 0406 DIRECT 0606 0407 0607 MARK GROUP 1 INTEGER X T GROUP 2 Logi o X 0411 WRITE 0611 LogeX 0412 WRITE ALPHA 0612 VX 0413 END ALPHA 10x 0414 STORE Y ex 0415 RECALL Y 1 0500 INDIR 0 0501 INDIR 1 0502 x INDIR 2 0503 INDIR 3 0504 STORE IN
74. w recorded as the fourth block on this tape 6 13 Section VII SECTION VII ADDITIONAL COMMANDS NOT FOUND ON THE 700 KEYBOARD PAUSE COMMAND One remaining function not previously discussed is the 700 pause command WRITE A PAUSE The WANG 700 has a pause command which allows the user to display the X and Y Registers for 5 seconds at any predetermined point within a program The command is a two step instruction Since it should only b used within a program it has not been assigned a regular key on the 700 keyboard The two step command is WRITE A followed by the code 0615 which corresponds to the 1 x key The following program will count from 0 to 10 displaying each integer in Y for 5 seconds SS aims CODE COMMENT OPERATING INSTRUCTIONS MARK 0408 SEARCH O 0 0700 1 0701 0600 WRITE A 2 Step command 1 0615 causes 5 second 1 0701 pause 0 0700 SKIP IF Y X 0509 SEARCH 0407 0 0700 STOP 0515 Multiple PAUSE commands can be used if a longer pause is required Simply repeat the two step command for each half second pause The pause command is only operational under programming mode It cannot be used to cause a stop or pause in a program that is executing If a program is executing and the user desires to stop it at any point simply index the STEP key and the program will stop instantly See Section II page 2 3 Section VII Additional Co
75. 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 key NUMBER SEQUENCE OF STEPS DISPLAY a 152 10 1 5 2 21 152000000000 21 b 662517310 6625 1 7 SETEXPCHS 2 6 662517000000 26 c 2534 5 2534 5 5 2534 5 CHSSETEXP 41 2534 50000000 750000000000 02 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 numb
76. wo digit number XX XX HIGH LOW ORDER ORDER The program code for vx is 06 12 HIGH LOW ORDER ORDER Section III Programming REG NO 000 001 002 003 004 005 006 007 Oju N 008 009 010 011 N 012 013 014 015 016 E 017 018 019 020 021 022 023 024 1 025 fi 026 027 028 029 030 031 032 033 034 035 036 037 co oiu o o o Q yje o o oy O o o 038 039 HIGH ORDER LOW ORDER PROGRAM STEP NO p i o DIO c o AN OJON o NANO NL c s oO o e oj5 ONION REG NO 040 041 042 043 045 046 047 049 050 051 052 053 054 055 espesssss 056 057 058 059 061 062 063 064 065 066 067 wW b S DD 068 069 070 071 072 073 074 075 076 077 078 079 owls o wfo ow CORE STORAGE PROGRAM STEP NO 3 4 On HIN ALN N Q o m c Q Q o p G REG NO 080 081 HIGH ORDER LOW ORDER 082 083 084 085 086 087 mN N o O Q O Q 088 089 090 091 5mwjooc N N mio 092 093 094 095 096 097 m sit 098 099 100 101 102 103 104 105 NN ajo p HO

Download Pdf Manuals

image

Related Search

Related Contents

Panasonic KX-FL511 Plain Paper Laser Fax  Mad Catz Z-CHUK BACK5716-MUG-R2 User's Manual  Avaya 585-229-770 Network Router User Manual  働くことは生きること よりよく生きるためのワーク・ライフ・バランス  2540 暖房調節器 RVL480  Marmitek SS13e  warning    ELPA-TUBE - Electra KLK Europe (EKE)  MANUAL DEL USUARIO  

Copyright © All rights reserved.
Failed to retrieve file