background image

Summary of Contents for TRS-80 PC-3

Page 1: ......

Page 2: ...CK S election and sale expense RADIO SHACK has no obligation to replace or repall expendable Items RADIO SHACK makes no w rranty 3S to the deSign capability capacity or suitability lor use of the Soft...

Page 3: ...hware License Customer IS expressly prohibited tram disassembling the Software CUSTOMER IS permiffed to make additional copies of the Software only for backup or archival purposes or if additional COP...

Page 4: ...ves the right to refuse to service the eqUipment or to VOid any remaining warranty on the equipment 2 If any Radio Shack computer equipment has been modified so that It IS not wrthin manufacturer s sp...

Page 5: ...cription of Keys 12 Description of Display 15 ALL RESET Button 17 Installing the Batteries 19 CHAPTER 3 USING THE PC 3 AS A CALCULATOR 23 Start Up 23 Shut Down 23 Auto Off 24 Some Helpful Hints 24 Sim...

Page 6: ...Hexadecimal Numbers 43 String Constants 44 Variables 45 Simple Numeric Variables 45 Simple String Variables 45 Numeric Array Variables 46 String Array Variables 47 Preallocated Variables 47 Expressio...

Page 7: ...g to Program on the PC 3 Example 1 Entering and Running a Program Example 2 Editing a Program Example 3 Using Variables in Programming Example 4 More Complex Programming Storing Programs in the PC 3 s...

Page 8: ...tte Recorder 87 Care and Maintenance 90 Errors 90 CHAPTER 8 BASIC REFERENCE 95 Commands 96 Verbs 97 Functions 98 Pseudovariables 174 Numeric Functions 175 String Functions 183 CHAPTER 9 PROGRAMMING EX...

Page 9: ...CKET COMPUTER 211 APPENDICES Appendix A Erro r Messages 213 Appendix B ASCII Character Code Chart 215 Appendix C Formatting Output 218 Appendix D Expression Evaluation and Operator Priority 223 Append...

Page 10: ...PC 3 remembers stored programs and variables even when you turn it off Battery powered operation for true portability AUTO POWER OFF function which conserves the batteries by turning the power off if...

Page 11: ...of these concepts on the PC 3 Chapter 5 introduces you to BASIC programming on the PC 3 showing you how to enter correct and run programs Chapter 6 discusses some shortcuts that make using your new c...

Page 12: ...rogram The remainder of the manual consists of Chapter 7 Basic information on the optional PC 3 Printer Cassette Interface Chapter 10 A troubleshooting guide to help you solve some operating and progr...

Page 13: ...AUTO OFF PERMANENT MEMORY 1 PRO OfF I DEL INS ON CA mIl E I CD OJ G c J rEI g g III lEI II S III III n a JE E ff 0m 0 00 lIJ 2 Gl0 lEJ 0 l1li II IEJ III SPC P NP 7 v Exp m0 81mGlS o QE E B a Figure 1...

Page 14: ...rs always appear in upper case spc CJ Equals key On the PC 3 this key is not used to indicate the end of a calculation in BASI C programming this symbol has a special function SPaCe key Pressing this...

Page 15: ...nthesis Up Arrow key Press this key to display the previous program line Pressing SHIFT before pressing this key produces a right parenthesis Backspace key This key allows you to move the cursor to th...

Page 16: ...ree modes RUN PROgram and ReSerVe Clear key Pressing Clear erases the characters you have just typed ir and releases errors Pressing pressing this key activates the CA reset function CA clears the dis...

Page 17: ...the exponentiation character used in scientific notation These three characters are found above the zero decimal point and 3 keys They are displayed by pressing SHIFT and then the character under the...

Page 18: ...appears from the display when execution is completed Printer Indicator This indicator appears whenever you elect the print option when using the PC 3 as a calculator Definable Mode Indicator This symb...

Page 19: ...SET button with any pointed object such as a ball point pen Do not use easily broken points such as mechanical pencils or the tips of needles PC 3 Pocket Computer NOTE To reset the PC 3 hold down any...

Page 20: ...data and all reserved contents are cleared so do not press the RESET button without any key unless the above trouble occurs RESET button Figure 7 Contrast ControI Figure 8 18 Turn the control in the d...

Page 21: ...nary instructions will eliminate many problems Always replace both of the batteries at the same time Do not mix a new battery with a used battery Use only Lithium battery type CR 2032 x 2 INSTALLING T...

Page 22: ...setting the power slide switch to the OFF position 2 Remove the screws from the back cover with a small screwdriver Fig 9 3 Remove the battery cover by silding it in the direction of the arrow shown...

Page 23: ...ig 11 Figure 11 5 Replace the battery cover by sliding it in the reverse direction of the arrow shown in figure 2 6 Hook the claws of the back cover into the slits of the computer proper Fig 12 Batter...

Page 24: ...e following display DEG Prompt symbol Figure 13 Sample Display On Start Up If the display is blank or displays any symbol other than the prompt remove the batteries and install them again Then check t...

Page 25: ...installed Start Up To turn ON the PC 3 slide the power switch up and select one of three modes RUN PRO or RSV For use as a calculator the PC 3 must be in the RUN mode When the machine is ON the prompt...

Page 26: ...press the ALL RESET button See Chapter 2 The PROMPT tells you that the PC 3 is awaiting input As you enter data the prompt disappears and the CURSOR moves to the right indicating the next available l...

Page 27: ...For example pressing SHIFT and CD will produce the character These keystrokes are written SHIFT o J Be sure to enter CLear after each calculation unless you are performing serial calculations CLear er...

Page 28: ...he left and right arrows are also used to position the cursor along a line The right and left arrows are very helpful in editing or modifying entries You will become familiar with the use of the right...

Page 29: ...ew number of groups you must replace the six with an odd number Five seems to make more sense than seven Because you recalled the last entry by using the the cursor is positioned at the end of the dis...

Page 30: ...ke a reasonable number of groups so you decide that each small group will consist of five participants Recall is also useful to verify your last entry especially when you results do not seem to make s...

Page 31: ...n the flashing cursor over the character before which you wish to make the insertion Input Use the INSert key no make space for the needed character Display Display Pressing INSert moves all the chara...

Page 32: ...roups Recall your entry using the C8 Input Display 000 5 The flashing cursor is now positioned over the first character in the display To correct this entry eliminate one of the zeros Use the C8 to mo...

Page 33: ...xt location for input Since you have no other changes to make complete the calculation Input Display 60 I Note Pressing the SPaCe key when it is positioned over a character replaces the character leav...

Page 34: ...entry after an ERROR 1 you find that you have omitted a character use the INSert sequence to correct it When using the PC 3 as a calculator the majority of the errors you encounter will be ERROR 1 an...

Page 35: ...the second calculation 15 the computer automatically displays the result of your first calculation at the left of the screen and includes it in the new calculation In serial calculations the entry mus...

Page 36: ...cate 2200 for the speaker and entertainment Input Display 675 I Obviously you will have to change either your plans or your allocation of resources Negative Numbers Since you want the awards dinner to...

Page 37: ...the sign of the remaining sum Input Now add th is result to your original presentation budget Input Display 675 1_ 675 7425 I Dividing by 45141414 gives you the percentage of the total budget this ne...

Page 38: ...45000 might be interpreted as 675 6750 45000 or 675 6750 45000 When performing compound calculations the PC 3 has specific rules of expression evaluation and operator priority see APPEN DIX D Be sure...

Page 39: ...riables with an Assignement Statement A 5 B 2 You can also assign the value of one variable right to another variable left C A 3 D E A variable may be used in place of a number in any calculation Now...

Page 40: ...lphabetic character it is stored under Input Display 37575 You can then perform calcu lations using your variable The value of R will not change until you assign it a new value You wish to allocate 60...

Page 41: ...apter 4 for a discussion of assignment See Chapter 5 for a discussion of the use of variables in programming Chained Calculations In addition to combining several operators in one calculation the PC 3...

Page 42: ...urn The concludes our discussion of using the PC 3 as a calculator Undoubtedly as you become more familiar with your machine s capabilities and special features you will find many new and useful appli...

Page 43: ...uses numbers The Radio Shack PC 3 recognizes three different ways to represent numbers Decimals Exponential or scientific notation Hexadecimal numbers Decimal numbers are familiar to most of you Scien...

Page 44: ...laces to the left Scientific notation is useful for many shortcuts You can see that it would take a lot of writing to show 1 0 times 1087 a 1 and 87 zeros But in scientific notation this number looks...

Page 45: ...pact form In these cases there are special limits imposed on the size of numbers usually either 0 to 65535 or 32768 to 32767 Those with some computer back ground will recognize both these numbers as t...

Page 46: ...ere it is convenient String Constants In addition to numbers there are many ways that the Radio Shack PC 3 uses letters and special symbols These letters numbers and special symbols are called charact...

Page 47: ...n algebraic equations Just as there are numeric and string constants there are numeric and string variables Simple Numeric Variables You have already used simple numeric variables when working with th...

Page 48: ...nal like a table Array names are designated in the same manner as simple variable names except that they are followed by parentheses The elements of an array are referred to by a number inside the par...

Page 49: ...tring array variables have the same relationship to numeric array variables as simple string variables have to simple numeric vari ables their names are the same except for the addition of a dollar si...

Page 50: ...X and then try to print X you will get an Error 9 Similarly if you store a number in A 24 and then store another number in X you will over write the first number but you will not get an error message...

Page 51: ...red in Chapter 3 were examples of expressions Expressions are an intrinsic part of BASIC programs For example an expression might be a formula that computes an answer to some equation a test to determ...

Page 52: ...ing the A operator You will then have to change the result to the appropriate sign String Expressions String expressions are similar to numeric expressions except that there is only one string operato...

Page 53: ...tional expressions A B C 1 2 5 0 3 8 If A was equal to 10 B equal to 12 C 1 2 equal to 6 and D 3 equal to 9 all of these relational expressions would be True Character strings can also be compared in...

Page 54: ...ce however dictates the use of an explicit relational expression instead of relying on this coincidence Logical Expressions Logical expressions are relational expressions which use the operators AND O...

Page 55: ...OF 16 BITS 32767 0111111111111111 3 0000000000000011 2 0000000000000010 0000000000000001 0 0000000000000000 1 1111111111111111 2 1111111111111110 3 1111111111111101 32768 1000000000000000 The negativ...

Page 56: ...bits become 1 in deciml notation that is 1 NOT 1 1 The relationsh ip between numerical value X and its negative NOT X is X NOT X 1 This results in an equation of NOT X X 1 i e NOT X X 1 From this equ...

Page 57: ...ber otherwise 0 10111 is 23 in decimal If you are a proficient programmer there are certain applications where this type of operation can be very useful Beginning pro grammers should stick to clear si...

Page 58: ...that the expression is True 1 Functions Functions are special components of the BASIC language which take one value and transform it into another value Functions act like variables whose value is det...

Page 59: ...ctions do not require the use of parentheses LOG 100 is the same as LOG 100 You must use parentheses for functions which have more than one argument Using parentheses always makes programs clearer See...

Page 60: ...ssuing the correct instructions BASIC Statements The PC 3 interprets instructions according to a predetermined format This format is called a statement You always enter BASIC statements in the same pa...

Page 61: ...rm A verb is always contained within a program and as such is not acted upon immediately 10 PRINT HELLO 20 READ B 10 30 END Some statements require or allow an operand 10 PRINT HELLO 20 READ 8 10 30 E...

Page 62: ...set in the RUN mode The RUN mode is also used to execute the programs you create The PROgram mode is used to enter and edit your programs The RSV or ReSerVe mode enables you to designate and store pre...

Page 63: ...1 Entering and Running a Program Make sure the PC 3 is in the PRO mode and enter the following program Input 1 11 PRINT HELLO 10 PRINT HELLO Notice that when you push ENTER the PC 3 displays your inpu...

Page 64: ...recall your program in order to edit it Use the Up Arrow t to recall your program If your program was com pletely executed the will recall the last line of the program If there was an error in the pro...

Page 65: ...ess ENTER at the end of the line Switch into the RUN mode Input RUN Display ERROR 1 IN 10 This is a new kind of error message Not only is the error type identified our old friend the syntax error but...

Page 66: ...inate the Input DEL Display 10 PRINT GOODBYE _ Now let s put the in the correct location When editing programs DELete and INSert are used in exactly the same way as they are in editing calculations se...

Page 67: ...l line will be elimi nated Example 3 Using Variables in Programming If you are unfamiliar with the use of numeric and string variables in BASIC reread these sections in Chapter 4 Using variables in pr...

Page 68: ...of th is program exceeds the 24 character maximum of the PC 3 s display When a line is longer than 24 characters up to the 79 character maximum PC 3 moves the characters to the left as the 24 charact...

Page 69: ..._ WORD IS 4 LETTERS This is the end of your program Of course you may begin it again by entering RUN However this program would be a bit more entertaining if it presented more than one opportunity fo...

Page 70: ...computes N up to the limit which you enter Enter th is program 100 F 1 WAIT 128 110 INPUT LIMIT L 120 FOR N 1 TO L 130 F F N 140 PRINT N F 150 NEXT N 160 END Several new features are contained in this...

Page 71: ...n a FO R N EXT loop You also do not have to start counting at 1 and you can add any amount at each step See Chapter 8 for details We have labelled this program with line numbers starting with 100 Labe...

Page 72: ...ize the computer using the ALL RESET button You create a new program using the SAME LINE NUMBERS as a program already in memory You change the batteries This brief introduction to programming on the P...

Page 73: ...y to start a program with a RUN or GOTO command you need to remember the beginning line number of each program see Chapter 8 But there is an easier way You can label each program with a letter and exe...

Page 74: ...he memory of the PC 3 47 characters are designated for Reserve Memory You can use this memory to store frequently used expressions which are then recalled by a simple two keystroke operation NOTE You...

Page 75: ...by ENTER to clear the program memory Type 10 as a line number and then press SHIFT and the A key Display 10 SHIFT A 10 PRINT_ 10 PRINT Immediately the word PRINT will appear in the display after the l...

Page 76: ...emplates are provided with the PC 3 You can use these templates to help you remember frequently used ReSerVe sequences or DEF key assignments After you have labelled the programs or created the sequen...

Page 77: ...us printing of calculations as desired Easy control of display or printer output in BASIC Cassette interface to connect to any standard cassette recorder Manual and program control of recorder for sto...

Page 78: ...NT PINS FOR COMPUTER AC ADAPTER JACK PAPER FEED BUTTON I LOW BATTERY INDICATOR PRINTER SWITCH REMOTE SWITCH CHECK CONNECTOR For serVice only iO O CASSETTE RECORDER JACK Figure 14 Printer Cassette Inte...

Page 79: ...PC 3 Printer Cassette Interface Paper feed button Pressing this key will feed the paper in the printer PC 3 POCKET COMPUTER col EAR Lj it t AC ADAPTER JACK REMOTE JACK PC 3 PRINTER MICROPHONE JACK CA...

Page 80: ...NNECTING JACK OF PC 3 PRINTER CASSETTE INTERFACE WALL OUTLET Figure 16 How to Connect the AC Adapter Always connect the recharger to the Printer Cassette Interface first Then plug the recharger into t...

Page 81: ...omputer to the PC 3 Printer Cassette Interface use the following procedure 1 Turn OFF the power in both units NOTE It is important that the power be OFF on the Computer before connecting the units or...

Page 82: ...slide the Computer to the left so that the pins on the Printer Cassette Interface are inserted into the plug on the Computer DO NOT FORCE the Computer and Printer Cassette Interface together If the tw...

Page 83: ...ERROR code 8 The low battery indicator may light up at this point In this case turn the Printer switch ON and press the key Then execute the printing again Loading the Paper 1 Turn off the Printer swi...

Page 84: ...to tighten the roll before using as shown in the figure Figure 23 Figure 24 4 t 8 Wrong Right 4 Turn on the Printer switch and press the paper feed button until the paper comes out of the Printer mec...

Page 85: ...t paper tape to your local Radio Shack store Please specify Model name when ordering The paper tape is specifically designed for this unique Printer Use of any other paper tape may cause damage to the...

Page 86: ...h the Printer by including a PRINT LPRINTstate ment in the program see Chapter 8 for details ALL PRINT statements following this statement will act as if they were LPRINT statements PRINT PRINT will r...

Page 87: ...only the symbol BUSY is displayed If this happens depress the key to stop the printing Release the paper misfeed Press the key When the PC 3 Printer Cassette Interface is not in use turn off the Prin...

Page 88: ...Chapter 8 for details on all these verbs and commands When a program or data is recorded on tape it will be preceded by a high pitched tone of approximately 7 seconds This tone serves to advance the...

Page 89: ...d with the PC 3 Printer Cassette Interface for more detailed operating instructions CASSETTE RECORDER t t t PC 3 PRINTER CASSETTE INTERFACE H Figure 27 Cassette Cables and Interface Jacks 89 Figure 28...

Page 90: ...DO NOT use solvent or a wet cloth Keep foreign objects out of the unit Errors If the batteries become low or if the Printer Cassette Interface is subjected to strong noise the unit may cease to functi...

Page 91: ...cess is ignored A good practice is to maintain a program log which includes the program name starting and stopping locations on tape use the counter numbers and a brief description of what the program...

Page 92: ...he program with a filename type CLOAD SHIFT SHIFT PRO 1 SHIFT Press the ENTER key The computer compares the CSAVEd program with the one in its memory If all went well it will display the prompt and en...

Page 93: ...e cassette retains a copy of the program so you can CLOAD the same program over and over again If an error message ERROR 8 is displayed while loading start again from the above step 1 Precautions for...

Page 94: ...If collation or transfer was not done properly the BUSY symbol does not disappear and the tape does not stop To stop the tape operation press the key Then try again from the beginning 94...

Page 95: ...nstruct BASIC statements Functions Special operators used in BASIC programs to change one variable into another Commands and verbs are arranged alphabetically Each entry is on a separate page for easy...

Page 96: ...ommands Variables Control CLEAR DIM Angle Mode Control DEGREE GRAD RADIAN Other BEEP PASS RANDOM USING WAIT These commands are also BASIC verbs Their effect as commands is identical to their effect as...

Page 97: ...GOTO IF THEN NEXT ON GOSUB ON GOTO RETURN STOP Assignment and Declaration CLEAR DIM LET Verbs Input and Output AREAD CSAVE DATA INPUT INPUT LPRINT PAUSE PRINT PRINT USING READ RESTORE WAIT 97 Other BE...

Page 98: ...Pseudovariables INKEY MEM PI String Functions ASC CHR LEFT LEN MID RIGHT STR VAL Functions 98 Numeric Functions ABS ACS ASN ATN COS DEG DMS EXP INT LOG LN RND SGN SIN SQR TAN...

Page 99: ...ing programs and loads the first program stored on the tape starting at the current position The second form of the CLOAD command clears the memory searches the tape for the program whose name is give...

Page 100: ...causing the computer to remain inoperative If this happens reset the computer by pressing the RESET button on the back of the computer 2 If the designated filename is not retrieved the computer will...

Page 101: ...of the CLOAD command compares the program stored in memory with the first program stored on the tape starting at the current position The second form of the CLOAD command searches the tape for the pro...

Page 102: ...mporarily halted Use When the STOP verb is used to halt a program during execution the program can be continued by entering CaNT in response to the prompt When a program is halted using the key the pr...

Page 103: ...name The second form of the CSAVE command writes all of the programs in memory onto the cassette tape and assigns the indicated filename The third form of the CSAVE command writes all of the programs...

Page 104: ...m or RUN mode program memory is loaded to the tape When the PC 3 Computer is in the ReSerVe mode reserve memory is loaded Examples CSAVE PR03 SECRET Saves the programs now in memory onto the tape unde...

Page 105: ...pression is provided execution begins with the first line GOTO differs from RUN in four respects 1 The value of the interval for WAIT is not reset 2 The display format established by USING statements...

Page 106: ...y be used in the PROgram mode The first form of the list command displays the statement with the lowest line number The second form displays the statement with the nearest line number greater than the...

Page 107: ...e used in the PROgram mode The first form prints all of the programs in memory The second form prints the statements from the line number with the nearest line equal to or greater than the value of ex...

Page 108: ...tape starting at the current position and merges it with programs already in memory The second form of the MERGE command searches the tape for the program whose name is given by filename and merges it...

Page 109: ...mber that you have a similar program portion on tape under the filename DEP1 You will of course want to see if this program has sections useful in the program you are currently constructing The first...

Page 110: ...some line numbers have been duplicated Also note that a label was used on the first line of the merged module This allows LINKING of the modules together See LINKING MERGED MODULES below It is importa...

Page 111: ...MERGE of the next program make any necessary changes to this program Then MERGE the next program MERGE PROG2 example 10 B REM THIS IS MERGED PROGRAM 20 INPUT ENTER DEPRECIATION D 30 INPUT NUMBER OF Y...

Page 112: ...logical sequence it will stop when it encounters a break in the sequence in line numbering i e if line numbers 10 20 30 are followed by duplicate line numbers in a second module the following techniq...

Page 113: ...en used in the PROgram mode the NEW command clears all programs and data which are currently in memory When used in the ReSerVe mode the NEW command clears all existing reserve memory The NEW command...

Page 114: ...programs in memory are protected A password protected program cannot be examined or modified in memory It cannot be output to tape or listed with LIST or LLlST nor is it possible to add or delete pro...

Page 115: ...rm of the RUN command executes a program beginning with the lowest numbered line greater than or equal to the value of the expression RUN differs from GOTO in five respects 1 The value of the interval...

Page 116: ...program with GOTO is identical to execution with the DEF key In all three forms of program execution FORI NEXT and GOSUB nesting is cleared Examples RUN 10l J Executes the program which begins at line...

Page 117: ...b can be used to enter a single starting value without the use of the INPUT verb The AREAD verb must appear on the first line of the program followinc the label If it appears elsewhere in the program...

Page 118: ...red Example When the program below is executed 10 A PRINT ABC DEFG 20 S AREAD A PRINT A RUN mode m ABC DEFG W DEFG When the display indicates PRINT numeric expression numeric expression or PRINT Strin...

Page 119: ...is evaluated but only the integer part is used to determine the number of beeps BEEP may also be used as a command using numeric literals and predefined variables In this case the beeps occur immediat...

Page 120: ...CHAIN verb one or more programs must be stored on a cassette Then when the CHAIN verb is encountered in a running program a program is loaded from the cassette and executed The first form of CHAIN lo...

Page 121: ...will searches the tape for the program whose name is indicated by filename loads the program and begins execution with the line number indicated by the expression Examples 10 CHAIN 20 CHAIN PRO 2 480...

Page 122: ...of these sections ends with a CHAIN statement PRO 1 ape recorder head 10 Magnetic tape 20 indicates the position of the t Execution r Filename Filename f 400 CHAIN PRO 2 PRO 3 400 CHAIN PRO 2 410 PRO...

Page 123: ...D Execution Filename PRO 2 Filename PRO 3 During execution when the Computer encounters the CHAIN statement the next section is called into memory and executed In this manner all of the sections are e...

Page 124: ...program are not required in the second part and available space is limited CLEAR may also be used at the beginning of a program when several programs are resident in memory and you want to clear out t...

Page 125: ...se forms are used in specifying the arguments to the SIN COS and TAN functions and in returning the results from the ASN ACS and ATN functions The DEGREE function changes the form for all angular valu...

Page 126: ...is executed the first value in the first DATA state ment is returned Succeeding READs use succeeding values in the sequential order in which they appear in the program regardless of how many values ar...

Page 127: ...I DIM B 1 1 2 1 FOR I 1 TO 1 1 3 1 READ B I 40 NEXT I 50 DATA 1 2 3 4 5 6 70 DATA 7 8 9 1 1 Sets up an array Loads the values from the DATA statement into B I B 1 I will be 1 B 2 will be 2 B 3 will be...

Page 128: ...ize is len is dimension spec dimension spec dim list numeric dim spec string dim spec numeric name size string name dims string name dims valid numeric variable name valid string variable name size si...

Page 129: ...d column In string arrays one specifies the size of each string element in addition to the number of elements For example DIM B 3 12 reserves space for 4 strings which are each a maximum of 12 charact...

Page 130: ...e a mark must be included to indicate where each program ends so that execution does not continue from one program to another This is done by including an END verb as the last statement in the program...

Page 131: ...reaches the NEXT verb this value is tested against expression 2 If the value of the loop variable is less than or equal to expression 2 the loop variable is increased by the step size and the enclose...

Page 132: ...a statement within a FOR NEXT pair Similarly programs must never leave a FOR NEXT pair by jumping out Always exit a FOR NEXT loop via the NEXT statement To do this set the loop variable to a value hi...

Page 133: ...1 2 3 4 5 40 FOR N 10 TO 0 STEP 1 This group of statements counts down 10 9 8 7 6 5 4 3 2 1 0 50 PRINT N 60 NEXT N 70 FOR N 1 TO 10 80 X 1 90 FOR F 1 TO N 100 X X F 110 NEXT F 120 PRINT X 130 NEXT N...

Page 134: ...rogram At those locations in the main body of the program where subroutines are to be executed include a GOSUB statement with an expression which indicates the starting line number of the subroutine T...

Page 135: ...eric expression is used it must evaluate to a valid line number i e 1 to 999 or an ERROR 4 will occur EXAMPLES 10 GOSUB 100 20 END 100 PRINT HELLO 110 RETURN When this program is run it prints the wor...

Page 136: ...a GOTO statement may not include a comma e g A 1 2 cannot be used Since there is an ON GOTO structure for choosing different destinations at given locations in the program the expression usually consi...

Page 137: ...Examples 10 INPUT A This program prints YES if a Y is entered and prints NO if anything else is entered 20 IF A Y THEN GOTO 50 30 PRINT NO 40 GOTO 60 50 PRINT YES 60 END 137...

Page 138: ...se forms are used in specifying the arguments to the SI N COS and TAN functions and in returning the rusults from the ASN ACS and ATN functions The GRAD function changes the form for all angular value...

Page 139: ...ped The condition part of the IF statement can be any relational expression as described in Chapter 4 It is also possible to use a numeric expression as a condition although the intent of the statemen...

Page 140: ...e accuracy however the mantissa is calculated in side the unit up to 12 digits the result of which is rounded to the 10th digit for display For example 5 9 and 5 9 9 are calculated as follows 5 9 5 55...

Page 141: ...esults in 8 99999999991 E 00 making an IF statement unformulated In this case reprogram the calculation by using variables so that it is independent as follows 10 INPUT A 15 B A 2 20 IF B 9 THEN 50 Th...

Page 142: ...D Purpose The INPUT verb is used to enter one or more values from the keyboard Use When you want to enter different values each time a program is run use the INPUT verb to enter these values from the...

Page 143: ...nd there is more than one variable in the list following it the second and succeeding variables are prompted with the question mark If a second prompt is included in the list it is displayed for the v...

Page 144: ...ssette tape Use PRINT saves the values of variables on tape They can then be read back into the same or another program using the INPUT verb With the first form the values are read from the tape and a...

Page 145: ...y not read a single element of an array Examples 10 INPUT A B C 20 INPUT FIL2 0 E F 30 INPUT FIL3 G l Reads three values from the current position of the tape Searches the tape for the file FIL2 and r...

Page 146: ...iables and only string expressions can be assigned to string variables In order to convert from one type to the other one of the explicit type conversion functions STR or VAL must be used The LET verb...

Page 147: ...N See also PAUSE PRINT USINT and WAIT Purpose The LPRINT verb is used to print information on the Printer of the optional PC 3 Printer Cassette Interface Use The LPRINT verb is used to print prompting...

Page 148: ...rom left to right with no intervening space It is possible to cause PRINT statements to work as LPRINT statements See the PRINT verb for details If an LPR INT statement contains more than 24 character...

Page 149: ...a group of statements which are being repeated in a FOR NEXT loop Use The use of the NEXT verb is generally described under FOR The numeric variable in a NEXT statement must match the numeric variable...

Page 150: ...integer is 1 the first sUbroutine in the list is executed as in a normal GOSUB If the expression is 2 the second subroutine in the list is executed and so forth After the RETURN from the subroutine ex...

Page 151: ...0 ON A GOSUB 10 1 200 300 30 END 1 10 PRINT FIRST 110 RETURN 200 PRINT SECOND 210 RETURN 30 1 PRINT THIRD 310 RETURN An input of 1 prints FIRST 2 prints SECOND 3 prints THIRD Any other input does not...

Page 152: ...ON and GOTO is evaluated and reduced to an integer If the value of the integer is 1 control is transferred to the first location in the list If the expression is 2 control is transferred to the secon...

Page 153: ...OTO 100 200 300 30 GOTO 900 100 PRINT FIRST 110 GOTO 900 200 PRINT SECOND 210 GOTO 900 300 PRINT THIRD 310 GOTO 900 900 END An input of 1 prints FIRST 2 prints SECOND 3 prints THIRD Any other input do...

Page 154: ...See also LPRINT PRINT USING and WAIT Purpose The PAUSE verb is used to print information on the display for a short period Use The PAUSE verb is used to display prompting information results of calcu...

Page 155: ...ing to the same rules as above With the third form the display starts at the left edge and each value is displayed immediately following the previous value from left to right with no intervening space...

Page 156: ...er USING Abbreviations P PR PR I PRIN See also LPRINT PAUSE USING and WAIT Purpose The PR INT verb is used to print information on the display or Printer of the PC 3 Printer Cassette Interface Use The...

Page 157: ...g space The fourth and fifth forms of the PR INT statement do no printing The fourth form causes all PR INT statements which follow it in the program to be treated as if they were LPRINT statements Th...

Page 158: ...e or more values on the cassette tape Use Using PRINT the values of variables can be saved on tape These can then be read back into the same or another program using the INPUT verb With the first form...

Page 159: ...he tape including the simple variable of the same name i e B saves Band B 0 B 1 B 2 etc for as many values as are in the array You may not save a single element of an array Examples 10 PRINT A B C 20...

Page 160: ...ng the arguments to the SIN COS and TAN functions and in returning the results from the ASN ACS and ATN functions The RADIAN function changes the form for all angular values to radian form until a DEG...

Page 161: ...PC 3 Computer is turned on so the sequence of random numbers generated with RND is the same each time unless the seed is changed This is very convenient during the development of a program because it...

Page 162: ...es in a DATA statement and use a READ statement in a FOR NEXT loop to load the values into the array When the first READ is executed the first value in the first DATA state ment in returned Succeeding...

Page 163: ...Examples 10 DIM 8 10 Sets up an array 20 FOR 1 1 TO 10 30 READ 8 1 Loads the values from the DATA statement into 8 8 1 is 1 8 2 is 2 8 3 is 3 etc 40 NEXT I 50 DATA 1 2 3 4 5 6 60 DATA 7 8 9 10...

Page 164: ...fication usage notes reminders about algorithms used etc These comments are included by means of the REM statement The REM statement has no effect on the program execution and can be included anywhere...

Page 165: ...rb the PC 3 Pocket Computer begins reading with the first value in a DATA statement and pro ceeds sequentially through the remaining values The first form of the RESTORE statement resets the pointer t...

Page 166: ...Examples 10 DIM 8 10 Set up an array 20 FOR 1 1 TO 10 30 READ 8 1 Assigns the value 10 to each of the elements of B 40 RESTORE 50 NEXT I 60 DATA 10 166...

Page 167: ...ubroutine may have more than one RETURN statement but the first one executed terminates the execution of the subroutine The next statement executed will be the one following the GOSUB or ON GOSUB whic...

Page 168: ...essage is displayed such as BREAK IN 200 where 200 is the number of the line containing the STOP STOP is used during the development of a program to check the flow of the program or examine the state...

Page 169: ...e The TROFF verb is used to cancel the trace mode Use Execution of the TROFF verb restores normal execution of the program Examples 10 TRON 20 FOR I 1 TO 3 30 NEXTI 40 TROFF When run this program disp...

Page 170: ...dis played after each statement is executed The PC 3 Computer then halts and waits for the Down Arrow key to be pressed before moving on to the next statement The Up Arrow key may be pressed to see t...

Page 171: ...self or as a clause within a LPRINT PAUSE or PRINT statement The USING verb establishes a specified format for all output which follows until changed by another USING verb The editing specification of...

Page 172: ...e positive Editing specifications may include more than one field For example could be used to print a numeric and a character field next to each other If the editing specifications is missing as in f...

Page 173: ...Computer to display for a specified interval and then proceed automatically similar to the PAUSE verb The expression which follows the WAIT verb determines the length of the interval The interval may...

Page 174: ...value of NUL INKEY is used to respond to the pressing of individual keys without waiting for the ENTER key to end the input For example these statements wait for a non NUL key to be pressed 10 A INKE...

Page 175: ...n on the keyboard Like other numbers the value of PI is kept to 10 digit accuracy 3 141592654 Numeric Functions Numeric functions are a group of mathematical operations which take a single numeric va...

Page 176: ...ns the absolute value of the numeric argument The absolute value is the value of a number without regard to its sign ASS 1IJ is 1IJ 1 ACS numeric expression ACS is a numeric function which returns the...

Page 177: ...ee radian or gradient mode for angles ASN 5 is 3 3 in the decimal degree mode 1 ATN numeric expression ATN is a numeric function which returns the arctangent of the numeric argument The arctangent is...

Page 178: ...DMS format the integer portion of the number represents the degrees the first and second digits of the decimal represent the minutes the third and forth digits of the decimal represent the seconds an...

Page 179: ...to the value of the numeric argument EXP 1 is 2 718281828 lINT numeric expression INT is a numeric function which returns the integer part of its numeric argument NT PI is 3 1 lOG numeric expression...

Page 180: ...t is an integer greater than or equal to 1 the result is a random number greater than or equal to 1 and less than or equal to the argument If the argument is greater than 1 and not an integer the resu...

Page 181: ...is 1 SGN 5 is 1 1 SIN numeric expression SIN is a numeric function which returns the sine of the angle argument The value returned depends on whether the PC 3 Com puter is in decimal degree radian or...

Page 182: ...Y 100 Y O x O ERROR 2 Ex IV i J IENTER 1 ERROR 2 yx y O x O O i J 5 ENTER 1 i J y x 4 i J 5 IENTERj ERROR 2 If Y 0 x must be an integer In TAN x however the SIN x DEG Ixl lxl01O following cases are ex...

Page 183: ...2 2 ENTER 6 E 10 String Functions String functions are a group of operations used for manipulating strings Some take a string argument and return a numeric value Some take a string argumennt and retur...

Page 184: ...ession CH R is a string function which returns the character which corresponds to the numeric ASCII code of its argument The chart of ASCII codes and their relationship to characters is given in Appen...

Page 185: ...ent The first numeric argument indicates the first character position to be included in the result The second numeric argument indicates the number of characters that are to be included MID ABCDEF 2 3...

Page 186: ...h returns the numeric value of its string argument It is the reverse of STR The VAL of a non number is zero Val 1 59 is 1 59 If the string contains alphanumeric character any numeric character on the...

Page 187: ...how the PC 3 Computer can be used to calculate the size of a loan payment and the total cost of the loan The program first solicits the amount borrowed the rate of interest and the number of months th...

Page 188: ...ts Display monthly payment amount Multiply monthly amount times months for total Display total cost Subtract principal from total cost to get interest Print interest 150 INPUT ANOTHER 0 Ask for repeat...

Page 189: ...ANY_ITEMS TO SORT N 20 DIM O N S N 30 FOR 1 1 TO N 40 INPUT 0 I 50 NEXT I 60 PAUSE SORTING 70 FOR 1 1 TO N 80 T 1 90 FOR J 1 TO N 100 IF 0 J 0 T THEN LET T J 110 NEXTJ 120 S I 0 T 130 0 T 9 9999999991...

Page 190: ...hen they begin to slow down and gradually come to a stop The stopping point of each wheel is random If the same three objects show in all three windows at the end of the play then you win Notice that...

Page 191: ...TER TO START 200 REM START OF TURN 210 M 0 Set initial variables S is amount of winnings F is amount of PRINT WAIT during first part of spin G is longest print WAIT in spin and H is PRINT WAIT for inf...

Page 192: ...stopping time for each window Set M to longest stopping time Reset WAIT to fastest interval Compute the amount to slow the interval during each turn of the slow down phase Loop from 1 to longest stop...

Page 193: ...od of computing Federal Income Tax is based on Tax Rate Schedules X Y and Z These schedules break down the income for each filing status into tax brackets For each tax bracket there is a tax computati...

Page 194: ...0 220 IF F 2 THEN LET 0 0 3400 230 IF F 3 THEN LET 0 0 1700 240 IF 0 0 THEN LET 0 0 250 I 1 0 260 PRINT INC LESS OED I Allocate arrays B is baseline for tax bracket M is minimum tax in bracket P is pe...

Page 195: ...tables have standard deduction built in Compute income less exemptions Minimum income is zero Display Compute line number of appropriate tax table for filing status And restore so READ will get right...

Page 196: ...15000 2330 27 811 DATA 18200 3194 31 812 DATA 23500 4837 35 813 DATA 28800 6692 40 814 DATA 34410 8812 44 815 DATA 41500 12068 50 850 REM TABLE FOR MARRIED FILING SEPAR 851 DATA 13 852 DATA 0 0 0 853...

Page 197: ...2013 22 908 DATA 20200 2937 25 909 DATA 24600 4037 29 910 DATA 29900 5574 33 911 DATA 35200 7323 39 912 DATA 45800 11457 44 913 DATA 60000 17705 49 914 DATA 85600 30249 50 950 REM TABLE FOR HEAD OF HO...

Page 198: ...a dependent variable the dependent variable is X and the independ ent is Y If the variables are independent then simply assign one to X and one to Y The program loops through the observations and com...

Page 199: ...computes the coefficients for the linear regression equation using the formulas Sum of Productsx y Sum of Squaresy a Meany bx y Mean x The coefficients are then shown in the regression equation Y a bx...

Page 200: ...V G Loop for number of observations Prompt with number of pair Prompt and input X Prompt and input V Reset WAIT time for data listing Ask if output is to display or printer If printer then switch Ask...

Page 201: ...ssion equation Reset output to display 380 P O J 390 Q G P F 400 WAIT 128 410 PRINT REGRESSION EQUATION IS 420 WAIT 430 PRINT Y Q P X 440 PRINT PRINT 450 END Minefield Game This program provides a sim...

Page 202: ...rs that it is difficult or impossible to start or finish You determine the number of mines by responding with a number in response to the question DIFFICULTY Notice the use of subroutines in this prog...

Page 203: ...GOSUB 600 Loop through entire array and set each entry to zero Needed to clear out mines from prior games Loop for number of mines Get random X coordinate Get random Y coordinate Check it too close to...

Page 204: ...INT 610 VOU ARE AT EAST EDGE GOTO 620 610 X X 1 620 RETURN If from left side then GOSUB to west subroutine If new square contains a bomb then GOTO losing message If new square is the goal then GOTO wi...

Page 205: ...00 750 PRINT CONGRATULATIONS YOU WIN 800 INPUT ANOTHER GAME A 810 IF LEFT A 1 Y THEN GOTO 40 820 END If at west edge don t do anything Move one square west And return Display losing message And go to...

Page 206: ...h of these one at a time until you have fixed the problem If You turn on the machine but there is nothing on the display There is a display but no response to keystrokes You have typed in a calculatio...

Page 207: ...eserved contents are cleared BASIC Debugging A newly entered BASIC program may not always work for the first time Even if you are simply keying in a program that you know is correct such as those prov...

Page 208: ...about each line as you go through the program as if you were the computer Take sample values and try to apply the operation in each line to see if you get the result that you expected 5 Insert one or...

Page 209: ...ause damage to your Computer Use only a soft dry cloth to clean the Computer Do not use solvents water or wet cloths To avoid battery leakage remove the batteries when the Computer will not be in use...

Page 210: ...r you have tried to divide by zero 5 0 3 DIM Error Range over Error Array variable already exists array specified without first DI Mensioning it or array subscript exceeds size of array specified in D...

Page 211: ...123 20 30 PRINT A 8 I O device error An error has occurred in sending information between the PC 3 Computer and another device such as the Printer or tape on the PC 3 Printer Cassette Interface check...

Page 212: ...r binary bits the row shows the second hex character or the second binary bits The upper left corner of each box contains the decimal number for the character The lower right corner shows the characte...

Page 213: ...0110 0 0 32 48 64 80 96 0000 SP 0 P 1 33 49 65 81 0001 A Q 2 34 50 66 82 S 0010 2 B R e 3 35 51 67 83 c 0 0011 3 C S n d 4 36 52 68 84 4 0100 4 D T B 5 37 53 69 85 i 0101 5 E U t s 6 38 54 70 86 0110...

Page 214: ...010 J Z B 43 59 75 91 1011 K V C 44 6 1 76 92 1100 L D 45 61 77 93 1101 M TI E 46 62 78 94 1110 N A F 47 63 79 95 1111 a PC 3 does not recognize codes in shaded area If you enter the code number in th...

Page 215: ...t Scientific notation format The number of string characters These diffrerent formats are specified with an output mask This mask may be a string constant or a string variable 10 USING 20 M 30 USING M...

Page 216: ...using the character Each in the mask reserves space for one digit The display or print always contains as many characters as are designated in the mask The number appears to the far right of this fiel...

Page 217: ...e filled with zeros If there are more significant decimal digits in the value than in the mask the extra digits will be truncated not rounded Statement 10 USING 20 PRINT 25 30 PR INT 350 5 40 PR INT 2...

Page 218: ...est scientific notation field would be which would print numbers such as 1 234567890IE 12 Statement 10 USING 20 PRINT 2 30 PR INT 365 278 2 001E00 3 651E02 Specifying Alphanumeric Masks String constan...

Page 219: ...ing characters or vice versa marks the boundary for a different value Thus a mask of is a specification for displaying two separate values a numeric value which is allocated 5 positions and a string v...

Page 220: ...omputer must have some way to decide between these options it uses its rules of operator priority Because division has a higher priority than addition see belowl it will choose to do the division firs...

Page 221: ...are two or more operators at the same priority level the expression will be evaluated from left to right Note that with A B C for example the answer is the same whether the addition or the subtractio...

Page 222: ...st 36 2 10 LOG 100 And then the addition 38 10 LOG 100 or 38 10 LOG 100 Now that the parentheses are cleared the LOG function has the highest priority so it is done next 38 10 2 The exponentiation is...

Page 223: ...nt models the following comparison charts are provided Verbs and Commands In the following chart the symbol M indicates that the feature can only be used in manual execution i e as a command P indicat...

Page 224: ...OLOR P CaNT M M M CSAVE M B B CSIZE B CURSOR B DEGREE B B B DATA P P DEBUG M DIM B B END P P P FOR TO STEP P P P GOSUB P P P GOTO P B B GCURSOR B GPRINT B GRAD B B B GRAPH B IF THEN P P P INPUT P P P...

Page 225: ...LLIST B M PC 1 can emulate with LIST LOCK B LPRINT B P See Note 2 MERGE M M M NEW M M M NEXT P P P ON ERROR P ON GOSUB P P ON GOTO P P PAUSE P B P PASS M PRINT P B P See Note 2 PRINT B B B RADIAN B B...

Page 226: ...ehavior of AREAD following PRINT but these are unlikely to cause problems in ordinary usage Note 2 Add PRINT LPRINT and PRINT PRINTstatements to PC 1 programs to achieve the desired results on the PC...

Page 227: ...Note 4 As compared with the PC 1 the PC 3 is faster in processing speed for calculations Therefore when game programs for the PC 1 are used with the PC 3 adjust the game speed etc Pseudovariables In t...

Page 228: ...C 2 PC 3 Comments ASS y Y Y ACS Y Y Y ASN Y Y Y ATN Y Y Y COS Y Y Y DEG Y Y Y DMS Y Y Y EXP Y Y Y INT Y Y Y LOG Y Y Y LN Y Y Y NOT Y Y POINl Y RND Y Y SGN Y Y Y SIN y y y SQR ory Y Y Y PC has only y S...

Page 229: ...HR y y LEFT Y Y LEN Y Y MID Y Y RIGHT Y Y STR Y Y VAL Y Y Operators PC PC 2 PC 3 Comments A y Y Y See Note 4 Y Y Y y y y AND OR y y Y Y Note 4 Raising a negative number to a power with the A operator...

Page 230: ...F N LPRINT A ENTER With the PC 1 this results in a command for If N L display A I F N L PR INT A With the PC 3 however it becomes a command for If N print A I F N LPRINT A causing a syntax error ERROR...

Page 231: ...y Protection Reserve Area Program Data Area Subroutine 10 stacks FOR NEXT 5 stacks Function 16 stacks Data 8 stacks Addition subtraction mUltiplication division exponentiation trigonometric and invers...

Page 232: ...nd functions Numeric pad User defined keys 6 0V DC Lithium batteries Type CR 2032 6 0V DC 0 03W Batteries are sufficient for approximately 300 hours usage without external power supply OoC 40 C 32 F 1...

Page 233: ......

Page 234: ...2 NEXT 149 Priority 223 INPUT 145 NOT 52 Program 59 INSert key 66 Numeric expressions 49 Pseudovariables 174 INT 179 Numeric variables 46 RADIAN 160 LEFT 184 ON Start up 23 RANDOM 161 LEN 185 ON GOSUB...

Page 235: ...P STR Scientific notation Square root Statements String expressions String variables Subroutines TAN TROFF TRON Tape Templates Trou bleshooti ng USING VAL Variables 74 51 79 181 24 181 181 168 186 41...

Page 236: ...ible regardless of your skill It is also important for you to refer to programs generated by others The following pages contain a variety of suggestions for programs using the BASIC commands We provid...

Page 237: ...61 TYPING PRACTICE 265 SOFTLANDING GAME 270 MEMORY CHECKER 275 BUGHUNT 281 DOUBLE ROTATION 287 Showing the bytes used in each program itself The number of bytes used in each program are shown at the e...

Page 238: ...ound When 1 root is found depending on the interval width by using Newton s Method the starting point automatically changes CONTENTS If the absolute value of the distance between X n and X n 1 is less...

Page 239: ...is found EXAMPLE x 3 2x2 X 2 0 the roots are 1 1 2 starting point 0 minute interval 10 4 interval 0 5 The above values are used in the calculation The functions are to be written into lines after 500...

Page 240: ...RVAL _ Waiting for minute interval input 3 0 0001 ENTER INTERVAL _ Waiting for interval width input 4 0 5 ENTER ANSWER 2 Display of roots 5 ENTER ANSWER 1 By repeatedly pressing the ENTER key the root...

Page 241: ...FLOWCHART Newton s Method calculation subroutine RETURN Function calculation subroutine 500 l y ABS D C 10 8 N 246 RETURN Roots are displayed 350 340 300 G V F V 50 Z Y Z O 320...

Page 242: ...0 90 F F W C F 100 GOSUB 300 110 GOTO 50 120 END 300 X C GOSUB 500 311 1 B X A C 320 GOSUB 500 330 D C C D A Y B Y 340 IF ABS D C E 8 GOTO 300 350 BEEP 3 PRINT 9ANSWE R C 360 RETURN 500 B X 2 X l X 2...

Page 243: ...um Average Variance xi fi Xi fi X fi 0 2 Xi X fi fi l Standard deviation 0 j7 2 Number of data entries up to 50 when there are no weights fi 1 INSTRUCTIONS 1 At W select whether or not there are any w...

Page 244: ...lay Remarks 1 jw NO OF DATA _ Waiting for number of data input 2 5 ENTER WEIGHTS 1 INO WEIGHTS 2 _ Waiting for the selection of weights no weights 3 1 ENTER X 1 4 14 1 ENTER F 1 5 8 ENTER X 2 12 14 5...

Page 245: ...ep No Key Input Display Remarks 1 ElCID X 1 14 1 2 ENTER F 1 8 3 ENTER X 2 14 1 El is used to input the revised values when data errors are found 4 El X 2 REVISION VALUE _ Revised value is input 5 14...

Page 246: ...emarks 1 CID TOTAL SUM 1072 5 Display of total sum 2 ENTER MEAN VALUE 14 3 Display of average 3 ENTER VARIANCE 1 432432432IE 02 Display of variance 4 ENTER STD DEV Display of standard deviation 5 ENTE...

Page 247: ...FLOWCHART o CD END N Y ith weights Data revision N N 260 Data revision i 250 230 210 200 Calculation ithout weightsts Y 40 70 Data input 50 30 20 L _ __ l 10 r 252...

Page 248: ...D 200 B WAIT I 0 210 B X STR I 1 J 1 PRINT B X I 230 IF A l LET B F Y STR I 1 PRINT B F I J 2 240 I I 1 250 IF I P END 255 GOTO 210 260 CY PAUSE B IF LEFT B l X INPUT REVISION YALU E X I GOTO 290 270...

Page 249: ...MEMORY CONTENTS A j B j c D E F j G H I j J Flag K L M N j 0 p Data number Q Variance R S Standard deviation T Total sum 254 u V W X Average y Z X P l Data F P l Data...

Page 250: ...en circles and straight lines in the X Y plane are found CONTENTS The 2 points of intersection between a circle and a straight line are P and Q Note The angles are in degrees minutes and seconds and a...

Page 251: ...line is determined by 1 point and 1 direction angle E is used 2 After the data are input the results are displayed EXAMPLE Xl 50 Yl a X2 50 Xp a Y2 100 Yp 50 Xo 50 XQ 50 Yo 50 Y Q 100 R 50 a 45 y P2...

Page 252: ...nts on the line are known Step No Key Input Display Remarks 1 lw X0 _ 2 50 ENTEF Y0 _ 3 50 ENTER R 4 50 ENTER Xl _ 5 50 ENTER Yl _ 6 a ENTER X2 _ 7 50 ENTER Y2 _ 8 100 ENTER P 0 0000 49 9999 xP YP 9 E...

Page 253: ...n the line and 1 direction angle are known Step No Key Input Display Remarks 1 Cilll X0 _ 2 50 ENTER Y0 _ 3 50 ENTER R _ 4 50 ENTER X1 _ 5 50 ENTER Y1 _ 6 0 ENTER A 7 45 ENTER P 0 0000 49 9999 xp Ypl...

Page 254: ...RETURN 90 FLOWCHART 500 If 1 point and 1 500 direction angle are known J 1 510 N 50 600 259...

Page 255: ...B E GOSUB 5 BB lBe K W SIN X H l1B L ACS K C l2B M H 9B L N H 9B L l3B GOSUB 6BB l4B PRINT USING tttttttttttt UU p O P l5B M N GOSUB 6BB l6B PRINT Q O P 17B END 5BB W f X X Y Y 51B X ACS X W IF Y B L...

Page 256: ...certain day this program will output the number of days that have passed since that day CONTENTS Jnstructions El CD BASE YEAR ENTER MONTH ENTER DAY ENTER TARGET YEAR ENTER MONTH ENTER DAY ENTER To en...

Page 257: ...1976 year 10 month 5 day input 3 10 ENTER DAY 4 5 ENTER END YEAR 5 1982 ENTER MONTH Target date 1982 year 6 month 4 day input 6 6 ENTER DAY 7 4 ENTER DAYS 2068 8 ENTER END YEAR 9 1985 ENTER MONTH Targ...

Page 258: ...120 FLOWCHART Calcu lation of sum of days 20 500 Y 510 30 Number of days 690 520 50 530 70 85 RETURN 100 263...

Page 259: ...G PRINT 9DAYS X 150 GOTO 30 500 IF G 3 0 LET G G 1 GOTO 520 510 G G 13 H H 1 520 I 1NT 365 25 H INT 30 6 G I 530 I I INT H 100 INT H 400 306 122 RETURN 600 9Z E D 270 MEMORY CONTENTS A B C D E F Year...

Page 260: ...level 3 is the shortest time allotment while 1 is the longest INSTRUCTIONS After the buzzer sounds 4 to 6 characters will be displayed You are to type in the same characters within the allotted time...

Page 261: ...ENTER AZBDC 3 CA AZBDC A 4 aJ AZBDC AZ YOUR SCORE 80 After the 10 questions are answered the score is displayed YOUR SCORE IS BEST If your score is higher than the high score the guidance is displaye...

Page 262: ...A 2 I Points are counted depending on the number of correct answers 150 160 110 y Input exists High score Series of problem characters and input character series 90 87 40 Depending on rade and length...

Page 263: ...0 D RND 26 B C CHR D 40 Y Y CHR D 40 NEXT C A 70 BEEP 3 E 0 WAIT 30 80 FOR W l TO B 10 L PRINT Vi A IF E B LET W B 20 L GOTO 100 85 C E INKEY IF C E THEN 100 87 A A C E 90 E E 1 100 NEXT W Q 0 110 FOR...

Page 264: ...MEMORY CONTENTS A J B J C Loop counter D J E J F G H I J K L Grade M N 0 P Score Q J R J S Loop counter T 269 u V W Loop cou nter X High score Y Z B 5 J C 5 J...

Page 265: ...tly as possible by controlling the engines while watching how much fuel is burned CONTENTS H height V speed a gravitational acceleration t time Vo initial speed Gravity is set to be 5 mj unit time 2 I...

Page 266: ...arks 1 W START Keys CQJ 2 designate fuel burned in H 500 S 50 F 200 C 0 unit time H 452 S 46 F 191 C 9 Repeat If successful SUCCESS FUEL LEFT F 15 If failed GOOD BYE REPLAY YIN Wait for input on wheth...

Page 267: ...Play again Rocket higher than round level N Speed and Y height under their limits N 140 FLOWCHART A 10 50 70 Screen display 80 y Any fuel left 90 100 130 Calculation of the rocket s height and speed 2...

Page 268: ...C 80 IF F 0 GOTO 170 90 BEEP 1 D INKEY 100 IF D LET C A GOTO 130 110 C VAL D 120 A C 130 rF e F LET C F 140 F F C X C 5 H H S X 2 S S X 150 IF H 0 GOTO 70 160 IF ABS H 5 ABS S 5 2 BEEP 5 PRINT SUCCES...

Page 269: ...MEMORY CONTENTS A J B J c Fuel burned D Fuel burned E F Initial fuel level fuel left G H Initial height height I J K L M N 0 P Q R S Speed T 274 u V W Wait time X J y Z J...

Page 270: ...wing type of line will be displayed for approximately 5 seconds There are 2 characters and 4 numbers in each set Character Number t Set 1 Set 2 J Set 3 The 3 sets shown above are to be memorized and t...

Page 271: ...LLIGENT 6 GENIUS KEY OPERATION SEQUENCE Step No Key Input Display Remarks 1 CAJ MEMORY CHECK Title Display of problem line 5 sec 2 XXXX XXXX XXXX character X number 3 ANS _ Waiting for the input of se...

Page 272: ...g for the input of set 3 6 XXXX ENTER XXXX XXXX XXXX Display of the problem line 1 5 sec 7 XXXX XXXX XXXX Display of the answer input 8 IDIOT BAD AVERAGE OK display of category GOOD INTELLIGENT GENIUS...

Page 273: ...isplay of the Subroutine 520 20 answer input 210 150 Display of the problem line Subroutine 500 300 Display of 5 sec category 160 370 200 Display of the input 200 oF Redisplay of the Subroutine 500 EN...

Page 274: ...5130 GOSUB 5213 21e N e 22e FOR I l TO 3 2313 IF A I Z I LET N N 1 2413 IF A I 3 Y I LET N N 1 25e NEXT I 26e N N 1 27e WAIT 1513 ON N GOTO 31313 318 3213 3313 348 3513 368 3ee BEEP 1 PRINT IDI OT GOT...

Page 275: ...x J Random number generation K L Random number generation M N Counter 0 P Q R S T 280 u V W Input for REPLAY X Y Z G 6 1 Characters 1 6 N 10 1 Number table 1 10 V 3 3 3 columns after answering 1 3 X 3...

Page 276: ...at a position that was chosen at random Hints are displayed as distance The distance is displayed by the ASS X a ASS Y b equation The initial energy level is 100 This decreases by 1 with time Each tim...

Page 277: ...e Small characters are actual values DISTANCE Q E e Hint Remaining energy distance Each time the man moves the display changes Bug is caught HIT BANG HIT BANG SCORE t ENERGY e Concerning the BEEP soun...

Page 278: ...is given When the bug is caught the BEEP goes off 5 times KEY OPERATION SEQUENCE Step No Key Input Display Remarks 1 meA 0 0 DISTANCE 5 E 100 8 0 1 DISTANCE 4 E 99 6 1 1 DISTANCE 2 E 98 2 BEEPs 8 HIT...

Page 279: ...core display GAME OVER END ut of the N O 9 4 HIT HIT BANG BANG 4 N he positions of the bug and the man Y Out of the 9 x 9 range or G had read in other han 2 4 6 and 8 Judge from the distance L 1 BEEP...

Page 280: ...X A AND V B GOTO 400 260 E F INT S 2 270 IF E 0 GOTO 500 280 R RND 5 290 IF R l LET B B 1 GOTO 340 300 IF R 2 LET A A 1 GOTO 340 310 IF R 3 LET A A 1 GOTO 340 320 IF R 4 LET 3 B 1 GOTO 340 340 IF A 0...

Page 281: ...of bug Y coordinate C Amount of energy added D E Remaining energy F Energy level G Key read in H I J K L Distance between bug and man M N 0 P Q R Size of bug movement S Time spent T Score 286 u V W X...

Page 282: ...ac ters A J is then displayed 2 The space in between the characters is taken as the breakpoints 1 9 where the numbers are placed Inputting a break number causes the characters on each side of the brea...

Page 283: ...1 W DOUBLE ROTATION A J Random sequence display 2 CD CD Numbers between 1 and 9 are selected and input Repeated input ABCDEFGHIJ GAME END YOUR SCORE 35 Does player want to play using the same beginnin...

Page 284: ...Sequence of letters is sh ifted accordi ng to the input numbers FLOWCHART HA 170 400 B 289 210 300 Arrange correctly N y 310 END...

Page 285: ...0 R 1 NEXT I 20 3 2 3 1 30 N 0 50 3EEP 1 70 D vv PRINT 3 2 D INKEY 80 C VAL D 90 IF C 0 GOTO 170 10 3 3 LEFT 3 2 C 220 3 4 RIGHT 3 2 10 0 240 IF C l GOTO 260 250 3 3 RIGHT 3 3 1 LEFT 3 3 C 1 260 IF C...

Page 286: ...MEMORY CONTENTS A J 8 J c J 0 Input key E F G H I J J K L M N Score 0 p Q R Random numbers S J T 291 u V W X Y z 8 4 Alphabet sequences...

Page 287: ...NG and the number to be dis played or printed becomes 0 the last 0 is dropped Example If decimal places are set with USING If A 0 1 0 1 will be displayed If A 0 01 0 will be displayed instead of 0 0 O...

Page 288: ...cause interference to radio or television reception which can be deter mined by turning the equipment off and on the user is encouraged to try to correct the interference by one or more of the follow...

Page 289: ...A DIVISION OF TANDY CORPORATION U S A FORT WORTH TEXAS 76102 CANADA BARRIE ONTARIO L4M 4W5 TANDY CORPORATION 3A3 AUSTRALIA 91 KURRAJDNG ROAD MOUNT DRUm N S W 2770 BELGIUM PARe INDUSTRIEL DE NANINNE 5...

Reviews: