background image

Summary of Contents for PC-2 TRS-80

Page 1: ......

Page 2: ...CK S electIOn and sale expense RADIO SHACK has no obligation to replace or repall expendable Ifems B RADIO SHACK makes no warranty 3S to the deSign capability capacity or SUitability for use of the So...

Page 3: ...tware License Customer is expressly prohibited from disassembling the Software CUSTOMER IS permitted to make additional copies of the Software only for backup or archival purposes or if additional cop...

Page 4: ...ve made reference to the book TRS 80 PC 2 Programming Guide optional extra This manual which should be available in the Summer of 1982 will be a comprehensive PC 2 BASIC Programming Manual In the mea...

Page 5: ...achine you want it to be At its simplest level of operation you can use Radio Shack cassette programs RAM Modules or ROM Modules All you will need to know is how to load and run a cassette program or...

Page 6: ...hose commands which can be used by the Computer when it is not connected to an optional device such as Printer Cassette Interface For a description of the commands which can be used with an optional d...

Page 7: ...ay Rear Panel 2 Setting Up the Pocket Computer 13 Starting Up Battery Installation External Power Supply 3 Using the Pocket Computer 19 Using the Keyboard The PC 2 As A Calculator PC 2 BASIC 4 Care an...

Page 8: ...than the mammoth computers of a few years ago Read Only Memory ROM which contains the BASIC language Random Access Memory RAM for storage of programs and data even when the Computer is turned off amou...

Page 9: ...Carefully read the following section P c c P P M MeMOR l t 1JHW TRs ao t j OWERr I I 2CD ill iJJ u S rL I TI I IlTIJl 1 1 I ITJI 1lI El1 I TI CA mmrn mru W gg _Ill ill f rnJ 1 g E rn rnJ n g g EJJ ru...

Page 10: ...ues commands or statements you desire When SHIFT is pressed before any of the Function Keys the character above the key will be used In Lowercase Option Mode SMALL any alpha key pressed after this key...

Page 11: ...entheses Keys Pressing SHIFT before pressing these keys will produce the Greater Than Less Than symbols CD 7l CD SMl GJ Display previous program line Pressing SHIFT before pressing this key will produ...

Page 12: ...before the PC 2 will accept alphanumeric input from the keyboard Backspace Key This key allows you to move the Cursor to the left without erasing previously typed characters Pressing SHIFT before pre...

Page 13: ...CQID and the Indicator wi II go off G SMALL Lowercase Option Indicator This Indicator is on whenever the Computer is in Lowercase Option Mode the Computer can display either upper or lowercase letters...

Page 14: ...cator This Indicator lights up when you press ill When the PC 2 is in the RUN mode pressing IT followed by a program label key see Table 2 will allow you to run a labeled program In any mode pressing...

Page 15: ...o this slot See your RAM ROM Module user s guide for specific details o ALL RESET Button If the PC 2 ever hangs up use a ball point pen to press this button while pressing ON Hold the button and key d...

Page 16: ...Remove this Cover to gain access to the batteries which supply power to the PC 2 Be careful not to lose the screw which secures the Cover it is not attached to the Cover when removed External Power S...

Page 17: ...compute degrees radians or gradients Which Operation Mode the Computer is in PROgram RUN or RESERVE Mode Which of the three Reserve Modes 0 II or III has been selected Whether or not there s enough ba...

Page 18: ...omputer on for the first time Battery replacement Pressing ALL RESET To clear the Display and begin computing 1 Press 2 Be sure you are in PROgram Mode If not press until PRO is displayed 3 Type NEW0...

Page 19: ...y and a key has not been pressed for seven minutes press QR to turn the Computer back on When you do so the previous display will appear Note If the ARUN statement is used as the first command in a pr...

Page 20: ...l be displayed and the program will be in memory The PC 2 forgets only when you remove the batteries without first connecting an external power supply or when you clear memory Note You cannot turn the...

Page 21: ...me on check to make sure the batteries are installed properly Then press ALL RESET on the back of the Computer The message NEWO CHECK will be displayed Press and the Ready prompt will appear External...

Page 22: ...he Indicator does not come on replace the batteries If the Indicator still does not come on check with your local Radio Shack store Note that an external power supply will not recharge the batteries W...

Page 23: ...as all the features of a memory calculator plus much more This section will describe how to use the PC 2 as a calculator We ll also discuss features of PC 2 BASIC Language which are not common to othe...

Page 24: ...SHIFT before pressing a character key The next and only the next character will be displayed as an uppercase letter Unless you press SHIFT again all following letters will continue to be lowercase To...

Page 25: ...es set them equal to zero type CLEAR ENTER If you want to erase all programs in memory go to PROgram Mode and type NEW ENTER Don t forget that you can also reset the PC 2 by pressing the ALL RESET But...

Page 26: ...END in advance You must always press ENTER to enter the program line into the Computer s memory For instance type 50 PRINT X ENTER After you press ENTER the Computer will display 50 PRINT X You canno...

Page 27: ...NTER Then go to RUN Mode and press CID The Computer will display RUN _ Press ENTER and program execution will begin with the first program line in memory Hint Assign RUN to CID When you press CID in R...

Page 28: ...or three values press CIJ to change modes then press the appropriate Function Key Any value statement or command which the PC 2 recognizes can be assigned to a Function Key You ll find it most conven...

Page 29: ...signment 1 Be sure you re in the appropriate Function Key Mode 1 11 111 press CD and the Indicator will go from I to II to III Use I for this example 2 Press a Function Key II CfID Use II for this exa...

Page 30: ...d display the current time and date as soon as you pressed C D Since it s easy to forget what is stored in a Function Key the Computer has a couple of ways of reminding you what values are currently a...

Page 31: ...mpt is displayed and you re in the RESE RVE Mode you want I II or III type a quota tion mark 3 Type the value or an abbreviation assigned to the keys in the order which they were assigned 4 When the l...

Page 32: ...diately displayed However you will lose whatever was previously on the Display Definable Keys Definable Keys let you use the alpha keys and a couple of others for purposes other than their obvious int...

Page 33: ...Table 1 Command INPUT These commands will only be displayed if the PC 2 is connected to the optional extra Printer Cassette Interface If you use these keys when the Computer is not connected to the op...

Page 34: ...labeling program line numbers For instance you ll probably use the PRINT statement several times in a single program Instead of typing it over and over just press f 0iD when you re ready to use the s...

Page 35: ...erface is not connected Once the Interface and Computer are connected however you can specify these commands even if the Interface is not connected to a Cassette Recorder The second set of Definable K...

Page 36: ...1_ When you re ready to run the program set the Computer in RUN mode press MODE until RUN appears on the Display then press CXJ The program will begin execution You might then want to begin another p...

Page 37: ...from I to II to III and back to 1 For details on using GJ see RESERVE Mode earlier in this manual RCL Recall Function Key Assignments The Recall Key RCL acts as a toggle between whatever is on the Di...

Page 38: ...ne of the program that s in memory will be displayed If you are writing or editing a program pressing CIJ will display the next program line Holding CD down will activate a repeat function and the Com...

Page 39: ...error and which program line will be displayed Press el to clear the Display and MODE to enter PROgram Mode Then press CD or CD and the program line which contains the error will be displayed Furtherm...

Page 40: ...ore the break occurred Another difference is that in the RUN Mode pressing CD after an error message has been displayed will display the program line with the Cursor positioned on the cause of the err...

Page 41: ...tion will erase whatever character or space the Cursor is on top of although the change will not be saved until you press ENTER A typical use of might be to position the Cursor so it is on top of a ch...

Page 42: ...ere the character was CB Forward Space Insert Characters When you need to move the Cursor forward to the right without erasing characters press CB Notice that this is not the same as pressing SPACE If...

Page 43: ...l appear 3 Press CJ 4 Press ENTER to enter the line into the Computer s memory You must press ENTER before going on to another line or your changes will not be in effect Using the PC 2 s Calculator Wh...

Page 44: ...ble 3 describes the mathmatical functions the PC 2 recognizes when you re using it as a calculator PC 2 Mathematical Functions E V square root 7 Table 3 40 ASS ACS ASN ATN COS DEG DMS EXP INT LN LOG S...

Page 45: ...mming guide Table 4 lists the priority of operations the PC 2 uses PC 2 Order of Mathematical Operations 1 Any values enclosed in parentheses will be evaluated first Table 4 In the following example a...

Page 46: ...9 4 3 5 Finally addition and subtraction are performed Arithmetic Calculations You can perform all standard arithmetic functions addition subtraction division multiplication and exponentiation with th...

Page 47: ...mple 131 t j e _ _DEG RUN_ As soon as you press ENTER the answer will be displayed on the right DEG 100 RUN I The Computer will remember the result too That is if you want to multiply the result by 7...

Page 48: ...listed in Table 2 whenever it is in RUN Mode Functions are entered in the same order as you would write them on paper This is different from a calculator which requires the argument first then the fun...

Page 49: ...he PC 2 can store numbers in memory locations when it is being used as a calculator Unlike a calculator the PC 2 has 52 fixed memory variables A Z for numerics and A Z for characters You can also assi...

Page 50: ...n where n is a numeric expression between 1 and 26 which specifies a variable storage location A is the first memory storage location 1 and Z is the last 26 For example type A 5 ENTER This stores the...

Page 51: ...r instance type to recall the value assigned to the variable B Recalling Equations Once you ve calculated the result you may need to recall the original expression To recall an expression when the res...

Page 52: ...do this simply type an equation a comma the next equation another comma and so on When you ve entered the final calcula tion press ENTER and the last current result will be displayed For instance Whe...

Page 53: ...or Mode Any values assigned to variables in the RUN Mode can be used by the PC 2 when it is in the PROgrammable Mode Press MODE to enter the PROgram Mode and type in this one line program which calcul...

Page 54: ...s recognized by the PC 2 but not by most other computers that use the BASIC Language If you re familiar with standard BASIC you should be able to begin programming after reading this section This sect...

Page 55: ...the PC 1 Catalog Number 62 2313 Note that most PC 2 BASIC Keywords can be abbreviated When abbreviating keywords you must at leave specify the part of the word which makes it unique from all other key...

Page 56: ...Statement AREAD A Abbreviation PC 2 Statements Statement LET Abbreviatio n LE 52...

Page 57: ...___ _ _ _ _ r PC 2 Statements Statement TRON Abbreviation TRO Statement USING Abbreviation U Table 6 PC 2 Functions Function ABS Abbreviation AB Function DEG Abbreviation...

Page 58: ...Function MID Abbreviation M PC 2 Functions Function RND Abbreviation RN Table 7 54...

Page 59: ...e name specified after AREAD This allows you to input assign values to a variables without having to use the INPUT statement The reading of the value is performed by AR EAD The AREAD statement must di...

Page 60: ...the PC 2 will display YOUR NAt1E IS Jon thctn 20 AVERAGE YEAR 12 REM AVERAGE s monthlY GverQge 50 am When you enter the RUN Mode and the Ready prompt is displayed type a number which represents the t...

Page 61: ...irst program line the PC 2 will automatically execute RUN the program when you turn the Computer s power on However the following conditions must be met The PC 2 must be set to RUN Mode when you turn...

Page 62: ...le Set the PC 2 to PROgram Mode and enter the following program 30 FOR 1 TO 100 Press MODE to enter the RUN Mode Press IT to turn the Computer off When you press CQID the program will automatically ru...

Page 63: ...nt turns the BEEP tone ON or OFF BEEP ON is effect after ALL RES ET has been pressed or after the batteries have been removed from the Computer without first connecting an external power supply Exampl...

Page 64: ...ic expression between 0 65279 and specifies the lengh of each beep duration is optional if omitted 160 is used Abbreviations B The PC 2 can produce sounds with the BEEP statement You must specify the...

Page 65: ...ecifies the entry address of a machine language program variable is a numeric variable which has previously been defined variable is optional if omitted the machine language subroutine located at addr...

Page 66: ...CALL an ERROR 7 will occur Note that machine language programs can only be stored in the Primary memory buffer see POKE and PEEK for more details on Primary and Alternate memory buffers Example The f...

Page 67: ...on is optional if omitted 0 is used Abbreviations CU CUR CURS The CURSOR statement positions the Cursor at one of the 26 character positions on the Display The normal use of CURSOR is to position the...

Page 68: ...numbers will move across the display from left to right GCURSOR Selects Graphic Display Start Position GCURSOR position position is a numeric expression between 0 155 decimal and specifies the dot co...

Page 69: ...156 columns GCURSOR is most often used with GPRINT For details on using GCURSOR with GPRINT see GPRINT later in this manual Example In this example the letter A is printed at the 51st dot position on...

Page 70: ...lay delimiter is either a comma or semi colon If a comma is used a blank column will be left between patterns if a semi colon is used columns will be printed next to each other Abbreviations GP GPR GP...

Page 71: ...use GPR INT to turn any combination of dots in that column on or off For instance in the RUN Mode type This will tell the PC 2 to use column 75 Then type and a solid line will appear near the center...

Page 72: ...ecify the dots in terms of the rows they occupy as described in Table 8 GPRINT Addressable Dot Numbering Decimal Column Row 1 2 4 8 16 32 64 Table 8 To turn on the Row 16 dot in a column column 100 fo...

Page 73: ...1 2 3 and specify the sum For example 1 pI H IT ENTER _ 1 1 1 I __I and the first two dots in Column 100 will light up In the same sense if you need to turn all dots in a single column on to form a s...

Page 74: ...s in the next column Column 141 if you separate Row numbers with semi colons If you separate Row numbers with commas the PC 2 will leave a blank column Next enter the GP RINT statement and specify the...

Page 75: ...8 1 2 4 Table 9 In this arrangement the seven rows are divided into a lower group of three rows and an upper group of four rows Each group is numbered from top to bottom by powers of two It is theref...

Page 76: ...oup Note that the lower group 1 4 must be specified before the upper group 1 8 To use hexadecimal numbers with GPRINT you must enclose the numbers in quotes to create a string 7F or preface the number...

Page 77: ...GPRINT Dot Patterns Hexadecimal 2 F B 3 7 E 6 A 9 5 D 1 2 4 8 0 1 2 4 8 4 1 2 4 8 8 1 2 4 8 C Tabel 10...

Page 78: ...and the box will be created If you specify a single digit Hex number it must be preceded by a zero e g OA is legal A is illegal Another way to accomplish the same thing is to use the hexadecimal pref...

Page 79: ...RUN PROgram or RESERVE After LOCK ENTER is typed you cannot change modes by pressing MODE On initial start up the PC 2 is not locked into any mode If you lock the current mode and turn the Computer of...

Page 80: ...Message and Continue Execution PAUSE Abbreviations PA PAU PAUS PAUSE is a semi automatic form of the PRINT statement It holds whatever is on the Display for approximately one second and then goes on t...

Page 81: ...proximately one second before the next number appears 10 FOR X l TO 10 PEEK Returns Contents of address in Alternate Buffer PEEK address address is numeric expression between 0 65535 and specifies a l...

Page 82: ...dress of the Alternate buffer The values returned represent an ASCII code PEEK II may be used to retrieve information stored with a POKE II statement PEEK II and POKE II allows you to set up very comp...

Page 83: ...rns will identify the dot pattern specified with GPR INT For instance if your program uses GCURSOR 100 and you specified GPRINT 8 the PC 2 will return the value of 8 when you enter POINT 100 For detai...

Page 84: ...is a numeric expression between 0 255 decimal and specifies the ASCII value you wish to put into address value may be repeated POKE allows you to put values into specified memory locations The PC 2 u...

Page 85: ...specifies the ASCII value you with to put into address Abbreviations PO POK POKE is the same as POKE but POKE puts a value into the Alternate memory buffer The PC 2 has two memory buffers a Primary b...

Page 86: ...1 returns the number of bytes in use 2 returns the address 1 of the location where the current program ends 3 returns the address of the memory location where the current variables are stored 4 255 re...

Page 87: ...lo will display the memory address where the current program ends Note that this address is actually one greater than the actual address where the program ends T I ENTER _ I H l _ _ _ will display th...

Page 88: ...o digit number between 00 59 and specifies the seconds of the minutes Abbreviations TI TIME lets you specify set the time or display the current time Note that the time is set according to the 24 hour...

Page 89: ...e 91214 2424 for September 12 2 24 21 P M WAIT Specify Duration of PRINT WAIT delay delay is a numeric expression between 0 65535 decimal and specifies the length of time the PR INT state ment will be...

Page 90: ...cify WAIT without a specified delay will wait for you to press ENTER WAIT 0 causes the information to be displayed faster than you can keep up with it WAIT 65535 holds whatever you want printed for ap...

Page 91: ...tors don t come on when Batteries may be worn out Replace batteries or you press ON connect the PC 2 to an external power supply The PC 2 hangs up during program Press ALL RESET on the rear of the Com...

Page 92: ...S 8 bit 16KB System Area Fixed Memory Area BASIC Program Data Area Reserve Area Expandable User Area Dot LCD Display Display positions Graphic display 66 Keys Alphabet Numeric Function Reserved on O 9...

Page 93: ...Batteries 23 552 9V DC Adaptor Expansion Capabilities Plug in RAM 4KB RAM Plug in ROM RAM 16KB ROM 2KB RAM Dimensions 7 11 16 W x 3 3 8 0 x 1 H 195 W x 86 0 x 25 5 H mm Weight Approx 0 83 Ibs 375 g wi...

Page 94: ...CSn A AC Computes absolute value Abbreviations AB 1 Computes arccosine Abbreviations AC i n I _lot AREAD var Assigns Display contents to variable Must be used with a Definable Key label 55 Abbreviatio...

Page 95: ...r specified number of times frequency 59 and duration of each tone Abbreviations B CALL address var Calls the machine language routine stored with specified entry address and will use specified variab...

Page 96: ...tions specified by position Abbreviations CU CUR CURS 63 C L F OF 13 DATA expression Stores data to be accessed by a READ statement Abbreviations DA DAT DATA n LH COU L A 1 61 I lL HID I II DEG Conver...

Page 97: ...Page FOR TO STEP NEXT FO STE N NE NEX Opens program loop Abbreviations F GOSUB Transfers program control to the specified line Abbreviations GOS GOSU D IJ B 75CI GOTO Transfers program control to the...

Page 98: ...t 4T 1 Cl t 1elC JFI I II F f 2C i JF I H F 4 l f 7 i4 r 7F 1I IF THEN Tests conditional expression Abbreviations T TH THE IF F C THEf 2ClCl INKEY Gets keyboard character if available Abbreviations IN...

Page 99: ...l_ET 1Ci LIST line Lists first program line or specified line Abbreviations L LI LIS Page L LOCK Locks in current Operation Mode Abbreviations LaC 75 LOG n Computes logarithm to base 10 Abbreviations...

Page 100: ...program and resets the Computer 14 ON ERROR GOTO Sets up an error handling routine Abbreviations O ER ERR ERRO ON ERF DR GOTD 210 ON GOSUB Multi way branch to specified subroutines Abbreviations O GO...

Page 101: ...rn of specified column 0 155 on Display Abbreviations PO I PO IN 78 POKE address value value Primary memory buffer Fm E 3422 22 Puts value 0 255 into specified memory address 0 65535 of 80 POKE addres...

Page 102: ...a to the left of every third digit left of the decimal point An extra is required for each comma PF I NT U I t lC i tt tttttt tttt tt II 246 13 A Exponential format Displays numbers in scientific nota...

Page 103: ...E Resets data pointer to the first item in the data line Abbreviations RES REST RESTO FE TCPE RETURN Returns from the subroutine to the next statement after GOSUB Abbreviations RE RET RETU RETUR FETUF...

Page 104: ...mber Checks the current memory status number returns 82 o program steps available 1 program steps used 2 address 1 of location of end of current program 3 address of location of variable storage 4 255...

Page 105: ...Abbreviations TROF TPOF Turn program trace on Abbreviations TR TRO TF O UNLOCK Unlocks Operation Mode after it has been locked Abbreviations UN UN L UN La UN LaC VAL str Converts a string to a number...

Page 106: ...withouta FOR 4 READ statement without a DATA Array specified without first 01 Mensioning it DIMensioned array has more than two levels Out of memory Incorrect format for PRINT USING statement unction...

Page 107: ...Error Code 18 Explanation Number of arguments is inappropriate for expression Incorrect input data during the execution of an INPUT or AREAD command 104...

Page 108: ...rves the right to refuse to service the eqUipment or to void any remaining warranty on the equipment 2 If any Radio Shack computer equipment has been modified so that it IS not within manufacturer s s...

Page 109: ...TEXAS 76102 CANADA BARRIE ONTARIO l4M 4W5 I I I I i 1 I I 1 1 I I t l 9A2 AUSTRALIA 2BO 316 VICTORIA ROAD RYDALMERE N SW 2116 TANDY CORPORATION BELGIUM PARC INDUSTRIEl DE NANINNE 5140 NANINNE U K Bll...

Reviews: