Tahoe of Contents Page INTRODUCTORY NOTE ..ot clannishness e sans 3 CHAPTER 1. HOW TO USE THIS MANUAL. .oversensitive 5 CHAPTER 2. INTRODUCTION TO THE PC-1245 7 7 Description of System . Description of Keys. . . 8 Description of Display ALL RESET Button. . 12 14 Cel! Replacement CHAPTER 3. USING THE PC-1245 AS A CALCULATOR. . Starr Up P Shut Down, .. .. Auto OFf .. Some Helpful Hints Key operation. Simple Calculations . . Recalling Entries . Serial Calculations. Negative Numbers . .
Table of Contents Page Relational Expressions . . . Logical Expressions Parentheses and Operator Precedence . . . Calculator Made Functions .. CHAPTER 5. PROGRAMMING THE PG-1245 Programs . BASIC Statements . Line Numbers. . . BASIC Verbs BASIC Commands. salaam Beginning to Program on the PC-1245 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.
Tabla of Contents Page Pseudo variables 127 Numeric Functions . L1128 Siring Functions . 133 CHAPTER 9. TROUBLESHOOTING PP L. 136 Mac hire Operation .-135 BASIC Debugging 136 CHAPTER 10. MAINTENANCE OF THE PC-1245 137 APPENDICES Appendix A: Error Messages nae e Appendix B: ASCII Character Code Chart . . Appendix C: Formatting Output Appendix D: Expression Evaluation and Operator Priority . .
Introductory Note INTRODUCTORY Welcome 1o the world of SHARP owners) Few industries in the world today can match the rapid growth and technological advances being made in the fled of personal computing. Computers which just a short time ago would have filled a huge room, required a Ph. O. to program, and cost thousands of dollars, now fit in the palm of your hand, are easily programmed, and cost so little that they are within the reach of nearly everyone.
How to Use This Manual CHAPTER 1 HOW TO USE THIS MANUAL This manual s designed to introduce you to the capabilities and features of your PC-1245 and to serve as a valuable reference tool. Whether you are a “first time wiser” or an “old hand” with computers, you should acquaint yourself with the PC-1245 by reading and working through Chapters 2 through 6. * Chapter 2 describes the physical features of the PG-1245.
Haw te Uso This Manual * Chapter 10 — The care and maintenance of your new computer, Petaled Appendices, at the end of the manual, provide you with useful charts, comparisons, and special discussions concerning the use and operation of the PC-1245. Using the Hard Cover When the computer is not being used, mount the hard cover on the operation panel of the computer.
Introduction to the PC-1245 CHAPTER 2 INTRODUCTION TO THE PC-1245 “The SHARP PC-1245 system consists of: * Character keyboard. * 1-character display. * Powerful BASIC in 24KB ROM. * 8-bit COS processor. * 2.2KB RAM. * option: CE-126 Printer/Microcassette Recorder. t DOCKET COMPUTER To familiarize you with the placement and functions of parts of the PC.1245 keyboard, we will now study each section of the keyboard. For now just locate the keys and read the description of each.
transduction to the PC-1245 DESCRIPTION OF KEY: (A~ [(Z7] Alphabet keys. You are probably familiar with these keys from the sPC Person [Enter] standard typewriter keyboard. On the PC-1245 display the characters always appear in the upper case, Equals key. On the PC-1245 this key is nat used to indicate the end of a calculation; in BASIC programming this symbol has a special function, S Pace key.
Introduction to the PC-1245 Up Arrow key. Press this key 1o display the previous program line, Backspace key. This key altos you to move the cursor to the left without erasing previously typed characters. Pressing [ERST) before pressing this key will Delete whatever character the cursor is “on top of”. Forward key. This key allows you to move the cursor to the right without erasing previously typed characters.
introduction tc the PC-1245 RUN' £ Use this power slide switch to turn ON and OFF the PC-1245. Notice fin = o that the machine is ON when this switch is positioned in any one of two modes, RUN and Program. 9 17} Number keys. The layout of these keys is simile to that found on the standard calculator, Number key. Pressing [S87] and then this key produces a left parenthesis. Number key. Pressing and then this key produces a right parenthesis. Clear key.
a v Introduction to the PG-1245 @ These three characters are found above the zero, decimal point and 3 keys. They are displayed by pressing and then the character under the symbol desired. BUSY P DEGRADE SHIFT Y 158 INPUT “WORD?" | The liquid crystal display of the SHARP PC-1245 shows up to 16 characters at one time. Although you may input up to 80 characters including in one line, only the first 16 characters are displayed.
Introduction to the PC-1245 e Reset button ALL RESET: Reset button. This button is used 1o taser the computer when Clear or CA is not sufficient to correct the problem, NOTE To reset the PC-1245 hold down any key on the keyboard and simultaneously press the RESET button on the back. This preserves all programs, variables, and reserve memory.
Introduction ta the PC-1245 PC-1245 the avow for the clover display, and wrn It in the opposite direction for the dimmer display. Adjust it so that the display is easy to see. the Table Beside the Display RAM 2.2K BYTE ~( = 1488 STEPS 26 MEMORIES [« FREE STEPS MEM (B ~® FREE MEMORIES indicates the available program size for the computer {1486 steps or 1486 neophyte, o & (D0 Indicates the RAM capacity in the computer (2.2 KB}. (3 Indicates the number of memory locations {space for 26 fixed variables).
Introduction to the PC.1245 CELL REPLACEMENT The PC-1245 operates on the lithium cell alone. When connected to the CE-125, the PC-1245 can also be supplied from the CE-125 if it has enough power voltage and the lithium cel! power decreases. This minimizes the power consumption of the lithium cell. When replacing the cells these cautionary instructions will eliminate many problems: # Always replace both of the cells at the same time.
introduction ta the PC-1245 {3) Removes the cell cover by siding it in the direction of the arrow shown in Figure 2. il cover Always replace both of the cells at the same tire. Lithium cell Fig. 3 {5} Replace the cell cover by sliding it in the reverse direction of the arrow shown in figure 2. (8) Hook the claws of the back cover into the slits of the computer proper. (Fig.
introduction to the PC-1245 {7} Push the back cover in slightly while replacing the screws. {8) Turn on the computer by setting the power slide switch to the ON position and press the RESET button to clear the computer. The display should look like this: ota & L Prompt symbol If the display is blank or displays any other symbol than the prompt remove the cells and install them again, then sack the display.
Using the PC-1245 as 2 Calculator CHAPTER 3 USING THE PC-1245 AS A CALCULATOR Now that you are familiar with the layout and components of the SHARP PC-1245, we will begin investigating the exciting capabilities of your new computer. Ba cause the PC-1245 allows you the full range of calculating functions, plus the increased power of BASIC programming abilities (useful in more complex calculations), it is commonly referred to as a “smart” calculator.
Using tha PC-1245 as a Calculator The PROMPT (2>} tells you that the PC-1245 is awaiting input. As you enter data the prompt disappears and the CURSOR moves 1o thé right indicating the next available {ovation in the display. “The right and left (&1 arrows move the cursor within a line, informs the PC-1245 that you are finished entering data and signals the computer to perform the Indicated operations. YOU MUST PRESS THE END OF EACH LINE OF INPUT OR YOUR CALCULATIONS WILL NOT BE ACTED UPON BY THE COMPUTER.
Using the PC.1246 as 8 Calculator Key aeration Now let's operate the keys. Set the switch to RUN and press the following keys while watching the display: (Example} ZXC_ ZXC12.3. M5B > A=4t5_ t Cursor If you press an alphabet or number key, the item denoted on the key will be entered. When you wish to enter the character or symbol denoted abase each key, pass [EFT) before operating the key. {Example} Clears the display.
Using the PC-1245 =5 a Calculator 150 (v 100. 0 18] 053 ) (seem) [EER) 609. 100. (Eia) 6. 283185307 &) L) L4 [Rite) 8. Recalling Entries Even after the PC-1245 has displayed the results of your calculation, you can re display your last entry. To recall, use the left & and right () arrows. The left arrow (& recalls the expression with the cursor positioned after the last character, The right arrow [ recalls the expression with the cursor positioned “on top of” the first character.
Using tha PC-1246 as a Calculator On second thought you decide that groups containing an odd number of participants might be more effective. Recall your fast entry using the arrow. oot Display. To calculate the new number of groups you must replace the six with an odd number. Five seams to make more sense than seven. Because you recanted using tha (&0 arrow, the curse is positioned at the end of the display. Use the (4] to move the cursor one space to the left.
Using the PC-1245 as a Calculator Even a tired, overworked manager like you realizes that 6 does not seem 1o be a reasonable result when you are dealing with hundreds of people! Recall your entry using the[ 5. input Display Because you recalled using the IF the flashing cursor is naw positioned over the first character in tha display. To correct this entry you wish to insert an added ere. Using the[ 1, move the cursor until it is positioned over the zero.
Using the PC-1245 as a Calculator The results seem much too large. {f you only have 388 people attending the meeting, how could you have 60% “small groups’*? Recall your entry using the [P . Input Display 3000/5 The flashing cursor is now positioned over the first character in the display. To correct this entry eliminate one of the zeros. Using the (%71 move the cursor to the first zero {or any zero). When deleting a character, you position the cursor “on top of * the character to be deleted.
Using the PC-1245 as a Calculator Recalling your last entry is essential when you get the dreaded ERROR massage. Let us imagine that, unintentionally, you typed this entry into the PC-1245: Input Display D &0 (o150 [Eden ERROR 1 Naturally you are surprised when this message appears! ERROR 1 is simply the computer's way of saying, ”I don't know what yau want me to do here™. To find out what the problem is, recall your entry using either the (30 or arrow.
Using the PC-1245 23 a Calculator Of this amount you plan to use 15% for the final night's awards presentation. When performing serial calculations it i not necessary to retype your previous results, but DO NOT Clear between entries. What is the awards budget? Input ) 00 D 150 45000 x. 15_ Notice that as you type in 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.
Sirius the PC-1245 as a Calculator Negative Numbers Since you want the awards dinner to be really special, you decide o stay with the planned agenda and spend the additional money. However, you wonder what percentage of the total budget will be used up by this item. First, change the sign of the remaining sum: Input Display o6 = (D) 1 [ 675.
Using the PC.1245 as a Calculator When performing compound calculations, the PC-1245 has specific rules of expression evaluation and operator priority (see APPENDIX DJ. Be sure you get the calculation you want by using parentheses to clarify your expressions: (675+6750) / 45000 or / 45000) To illustrate the difference that the placement of parentheses can make, try these 1wo examples: Input Display 8 = [ ¢.
Using the PC-1245 as a Calculator Input Display (104 (5080 aloe =D m (enter) 37675, As you press the PC-1245 performs the calculation and displays the new value of R. You can display the current value of any variable by entering the alphabetic character it is stored under: Input Display {ENTER 37575, You can then perform calculations using your variable.
Using the PC-1248 as a Calculate There are certain imitations on the assignment of variables, and certain programming procedures which cause them to be changed. See Chapter 4 for a discussion of assignment. See Chapter & for a discussion of the use of variables in programming.
Concepts and Terms bf BASIC CHAPTER 4 CONCEPTS AND TERMS OF BASIC In this Chapter we will examine some concepts and terms of the BASIC language. Because the PC-1245 uses many features of BASIC when used as a calculator, some of these concepts are also useful for advanced calculator functions. Numeric Constants In Chapter 3 you entered simple numbers for use in calculations, without worrying about the different ways that numbers can be represented, or the range of numbers that the SHARP PC-1245 can process.
Concepts and Terms of BASIC 1234 becomes 1,234 times 18° (3 places to the right) 654321 becomes 8.54321 times 19° (5 places to the right) 0125 becomes 1.25 times 10~ (4 places to the deft) Scientific notation is useful for many shortcuts. You can see that il would take 4 Tat of writing to show 1.0 times 19%7 — a 1 and 87 zeros! But, in scientific notation this number looks kite this: 1.
Concepts and Terms of BASIC The decimal system Is clinic one of many different systems to represent numbers, Another which has become quite important when using computers is the hexadecimal system. The hexadecimal system is based on 16 instead of 16, To write hexadecimal numbers you use the familiar @~ 9 and 8 more “digits”: A, B,C,D, E, and F.
Concepts and Terms of BASIC In addition to constants, whose values do not change during & program, BASIC has variables, whose values can change. Variables are names used to designate locations where information is stored.
Concepts and Arms of BASIC Arrays are created using the DIM verb or command. Ta create an array you give its name and its size: DIM X {5) DIM Y {32} Note that DIM X{8} actually creates an array with six entries: Similarly DIM Y(2, 2) creates an extra @ row and a extra @ column: Y@.e o van Yi8,2) Y{,0 Y0 v, Yz, 1) This extra element, or row and column, is often used by programmers to hold partial products during computations. For example, you might total the elements of the X stray by summing them into X(g).
Concepts and Terms of BASIC Loc. Num, Var. Str, Var. Num, Arr.Var, Str. Arr. Var, AS{1) 2 B BS Al2) AB(2} AS{3) 4 o D$ Al4) ASL) 22 w w$ A(23) 24 X X$ A{24) 25 Y Y§ A{25) 26 z z$ A28} AS(26) NOTE: There are only twenty-six locations and you must be careful not to use the same location in two different ways. 1f you use location 24 to store a numeric value in X and thee iry to print XS, you will get an ERROR 9.
Concepts and Terms of BASIC Numeric Operators. | The PC-1245 has five numeric operators, These are the arithmetic operators which you used when exploring the use of the PC-1245 as a calculator in Chapter 3: + Addition Subtraction X Multiplication / Division A~ Power A numeric expression is constructed in the mass way that you entered compound calculator operations.
Concepts and Terms of BASIC NOTE: String quantities and numeric quantities cannot be combined in the same expression unless one uses one of the functions which convert a string value anti a numeric value or vice versa: “16” 419 Is illegal 54 g is 1510, not relational expression compares two expressions and determines whether the stated relationship is True or False, The relational operators are: > Greater Than > = Gr ester Than or Equal To = Equals <> Not Taegu Te < = Less Than or Equal To < Less Than The f
Concepts and Terms of BASIC LT NN Y Logical expressions are relational expressions which use the operators AND, OR, and NOT.
Concepts and Terms of BASIC Thus, 1 Is inverted to 0, and O to 1 for each bit, which is called “to take negative {NOT" Then, the fallowing will result when 1 and NOT 1 are added together: (1) +) (NOT 1) VTN =1 Thus, all bits become 1.
Concepts and Terms of BASIC I you are a proficient programmer, there are certain applications where this type of operation can be very useful.
Concepts and Terms of BASIC LOG is a function which computes the log to the base 10 of its argument. LOG s 2 LOG (1006} w3 A function can be used any place that a variable can be used, Many functions do not require the use of parentheses: LOG 10¢ 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 Chapter 8 for @ complete list of functions available on the PC-1245.
Programming the PC-1245 CHAPTER 5 PROGRAMMING THE PC-1245 In the previous chapter we examined some of the concepts and terms of the BASIC programming language. In this chapter you will use these elements to create programs on the PC-1245. Let us reiterate however, this is not a manual on how to program in BASIC. What this chapter will do is familiarize you with the use of BASIC on your PC-1245. [l 1B A program consists of a set of instruction to the computer, Remember the PC-1245 is only a machine.
Programming the PC-1245 19: PRINT “HELLO" 2% READ B (18} 30: END Some statements require or allow an operand: 1¢: PRINT “HELLO™ 26: READ B(18) 3¢: END Operands provide information to the computer telling it what data the verb wilt act upon. Some verbs require operands, with either verbs they are optional. Certain verbs do not allow operands.
Programming the PC-1245 Begin hing to Program.on tha PC.1245 After all your practice in using tha PC-1245 as a calculator you are probably quite at heme with the keyboard. From now on, when we show an entry, we will not show every keystroke. Remember to use [SHIFT) to access characters brave the keys and END EVERY LINE BY PRESSING THE [Ewer! KEY.
Programming the PC-1245 T g a Program Suppose you wanted to change the message that your program was displaying, that is you wanted to edit your program. With a single line program you could just retype the entry, but as you develop more complex programs editing becomes a very important component of your programming, Let’s edit the program you have just written. Are you still in the RUN mode? 1f so switch back to the Program made, You need to recall your program in order to edit it.
Programming the PC-1245 This is a new kind of error message. Not only is the error type Identified {our old friend the syntax error) but the ling number in which the error veers is also indicated. Switch back into the Program mode. You must be in the Program mend 1o make changes in a program. Using the 1, recall the last line of your program, input Display t 10: PRINT “GOOD" ] The flashing cursor is positioned over the problem area.
Programming the PC-1245 Remember to press [ENTER] so the correction will be entered into the program. NOTE: 1f you wish to Delete an entire line from your program just type in the fine number and the original line will be eliminated. 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 programming allows much more sophisticated use of the PC1245's computing abilities.
Programming the PC-1245 As your programs get more complex you may with 1o review them before you begin execution. To gook at your program, use the LIST command. LIST, which can only be used In the Program made, displays programs beginning with the lowest line number. Try listing this program: input Display LIST 10: INPUT “WORD?” Use the [T and [ arrows to move through your program until yous have reviewed the entire program.
Programming the PC-1245 When you have stopped a program using the [ea: key, you can restart it using the CONT command. CONT stands for Continue. With the CONT command the program will restart on the fine which was being executed when the [sr key was pressed, naming The following program computes N Factorial The program begins with 1 and computes N! up 1o the limit which you enter. Enter this program.
Programming the PC-1245 You may use any numeric variable in a FOR/NEXT too. You lase do not have to start counting at 1 and you ean add sny amount at each step.
Programming the PC-1245 “The following table shows the number of bytes used to define each variable and the number used by each program statement. Variable Variable name Data Numeric array variable 8 bytes B bytes String stray variable 6 bytes Specified number of hytes™ * Far example, if DIM specified, 12 variables, each capable of storing 10 characters, are reserved. This requires B bytes {variable name) + 10 bytes {number of characters) x 12 = 126 bytes.
Shortcuts CHAPTER 6 SHORTCUTS The PC-1245 includes several features which make Programming mare convenient by reducing the number of keystrokes required to enter repetitive material, One such feature is in the availability of abbreviations for verbs and commands (See Chapter 8) This chapter discusses the additional feature which can eliminate unnecessary typing — the DEF key.
Shakeouts b One template is provided with the PC-1245. You can use this template to help you remember frequently used DEF key assignments. After you have labeled the programs, mark the template so you know what is associated with each key. You gan then execute programs using the two-keystroke operation.
Printer/Microcassette Recorder CHAPTER 7 USING THE CE-125 PRINTER/ MICRO CASSETTE RECORDER The CE-125 Printer/Microcassette Recorder allows you to add a printer and micro cassette recorder to your SHARP PC-1245 Pocket Computer, The CE-125 features: * 24 character wide thermal printer with approximately 48 line per minute print speed. Convenient paper fade and tear bar, Simultaneous printing of calculations as desired.
Printer/Microcassette Recorder EXTERNAL PLAYBACK UNIT CASSETTE CONNECTION JACK COMPARTMENT TAPE COUNTER RESET BUTTON AC ADAPTER CONNECTION JACK: TAPE COUNTER CHECK CONNECTOR 1 PRINTER o sec oL P STOP/EJECT PAPER FEED KEY BUTTON PRINTER SWITCH FAST-FORWARD LOW BATTERY INDICATOR BUTTON { w¢} REMOTE SWITCH REWIND BUTTON { CONNECTOR PLAY BUTTON {4} RECORD BUTTON PRINTER/MICROCASSETTE RECORDER (Front view} In the lower left corner of the machine is the cradle where you will connect the PC-1245 to the CE-125.
Printer/Microcassatte Recorder The CE-125 is powered by & rechargeable Mi-Cad battery. It is necessary to recharge the battery when the low battery indicator acmes ON. To recharge the battery, turn the computer and interdependence power OFF, connect the AC adapter {EA-23E) to the printer/recorder, and plug the AC adapter into a wall outlet. It will take about 15 hours before the battery is fully changed.
Printer/Microcassette Recorder Always connect the recharge to the CE-125 fists. Then plug the recharge into the wall socket. When the batteries in the CE-125 become discharged, the low battery indicator on the front of the unit lights up and the unit will not function. At this pant you must recharge the batteries. When you first receive your CE-125 it is Likely that the batteries will have inadequate charge due to storage. The unit will require charging before its first use.
Printer/Microcassetts Recorder 5. To use the printer, turn on the PC-1245 and then the CE-125. Press the [CL) key. If the (€0 key is not pressed, the printer may not operate, Note: If executed when the printer switch is set at the OFF position, printing causes an error (ERROR code 8). {Low battery indicator may lit at the moment.} In this case, turn the printer switch to ON position, and press the key.
Printer/Microcassette Recorder loading the Paper (1) Turn off the printer switch. {(2) Pen the paper cover. {Fig. 1} "Paper cover {3) Insert the leading edge of the roll of paper into the slot located in the paper tape compartment. (Fig. 2} {Fig. 3} {Any curve or crease near the beginning of the paper makes insertion difficult.} NOTE: Use of irregular paper tape may cruse sober ape ol irregular paper Seeding or paper misdeed. Therefore, be sure to tighten the tall before using a shown in the figure.
Printer/Microcassette Recorder (5} Install the roll of paper into the compartment, (6} Close the paper cover. {Fig, 5) Paper cover ® If iris necessary to remove the paper, cut the paper an the paper roll compartment side and pull the remaining paper through the printer in the direction of normal paper movement, Do not pull the paper backwards as this may cause damage to printer mechanism.
Printer/Microcassette Recorder Programs which have been written with PRINT ean be converted to work with the printer by including a PRINTMAKING statement in the program (see Chapter 8 for details). Al PRINT statements following this statement will act as if they were PRINT statements. PRINT=PRINT will reset this condition to irs normal site, This structure may also be included in a program in an |IF statement allowing & choice of output 8t the time the program is used.
Printer/Microcassette Recorder UNLOADING THE CASSETTE TAPE 1. Depress the STOP/EJECT {W) button to open the cassette compartment Hd and remove the taps, 2. Press the cassette compartment lid down. Note: In the PLAY mode press the STOP/EJECT button once to stop the tape movement. Press it again to eject the taps. Uss the manual controls for positioning the tape. Set the 'REMOTE’ switch to OFF.
Printer/Microsassetts Recorder When a program or data is recorded on tape i1 will be preceded by a high pitched tone of approximately 7 seconds. This tame serves to advance the tape past any leader and 1o identify the beginning of each program or set of data. When searching for a filename, the tape can read only in a forward direction. This search is relatively slow, so it is sometimes preferable 1o keep track of program locations by using the tape counter.
Printer/Microcassette Recorder Care and Maintenance * Be sure that the power is OFF on both units when connecting or disconnect ing the CE-125 and the PC-1245. The printer should be operated on a level surface. Tha CE-125 should be kept away from extreme temperatures, moisture, dust, and loud noises. * Use a soft, dry cloth to clean the CE-125. DO NOT use solvent or a wet cloth. » Esp foreign objects out of the CE-125. * Clean tape heads periodically with any standard head cleaning kit.
Printar/Microcassatte Recorder finger than 7 characters, the access is ignored. Good practice is to maintain a program fog, which includes the program name, starting and stopping location on tape (use the counter numbers), and a brief description of what the program does. Press tenterhook. At this time you should hear a shrill buzzing sound, and the tape should be turning. Also the “BUSY" indicator should light up. This tells you that the computer is “busy” transferring your program from memory to the tape.
Primer/Microcassette Recorder The computer compares the C Saved program with the one in its memory. FE all went-well, it will display the “‘prompt” and end its check. If all did not go wall, an error massage will be displayed, usually ERROR 8. This tells you that the program on tape Is somehow different from the program in SHARP's memory. Erase that portion of tape and sitar again, 3.
BASIC Reference CHAPTER 8 BASIC REFERENCE The following chapter is divided into thees sections! Commands: Instructions which are used outside a program to change the working environment, perform utilities, or control programs. Verbs: Action words used in programs to construct BASIC statements, Functions: Special operators used in BASIC programs 1o change one variable into another. Commands and verbs are arranged alphabetically. Each entry is on a separate page for easy reference.
BASIC Reference Control and Branching CHAIN END FOR...TO...STEP Gooses GOT iF THEN NEXT ON GO SUB ON...
BASIC Reference Functions Pseudo variables Numeric Functions IN KEYS ABS MEM ACS Pl ASN ATN String Functions cos ASC DEG CHRIS DMS LEFTS$ EXP LEN INT MID$ LOG RIGHTS LN STIRS RND VAL SGN SIN SQR TAN 68
Commands CLOD COMMAND. > 1 CLOD ‘ ! 2 CLOD “filename” Abbreviations: CLEW, COLA. See also: CLOACA, CAVE, MERGE, PASS The CLOD command is used to load a program saved on cassette tape.
Commands CLOD? ; |1 CLOD? | \ 2 CLOD? “filename” | | . Abbreviations: CLOCK, COLA? See also: CLOD, CAVE, MERGE, PASS I The CLOD? command is used to compare 2 program saved on cassette ape with one stored in m Memory. It can only be used with the optional GE-125 Printer/ Micro cassette Recorder. The first form of the CLOD? command compares the program stored in memory with the first program stored on the tape, starting at the current position.
Commands CONT [Hi Cont L Abbreviations: C., CO., CON, See also: RUN, STOP vert Purpose The CONT command is used 1o continue a program which has been temporarily halted.
Commands CAVE 1 CAVE 2 CAVE “filename’” 3 CAVE, "@sword" 4 GAVE “filename”, “password” Abbreviations: CS., CS, CS AV, See also: CLOD, CLOACA, MERGE, PASS The CAVE command is used to save @ program to cassette tape. 1t can only be used with the optional CE-126 Printer/Micracassette Recorder. Tha first form of the CAVE command writes all of the programs in memory on to the cassette tape without @ specified file name.
Commands GOT 1 GOT expression Abbreviations: G., GO., GOT. See also: RUN | ) The GOT command is used to start execution af a program, L5 The GOT command cen be used in place of the RUN command to start program execution at the line number specified by the expression. GODOT differs from RUN in five respects: 1) The value of the interval for WAIT is not reset, 2} The display format established by USING statements is not cleared, 3) Variables and arrays are preserved.
Commands List 1 LIST 2 LIST expression | Abbreviations: L., Lk, LIS See also LILTS —J The LIST command is used to display a program. The LIST command may only be used in the Program mode. The first form of the LIST command displays the statement with the lowest line number. The secant form displays the statement with the nearest fine number greater than the value of the expression, The Up Arrow and Down Arrow keys may then be used to examine the program.
Commands LILTS ! 1 LILTS ‘I 2 LILTS expression 1 » Expression 2 Abbreviations: LL., LLL, LLS, See also: LIST [ The LILTS command is used for printing a program on the optional CE~125 Prints/ Micro cassette Recorder. The LILTS command may only be used in the Program mads. The first form prints alf of the programs in memory.
Commands MERGE 1 MERGE l 2 MERGE “filename’ | Abbreviations: REM, GERM. See also: CLOD, CLOACA, CAVE, PASS verb T3S The MERGE command is used 10 Joan a program saved on cassette ape and merge it with programs existing in memory. 1t can only be used with the optional CE-125 Printer/Microcassstie Recorder, “The first farm of the MERGE command loads the first program stared on the tape starting at the current position and merges it with program already in memory.
Commands MERGE At this point you remember that You have a similar program portion on tape under the filename “DEP1™. You will, of Louise, want to see if this program has sections useful in the program you are currently constructing. The first step is 10 find the tape with “DEPT” on it, Cue the ape to the place at which “DEPT* starts, Now type: MERGE “DEPT” and press [ENTER]. The computer will now load “DEPT” into memory IN ADDITION 1o the above program.
Commands MERGE 10 75" REM THS IS MERGED PROGRAM 20 INPUT "ENTER DEPRECIATION: INPUT “NUMBER OF YEARS: ;¥ | 40 ete. Now you may make changes to the above program since it was the last MERGED portion. LINKING MERGED MODULES (programs) TOGETHER Ginger the processor executes your program Junes in logical sequence, It will stop when it encounters a break in the sequence in line numbering, t.e.
Commands NEW ‘r 1 NEW . ] Abbreviations: bane ] Loge e The NEW command is used 1o clear existing program, *L] When used in the Program mode the NEW command clears sl programs and data which are currently in memory. (The programs with password cannot be cleared.} The NEW command is not defined in the RUN mode and will result in an ERROR . NEW Clears program or data.
Commands PASS PASS “character siring” ! Abbreviations: PA., PAS. See also: CAVE, CLOD | The PASS command is used to set and cancel passwords. Passwords are used to protect programs from inspection or modification by other users, A password consists of a character string which is no mote than seven characters long, The seven characters rust be alphabetic or one of the following special symbols: Once & PASS command has been given the programs in memory are protected.
Commands Verbs RUI AREAS 1 RUN 2 RUN fine number : Abbreviations; R., R, See also: GOT The RUN command is used to execute a program in memory, The first form of the RUN command executes a program beginning with the lowest numbered statement in memory. specified line number, RUN differs from GOT in five respects: 1} The value of the interval for WAIT is reset.
Verbs AREAS [— 1 AREAS variable name ! | See also: INPUT verb and discussion of the use of the DEF key in \ Abbreviations: A, AR., ARE., AREA. Chapter The AREAS verb Is used to read in single value to & program which is started using the TER key. When a program is ta belted with a letter, s0 hat it can be started using the BEF ey, the AREAS verb can be used to enter @ single starting value without the use of the INPUT verb.
Verbs BEEP ® When the display indicates PRINT numeric expression, numeric expression or PRINT “String”, "String”, the contents on the Fight of the display aré stored, Example: When the program below is executed; 10 "A": PRINT “A BC”, “DEF AREAS AS: PRINT A$ RUN mods BER (3] ABC DEF e (5] ~ DEF ® When the display indicates PRINT Numeric expression; Numeric expression; Numeric expression...
\ 2 CHAIN expression i | 3 CHAIN “fig name” \ \ 4 CHAIN “filename, expression | — | Abbreviations: CH., CHA. TEAL \ Seo also: CLOD, CAVE, and RUN | e Dotty I The CHAIN verb is used to start execution of & program which has been stored on cassette tape. ft can only be used in connection with the optional CE-125 Printer/ Micro cassette Recorder. To use the CHAIN verb one or more programs must be stored on a cassette.
Verbs CHAIN For example, let's assume you have three Program sections named PRO-1, PRO-2, PRO-3. Each of these sections ends with 8 CHAIN statement, “PRO.1* indicates the position of the tape . recorder head.) File name “PRO-3" Magnetic tape g‘ Execution Y P — 400: CHAIN Fife name “PRO-2" 400: CHAIN “PRO-2", 410 = 410: 5 5 700: CHAIN | File name — “PRO-3" 700: CHAIN “PRO.
Verbs CLEAR 1 CLEAR Abbreviations: Cl.. CL, LEA. See also: DIM The CLEAR verb is used to erase all variables which have been used in the program and to reset all reciprocated variables o ere or NUL. The CLEAR verb recovers space which is being used 1o store variables, This might be done when the variables used in the first part of a program are not required in the second part and available space is limited.
Verbs DEGREE F 1 DEGREE T Abbreviations: DE., DEG., DEG, EDGER, J‘ See also: GRAD and RADIAN and ATN functions. The DEGREE function changes the form for all angular values to decimal degree from unit 2 GRAD or RADIAN verb is used, The DMS and DEG functions can be used to convert decimal degrees to degree, minute, second form and vice versa, 18 DEGREE 20 X= ASN 1 X now has a value of 90, i.e. 9¢ degrees, the Arc sine of 1.
Verbs DATA \ 1 DATA expression [ist \ | Where: expression list is2 expression i \ or: repression L expression Vst \ | Abbreviations: DA., DAT. | \ See also: READ, RESTORE The DATA verb is used to provide values for use by the READ verb. When assigning Initial values to an array, it is convenient 10 Vst the values in @ DATA statement and use 3 READ statement in 3 FOR NEXT atop to load the values into the array.
Perks DIM Where: dim List dimension spec, ’ or: ( and: dimension spec. is: numeric dim}i ‘ ! or: string dim spec.
Verbs DIM When a numeric array is dimensions, all values are initially set to zero; in a string array the values are set to NUL. Al ) and AS( ) may be dimension ed to sizes larger than 26 with the DIM statement, In this case, part of the array is in the reciprocated memory and part is in program memory. See Chapter 4. 1% DIM B(19) Reserves space Tor a numeric array with 11 elements.
Carbs END END Abbreviations: E. EN, -J The END verb is used to signal the end of a program, When multiplier programs are loaded into memory at the same time s mark must be included to indicate where each program ends so that execution does not continue from one program ta another.
Verbs FOR scion EOR numeric variable = expire 2 FOR alphanumerical = ex Pres — | \ STEP expression 3 | Abbreviations: F.and FO.; STE. See also: NEXT | The FOR verb is used in combination with the NEXT verb to repeat 2 series of operations & specified number of times. The FOR and the NEXT verbs are used in pairs to enclose a group of statements which are to he repeated.
Verbs FOR The group of statements enclosed by a FOR/NEXT Pair can include another pair of FOR/NEXT statements which use a different loop variable as long as the enclosed pair is completely enclosed; ie., if a FOR statement is included in the group, the matching NEXT must also be included. FOR/NEXT pairs may be “nested” up to five Revels deep. W FOR [TOSS This group of statements prints the numbers 1, 26 PRINT | T 2,3,4,5.
Verbs Gossip 1 GO SUB expression | \ Abbreviations: HOS, GOSH. ‘ ‘ See also: GOT, ON GO SUB, ON . ..GOT, RETURN J The GOURD verb is used to execute a BASIC subroutine. When you wish to execute the same group of statements several times in the course ot a program of use @ previously written set of statements in several programs, it is convenient to use the BASIC capability for subroutines using the GO SUB and RETURN verbs.
Derby GOT F 1 GOT expression ‘I Abbreviations: G., GO., GOT. r | L Sse also: GO SUB, ON ., GO SUB, ON...GOTD The GOT vert is used to transfer control to a specified fine number, The GOT verb transfers control from one location in a BASIC program to another location. Unlike the GO SUB verb, GOT does not *“remember” the location from which the transfer occurred. The expression in a GOT statement may not include a comma, e.g, ‘A1, 2) cannot be used.
Carbs GRAD r i 1 GRAD Abbreviations: GR., GRA. Sec also: DEGREE and RADIAN pose The GRAD verb is used to change the form of angular values to gradient farm, The PC-1245 has three forms for representing angular values — decimal degrees, radians, end gradient. These 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.
Verbs IF. .. THEN 1 IF condition THEN statement 1 2 IF condition statement | L Abbreviations: none for IF, T, TH., THE. The IF THEN verb pair is used to execute of not execute a statement depending on conditions at the time the Programmer is run, Use In the normal running of a BASIC Programs, statements are executed in the sequence in which they occur.
Carbs NUT 1 INPUT input list ‘ | nut HS% Where: ijputlisl is: Input group \ ot: input group. annalist | and: input group is: var list | or: prompt, var list \ or: prompt ; var fist \ and: var list is: variable | or: variable , var list | \ and: prompt is: any during constant i | Abbreviations: 1., 1N, NIP, INPUT. \ 1 See also: INPUT #, READ | s The INPUT verb is used ta enter one of more values from the keyboard.
Verbs INPUT If the [Enter key Is pressed and no input is provided, the variable retains the value it had before the INPUT statement. 18 INPUT A Clears the display and puts a question mark at the left edge. Displays ‘A=" and waits for input data. Displays ‘A=, When data is input ‘A = disappears and the data is displayed starting at Tet edge. 40 INPUT Displays.'X =7 and waits for first input. After is pressed, display is cleared and 'y =pr is displayed at left edge.
Verbs INPUT # 1 INPUT # 2 INPUT # “filename” 3 INPUT # var list 4 INPUT # “filename'; var list Where: var list is: variable or: variable , var fist Abbreviations: INEPT, INPUT. # See also: INPUT, PRINT #, READ [0 The INPUT # verb is used to enter values from the cassette tape, PRINT # saves the values of variables on tape. They can then be read back into the same or another program using the INPUT # verb.
Verbs INPUT % 1) 28 INPUT# A Reads values from the current position of the tape. 2} 20 INPUT # A3} Reads values from the current position of the tape and assigns the values to the variables A(3) ~ A(28) force) and A{27) ~. 3} 20 INPUT # “FILL; A Searches the tape for the file ‘F|L2" and reads in values, 4) 20 INPUT # "FILL; G Searches the tape for the file FLY and reads in G and as many values are available, NOTES: 1.
Vars LET 1 LET va 2 variable = expression expression Abbreviations: LE. The LET vert is used to assign 8 value to a variable. The LET verb assigns the value of the expression 1o the designated variable. The type of the expression must match that of the variable, i.e. only numeric expressions can be assigned 10 americium variables and ably string expressions can he assigned to siring variables.
Verbs PRINT 2 PRINT print proxy , print exp 3 PRINT pri Print list Where: is: print exp or: print exp ; print list and: print exp is: expression or: USING clause ; expression The USING clause is described separately under USING | | ! Abbreviations: Lp, PR, PERL, PRINT, See also: PAUSE, PRINT, USING, and WAIT The PRINT verb s used to print information on the Printer of the optional CE-125 Printer/Microcassette Recorder.
Carbs NEXT r— 1 NEXT numerate variable . ! Abbreviations: N., NE., NEX, See also: FOR LT The NEXT verb is used to mark the end of a group of statements which are being repeated in a FOR/NEXT poof, The use of the NEXT verb is described under FOR. The numeric variable in a EXT statement must match the numeric variable i the corresponding FOR.
Vars ON ,..GO SUB expression GO SUB retrogression \ ! Where: transgression iz expression \ ar: expression , expression list | | Abbreviation: O.; HOS, GOSH. \ ‘1 Sen also: GO SUB, GOT, ON GOT 4 Purpose The ON GO SUB verb is used to execute one of a set of subroutines depending . on the value of a contra expression. When the ON . .. GO SUB verb is executed the expression between ON and GO SUB is evaluated and reduced 1o an integer.
Verbs ON...GOTo or: Expression , expression fist ' 1 ON expression GOT expression fist ’ ! Where: expression fist is: expression i | Abbreviations: 0; G., GU., GOT. ! See also: GO SUB, GOT, ON...GOosUR The ON...GOTO verb is used to transfer control to one of a ser of Vacations depending on the value of 3 control expression, When the ON GOT verb is executed the expression between ON and GOT is evaluated and reduced to an integer.
PAUSE 1 \ 1 PAUSE printer | i 2 PAUSE print exp¥ print exp \ 3 PAUSE print list | \ Where: print list js: print exp ! or: print expire grim list \ \ and exp st expression | i or: USING clause expression \ \ The USING clause is described separately under USING | | Abbreviations: PAY, PAYS. \ \ See also: PRINT, PRINT, USING, and WAIT Teri] The PAUSE verb is used to print information on the display for a short period. The PAUSE verb is used to display prompting information, results of calculations, etc.
Verbs PRINT PRINT print exp. PRINT print exp , express PRINT print list \ PRINT = PRINT PRINT = PRINT BN or: print exp ; print list and: print exp is expression or: USING clause ; expression | Abbreviations: P, PR, PRI, PREEN. See also: PRINT, PAUSE, USING, and WAIT ‘ | \ Wheres print fist ist printer USING clause is described separately under USING \ The PRINT verb is used 10 print information on {he display or on the printer of the CE-125 Printer/Microcassette Recorder.
Verbs PRINT 18 characters, only tha leftmost 16 appear in the display. There is no way to see the other characters. 10 X5 = “ABERDEEN" Display 20 PRINT A 19, 30 PRINT X§ ABRADE 49 PRINT PRINT A; B; X$ 9.28.
Verbs PRINT # r 1 PRINT PRINT# “filename” 3 PRINT # “var list” ! 2 PRINT # “filename” ; var list I Where: varlet is: variable ‘ or: variable , var list | | Abbreviations: PRI #.GRIN. # | L Seedless INPUT #, PRINT, READ Ty o L] The PRINT # verb is used to store values on the cassette tape. Using PRINT # the values of variables can be saved on tape. These can then be read pack into the same or another program using the INPUT # verb.
Verbs. PRINT # 1} 18 PRINT# A Saves values on the tape at the current Position, 2] 19 PRINT # “Folio; A Saves values on the tape under the filename ‘F1L2’, 3) 18 PRINT # “FILE Gk} Saves G and values on the tape under the filename *Fill, Note: A variable above A(27) or 5 dimensional variable must be secured into the Program/data area before the PRINT #command is executed.
Carbs RADIAN ‘ 1 RADIAN 1 | Abbreviations: RAD., RAD, RADIAN. | l See also: DEGREE and GRAD B The RADIAN verb is used to change the form of angular values to radian form. [ The PC-1245 has three forms for representing angular values — decimal degrades, radians, and gradient. These farms are Used in specifying the arguments to the SIN, €0S, and TAN functions and in returning the results from the ASN, ACS, and ATN functions.
Verbs RANDOM ’ 1 RANDOM L ‘ Abbreviations: RA., RAN., RAND,, RAND. The RANDOM verb is used to reset the seed for random number generation. Use When random numbers are generated using the RND function, the PC-1245 begin with 2 predetermined “seed” or starting number. The RANDOM verb rests this seed to a new randomly determined value, The starting seed will be the same each time the PC-1245 is turned on, so the sequence of random numbers generated with RND is the same each time, unless the seed is changed.
Carbs READ r 1 READ variable list \ Where: variable list ‘ Abbreviations: REA. L variable variable , variable fist See also; DATA, RESTORE The READ verb is used to read values from a DATA statement and assign them to variables. When assigning initial values to an may, it is convenient to list the values 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 thirst DATA statement is returned.
Verbs REM I ‘ 1 REM remark ' Abbreviations: none The REM vert is used to include comments in 3 program, Often it is useful to include explanatory comments in @ program, These can provide titles, names of authors, dates of last modification, usage notes, reminders about algorithms used, etc. These comments are included by means of the REM statement, & a comment, so the REM verb must be the East statement in a line when multiple statement lines are used.
Verbs RESTORE r 1 RESTORE RESTORE expression \ Abbreviations: RES., REST. REST. ROSTER. | et DATA, READ Purpose The RESTORE verb is used 1o reread values in a DATA statement or to change the order in which these values are read.
Verbs RETURN 1 RETURN ] Abbreviations: RE., REGRET, TURRET, RETURN, ’ See also: GO SUB, ON. .. Gossip . 301§ 0T The RETURN barb is used at the end of a subroutine to return contort 1o the statement following the originating GOURD, A subroutine 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 GOURD o GO SUB which calls the subroutine.
Verbs STOP ‘ 1 STOP “ Abbreviations: 8., §T., §TO., 1 See also: END; CONT command The STOP vert is used to gait execution of a program for diagnostic purposes. When the STOP verb is encountered in program exaction the PC-1245 execution halts and a message is displayed such as 'BREAK IN 200' where 208 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 of examine the state of variables.
Carbs TOFF 1 TOFF Abbreviations : TROD, See also: TRON s L Purpose The TOFF verb is used ta cancel the trace made.
Verbs TRON 1 TRON Abbreviations ¢ TR., TRO. | See also: TOFF The TRON verb is used to initiate the trace mode. The trace mode provides assistance in debugging programs, When the trace mode is on, the line number of each statement is displayed after each statement is executed. The PC-1245 then saith and waits for the Down Arrow Key to be pressed before macing on 1o the next misstatement, The Up Arrow key may be pressed to see the statement which has just been executed.
Carbs USING 1 USING 2 USING “editing specification”” 3 USING characteristically Abbreviations: U, US., USL, UNIS, See also: PRINT, PAUSE, PRINT Further guide to the use of USING is provided in Appendix C ‘J The USING verb is used 1o control the format of displayed or printed output, The USING verb can be used by itself or as a clause within a PRINT, PAUSE, or PRINT statement.
19 A=125 : X$= “ABRADE" 2¢ PRINT USING i A 3@ PRINT USING “EBENEEZER XS 49 PRINT USING B THREE A XS Notes: 1. When the Carbs USING Display. [ [ABRADE ] —terse | | _125ABC total number of digits specified with USING exceeds 16 for ”Professionalization, ERROR 7 results. 2, When the number of digits for the integer part {sign and decimal! point included) “PRINT depressing, _expression , expire played. 3.
Verbs WAIT 1 WAIT 2 WAIT expression ; Abbreviations: W., WA, WA, See also: PAUSE, PRINT . | T TTY The WAIT verb is used to contort the length of time that displayed information is shown before program execution continues. In normal exaction the PC-1245 halts execution after 4 PRINT command until the [ENTER] key js pressed. The WAIT command causes the PC-1245 to display for a specified interval and then proceed automatically {scimitar 0 the PAUSE verb).
Functions Psauriovariables [ Pseudosciences are a group of functions which tee no argument and are used like simple variables wherever required. — | 1 IN KEYS L A PINKEYE is a string pseudo variable which has the value of the last key passed on the keyboard. (ENTER) , (L), G, [0, 30, (30, and (3] all have a value of NUL. PINKEYE is used to respond to the pressing of individual keys without waiting for the ENTER key to end the input. 10 A$ = IN KEYS 20 BASIC AS 3¢ If B=0§ THEN GOT 19 49 1IF B...
Functions Numeric Functions Pl is a numeric pseudo variable which has the value of PI, Iris identical to the yse of the special Pl character {n} on the keyboard. Like ‘other numbers the value of Pl is kept to 10 digit accuracy {3.
Functions Pseudo variables ASM is a numeric function which returns the arc sine of the numeric argument. “The arc sine is the angle whose sine is equal to the expression. The value returned depends on whether the PC-1245 sin decimal degree, radian, or gradient made for angles. ASN 5is 3@ in the decimal degree mods. 1 \ 1 ATN numeric expression | _ ATN is a numeric function which returns the arc tangent of the numeric argument. The arc tangent is the angle whose tangent is squeal to the expression.
Functions Numeric Functions 1 EXP numeric expression . —J . EXP is a numeric function which returns the value of e (2.718281828 — the base of the natural logarithms) raised to the value of the numeric argument, EXF § is 2.718281828, [ L 1 INT numeric expression ! INT is a numeric function which returns the integer part of jts numeric argument, Plinths, [ l 1 L0G numeric expression I LOG is a numeric function which returns the logarithm to the base 18 of its numeric argument.
Functions Pssudovariables 1 RND numeric expression RND is a numeric function which generates random numbers. If the value of the argument is lass than one but greater than of equal 1o zero, the random number is less than one and greater than or equal to zero. if the argument is an integer greater than or equal to 1, the result is @ random number greater than or equal ta 1 and less than or equal to the argument.
Functions Numeric Functions 1 8QR numeric expression 8QR is a numeric function which returns the square root of jts argument, It is identical to the use of the special square root symbol (v } on the keyboard. SOR 4is 2, | TAN is a numeric function which returns the tangent of its angle argument.
Functions String Functions | 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 argument and return a string. Some take a numeric value and return a string. Some take a string argument and one or two numeric arguments and return a string. Many dialects of BASIC require the argument of a function to be enclosed in parentheses.
Functions String Functions L 1 MID$ (string expression , num, exp. 1, num, exp, 2) MID is & string function which turns a middle portion of the string first argument. The first numeric argument indicates the first character position 1o he included in the result.
CHAPTER 9 TROUBLESHOOTING Troubleshooting This chapter provides you with some hints on what to do when your SHARP PC-1245 does not do what you expect divided into two parts — the first part deals with general machine operation and the second with BASIC programming. For each problem there are a series of suggestions provided. You should try each of these, one at a time, until you have fixed the problem.
Troubleshooting BASIC Debugging When entering a new BASIC program, it is usual for it not 1o work the firer time, Even if you are simply keying in a program that you know is correct, such as those provided in this manual, it is usual to make st least one typing error.
Maintenance CHAPTER 10 MAINTENANCE OF THE PC-1245 To insure trouble-free operation of your SHARP PC-1245 we recommend following: + Always handier the pocket computer carefully as the liquid crystal display is made of glass. Keep the computer in an area free from extreme temperature changes, moisture, or dust. During warm weather, vehicles left in direct sunlight are subject to high temperature build up. Prolonged exposure high temperature may cause damage 1o your computer.
APPENDIX A Error Massages APPENDIX A ERROR MESSAGES Thar are nine different error codes built into the PC-1245. The following table will explain these codes, Error Number Meaning 1 Syntax error. ® This means that the PC-1245 can’t understand what you have entered. Check for things such as semicolons on the ends of PRINT statements, misspelled words, and incorrect usages, 3%/2 2 Calculation error. Here you have probably done ons of three things: 1.
APPENDIX A Er cor Messages Line Number error. Here you have probably done one of two things: 1. Tried to usa an unstinting June number by the GOT, GO SUB, RUN, LIST or THEN etc. 2. Tried 1o use too large 2 line number, The maximum line number is 998, Nesting error. Subroutine nesting exceeds 10 levels. FOR loop nesting exceeds 5 levels. RETURN verb without a GO SUB, NEXT verb without a FOR, or READ verb without a DATA. Buffer space exceeded, Memory Overflow.
ASS Charterer Code Chart YIS o P CODE CHART s the conversion values for use with CHRIS and ASC. st hex character or the first four binary bits, the row Tater or the second binary bits, The upper left comer of each hox contains the decimal number for the character, The lower right shows the character, {f no character is shown then jt is an illegal character on the PC-1245.
ASCII Character Case Chart First 4 bits PE-1245 does not recognize daces in shaded area. if you enter the code nurturer i the shaded area, an error wilt result.
APPENDIX ¢ Formatting Output 035 1t is sometimes important or useful ta control the format as well the content of output.
APPENDIX C Formatting Output Specifying Number L The desired number of digits is specified using the *# character. Each the sk reserves space for one digit. The display of print always contains as many characters as are designated in the mask. The number appears to the far right of this fetid; the remaining positions to the left are filled with spaces. Positive numbers therefore always have at jest one space at the left of the field.
APPENDIX C Formatting Output A A" character may be included in the mask to indicate that the number is to be displayed in scientific notation. The and characters are used in the mask to specify the format of the “characteristic” parson of the number, ie,, the part which is displayed to the left of the E. Two characters should always be used to the left of the decimal point to provide for the sign character and one integer digit. The decimal point may be included, but is not required.
APPENDIX C Formatting Output B (ke String constants and variables are displayed using the character. Each indicates one character in the field to be displayed. The string will be positioned at the left end of this field.
APPENDIX C Nature Comparison Precaution for using the program on the PC-1251 Although the BASIC statements of the PC-1245 are identical to those of the PC1251, the number of display columns differ. As a result, when programs created for the PC-1251 are executed on the PC-1245, problems may occur in the statements related to the display such as "PRINT”, “PAUSE”, “INPUT”, etc, Therefore In these instances, the programs must be modified, 1.
APPENDIX D Expression Evaluation 2, When the integer part excess 8 columns with a USING format in the PRINT expression, expression, ERROR 7 results. Example: 10: USING columns or more 20: PRINT A, B e Change the USING format to within 8 columns, 3. When a message of the form INPUT exceeds 15 columns, the beginning part of the message is not displayed. # Shorten the message. 4. When the display contents of the form PRINT expression ; Dressiness expression ..
APPENDIX D Expression Evaluation Operators on the SHARP PC-1245 are evaluated with the following priorities from highest to fewest: 1. Parentheses . Variables and Pseudo variables 3. Exponentiation when receded by a multiplication which omits the operator 4. Multiplication which omits the operator 5. Functions 6. Exponentiation 7. Nary minus, negative sign 8. Multiplication and division {x, /) 8.
APPENDIX D Expression Evaluation Starting with the expression: { / 10 LOG 108 “The PC-1245 would first evaluate the innermost sel of parentheses, Since '+ and 17 are at the same level it would move from left to right and would do the addition first: ( [ 10/ LOG 100 Then it would de subtraction: { 6+2) / 187 LOG 100 or: (6x6+2) / 10~ LOG 1008 In the next set of parentheses it would do the multiplication first: (36421 / 10~ LOG 10¢ And then the addition: (38) / 14°LOG 109 or: 38/ 16/ LOG 10¢ Now that the pare
APPENDIX E Feature Comparison APPENDIX E FEATURE COMPARISON OF THE PC-1211, PC-1245, [y P AND PC-150p The four SHARP pocket computers, the PC-1211, the PC-1245, the PC-1261, and the PC-1508 have many features in common, hut are some significant differences. Sometimes the same features ara present, yet act in a slightly different fashion. the following chart the symbol: M indicates that the feature can only he used in manual execution, ie.
APPENDIX E Feature Comparison Verbs and Commands (con nude) PC-1245 PC-1211 PCP-1251 PC-159¢ | Comments DEBUG M DiM END FOR TO STEP GO SUB GOT CURSOR PRINT GRAD GRAPH IF THEN INPUT INPUT # LET LF LINE LIST M LILTS Twe T twe T = PC-1211 can emulate with LIST LOCK PRINT MERGE M NEW ) NEXT ON ERROR ON GO SUB ON...
APPENDIX E Feature Comparison Verbs and Commands {continued) PC-1245 ' PC-1211 fps-1251 JP-wan RESTORE P RETURN P P LINE RM TOFF RM TON ROTATE RUN M SORGHUM STOP P TAB TEST TEXT TOFF B TRON B UNLOCK USING P B WAIT B Note 1: There are some minor differences between the and the PC-1211 in the behavior of AREAS fallowing PRINT, but these are unlikely to cause problems in ordinary usage.
Pseudo variables APPENDIX E Features Comparison In this and the following charts the features are simply marked with a *Y* when the machine has the feature. PC-1245 PC-1211 | p1251 | PC-15¢8 | Comments PINKEYE ¥ Y MEM Y Y Y Flora Y Y Y PE-1211 has only TIME Y .
APPENDIX F Humeri Precision S NUMERIC PRECISION ON THE (o bl Accuracy in Computations While the PC-1245 displays the vaults of calculations to an accuracy of 10 digits, 12 digits are used internal in calculations 1o provide addition accuracy. For example: 5/9 yields —01 internally which is rounded o the 10th digit and displayed externally as ~@1 Similarly, B/B%9 yields 4,99599908990F 00 internally and when this is rounded to 10 digits externally, the display will show 5.
APPENDIX F Numeric Provision the branch would occur because the rounding would have obscured when the value was assigned to B, Special Limits In addition to the general lim} ts described above and in Chapter 4, certain functions of the PC-1245 have their own special limits. These are shown in the chart below, Functions I Dynamic range ~1x10" logo y < 100 ERROR 2 {Ex.
Model: Processor: Programming Language: Memory Capacity: Stack: Operators.
Program Examples Probably you have acquired knowledge on a number of program commands as you have proceeded to the function description up to this page. 1t Is necessary, however, ta generate actual programs by yourself in addition to the instruction manual, so that you can generate programs freely using BASIC language, Like driving & car or playing tennis that can be improved by actual practice, you ean improve your programming only by generating as many programs &s possible regardless of your skill.
CONTENTS {program title} (page} NEWTON'S METHOD FOR FINDING ROOTS OF EQUATIONS, , 161 AVERAGE, VARIANCE AND STANDARD DEVIATION 165 INTERSECTION BETWEEN CIRCLES AND STRAIGHT LINES NUMBER OF DAYS CALCULATION . . .. TYPING PRACTICE, . ..
NEWTON'S METHOD FOR FINDING ROOTS OF Program Title: EQUATIONS OVERVIEW (mathematical) Finding the roots of equations is usually troublesome, but by using Newton's Method the approximate roots of equations can be found, When 1 root is found, depending on the interval width, by using Newton’s Method the starting point automatically changes.
How to type in the example: 1. Go into PRO mode by operating the made change key. 2. BOOB = % X=1)% X+2 (Lenten] 510 RETURN [enter] That is ail that had to be done. KEY OPERATION SEQUENCE S Key Input Display Remarks Waiting for starting point 1 | BERIA STARTING POINT Waiting for minute interval 2o MINUTE INT. = _ input 3 | ENTER] | INTERVAL = _ caning for interval width 4 |es (Enter 2.| Display of roots By repeatedly pressing the 5 ENTER] 1.
FLOWCHART CL—‘) / Newton's Mm@ {7 calculation \ subroutine 0 — Tagus (starting 300 point, interval and minute X=¢ interval) | Function calculation Y X=A+C 320 Function 0 calculation =g 1 z=1 pd (B-Y] 20 e ' Newton's Method 340 calculation Newton's Method ejaculation L alleviation Roast are ; displayed calculation subroutine 500 RETURN 163
program Title: AVERAGE, VARIANCE AND STANDARD DEVIATION OVERVIEW 1§ the data are input, the total sum, average, variance, and standard deviation will e calculated for you. Revision of input data as well as data with weights is possible. CONTENTS Total sum Ex fi Standard deviation 0= Average Bath Zf Variance ot = Number of data entries {up to 50) {when there are no weights fin INSTRUCTIONS 1. At DER 7, select whether or not there are any weights, then input the data, 2.
KEY OPERATION SEQUENCE Step Key {nut Display Remarks | BEECH NO. OF DATA =_ for number of data Waiting for the selection of 2 8 ENTER] | WEIGHTS weightiness weights. YES NYERERE! 141 ENTER] ENTER|| 14.
KEY OPERATION SEQUENCE Step Koy Input Display f Remarks 1 8] X111 =141 2 (enter) [BEE) 1s used to input 3 X2 =141 1 Fie revised values when data errors are found 4 Xi{2)= REVISION VALUE = _ Revised value is input 5 142 (nER] F21=19 (ERE) TOTAL SUM 2 (Enter] 1072.5 2 [PERTER] | MEAN VALUE 4 {Eff Fer) 143 5 [ENTER) | VARIANCE 6 {Enter) 1432432432602 7 @ STD. DEV.
FLOWCHART Eats input Darla minion Car 10 An' 20 Nur;h;lzf‘ ;ynj ata display With or without v weight @w»— 3 N lats display " %ij' Data input Data display Revised value {Total churn, average, | variance, standard deviation ith weights g 400 1 @ variance, standard deviation [Total sum, transverse 168
Program Title: INTERSECTION BETWEEN CIRCLES AND STRAIGHT LINES OVERVIEW The points of intersection between circles and straight lines in the X—Y plane are found. CONTENTS The 2 points of interaction between a circle and a straight line are P and Q. {Note) The angles are in degrees, minutes, and seconds and are to be input in the following way: 123.1423 = 123 degrees 14 minutes 23 seconds. P, Y0y INSTRUCTIONS 1. H the straight line is determined by 2 points, BEF (& is used.
KEY OPERATION SEQUENCE (when 2 points on the line are known} Key Input Display Remarks 1 | DEF) (ENTER) [enter} [ENTER) | X1=~ 5 50 ENTER] ENTER) | X27 _ 7 50 (PERTER) | Y2= 8 100 ZENGER] | P--X {xp, yp} 9 Rex) | P-Y 49,5899 10 Enter] 0% —— txg.
(when 1 point on the line and 1 direction Angie are known) e Key Input Display Remarks 1 | BEF B Xp=_ 2 50 [PERTER] (Enter] |R=— 4 50 (ENTER] ENTER] | Y1=_ 8 o ENTER] 0.6000 {xp.
FLOWCHART /2 paints are /lf 1 paint and 500 known direction eagle 5]°° J J=1 W-\/ (KX YR YY SACS (/W) input radius input direction fi/‘ angle o 600 — % | Subroutine for v, | HEIDEGGER finding the X—Y I coordinates xRS L Y=G-E " Re Turn the X-Y coordinates \ Subroutine for finding Play of XY | coordinates Subroutine for finding the X—Y coordinates v 10 150 Display of values of point 173
program Title: NUMBER OF DAYS CALCULATION OVERVIEW How many days has it been since you were porn? This program is convenient for answering such questions. By setting a certain day, this program will output the number of days that have passed since that day. CONTENTS {Instructions] bR (B3 BASE YEAR MONTH DAY TARGET YEAR MONTH DAY To end the program, type in [DEE {27 in place of the year.
KEY OPERATION SEQUENCE Sb}g" Key putout Display Remark 1 \DER (A START YEAR = Base date 1976 year 10 ? 1976 MONTH math 5 day input 3 10 ENTER| | DAY = 4 s [Enter] | eNp bear = Target date 1982 year B8 5 1982 MONTH month 4 day input § 6 [ENTER] | DAY = 7 a DAYS = 2068, 8 ENTER] | END YEAR = _ Target date 1985 year 1 ° 1985 [ENTER] | MONTH monolith 1 day input 10 1 DAY = 1 1 [En Er) | pas 3010, 12 ENTER}| END YEAR = 3| BENZ > 176
FLOWCHART Base year, north, day 30 |t [ Target year, | month, day 70 Calculation of sum of days — 100 120 | Confutation of sum of days || 177 Calculation of sum o days /. 1= INT (365.
PROGRAM LIST MEMORY CONTENTS 181v8° 2@: INPUT YSTBRT T 39:INPUT "ERD MONTH=" 3¢, Year (after calculation} TB:GEUE 508 T ¥ USING PRINT BAYES" .
Program Title: TYPING PRACTICE OVERVIEW Quick key operation! How fast and accurate is your typing? 1f you practice with this program, it will make programming much easier for you. Improve your skill CONTENTS (such as calculation contents) “The number of characters randomly chosen. The character arrangement done randomly. The allotted time depends on the number of characters and the grade feel, 3 is the shortest time allotment while 1 is the longest.
KEY OPERATION SEQUENCE Step Key input Display Remarks 1 zZ] GRADE (1,2, 3}7 Grade input 2 1 ENTER|| HAZARD 3 AZTEC A 4 AZTEC Az After the 10 questions are YOUR — SCORE = 80 answered tha scars is displayed ¥ your score is higher than YOUR SCORE BEST the high score the guidance is displayed > When you want to play in 1 | BEAR] tha some grads SUBWAY 2 BWvVs 8 YOUR — SCORE = 60 B 180
FLOWCHART e 40 Characters arranged according to random numbers e Beriberi of problem characters input | character series | airs / 1o lap has e 87 As-Cassie) | a0 Character bumper count 1 Depending on Ta tier the 0 grade and length been processed T = 1100 points are counted depending on the number of correct NEWEST 181 Point become the high score YOUR SCORE BEST
Program Title: SOFT LANDING GAME OVERVIEW This game involves landing a rocket, with only a limited amount of fuel, as softly as passable, The rocket is in free fall, The engine is used to slow down the free falling rocket. If ignition takes place tog soon of too much fuel issued, then the rocket is thrust back out into space and becomes dust around the planet. 1 all the fuel is burned up, the rocket hits the planet .
KEY OPERATION SEQUENCE Sr Key input Display Remarks 1 | [OEF (A) STARFRUIT 5Kk 9] Height, speed, fuse toff and 2 | designate fuel burned | 500 ~EO. 203 fuel bunt in Unit time are in unit time displayed.
FLOWCHART Cr 0 e Intel spin | | { Dash data ; < Screen d\splay fuel /Burned ol sconces fuel Tet Circulation of the rocket's height and doses 150 / rocket\ higher than ground level 160 peed ar heir hm& N — Good 8YE! ) 200 Want to play again? 20 < Fiat again Tt “Flay again TN T Y END _ / o= SUCCESS! Cruet L —T 186
program Title: MEMORY CHECKER OVERVIEW Three line with a total of 12 characters will be displays on the screen for sprat. 5 seconds. Your memory will be tested by how well you input the above line after it has disappeared. CONTENTS The following type of line will be displayed for approx. 5 seconds. There are 2 characters and 2 numbers in each set.
FLOWCHART 20 180 200 200 200 210 300 370 D Construction of the problem line splay of the problem line (5 sect ik Answer input ploy of the | input Predispose of the problem fine Re display of mfl antiwar In Put uterine Evaluation of me mo Ty Display of allegory.
MEMORY CONTENTS columns of characters Index J ‘Random number generation K Condom number generation L Random number generation M N Counter input for REPLAY X ¥ 7 Characters (1 ~ 6} g0k Number table (1 ~ 10} vsiarkz| 2 columns after answering (1~ 3] Xsiapxa| Ark {1~ 3} vs@akdl Work (1 ~3) 2 columns store answering {1~ 3) 191
Program Titch: BUG HUNT OVERVIEW This is a game involving a man chasing after a bug, CONTENTS The bug moves according to random numbers. The man chases the bug and kills it. 8] The man moves by using the (4]« (&7 kens. (IN KEYS s used) = Each time the man moves one space, so doss the bug. (Sometimes the bug will stay in the same place) v Initially the amen is in position @, 0). The bug is placed at 2 position that was chosen randomly. Hints are displayed as distance.
e Each time the man moves the display changes Bug is caught = T HIT! HIT! BANG! BANG! L e SCORE t I ENERGY e L. Concerning the BEEP sound % Hint: When the distance is 1 the BEEP goes off 3 times the distance is greater than 3 no BEEP is given.
FLOWCHART Initial setting RANDOM Energy calculation] Score display GAME EVER Tha bug is moved by random numbers N shutoff Bug goes into “warring Bee Ping 3 times Judge from the distance | I L=1 BEEP Y1:LiE display splay @ [Reading 2,4, 6 or 8] IN KEYS BANG! BANG! G is used to move the man, Time spent Posits and energy added Distance calculation Positions of the bug and the man §=5+1 Out of the 9 x 9 range or GH had read in either than 2,4, 6 and 8, Score displayed "The positions’ of the bug and the man
MEMORY CONTENTS A Position of bug X coordinate B Position of bug ¥ coordinate c Amount of energy added D E Remaining energy F Energy level as Key read Distance between bug and man Size of bug movement s ‘Tums spent T Score Man position X coordinate Y Man position Y coordinate z 198
Program Title: DOUBLE ROTATION OVERVIEW Quickly put in order “This is & tame that arranges randomly placed characters (A —J) in alphabetical order. When the letters are arranged in the right order, a score is displayed. The trick is to attack from the best place. The sooner the characters ars arranged, the better, It is fun to race with your friends. INSTRUCTIONS 1. After the program is initiated, by pressing DEF! [ A , “DOUBLE ROTATION” is displayed. A random sequence of characters then displayed. 2.
KEY OPERATION SEQUENCE Key Input Display Remarks o.
FLOWCHART Random number generated 110 Alphabet is stored) depending on random numbers 170 —B A sequence of alphabets is displayed /—Wuss/ { D8 g 210 Sequence of letters is shifted according to the input slumbers e correctly? N 300 310 Game over | score END 199
{ Modification Summary of the CE-125 Program Examples) Program Ti tie MATRIX PRODUCT KEY OPERATION SEQUENCE REVISION FORESTATION REV.
Program CORRELATION COEFFICIENT AND LINEAR Title REGRESSION @ KEY OPERATION SEQUENCE [REVISION POSITION REVERE. POSITION = _ [aLL oat A PRINT? /] [TALL TRIP ] ® Change 2 step of the program list as follows: 5883 INPUT INPUT *ALL PR TREY.
Program Tide SORTING KEY OPERATION SEQUENCE CHARACTER = 1/NUMBER CHAR.= NUMB. =27 ! [\GREASE 1/DECREASE =27~ | = | Change 2 steps of the program list as follows: 1817 Ta Rut 38:INPUT =2 2 230 Program THE LOAN LIMIT, CALCULATION OF THE Title NUMBER OF INSTALLMENTS KEY OPERATION SEQUENCE [ NO.OF INSTALLMENT=_ INST.= [INSTALLMENT AMOUNT] = [ INST AMT. = | Change 3 steps of the program list as follows: 231 TH PUT "D, OF INST.= UPBRINGING PINTS.
index Vo =3 VeV AMALIA ABS AC adapter, CE-128 ACS ALL RESET AND AREAS ASC As Git ASN ATN Arrays Auto off (Auto Power Off}) BEEP Batteries, PC-1245 Busy CA key CE-125 132 127 136 136 128 56 128 12 38 83 133 140 128 129 208 CHAIN CHRIS CLEAR CLOD CLOD? Clear key CONT cos CAVE Cursor Cassette Commands Comparability Constants DATA DEF key DEG DEGREE Delete key DM DMS Debugging Display END ENTER key EXP Editing calculations Editing programs Error Messages Exponentiation Expressions FF {Fast forward) FOR TO...
Ind ax Go Sub GQOT0 GRAD Hexadecimal {F THEN IN KEYS INPUT INPUT # Insert key INT LEFTS LEN LET LIST LILTS LN LOG PRINT Labeled programs Limits of numbers Line numbers Logical expressions Loops MEM MERGE MID$ Maintenance Masks Memory Protection NEW NEXT NOT Numeric expressions Numeric variables ON {Start up} ON Gossip N GOT OR Operator precedence Operator priority Operators 95 74,496 208 P <> NP PASS PAUSE Pl PRINT PRINT # Program mode Paper feed Parentheses Power Reallocated variables Printer Priority Prog
TAN TOFF TRON Tape, external Taps Tape counter Template 132 122 123 207 Troubleshooting USING VAL Variables Verbs WAIT index 138 124 134 33 42,68 126