background image

Summary of Contents for PC-1500A

Page 1: ...I Do not salEJ t 1s R ...

Page 2: ...All and more about Sharp PC 1500 at http www PC 1500 info Do not sale this PDF ...

Page 3: ...ter size1 This machine is capable of many of the functions which only a few years ago would have filled a warehouse with tubes wires and engineers Such sophistication does not require Engineering credentials to use On the contrary the PC 1500A and this manual are designed to help you gain rapid access to this new technology We have divided this manual into five major sections allowing the novice u...

Page 4: ...urned only to an authorized SHARP Service Center 5 This manual be kept for further reference Trouble Shooting This unit if subjected to strong external noise or impact during operation may r ender all its keys I ct OltfAI k inc u 1ng 1ON I ey inoperative Should this occur press the ALL RESET switch on the back of the unit for approx 15 seconds OIU AJ with the ID key held down BREAK 0 Press ION k e...

Page 5: ...r conversion extraction of square root s ign function absolutes integers and logical calculations etc Cursor shifting Line up and down I I t Insertion INS Delet ion DEL CMOS battery back UP program data and reserve memories are protected 26 character liquid crystal display with 7 x 156 Dot Graphics 65 keys including Alphabetic Numeric User definable Function Pre programmed 6 0V DC 4 dry batteries ...

Page 6: ...ery f unction Indication 14 L How to use the RCL RECAL L key 14 II Taking the Plunge 15 A MODEkey 15 8 Simple Calculations 15 C Sorial Calculations 16 D Calculations with Negative Numbers 16 E Compou nd Calculations 17 F Use of Parentheses 17 G Logical Comparisons and Inequalities 18 H Editing Keys and Functions 19 H 1 Left Arrow DELete Key 19 H 2 Right Arrow INSert Key 20 H 3 Recall Function 21 I...

Page 7: ...d RETURN 58 Summary of PROgram Mode Editing Features 59 IV Advanced Calculations 60 A Scientific Notation 60 B Range of Calculations Overflow Underflow 62 C Root Power and Pi 62 D Angular Modes 64 E Trigonometric Functions 64 SIN COS TAN ASN ACS ATN 65 F Logarithmic Functions 65 LN LOG EXP 65 G Angle Conversion 66 DEG DMS 66 H Miscellaneous Functions 66 ABS INT SGN 66 67 V Advanced Programming 67 ...

Page 8: ...CE 150 101 A I Connecting the Computer to the Interface 101 A 2 Power Recharging the Batteries 103 A 3 Connecting aTape Recorder to the Interface 103 A 4 Loading the Paper 105 A 5 Replacing the Pens 106 B Usinga Cassette Recorder 108 B 1 Tape Recorder Operation 108 B 2 Savir g Programs on Magnetic Tape CSAVE 108 B 3 Loadir g Programs from Magnetic Tape CLOAO CLOAD 109 B 4 Saving and Loading Data U...

Page 9: ... DEFinablc Programs 132 A 2 Pre Assigncd Keywords 132 A 3 The AREAD Statement 133 B Automatic Program Initiation 134 ARUN 134 C Comparison of Initiation Methods 134 IX Appendi 137 A Abbreviations 138 B Battery Replacement 142 C ASCII Character Code Chart 144 E Error Messages 145 F Further Reading l 51 O Order of Expression Evaluation 151 X Command Comparison PC 1211 vs PC 1500A 153 z Command Refer...

Page 10: ...of the computer should be similar to the illustration below DEG PRO Press the key Ion the far right side until the abbreviation PRO appears in the upper portion of the d isplay Uf you press the key too many times just press it again until the desired result is obtained The SHARP PC 1500A is ready to accept the series of instructions which make up a computer program Enter the following keystroke se...

Page 11: ...ssing keys so feel free to experiment If you have pressed the BR EAK key a message similar to the following is visible in the display window BF EAK I t T his informs you i vhich instruction was being executed or worked on when you interrupted the computer Press the BREAK key once more and the computer awaits your next instruction DC KUH For those of you who just remembered that you left the tap ru...

Page 12: ...1 rn rn rn ill m m rn I n lom OD CIDIeNreRI Our second program is no v stored in the PC 1500A s memory Do you remember what must be done next If you said Run ihe program you are well on the way to programming competency Return to the RUN mode HINT use the MODE key and tYP in the word RUN Press lt Nru l to begin execution another word for running of our second program Is the compUter interrogating ...

Page 13: ...a powerful tool It can be programmed to follow different sets of instructions and proc ess the variety of infor mation it is given Because of the instructions in line 20 if the user s input is zero or less the computer skips over the computa tion of the list and goes to the end of the program In effect it has made a decision based on the user s request As a programmer you control what decisions ar...

Page 14: ...owcr case letter is displayed NOTE In the SMALL mode the SHIFT preceedi ng the alphabetic key will produce an upper case letter When the SHIFT key is activated the word SHIFT appears in the upper ch corner of the display The shift mode is only active for one keystroke at a time The six keys at the top of the keyboard directly b Jlow the display window are called RESERVABLE KEYS Using the shift in ...

Page 15: ... not lost they remain in SHARP as part of the typed line up to a maximum of 80 characters for any single line We will see how to recall and ho Y to change these characters in a later section H CLEAR The red key in the upper right corner Push this button and you Clear the d isplay of its contents Use it to erase the charaC tcrs that you just typed in Notice that the prompt has returned indicating t...

Page 16: ...mmediately to the left of the RCL Recall key Now depress the RCL Recall Key and the Reserve Key previously assigned If you have forgotten your pre ious assignments simply follow the instructions in paragraph B on page 130 QUIZ CHAPTER Match each item in column A with one from column B Answers on bottom of page H INT Column B contains some silly possibilities A al SHIFT key b The Display cl The Cur...

Page 17: ...to plan And also like a car when you attempt to operate SHARP in an improper gear the computer will quickly notify you of your mistake By repeatedly pressing the MOOE button you will be introduced to the two most important of SHARP s three modes RUN and PROgram A third mode RESERVE is activated by prcs ing the SHIFT key before the MODE key Later chapters of thi manual will describe how each of the...

Page 18: ...culations These symbols have special meaning in the BASIC languag e and therefore to SHARP Other operations can be performed similarily Tiry these Input Display 5 1 3 ItHttRI 8 8 3 1 IENTERI 1 0 1 0 3 1 1t NTE RI 29 29f3 1 IENT ER 8 666666667 D CALCULATIONS WITH NEGATIVE NUMBERS Imagine you have presented your computer science teacher Mr Onoff with two apples You have remaining an inventory of fiv...

Page 19: ...xpression 5 3 I 4 can be read two ways 5 minus 3 divided by 4 in which case the answer is 5 or 5 minus 3 divided by 4 in which case lhc answer is 4 25 Located in the first row of keys arc the parentheses which you can use to clarify such ambiauities Run the following calculations Input Display 5 3 4 ICNTC I 4 25 5 3 4 I NTf I 4 25 5 3 4 I f HT lll 0 5 SHARP is predisposed has default priorities to...

Page 20: ...true or false For instance the statement six divided by three is equal to t vo is a comparison which happens to be true On the other hand the statement six divided by three is greater than fi11e is a false comparisol Co1nputers and mathematicians use the follo ing symbols for the possible types of com parisons less than greater tha equal to less than OR equal to greater than 0 R equal to not equal...

Page 21: ...und bag He wonders in which case he will get more cement He asks SHARP if 2 1 2 3 4 8 SHARP replies 1 Nob buys two 12 pound bags Experiment with ineQualities applying them to your own problems H EDITING KEYS AND FUNCTIONS Most humans except us genius wpes have a tendency to make mistakes Rccogniting human fallibility the designers of the PC 1500A have incorporated several features which facilitate...

Page 22: ...rrow key has a second use the OELete function whose abbreviation is inscribed above the key To dele e a character place the cursor on the doomed character and press ISH FT lonl Let s try it move the cursor bac k to the W and press the sequence SH1frl DELI four times The display now shows O G RUN THE CAT It HAT INS H 2 Right Arrow INSert key J As we have already seen sorry to ruin the surprise the ...

Page 23: ...nt at which it became puzzled and for good reason in this case From here you may proceed to make any correction you deem appropriate I VARIABLES The ability to work abstractly through variables Is one of SHARP s most powerful features Variables may be thought of as a group of little boxes each o f which may be filled with a single item of data such as a number o r a name You might remember variabl...

Page 24: ...qualities are not used separately but form parts of other programming instructions The Assignment statement instructs SHARP to store the result obtained by calculating the expression in the memory location associated w ith the given variable name Thereafter using the name of the variable G in our example is juot like using the result itself Notice also that a variable may be used as many times as ...

Page 25: ... through 9 or by another letter Thus the following are valid names for numeric variables S 01 TX MM Z9 RO E 1Q g_ Due to conflicts with abbreviations which have other rneanir1gs in the BASIC language SHARP does not allow the use o r these variable names LF IF LN Pl TD Names of character variables those used to hold characters follow the same rules as above except that the name ends with a S dollar...

Page 26: ...atulations If you have pcrscrvered to this point you now know the fundamentals of the SHARP PC lSOOA well enough to perform a wide variety of calculations BecauJe the PC 1500A is so versatile each reader will find many uses for it in his own fields of interest No matter what your application is however you will eventua lly want to learn programming in order 10 fully exploit the power of this amazi...

Page 27: ...the information to be inserted 9 Recall function After ENTER is pressed and the result of a calculation is displayed the original equat ion may be ecalled by pressing either the Loeft Arrow or the Right Arrow key At this point changes may be made and the modified equation re entered The Reeall function will also work for any non programmed expression which produces an error In this case the cursor...

Page 28: ...s just a set of instructions that the computer follows one at a time These instructions must be given to the computer in a language it under stands The SHA RP PC 1500A speaks a dialect of BASIC a widely used and very popular programming language Like other languages BASIC has a special vocabulary and grammar rules which arc combined to form statements If you speak to SHARP ungrammatically or in un...

Page 29: ...pe of instruction is known as a command The PRINT instruction on the other hand was somewhat different It was entered in the PROgram mode was preceeded by a number 10 and was not executed immediately This type of instruction is known as a state ment In some sense the commands tell SHARP what to do with the statements For example the NEW command will erase all currently saved statements It is impor...

Page 30: ...ram in the same way you did before It is JOLLY AWFUL to loose a program line isn t t And since line loss can lead to some very subtle errors you should exercise c 0ution in writing your programs E PROGRAM LINE REVIEW keys But you might ask yourself How can I remember what lines I have entered Fear not intrepid programm er This need to review has been anticipated and provided for with the CO Up Arr...

Page 31: ...Today it is generally agreed that the word LET is not really needed As a result the keyword LET is optional in PC 1SOOA BASIC Thus a statement which stores the number 7 into a variable Scan be written in either of the following ways s 7 or 1 L LET S 7 The one exception the place where LET must be used is an assignment which occurs as part of an IF statement Although we have not yet discussed the I...

Page 32: ...quote marks are NOT printed as part of the output They are necessary to delimit or mark the beginning or end of the sequence of characters which you wish to print This sequence can include any character except the double quote character itself The items in lhe second and third PRINT statements lines 40 and 50 should be recognilable to all readers as variables When a variable name is used within a ...

Page 33: ...t of the multiple item PRINT statements divides the display window into two sections Each section contains one of two items specified in the print list The items arc separated in the list by a comrrna Explore this format using the following program Program List ing 10 A 2 PI 20 PRINT 2 T IMES PI A Keystrokes rn rnmr icoc mco1 T I m oo m mmoorn r1 c i m fSP o I CDOJ QD I lsPACEI m co1 I ISN FT lc J...

Page 34: ...llustrate the action of the PRINT statement when the printable items are separated by semicolons In this format the items are adjacently displayed with a minimum separation between them This capability is very handy for creating natural looking output i e output which flows together Qrr If the length of the informat ion displayed exceeds the sPace available on the disPlay 25 characters the items a...

Page 35: ...lear Program Listi1 ng 1C PR INT HUMPTY 20 PRINT DUMPTY Keystrokes moomm m oorn1 1FTIc J ID mCIDmCD rr1 lsP1 c1 I I SHIFT I c J IENT CRI rn oo moo m oom 1 n 1c i rn 01Joo m m rn The next sample program illustrates that the semicolon may join as many lines of output as will fit on the display Printin g too much information on the display is a m istake which SHARP will not signal It is up to you as ...

Page 36: ... PAUSE statement is a semi automat ic form of the PRINT statement It displays the various items in its associated list for a fixed and brief t ime period The us r is thus freed from the burden of prodding SHARP to cont inue by pressing ENTER Think of the PAUSE as a PRINT statement followed by a countdown Whern the countdown is over the program continues The formats of the PAUSE statement are ident...

Page 37: ...USE statements througnout our program Try this for yourself H INPUT By utilizing the various forms of the PRINT statement alone or in combination information can be nicely presented to the computer user Most of the items which will be printed however are the result of processing some initial data This initial da ta is given to the program by that same computer user The instruction which controls t...

Page 38: ...ears What does it mean He presses ENTER to continue but the program ends From his viewpoint the whole experience has been a waste of time Why Because of poor programming One solution to this problem is to use PRINT or PAUSE statements to help the user along With this idea we can re write our program as follows Program Listing 10 A 0 20 PAUSE ENTER ANY NUMBER 30 INPUT A 40 AP A PI 50 PRINT A TIMES ...

Page 39: ... maorAJ m 1 1 rn IJmcnu CD w mmCD ODl J AJ I C J1 I C Jl c I m m oomm _ m m 1tfil llPACl I SMn C l so nl CD m As you run this example notice how the use of the INPUT statement differs from the PAUSE statement The second prompting input form is almost identical to the first except that it uses a comma instead of a semicolon INPUT characters varioble name When this form of the statement is executed ...

Page 40: ...D o JC 0 I Ic J c J I SHIFT J C J EHT RI m m L u m m moo 1 c ioomm CL ISH FT I c J IlHl lll rnmmmrnm mc 1 c Jrnmo om 1 c 1 cooocornco mm1 m mm1SP 1 1 n lc Jl ICDCO I NOTE Don t worry about line 30 it uses advanced techniques which you will learn later In addition to accepting a single item of data the INPUT instruction may be used to gather ond store severol such values To program such a process o...

Page 41: ...en the first number is completely typed you must press l I A question mark will precede every successive number each of which must also be followed by pressing l rERI Had we used a semicolon in the INPUT statement the fir st number entered would not have replaced the prompt but would have shared the line with It All successive inputs would have been the same as with the comma Try this for yourself...

Page 42: ...rHI 00 CDCD CJ I c J 00 JI CDIP al COill Iso I ICDODI c cornm c i 1 1c iooromm1 c 1 CD Cl I oo m m co cYJ rnro i 1 1GJ c 1 Ism ICJI I CJ l nl C J l iirr As you complete the entry of each line by pressing the ENTER key notice that SHARP expands any abbreviations on that line The resulting clarity is immensely valuable to your later as you check the program for errors An additional hidden benefit is...

Page 43: ...al and inter active it is highly desirable that you are able to modify and extend programs to suit your own needs Ve therefore recommend that you exercise restraint in your use of the colon If you do use the colon it is very advantageous to group only those statements which are con ceptually related That is place only those few statements which accomplish a single task out of the many possible tas...

Page 44: ...ion in the Program Mode Although abbreviations and colons help us to easily enter programs they cannot prevent the best of us from making mistakes Even profcss ional programmers fail to catch errors when reviewing their own programs What this means is that sooner or later you will encounter an error while running your program if you haven t already Most of these errors are easily corrected if you ...

Page 45: ...am in memory at the same time The trick to doing this is to give each program its own range of line numl ers For example one program could have line numbers of 10 to 200 while the lines of a second program would be numbered from 300 to 500 You must of course be careful not to accidentally intermix statements from the various programs by incorrect numbering or unpredictable results could follow L 1...

Page 46: ...be done by choice ii it is done it will produce some ah unusual results Try it on our fi rst program by issuing the con unand RUN 30 This is a mild mistake compared to what could happen in a more complex program M CONTROL STATEMENTS Our programs so far have been a consecutive sequence of instructions each performed one time by the computer Those with experience giving instructions may realize that...

Page 47: ... inequality and is called a condition Remember that inequalities are comparisons which are either True or False If the inequality is True then th statement is executed If the inequality is False then the statement is skipped In our sample program the test is whether the variable SXS is equal to contains the character string YES If it does and o nly if it does then the PRINT instruction is followed...

Page 48: ...UST be used Failure to do so will cause an ERROR condition to occur This was dis cussed in the section on the LET S1atcment Caution Refer to page 164 0 GOTO You may have noticed in the last section that our options vere limited after the test was made in the IF statement We vere only allowed to execute one statement if the condition was True For convenience we would like to execute several stateme...

Page 49: ...e IF 10 E test THEN GOTO 100 20 statements here are performed only if the j test is False 90 GOTO 200 100 l statements here are j performed only if the test is True 200 statements here are always performed 999 ENO The logic of this program is applicable to many situations Any number of statements can be inserted in each of the sections which arc formed by the GOTO statements As an example of this ...

Page 50: ...l oornm OD m C2J moo rnrn m r10coooCD D J m 1 1o1 1 CJ l I rnrnmmmoom c 1CEJ rnm rnrnoomooOD 1 c i 1 oooo moorn ooCD1 1 c J m rnrn rnm ISP CE rnmmm OD mm1 11 c 1 1 c i1 1orn1 mmmaorn 1 Observe that this program ends only if the transaction amount is zero The second IF late ment is the one which illustrates the structure we mentioned before Notice that in addition to the t IO separate actions assoc...

Page 51: ...sion and could be expanded into the larger form of the IF statement described above Re arrang ing statements in this fashion is often a useful maneuver when programming Take some time to experiment on your own and you will be rewarded with better programs Another very common use of the GOTO statement is to cau e repeated execution of a sequence of statements This process is known as looping A simp...

Page 52: ...mmOlJ CD aoc o1SH 1c i moo OD rn1 c 1 mCBJODGDISP c IC J0DOD001 c Io JCEJ OD I ls OF I c J lE E I m m mrnCD ao fS oFTICJ ls cEIlsP CEI l c I ISP C IlS CEIm OD 0 0 rn lsPACEIm C J OD l c Jmoom m 1 cc1mmonoo1 1C J moomt 1m rnrn l I m oomm m1 1m1 1rornrn ao mao m 101 r I mrnmOTJrn1 Follow the operation of the counter as each loop is executed Notice that in line 15 we must assign the counter an initia...

Page 53: ...iable is the name of the variable used to hold the oop count initlal value is the value sto red in the counter variablc before the lir t t ime through the loop The allowable range for this value is 32768 through 32767 final value is the number which is used in tho test If the counter variable contains a value greater than final value the looping is ended The legal range for this number is 32768 th...

Page 54: ...mber for processing The loop is executed N times unless N is less than or equal to zero in which case we END w ithout further processing Program Listing 10 N 0 V 0 T 0 A 0 20 WAIT 0 30 INPUT HOW MANY VAILUES N 40 IF N 0 THEN GOTO 999 50 FOR I 1 TO N 60 CLS CURSOR 0 70 INPUT V BO T T V 90 NEXT I 100 WAIT CLS CURSOR 0 110 A TI N 120 PAUSE TOTAL T 130 PRINT AVERAGE A 999 END Keystrokes OJ I j I l I l...

Page 55: ...grammer may specify the size of the increment or decrement Our next example program demonstrates this and brings back memories of high school cheerleading Program Listi ng 10 WAIT 30 20 FOR HS 2 TO 8 STEP 2 30 PRINT HS 40 NEXT HS 50 WAIT 60 CLS CURSOR 0 60 PRI NT WHO DO WE APPRECIATE 70 PRINT SHARP PC 1 500AI 80 ENO Keystrokes CD OOCRJ m CDCDa J W tvm I m rnm oom0mwrnmrnrnmmmm rn IENTE rnmm OOOJCl...

Page 56: ...ment is specified the default time period is infinite that is the information will remain on the display until the user presses 1 1 This is the mode of operation used in most of our programs to this point If an argument is given all subsequent PRINT statements will hold their information on the display for a time period proportional to the number specified as an argument This type of printing is s...

Page 57: ...items These include numbers in real or scientific notation and character strings The items in the list are separated by commas Doto statements may appear anywhere within a program but many programmers prefer to group them at the beginning of the program This enables them to be found more easily when the program is read A typical DATA statement might resemble the following 10 DATA MOBY DICK 20000 W...

Page 58: ...n the program finishes in a normal manner are ignored If the type character or numeric of the next item does not match the type of the varinble to be filled an error will occur Good programmers group data items into separ te DATA state mcnts each of which corresponds to its READ statement within the program This is illustrated in the following program which reads three data items four times 10 DAT...

Page 59: ...ORE statement may then be used to re issue data items beginning at the DATA state ment with the given label An example of a labeled DATA statement is 20 A DATA 1 12 2 8 The following program segment RESTOREs back to the DATA statement labeled X 10 DATA 4 2 3 1 20 X OATA 2 0 3 5 100 READ Q Y Z 110 READ MA MB MC MD 120 RESTO RE X 130 READ N Z At the end of the program N contains 2 and Z contains 0 S...

Page 60: ... the group of statements would occur a GOSUB instruction is inserted The GOSUB statement instructs SHARP to begin executing the group of statements which have been set aside_ This process is known as calling a subroutine Because the GOSUB state ment causes a change in the normal sequential flow of execution it is similar to the GOTO natement The d fference however is that before SHARP begins to pe...

Page 61: ...ld be numbered in intervals of at least ten This will allow an additional line to be ir serted bet vccn any t IO existing lines merely by choosing a li ne numberwhich lies in between the line numbers of the existing lines For example to inser t a line between lines 40 and 50 give the new line a number from the set 41 through 49 2 To delete an existing line simply type its line number and press IEH...

Page 62: ...en tific 1 otation AX 11 0 B enter the mantissa press the letter C J and enter the exponent Example 1 To key in 6 7 x 10 8 Keystrokes Display e 7E_ rn _ E_ 8____ Example 2 To key in 9 12 x 10 34 Keystrokes Display 1 e 12 1 9 12E GJ rn m F 12 E 34 Only the first 10 digits of the mantissa are signifi ant see example For a number smaller than 1 but larger than 1 the data is aceurate to a maximum of 1...

Page 63: ...mmmrn i 0000000002345678_ I 2 345678E 10 I Example 6 Key in 0 00001234567 x 10 24 Keystrokes Display G J rnrnoorn rnm rn m mrnrnmrnrn 1 00001 234567E24 1 I i 234567E 1s I Notice that for exponents only the last t vo digits typed are effective Example 7 Key in 3 x 10 123 Keystrokes Display rnmm rnrn 13E123_ Example 8 Key in 4 x 10 3210 Keystrokes Display l 4E 3210_ I 4E 10 Do not sale this PDF 61 ...

Page 64: ...dition will not be signalled no error message or halt viii occur Any number which falls into the range of 1 x 10 A 99 to 1 x 10 99 will be regarded as zero This is illustrated by the following chart 1x10 99 9 999999999 x 10 I 99 0 9 999999999 x 10 99 ERROR COMPUTAT IONAL REGARDED COMPUTATIONAL ERROR RANGE AS ZERO RANGE Example 1 If you try to solve the equation 5 67 x 10 551 8 90 x 10 651 you will...

Page 65: ...mple 4 Keystrokes Display 1 11 1u J m 1 s m rnm CDCD Ir 3 2 4 2 _ I EHTERI Power The power or exponentiation function perm itsyou to raise a number to a power Example 1 Calculate 4 3 4 x 4 x 4 Keystroke s Display 14 3_ L Example 2 Calculate 3 3 2 x 4 A 2 4 Keystrokes Display 1 3 3 L Example 3 Calculate 4 3 2 Keystrokes Display 14 3 2 5 26214i 63 Do not sale this PDF ...

Page 66: ...G l m l IDEG will appear at top of the display To set the PC 15 00A into Radians mode type RAD l I HAD will appear at top of the disi lay To set the PC l 5 A into Grads mode type GRA l n I GRAD will appear at top of the display E Trigonometric Functions The six trigonometric functions provided on the PC 1500A are SIN COS TAN ASN ACS and ATN Each function can be calculated in either the GRAD DEG or...

Page 67: ...ctarigent F Logarithmic Functions LN LOG The function LN will compute the natural logarithm base e while the function LOG will compute the common logarithm base 10 These are executed in the RUN mode as follows LN 7 4 ICHJERI I 2 00 148 1 LOG 7 4 I EHTF R 8 692317197E 01 LN 25 I MTElll 3 218875825 1 LOG 100 jE NTERI 21 EXP The reverse function of LOG is a l 1 umber raised to a power of 10 For examp...

Page 68: ...16 1932 l I I_ 16 1 13552 Example 2 Convert 32 2513 OMS into Decimal Degree form DEG 32 2513 l n I 32 42027778 1 H Miscellaneous Functions ABS The ABS function derives the absolute value of a numerical value or variable Example 1 ABS 25 86 l I sl Normally 25 86 61 The ABS function takes the actual difference of the numbers to get 61 INT The INT function rounds a numeric value to the largest intege...

Page 69: ...the PC I500A you will discover that variables which hold a single nurnber can have drawbacks Perhaps for exampl c you arc considering a program which reads in fifty numbers and sorts them You may 1uickly conclude that although the PC I 500A has more than enou gh POtential variables there must be an easier way There is and it is called an array variable An array is simply a group of consecutive sto...

Page 70: ... creates an array with one location and is actually ra1her silly since for numbers at leastt i1 is the same as declaring a single value numeric variable It is important to knovJ that an arrav vadable X and a 11ariable X are separate and distinct to SHARP The firs1 X denotes a series of numeric storage locations and the second a single and d ifferent location Now th at you knov1 hov1 to create arra...

Page 71: ...of Slrings smaller than the dcf 0ult helps to conserve memory space The third example declares a two clement array of 80 eht1rac1er strings and the last example declares a single string of twenty six characters see Section B 1 Besides the simple arrays we have just studied the PC 1500A allows two dimensional arrays By analogy a one dimensional array is a list of data arranged in a single column A ...

Page 72: ...IMensioning Strings Character strings are limited by default to sixteen characters in len91h By d imensioning a character string it is P0 5ible to create a string whose length is up to 80 character s Reductions in string lcng1h 10 conserve memory space are also possible The length of a string is specified in the DIMension starnmcnt as follows DIM variable name bound length where variab c name is t...

Page 73: ...operations are performed an internal temporary character storage area is used 10 build the new string This storage area has a capacity of BO characters If the new str ing exceeds this length an ERROR 15 will occur An illuuration of this area during a concatenation operation follo 1s Example 3 X LEN ABC LEFTS DEFGH I 2 l lNTE l _ t 2 l ABC l t 3 I ABCDE FGH I t 4 ABC DE t 5 l t NOTE The t symbol re...

Page 74: ...e order True if the two strings differ in length characters or ordering of characters True if the characters of 1he first string are greater occur later in the ordering than the characters in the second string True if the characters of the first string are less occur first in the ordering than the characters in the second string True if the characters of the first stl ing are greater than or arc e...

Page 75: ...above example XS is assigned the value of the character st ring PATTI The ASC function takes the first character P and converts it to its ASCII code SO Example 2 10 PRINT ASC K Output RUN i ASC K returns the ASCII code for K which is 75 C 2 CHR CHR is the complement o f the ASC function The CHR function takes an ASCII decimal code from 0 through 127 and returns the character string equivalent Nole...

Page 76: ...30 T MIDS MS 1 1 40 L ASC TS 45 IF L 651 OR L 90 THEN 60 50 TS CHRS L 32 60 PRINT TS 70 NEXT I 80 WAIT PR INT C 3 INKEYS This h JnCtion takes in any character from the keyboard and stores it in the specif ied variable There is no need to press ENTER because the character VJill be automaticalfy accepted variable INKEYS During execution of this statement a prompt character is not displayed unless a ...

Page 77: ...acter string character variable name 10 AS CATHY 20 C LEN AS 30 PRINT C 10 C LEN CAT 20 PRINT C RUN RUN If LEN is used on an empty string i e nothing is enclosed in the quotation rnarksl zero will be returned Example 3 Outrut 10 A LEN 20 PRINT A _ _ _ _ U N 0 1 C 5 LEFTS There are three functions used to select or extract specified sections of a character string LEFTS extracts characters from the ...

Page 78: ...examples starting from the left side of the character string characters are extracted and stored in AS Printing AS results in DR ESS and THIN respectively C 6 MIDS To extract the middle portion of a character string the function MIDS is used Example 1 Output Example 2 Output I character string e xpression expression MIO character string variable expression expression 10 A NEED HELP 20 BS MIDS A 3 ...

Page 79: ...me as LEFTS RIGHT character string number character variable number The nunlber argument to this function specifies how rnany characters to extract from the character string beginning on the right side Example 1 10 XS READ ONLY MEMORY 20 YS RIGHTS XS 61 30 PRINT YS In this program the RIGHTS function takes six characters from the right end of the string and stores them in the variable Y The conten...

Page 80: ...ANDOM should appear before the RND statement This fu nction soi vs a new seed in the generation of random numbers and thus causes the numbers to dif fer Accordingly a program run under identical conditions viii produce varied ou tput Exampl 1 Example 2 10 RANDOM 10 RANDOM 15 FOR I 1 TO 5 15 FOR I 1 TO 5 20 A RND 3 20 A RND 3 30 P R N T A 30 PRINT A 40 NEXT 4l0 NEXT Output 31 22 3 Output 2 3 132 C ...

Page 81: ...riables are stored STATUS 4 l N TlRI STATUS 100 iurul will display the program line number that was being e ecuted when program e ution was halted MEM IE mRI The MEM command is equivalent to the instruction STATUS 0 MTERI Program d ta memory STATUS 1 l r Free are a STATUSG ENT RI STATUS 3 ENTERI Freearea isobtained by STATUS3 STATUS2 1 C 12 TIME To display or set the month date and hour the TIME f...

Page 82: ...e USING statement allows a programmer to rigidly control the fotrnat of inforn lation on the display This allo vs standardized displays and prevents loss of information Wh n the USIN G clause appears alone or within a PRINT or PAUSE statement it defines the format for all subsequent PRINT or PAUSE statements until the next USING clause is encountered in the program Several USING clauses may appear...

Page 83: ...gits Used within c i numeric field to cause the number to be displayed in scientific notation Used in a numeric field to force printing of the sign of the data Speci fics a character field Characters are left justified within the field If the field width is not sufficient to hold the data string the string is truncated NOTE The width of a numeric field must always be one more than the width of the...

Page 84: ...0 info PRINT USING X 3 E 00 I PRINT USING l i ll Y 1234 1 PRINT USING Y 1234 1 PRINT USING II AS Y BCDEF 1234 PRINT USING AS 10 U I II 20 USING US 30 PRINT Y S I 1234 00 _______ PRINT X 1 3 14 PRINT USING AS X IABCDEF 3 141592654 82 Do not sale this PDF ...

Page 85: ... That is the GOTO or GOSUB functions will GO to one ot several statements or subroutines depending on the value of a numeric variable This dependence on a variable for guidance is what gives the ON state ents the nickname computed control statements The ON statements have the form ON expression l GOTO GOSUB line ii 1 line ll2 line 113 etc T he exp essiol I which follows the ON keywo cJ must evalua...

Page 86: ... exploit the 1 ull po ver of the d isplay several new statements have been added to the dialect of BASIC used by the PC l SOOA These extensions aro d escribcd in this section The display itself utilizes liquid crystal technology to display up to 26 characters at a tirne Each character in the computer s character set occ upics a 5 x 7 dot matrix Utilizing the GPRINT command programmers may develop ...

Page 87: ...s turned OFF and then ON the speaker is restored to an active mode The tones created by BEEP statement may vary depending on the combination of the expressions Demonstration Program F 2 CURSOR 10 D 60 20 DATA 14 30 DATA 245 1 245 1 160 1 160 1 40 DATA 143 1 143 1 160 2 50 DATA 180 1 180 1 195 1 195 1 60 DATA 220 1 220 1 245 2 100 READ X 110 FOR I 1 TO X 120 READ N S 130 BEEP 1 N ID SI 140 NEXT 150...

Page 88: ...I GO rn III OD m QJ CKJ rnl I moommco rnrn1SHIFT1 c J rn1SHIFT1c J rnrn IIlDD rnmoomml NT I m rnm m f IJ CK rn smnlCJ m Ic i IEHTER rn rnm ODmmrnrnmmrn 1sH 1c Jm m z i m cosm l T I rnmm m m O JC J l sHIFTfc JOD ISHIFTfC J rn rnmmoorn This program will cause the letters A 8 C and D to appear in positions 0 4 6 and 12 respectively on the display AUN B c D NOTE Specifying a cursor position greater th...

Page 89: ...orncornoo1 1 mmrncooorn r1rn coonc ow rnrn Il00 CIJ l IlOD CO ls n lc l IlQO CD Il00 Is Y QJ J J OD lSPAC I000000 CD c J CD Jl sHOFT j mcooom jcH r I mrnm1 1m1 1o ocim m m1 rurumrn1 1 mrnrn m moom imcoooco G CD CD l n I moomo omm0Dmm1 n 1 rnoommcooo rn oornoornco rnmcomm 1 CD CO I SHOFT cuCDCDl HtE rnmm1 1mrnrn1 Ht 1 0000 00CTJ CXJCD CDl r I CD rnrncrurn m rn1 CD m rnm o ommrnmm moo oornmcoaommmmr...

Page 90: ... any subsequent display of information The format of the GCURSOR instruction is GCURSOR position ixpression where position expression evaluates to a number in the range 0 to 155 TJ iS number pec ifies one of the 156 7 dot columns of the display NOTE If a position expression results in a number which is less than 0 or greater than 155 an ERROR 19 will occur The GCURSOR statement is usually used in ...

Page 91: ...110 1ing line 30 GCURSOR 93 Surprise The second outpu t has been truncated chopped offJ because it ran off the end of the display As a final example of the GCURSOR statement we present an advanced program which crc atcs ar I unusual effect by overlapping characters Program Listing 10 WAIT 0 20 DIM AS 0 10 30 A 0 C 0 40 INPUT ENTER MESSAGE 10 CHARS AS 0 50 CLS 60 FOR I 1 TO L EN AS O J 70 GCURSOR c...

Page 92: ...J m ISH nl rnrnoorn IE r I mrnm mm1 1 rnoo m oom rn 1 1rnmmrn m rooom 1 1 m moomco1 TE 1 rnrnmm oo mmoo mm1 00 00 CD OD QJ I I OJ CIJ IJ aJ r I rnao rnm o om rnoo rnm t n 1 o J0000 m m CDCIDCD 00 o J rnI C S JCDm l s fTI Jo JOOCD ISH FTI G Jo J 5 fTICTI J CO I TE CD rnrnt c t 1r c iG IJ l r l CIJ CDOOIXJ Il CXJ CD QJ T I CD rnooru1 1m m r J CD moooocorn rnm m moow mmm t TEAI rnrnrnrnmaornmoo0Dmm m...

Page 93: ...ed below 2 4 8 16 32 64 With 7 dots to a column each of which may either be on or off there arc 128 possiblc dot patterns Thus to specify a particular pattern one uses the format GPRINT pattern expression J attern cxprcssion2 etc where pattern expression evaluates to a number in the range 0 to 127 and specifics the pattern of energized dots Several pattern expressions may optionally be specified a...

Page 94: ...r a sum of several rows If the hexadecimal addressing scheme is used the 7 rows of the display are conceptually divided into a lov1cr group of 3 rows and an upper group of 4 ro vs Each group is numbered from its top row by powers of two as illustrated below 1 2 4 8 1 2 4 Thus it is possible to represent all the patte ns of a group by a single hexadecimal digit Because the lower group has only 3 ro...

Page 95: ...am Listin g 10 WAIT 0 CLS 20 FOR I OTO 127 30 GCURSOR 40 GPRINT 50 NEXT I 60 WAIT 70 GCURSOR 155 GPRINT 00 80 ENO Keystrokes 3 7 B F rnrn oo rn co CDoo1 1 o mrnm 1 1 moom rn 0Dco 1 1 rnco J o Jrnrn1 HTE I rnoom m uo m rn rnmco 1 rnoom 0 1 m cooo CDCTJ l rul m ooOD m rn cornl HT I m CilJ CID CAJ OJ CD l 1 CDOOCTDaJ J XJ IJ J KJ IJ D IJISH Tl JJ QiJ m OiJ cornco ICJ Q J rn SHOFTj c Jl TE I 0000 CiD ...

Page 96: ...Yhcrc position expression evaluates to a number in the range 0 to 155 and represents the column to be investigated The value returned by the POINT function is a number in the range 0 to 127 The interpreta tion of this number is a sum of pov1ers of 2 asexplained in the section on GPRINT As an illustration assume that on the display is a capital I in columns 40 through 44 1 2 4 ___ _ ___ _ 8 16 32 6...

Page 97: ...OfJ CAJ ls UFT ffi l ll S U FTI CJ CKJ SKIHI C IENTEAI m oooom CD rnrnt rc 1 a JOO DI 1 f sHOFTICJ KJ I lo Ja JUJCZJ D 1om 1 1m1 TE I m rn m CID ODcor 1rn rn oornt TE I m m m rnooODmrn ODm 1 N 1 rnrcom oocooornm r 1rn1 TE I OJ IJ CJDI l IJIT ill l HTEAI mmnooo m rn CD 1 m m m CQJODCO I IOOCOCQJrnmw l TE I CDl Om OD m CB m CQJ OD CD IEHTU I rnrnoorn1 irnrnrnGm cooorn rn 1 1 m m m cru m m cooo rnm l...

Page 98: ... t he Trace mode only when the line containing it is executed If for some reason that line is never reC1ched the Trace mode will remain inactive Once initiated the Trace mode of operation remains in effect until canceled by a TROFF instruction The TROFF instruction may also be issued as either a commanrt or a i rAtP ment The Trace mode can also be canceled by the key sequence As an example of usin...

Page 99: ...ress the ENTER key to suspend execution of the program If you change your mind again suspended programs may be continued with the CONT command A sampl session using our hypotenuse program follov1s Keystrokes Display UJ m i5J on TRON_ I NTCA RI JIJO RUN l NT I CD 3 CiN1 l rn 4 IEHTERI 1 0 IIl 1 0 I NPUT A B CD 20 IIl 2 0 A A A B B B rn A IEHTEA 9 00 B 1E NTEFtf 1 6 OJ 30 OD H ENTER 5 CD HYPOTE NU S...

Page 100: ...ing them with an ampersand The following are e amplcs of valid hexadecimal numl crs 16 F 7ECA 08 99A 58 Hexadecimal numbersmay be used in calculations 10 A l NT l RUN 20 Or ithin programs 35 GPRINT F 54 3E 40 DATA 67 7F 28 12 305 H 2 AND Function The AND function provides a boolean AND of the internal representation of 1v10 values The values must be in the range 32768 through 32767 Numberswhich ex...

Page 101: ...h exceed this range will cause an ERROR 19 Example Result 10 OR F 1 5 1 OR 0 1 1 OR 1 1 55 OR 64 I 1 9 16 OR 63 63 H 4 NOT Function The NOT function returns the boolean NOT or complement of the internal representation of a single value The value must be in the range 32768 throu gh 32767 If the value exceeds this range an ERROR 19will occur Examples Result NOT 0 1 NOT F 1 6 NOT 55 56 NOT 2 NOT 2 1 ...

Page 102: ...e D Up ArrowI key When the BREAK message appears you may also review and change the values oi variables For example HO I ENTERI 56 AS ENTER Whenever you are ready to resume execution simply return to the prompt 1 I and type CONT ENTER J MODE CONTROL LOCK UNLOCK The LOCK inst uction may be used to control the mode RUN PROgram or RESERVE in which the computer operates Included Vithin a pro ram it pr...

Page 103: ... you the trouble of typing them again 1 Connecting the Computer to the Interface Connect the printer cassette interface CE 150 and the computer PC 1 500AI in the following manner 1 Turn the computer power OFF Important Note It is essential that computer power be OFF If power is ON the computer may hanu up all keys inoperative If this occurs press the A LL RESET switch on the bottom of the comp 1te...

Page 104: ...he left so that the printer pins are inserted into thr computer see figure 0 4 nark tb Oown ard 1 4 Y I I I 1 j al To vord you b gl I T 4 marl S lA 1 J I til Af P _ I cl Leftward lAlign this UrlJce with mating sur face of t he printer Make aclc e contact Do not force the computer and Printer together 1 rnatch up does not easily take p lace carefully shift the computer left and right to correctly p...

Page 105: ... 2 CHECK 6 or NEW 0 C HECK6 How to connect the AC adaptor P C ISOOA 3 Connecting a Tape Recorder to the Interface ACad Jptor EA 150 I Do not connect the AC adl pto EA lSO to the Comouter whtn the Computer is connected to the Prlnte r Oassettc Interlace First connect the CE 150 unit and computer and connect a tape recorder with tho CE 150 unit as shown in the following diagram CE 150 termin tls lol...

Page 106: ...4 KHz 9 Wow and Flutter 0 3 maximum W R M S TO Other Recorder moto r should not fluctuate speed In case the mini Plug provided with the CE 150 is not compatible with the input output jacks of your tape recorder special line conversion plugs are available on the market NOTE Some tape recorders may reject connection due to different specifications Or those tape re corders having distortion increased...

Page 107: ...he pal r inlet Any curve or crease at the paper tip may prevent paper insertion 3 Press the computer ON key to turn it on and press the fill key to feed paper At this time feed the paper so tllat the paper tip is 3 to 5 cm above the printer Note Paper tape is available wherever the CE 150 is sold Paper inlet Please order product No EA 1500P 5 rolls per package when reordering the paper tape The pa...

Page 108: ... I CJUO L I CJ Cl CJ OOCJ o o o 6 Lock the printer cover 5 Replacing the Pens Four kinds of pens can be installed in this unit Pen installation pos itions are as illustrated belo w For details refer to the instruction 1nanual ockl Pen position I dttli cting rnagoct t 3 Red 106 Do not sale this PDF o w e ao oc oc The pc o slots are numbered 0 1 2 and 3 clock isc from the position detecting magnet T...

Page 109: ... when reordering pens The pens are specifically des gned for this unique printer Use of any other pen may 0 cause damage to the unit 14 To install or remove the next pen press the Olli key The pen holder returns to the left rotates so that the next pen comes up and shifts to the right again Remove the pen and replace it with a new one as in steps 2 and 3 15 After pen replacement or installation pr...

Page 110: ...s extremely helpful in relocating the program you are saving O K next 4 If your recorder has an automatic volume control set it on automatic If it is a manual volume control turn the volume level up halfway between middle and maximum i e 3 4 level If y6ur recorder has atonecontrol turn the tonecontrol knob to aposition halfww between intermediate and high 13 4 position 5 Turn the remote switch on ...

Page 111: ...inning of the section 1t took me only 1Otries to get it right so don t be discouraged If I can do it you can do it Once the computer arrives at the end of the program the BUSY indicator light will go off the recorder will stop and the prompt will re appear on the display Congratulations your first pfogram has been saved for future use In order to insure that this has in fact been accomplished we c...

Page 112: ...NT and INPUT Commands PRINT Now that we have illustrated the use of CSAVE and CLOAD we would like to introduce two similar commands The PRINT command saves the value of a variable Of s et of variables on tape This is different fro m CSAVE which saves a program The purpose for saving data is to enable you to use the sanle data in ar Other program For example in the follo ving program the variable T...

Page 113: ...er variable is regarded as a file name In this case be sure to place a file name Example 1 Example 2 Example 3 INPUT HI AS TAPE 20 PRINT AS X This is idential to PRINT TAPE XS PRINT X This records only the contents of numerical variable X without a file name PRINT XS This does not record only the contents of character string X without a file name but the contents of XS is regarded as a file name N...

Page 114: ...odule 20 PRINT INTEREST CHARGES 30 INPUT Amount Borrowed B etc Note that unlike the CLOAD command the new program DID NOT replace the existing one and that some line numbers have been duplicated Also note thot a label was used on thc first line of the merged module This allows LINKING of the modules to lether See LINKING MERGED MODULES below It is important that you review the following informatio...

Page 115: ...second modul e the processor will cease execution after line 30 in the first modu le To LINK your various modules together the following techniques are valid GOTO B GOSUB B IF THEN B Bis used for example only you can use any label except reserved words or letters which appear in row 2 on the keyboard i e Q thru P NOTE When another program is subroutine called with GOSUB statement in a plurality of...

Page 116: ... two remote control terminals REM 0 and REM 1 either of v1hich can be used In program operation not manually however the program designates the tape recorder connected to the REM 0 term inal or the REM 1 terminal The reforc these remote control terminalsshould be connected a cording to the program In this section how to operate the second tape recorder connected to the REM 1 terminal of the interf...

Page 117: ... that e pla ined previously in he single tape recorder 5 Press Playback button_ 6 Execute COLLATION instruction CLOAD 1 file name l rul Example Designate PRO or RUN mode CLOAD 1 PR l l ERI Execution ends when both contents match resulting in prompt displays 3 T rcinsfer from Tape Procedures 1 Enter AMT OFF and the l t I key to clear remote control functions 2 Put a recorded tape into the tape reco...

Page 118: ...Speed Rotation Colors Graphing System Paper Feed 4 5 6 7 9 12 18 or 36 depending on character size chosen 1 2 x 0 8 mm to 10 8 x 7 2 mm depending on charactersize chosen Maximum 11 Characters pe r second v1hen printing smallest characters Characters may be printed in either of two directions on either of two axes 4 Red Blue Green Black X Y axis plotting Manual or Programmable C 2 The TEST Command ...

Page 119: ...commands which cause printing or dra1lo1ing such as LLIST LINE and others are also functional in this rnode When printing the color used will be the color which was previously specified If you have U ust turned the machine on this Viii be whatever color pen you have selected to correspond to Colot 0 To change the color you must issue the Color command lsee appropriate section The character size us...

Page 120: ...he statement GRAPH will initiate this mode setting the pen to the far left side of the paper C 5 Listing Programs The LLIST command causes the current progiram or portions ot the program to be printed Because selective printing of program sections is possible the LLIST command is extremely helpful during the program development process The form of the LU ST command is sim ilar to tine form of the ...

Page 121: ... list a program is dependent on the previous specification If the previous character size specified was size 1 or siie 2 then this size remains in effect If the previous size 1a s larger than 2 then size 2 is used The LUST command caus s the printer mode to be set to TEXT If you were in GRAPH mode and wish to return to this mode you most issoc the GRAPH command While listing a prooram the PC 1500A...

Page 122: ... 1 CSIZE 1 2 3 4 5 6 7 8 9 Characters per printed 36 18 12 9 7 6 5 4 4 line Height of each 1 2 2 4 3 6 4 8 6 0 7 2 8 4 9 6 10 8 character rnm Width of each character 0 8 1 6 2 4 3 2 4 0 4 8 5 6 6 4 7 2 mm C 6 2 ROTATE The ROTATE OMl Mnd is used in GRAF H Mode only to specify the direction in which printing occurs Four directions are possible Up Down Left to Right and Right to Left with the letter ...

Page 123: ...tion of the COLOR command will cause the pen position to be r set to the left side of the paper In the GRAPH mode the pen wiln return to its previous position C 6 4 LF Line Feed The LF command causes the paper in the printer to be moved forward or backwards The form of the command is LF expression TEXT mode only If the expression evaluates to a positive number up to 3276 7I the paper is advanced t...

Page 124: ...he curroent character size If the item is a number an ERROR 76 will result If the item is acharacter string the string will be continued on the next line Concern for the size of a printed item is also important for the t vo item LPRINT statement whose form is LPRINT item 1 item2 Using CSIZE 1 guarantees that l IO numeric it ems ill be rinted on the san1e line In this case the items will be justifi...

Page 125: ...ubsequent commands as if it were 150 30 A B The LPRINT statement also incorporates a USING clause which operates in the same manner as it docs in the PRINT statement The USING clause may only occur in an LPRINT statemer t which is executed in the GRAPH mode C 6 6 LCURSOR The LCURSOR statement allows positioning of the pen in a manner analogous to the CURSOR statement of the display The form of the...

Page 126: ... off If the pen is moved into this imaginary realm and then the SORGN command is issued subsequent printing or dra Jing statements viii have no effect It would thus appear as if the program was in error or that the Interface was damaged The following proyram sets the origin to 100 units up and 100 units to the right of the pen s current position l l then draws a 10 unit box with one of the boxes c...

Page 127: ...lso allows dashed lines to be drawn with eight different dash lengths The first from of the LINE command is LINE X1 Y11 X2 Y2 line tYpe color The starting point of the Iine is determined by the values of the expressions X1 and Yl_ If the values of the trxpressions X1 and Y1 are omitted the c urrcnt pen position is used for the starting point X1 Y1 The destination point of the line is determined by...

Page 128: ...ous form of the command The final form of the LINE command allows multiple point specilications to be made Each point after the fir st represent a destination endpoint of the next line segment to be dra n The current position is assumed as the starting endpoint for the line segment This form of the LINE command is LINE X1 Yl X2 Y2 l X6 Y6 line type color The three dots in the form above are used t...

Page 129: ...he current pen position rather thijn to the origin The forms of the RLINE commands are he same as those of the LINE commands with the substitution of the word RLINE for LINE Examples follow LINE 100 1001 200 50 2 1 y 100 too too Colot 1 200 50 LINE 50 1001 100 1001 50 1001 y Starting pen position t ___ so 1 0 0 1 1 1 x C 50 _ OOj f Pen goes Do not sale this PDF off edge and is lifted Ctoo tool 127...

Page 130: ...and more about Sharp PC 1500 at http lwww PC 1500 info RUNE 50 50 50 1001 50 50 50 50 t ll Starting pen position 50 50 LINE 50 50 100 100 2 B y Do not sale this PDF ooo 1001 _ I I I f I I I J ISO SOI 128 50 ...

Page 131: ...e RESERVE mode press I SHIFT I The mode indicator at the top of the display should now read RESERVE To escape from the RESERVE mode simply press the MODE key once Because each Reserve key may be used to recall any of thiree stored phrases ther e must be a method of selecting which phrase is recalled when a Reserve key is pressed This method is a key in the lower left corner marked with the symbol ...

Page 132: ...e it A special notac ion 1 1llowed in the Reserve mode could have saved us some trouble in the previous example This notation is the use oi the At sign to represent the EN TER command If we had assigned the phrase RUN 100 to our Reserve key execution of the program would have begun as soon as ve returned to the RUN mode and pfessed the Rescfve key To demon strate this enter the following statement...

Page 133: ...ATN Keystrokes C Jmmoo1 tmoom 1 c 1 CD 00 QO C I m J J I lsr c ICD m OD ISP IDO CD ISH1rtlC J lc Tc l The template has now been defined and stored Return to the RUN mode by pressing the key To recall the meaning of the Reserve keys simply press the RCt I recall button and there they are Pre the Ra I key once more and the prompt returns Templates may be created for each group of reserve keys and ma...

Page 134: ...Z X C V B N M SPACE and As an example enter the following statements to create three labeled programs Program Listing 10 Z GOSUB 500 20 PRINT Z KEY 30 END 140 A GOSUB 500 150 PR INT A KEY 160 END 270 GOSUB 500 280 PRINT SPACE KEY 29 0 END 500 CLS PAUSE YOU PRE SSED THE 510 RETURN In RUN mode try beginning each program with the DEFine key Notice that specifying a letter for which no corresponding l...

Page 135: ...ms which are initiated using the DEF key may be given a single value each time the program is run without using an INPUT statement ThlO reading of the value is performed by the AREAD statement which must follow the program label on the same line The AREAD statement has the form AREAD variable name where variable name is a legal numeric or character variable name To pass a value to a program which ...

Page 136: ...e pr gram memory or it will be ignored In addition several other conditions are necessary for the A RUN statement to work These are that the PC 1500A was tu rned OFF while in the RUN mode and that no errors arc detected as the PC 1500A is turned ON The folloi ving program uses the ARUN statement to greet the computer operato r Program Listing 10 ARUN 30 CLS 50 BEEP 5 50 70 PRINT WELL HI THERE 90 E...

Page 137: ...iation This is explained in the chart in the next section Basically variables in the fixed memory area are never cleored except by an explicit CLEAR statement Those in main memory arc cleared whenever a program is begun 1 1ith the AUN command One other idiosyncrasy about the fixed memory aroa is that the data in this urtta nlay be redefi ned as an array whoso name is At Sign for numeric variables ...

Page 138: ...44 23 l RI 2 Change the data retention program in the CE 159 Instruction Manual page 45 as follows IData retention programI 10 STOP 20 A POKE 30873 PEEK 16375 PEEK 16376 30 END 40 B POKE 30873 72 0 50 DIM ZY 127 ZZ 0 2 60 END 70 C POKE 16375 PEEK 30873 PEEK 30874 80 END 90 Do not sale this PDF Data retention program 10 STOP 20 A POKE 30873 PEEK 16375 PEEK 16376 1 3_9__E _N_D ______________________...

Page 139: ...All and more about Sharp PC 1500 at http lwww PC 1500 info APPENDICES Do not sale this PDF 137 ...

Page 140: ...SOR GL RU GLC RUN GLCU GLCUR ROTATE RO GLCURS ROT GLCURSO ROTA ROTAT GRAPH GRAP SORGN so LCURSOR LCU SOR LCUR SORG LCURS LCURSO TAB LF TEST T E LINE LIN T ES LUST LL TEXT TEX LLI LLIS Cassette Commands CHAIN CHA MERGE MER CHAI MERG CLOAD CLO PRINT P I CLOA PR II PRI CLOAD CLO PRIN 11 CLOA RMT OFF RM OF CSAVE cs RMT ON RM 0 CSA CSAV INPUT I IN INP INPU 138 Do not sale this PDF ...

Page 141: ...EE CLEAR CL CLE CLEA CLS CURSOR cu CUR CURS CURSO DATA DA DAT DEGREE DE DEG DEGR DEGRE DIM D 01 ENO E EN ERROR ER ERR ERRO FOR F FO GCURSOR GCU GCUR GCURS Do not sale this PDF GCURSO GOSUB GOS GOSU GOTO G GO GOT GPRINT GP GPA GPRI GPRIN GRA D GR GRA IF INPUT I IN INP INPU LET LE LOCK LOC NEXT N NE NEX ON 0 139 ...

Page 142: ...RE RETURN Commands CONT LIST PALI PAUS P PR PRI PRIN RAD RAOI RADIA RA RAN RAND RANDO REA RES REST RESTO RESTOR RE RET RETU RETUR c co CON L LI LIS Do not sale this PDF STEP STE STOP s ST STO THEN T TH THE TRON TR TRO TROFF TROF UNLOCK UN UNL UNLO UNLOC USING u US USI USIN WAIT w WA WAI NEW RUN R RU 140 ...

Page 143: ...AC MID Ml MID AND AN NOT NO ASC OR ASN AS ATN AT Pl CHA CH POINT POI CHR POIN cos RIGHTS RI RIG RIGH RIGHT DEG RND RN OMS OM SGN SG EXP EX SIN SI INKEY INK SQ R SQ INKE INKEY INT STATUS STA STAT STATU LEFT LEF STA STR LEFT LEN TAN TA LOG LO TIME T l TIM LN VAL V VA Do not sale this PDF 141 ...

Page 144: ...n off th computer by pr sing the O ll key 2 Remove the screw from the battery cover with a coin or a small screw driver tsee Fig 1 3 Replace the 4 batteries Fig 21 a r 9 Bo ltrel v J I Fig 1 p cover _ L Fig 2 4 PU h the battery cover in slightly while replacing the screw 5 To proceed press the loNIand CL Ikeys Be sure you are in program mode If not press l until PRO is displayed type NEW 0 and pre...

Page 145: ... rechargeable battery can not be used as a battery for PC 1500A The AC adaptor EA 150 for CE 150 is also used as an AC adaptor for the PC 1500A when it is separated from the CE 150 Do not connc t EA 150 to the computer PC 1500A when the PC 1500A is connected to the printer cassette interface CE 1 50 M0 dulo compartment This is whi rt iln optionul rn rnorv module is accommodated Oo nut touch any co...

Page 146: ...xa 0 1 2 3 4 5 6 7 decimal b4 b3 b2 bl I 0000 0 SPACE 0 p p 0001 1 1 A Q a q 0010 2 2 B R b r 0011 3 3 c s c s 0100 4 s 4 D T d t 0101 5 5 E u e u 0110 6 6 F v f v 0111 7 7 G w 9 w 1000 6 8 H x h x 1001 9 9 I y i y 1010 A J z j l 1011 I B K r k 1100 c L I I 1101 D M m 1110 E N n 1111 F I 7 0 0 I These symbols can be disploycd but cannot be printed on the printer 144 Do not sale this PDF ...

Page 147: ...m mand or when there is no GOSUB command corresponding toa RETURN command E 10 FOR A 1 TO 10 100 NEXT B Display ERROR 2 IN 100 4 This error occurs Vhen there is no DATA corresponding to a READ command E 10 READ X Y 20 DATA 10 30 END DisJ lay ERROR 4 IN 10 5 This error occurs when an array variable is declared with the name of an existing variable E 10 DIM A 10 101 20 DIM A 5 Displ y ERROR 5 IN 20 ...

Page 148: ... 10 DIM A 3 20 A 4 1 Display ERROR 9 IN 20 10 This error occurs vhen there is not enough memory available to create rnore vari ables Ex key operation MEM l TCRI AB 10 l NT I diu lay 7 ERROR 10 11 This error occurs when the wecified line is not in the program Ex 10 PRINT X X GOTO 5 Display ERROR 11 IN 10 12 This error occurs when the USING command spe ifies incorrect format specifica tions Ex 100 P...

Page 149: ...et by hexadecimals exceeds 65535 Ex 1Fli AB 17 Data type tnumerals character strings is inappropriate for calculation expression Ex 1 A ltHT RI 18 Number of arguments inappropriate for expression Ex LEFT ABC I IE rn SIN 30 60 l TEAf 19 Specified numeric value is outside the permitted ra nge Ex 10 DIM A 256 Display ERROR 19 IN 10 20 When fixed memory array variables are specified there is no follow...

Page 150: ...occurswhen a line nurnb r exceeds 65539 65280 65539 ERAOR 1 Ex 102235 A 10 lEMTERt 32 This error occurs vhen the graphic cur sor is between columns 1S 2 155 during execu1ion o f input commands i nput code cannot be displayed 131 177 181 0 224 241 Ex 100 GCURSOR 152 110 INPUT X Display ERR0 R 3 2 I N 1 10 There is a or which is regarded as sign irTuntodhttely before character string and or characte...

Page 151: ... case of X 1 Square Root o1 negative numbers Cassette Related Errors 40 Inappropriate specification for the expression Ex LN 1 101 Ex ASN I1 5 ACS 1100 Ex SOR 10 41 SAVE and LOAD have been specified for the ROM area 42 The Cassette file data is too large and cannot be LOADed 43 While verifying data using the CLOAD command the format of data to l e loaded docs not match the file format 44 A CHECK S...

Page 152: ...e printer turn OFF the CE 150 After recharging the printer turn the CE 150 ON You may now c ontinue 2 The color signal is for COLOR and goes on only when the pen comes to the left side When the pen is in this position it is possible to know the number ol the present pen color p0sition 3 After recharging immediately push the PC 1500A ON key again and start opera tion 4 When error 1 appears note the...

Page 153: ...mputers and Data Processing by Gary B Shelley and Thomas J Cashman Anaheim Publishing Co Fullerton California 1980 0 ORDER OF EXPRESSION EVALUATION Calculations are performed in accordance with the following hierarchy expressions in parentheses having the highest priority and logical operations having the to iest If two or more operations of the same priority are found in the same expression or su...

Page 154: ...ogy l OO y O x o ERROR39 y x yx y O x O 0 y 0 x integer ERROR 3 9 DEG I x l 1 x 10 10 lIn TAN x however the foll owino cases are SINx excluded COSx RAO 1x 1 x 1o IDEG Ix 1 90 2n 1 TAN x GRAD I x I x 1010 RAD I x I y 12n 1 GRAD I x I 10012n 1 In integer SIN Ix 1 x 1 cos x TAN 1X l x l 1x10100 LNx 1 x 10 99 x 1 x 10100 LOGx EXPx 1 x 101 x 230 2585 092 x 0 X 1 X 101 00 Functions other than shown abov...

Page 155: ...1 Functions ABS ACS ASN ATN cos OEG OMS EXP INT LOG LN rt Pl SGN SIN V Square Root TAN exponentiation 2 Statements AAEAD USING CLEAR DEGREE END FQR TO STEP GOSUB GOTO GRAD IF INPUT LET MEM Do not sale this PDF 3 Commands CONT LIST NEW RUN 4 Cassette Commands CHAIN CLOAD CLOAD CSAVE IN PUT PR INT NEXT PAUSE PRINT RADIAN REM RETURN STOP THEN USING 153 ...

Page 156: ... ARUN BEEP not PC 12111 CLS CURSOR GCURSOR GPRINT DATA DIM LOCK ON ERROR ON GOSUB ON GOTO POINT RANDOM READ RESTORE TRON TROFF UNLOCK WAIT Do not sale this PDF 3 Commands same as PC 12111 4 Cassette Instructions CHAIN CLOAD CLOAD CSAVE INPUT MERGE PRINT AMT OFF AMT ON 5 Printer Instructions COLOR CSIZE GCURSOR GLCURSOR GPR INT GRAPH LCURSOR LF LINE LUST LPRINT RUNE ROTATE SORGN TAB TEST TEXT 154 ...

Page 157: ...ees to degrees minutes seconds EXP EX IN KEY INK Character variable IN KEY INKE If a key is pushed during execution of INKEYS INKEY command the ASCII character will be read into the character variable INT Truncates value to integer INT 1013 IE Ttol Display 3 LEFTS L EF L EFTS character variable numeric expression LEFT Takes the specified number of characters from the lctt side of the specified cha...

Page 158: ...variable numeric exp RIG Takes the specified number of characters from the RIGH right side o f the specified t haractcr string RIGHT RND RN RND expression Command to generate random numbers SGN SG Signum furiction SIN SI sine SOR so square root STATUS STA STATUS 0 or 1 STAT 01 Number of program steps available STATU 1 Number of program steps already used STRS STA STRS numeric expression Converts n...

Page 159: ...u 1 CURSOR exp 0 exp 25 CUR specification of starting position of display CURS 2 CURSOR CURSO cancels previous specification DATA DA DATA exp exp OAT Data to be read in using the READ command DEGREE DE Angular mode specification DEG Degree 0 is designat ed DEGR DEGRE DIM D 1 DIM variable name exp dimensiont DI 21 DIM variable name exp exp3 3 DIM variable name exp1 exp2 variable names A B CS 0 etc ...

Page 160: ...side arc hexadecimal numbers print GPRI GPRIN 2 GPRINT 0 0 3 GPRINT O O GRAD GR angular mode designation GRA grad 9II is designated IF 1 IF conditional expression execution command 2 IF arithmetic expression execution command Evaluates given conditions and either moves execution to the next l ine or executes command INPUT I 1 INPUT variable variable IN 2 INPUT character variable character INP vari...

Page 161: ...fer to the Instruction Manual of the CE 158 PAUSE PA Same form as PRINT command Displays the specified PAU content for about 0 85 seconds then executes PALIS program POINT POI POINT expression O expression 155 POIN 0 expression 9 B Reads out dot pattern of information displayed at specified point ex A POINT 56 PRINT P Iexpression l PR 1 PRINT character PRI character variable PRIN 1 xprcssion I lex...

Page 162: ...alt program execution ST STO THEN T Defines execution command for IF statement TH mp commands are only possible to be defined as THE execution commands for IF command Iexpression I THEN character character variable TRON TR Specifies th e mode to perform debugging trace on TRO T ROFF TROF Cancels the mode for performing debugging trace off UNLOCK UN Cancels LOCK mode UNL UN LO UNLOC USING u 1 USING...

Page 163: ...or machine language area and the remaining area for the program and all variables is cleared RUN R 1 RUN RU 2 RUN expression 3 RUN character character v ariablc Effective in RUN mode 4 Cassette Commands Command Abbreviation Remarks CHAIN CHA Transmission commands When used in the middle of CHAI a program reads in programs from the tape transmits and executes the program 1 CHAIN filename CHAIN file...

Page 164: ...computer Takessarne form as CLOAO command In thiscommand previously recorded prog rams will be retained as they are and programs newly re ad in Viii be added PRINT p Data recording command This command records onto PR ii tape the data stored in the PC 1500A PRI 1 PRINT variable name variable name PRIN PRINT 1 variable name variable name 12 PAINT filename variable name _ PAINT 1 filename variable n...

Page 165: ...INE LIN Line drawing commands Valid for GRAPH mode only 11 LINE exp 1 exp2 exp3 exp4 21 LINE exp 1 exp2 exp3 exp4 exp5 exp6 31 LINE exp1 exp2 exp3 exp4 exp5 exp6 B cxp5 specifics line type exp6 specifics color 8 specifies a box drawing 4 LINE exp 1 exp 2 exp 3 exp4 exp 11 exp 121 LU ST LL List program LLI LLIS LPR INT LP Prints specified content LPR Valid for text mode only Takessame form as PR IN...

Page 166: ...0th digit Display 5 555555556E 01 5 9 9 4 99999999999E 00 t This is rounded to tho 10th digit Display 5 Thus calculations are carried out for mantissas ol up to 12 digit This may cause a diflerence in the results of calculations when performed in succession and independently Example 1 31 9 Successive calculation 3 SH l 2 G 9 9E 11 Independent calculation 3 n 2 9 8 9 1 1 0 Even in the IF statement ...

Page 167: ...All and more about Sharp PC 1500 at http www PC 1500 info Do not sale this PDF ...

Page 168: ...All and more about Sharp PC 1500 at http www PC 1500 info SHARP CORPORATION OSAKA JAPAN Do not sale this PDF 1983 f SHARP CORPO RAT I ON Ptintttd Jn JoPon lmprlmll au Jopon 3 G0 2T I T IN SE 397 CCZZ ...

Reviews: