TRS-80 Pocket Computer Owner's Manual
—TRS-80 {
Pocket Computer !
" Catalog Number 26-3501
iy . :
oa
CusTOM MANUFACTURED FOR RADIO SHACK A DIVISION OF TANDY CORPORATION .’
INTRODUCTION... 0.6... ce cece ee cence nee e een eeeecebnes 1
TABLE OF FUNCTIONS AND STATEMENTS.................--.000--0... 3
KEYBOARD .. 12... eee ete cee tent e et eneeveeees 8
FUNCTIONS OF KEYS... 0... cece ccc eee e eee e eee seu scene. 9
SECOND FUNCTION. ... 00... cece cece cence cette eeeen cece, 13
MODE. 2... cece cence nee n nee b et eebeeebnes 13
DISPLAY 1.0... cece ete cnet eb eeeeunbreees 14
DISPLAY SYSTEM ... 6... e ccc cent teeeebneeeee 16
INPUTTING DATA 2.0... ccc ccc cece nett eeeeevneneees 17
COMPUTATION RANGE .......... 0000 ce ccc e cece cece eect ceeeenneee. 17
MANUAL CALCULATIONS ..........0 0.0 c cece cece e cece eeueeeeeees 18
1. What is a manual calculation? 22.0.6... eee eee cence eees 18
2. For arithmetic calculations... 00... cece ence eeeeneneee 18
3. Power calculations. 6... cee eee e cece ce eeeeenees 20
4, Calculations with parentheses... 0.0.0... cece cence eeeeeeeeeees 20
5. Scientific functions 2.0... cece cece e ee eveneeeneecs 21
6. Logic functions... ce cece cece e ne ceeeenneeus 24
7. .
8.
9.
10.
11.
PROGRAMMED CALCULATIONS
1.
2.
3.
4.
5.
6.
7.
VARIABLES
1.
2.
3.
4. PAUSE statement 6.0... cece cece eee eee e eens 57
5. USING statement 2.0.0 eee cee eee rnneenennes 57
6. GOTO statement... ccc cence eneeeennes 59
7. AF statement. 2... cece cece cnet ten eeeeannes 60
8. GOSUB statement, RETURN statement .......0. 0.00 ccc cece ee eeccccuaee 62
9. FOR statement, NEXT statement... 2... ce eee eens 64
10. STOP statement 2... ee eee eee eee 68
41. END statement. ....... 00 ee et eee 68
12. BEEPstatement 0.0 ee ee eee eee eee eee 68
13. CLEAR statement... 0. eee ee ee 68
14. DEGREE, RADIAN, GRAD statements... 0... ee eee tee 69
14. AREAD statement. 0... 0 eee eee eee eee 69
16. REMstatement. . 0.0... cee ee ee et te eee 70
COMMAND STATEMENTS.........0. 5000 eee ete ee ene 70
1. RUN command. 2... 0. cc ee eee eee eet eee 70
2. DEBUG command... 0... ee ee eee ee eee 71
3. CONT command. 2... ee ee eee eee eet tees 71
4, LIST command... 00. ee tee eee eee eee tee 72
5. NEWcommand.......- 0. ee eee eee tenet e teens 73
6 MEMcommand. ....... 00.0 ee tenet eee eee 73
STATEMENTS FOR OPTIONAL CASSETTE INTERFACE (Cat. No. 26-3503)....... 74
1. CSAVE (Cassette Save} statement... 2. tee 74
2. CLOAD (Cassette Load) statement... 0.0. 02 eee eens 75
3. CLOAD? (Cassette Load?) statement 00... cc eee eee 75
4. CHAIN statement 2... ne et tte eee 76
5. PRINT # (Print cross-hatch) statement... 0... eee eee 78
6. INPUT # (input cross-hatch) statement... 2... ee eee 79
RESERVABLE KEY... 0... ccc eee enn eee 80
1. Reserve memory for reservable keys 2... ce ee eee ee eee 80
2. Use of reservable keys 2... eee eee eee tee 81
3. Checking reserve programs . 6... eee eee 83
4, Correction of reserve programs... 6. ee eee te eee 83
5. Deleting reserve programs... 2. ee ee ee eee 84
6. Configuration of reserve programs ©... 6. ee ee eee 84
ERROR CODES. 1.0... eet eee ene 85
APPENDIX 2... ee eee te eee ete eee 87
SPECIFICATIONS ... 0.0... ee eee eee eee eee 88
BATTERY REPLACEMENT ...... 2.0.0 cece tet eet ete ee eee 89
CONNECTING THE CASSETTE INTERFACE ....... 0... e ener eee eee 90
Replacing the Batteries... 1... eee ee ee eee 90
Connecting the Pocket Computer to the Cassette Interface... 22... cee eee eee eee 91
Connecting the Cassette Interface to a Tape Recorder 2... 0. eee eee 92
OPERATING THE CASSETTE INTERFACE AND RECORDER...........+.---- 93
Recording onto Magnetic Tape... 1.0... ee ee ee eet tee 93
Loading from a Magnetic Tape... 1... ee eee ete 93
Editing Programs on Magnetic Tape .. 1... ee ee ee ee eee 95
CLOAD 1 statement 2.0... ee re ee 96
Checking the Program 2.2... 6. ec eee ee ee eee ee 98
Execution of the Program. 2... ee eet eee 99
SOME SAMPLE USER’S PROGRAMS.........- 0060 eee eee eee ete eens 101
Notes for entering program listings... 0... ee ee eet eee 102
Biorhythm. . 0. eee ee eee tees 103
Guess Number Game... 1.0 er ee eee erent teens 105
Impedance in a Series Circuit. 2... ee ee ee eens 107
Days between Dates... 2... eee eee ee eee 109
Random Numbers... 0.0.0.0. eee eee eee eee eet ete 111
Normal Distribution and Percentile... 0... 6 ee tee 113
INDEX oo eee eee nn tenes 119
INTRODUCTION oe
This new TRS-80 Computer is another “first” from the company which brought you the best-
selling, world renowned TRS-80. A truly pocket-sized Computer (not a programmable calculator).
Of course it is an ultra-powerful calculator too... And it “‘speaks’’ BASIC - - the most common
computer language, and the easiest to learn. You'll soon be impressed by the phenomenal
computing power of this hand-held TRS-80 - - ideal for mathematical, scientific, engineering and
business applications.
FEATURES
@ Programmable, with BASIC language.
© 24-digit alphanumeric dot matrix Liquid Crystal Display, enables easy use of BASIC language, or
standard calculator function.
@ Program capacity 1424 steps, 26 memories with memory safe guard.
© Reservable and definable key systems. (See page 80 and 42}
@ When used with an optional Cassette Interface (26-3503), you can store or recall programs and
data on a cassette tape. (See page 90)
Some Special Notes
Since the Liquid Crystal Display is made of glass material, treat the Computer with care. @
Do not put your Pocket Computer in your back pocket - - you may sit on it and break the
LCD display. “
To insure trouble-free operation:
1. The Computer should be kept in areas free from extreme temperature changes, moisture and
dust.
2. Use a soft, dry cloth to clean the Computer. Do not use solvents or a wet cloth.
3. If you're not going to use the Computer for an extended period of time, remove the batteries to
avoid possible damage caused by battery leakage.
4. If service is required, use only an authorized Radio Shack Service Center.
5. Keep this Manual for further reference.
Name label
Write your name on the attached name label and stick it on the back of the Computer.
For your own protection and security, we urge you to record the Serial Number of this unit in the
space provided. You'll find the Serial Number on the bottom of the Computer.
Serial Number:
e” We Are Going...
Since this is such a radically new product and most people won't know how or where to start we
thought it might be helpful to tell you where we are going with the rest of this Manual.
But first — where were coming from! This manual is written assuming at least a little familiarity
with BASIC. You don’t have to have hands-on experience, just be familiar with simple concepts of
programming and BASIC. If you are looking for a lead-’em-by-the-hand Manual, this is not it. For
that approach, stop by your Radio Shack store or Computer Center and take a look at some of our
books. Two or three of them start from scratch.
Back to this Manual.
First were going to give you an over-view of the Computer
Keyboard
Functions
Display
Then show you how to use the Computer
Manual Calculations
Programmed Calculations
And then you'll be ready for some
Programming in BASIC
r) The back of the Manual has some vital information in the Appendices.
A separate Quick Reference Card has all the information you need for using your TRS-80 Pocket
Computer, but in an extremely abbreviated form.
ABLE OF FUNCTIONS AND S MENTS f }
This Table will provide a quick reference for the BASIC Language functions as used by the Pocket
Computer. The Page reference shows the page on which the Function/Statement is discussed.
You can use abbreviations for the Functions and statements as noted.
1. Functions
-—— Remember to press the [+] key.
Functions Abbreviations Remarks Ref.
page
SIN Si. sin
. . . 21
cos cos Trigonometric functions
TAN TA. tan
ASN AS. sin~?
ACS AC. cos"? Inverse trigonometric functions 21
ATN AT. tan”!
LN log, X Natural logarithm
Logarithmic 2
functions
LOG LO. logig X Common logarithm
EXP EX. e* Exponential function (Antilogarithm for LN} 22
Vv Extraction of square root 22
DMS DM. Dec’ al to degree/minute/second conversion 22
DEG Degree/minute/second to decimal conversion 22
INT Integer 23
ABS AB. Absolute value 23
SGN SG. Signum 23
2. Statements
State- Abbrevia- Ref.
ments tions General forms Remarks page
LET LE. (1) LET [numerica! variable] = < expression ) LET can be omitted
{assign- (2) LET (Character variable] = “character” {except when 51
ment (3) LET [Character variable] = [Character variabie] following an IF
statement) statement).
INPUT 1. (1) INPUT [variable] , [variable] , - - - Input instruction
IN, (2) INPUT “character”, [variable] , “character”, Data is input.
INP. {variable] , --- 52
INPU. (3) INPUT “character”; [variable], “character”;
{variable] , ++ -
PRINT P. (1) PRINT ¢ expression ) Output instruction.
PR. (2) PRINT “character” Specified contents
PRI. (3) PRINT (Character variabte] are displayed.
PRIN. « expression ) « expression )
{4) PRINT { “character” \, “character” | 54
(Character variable] {Character variable]
( expression > “eharacter”’
(5) PRINT { “character” }; {in mt variabl if:
[Character variable] aracter variable
{ “character”
[Character variable] i
PAUSE PA. Genera! forms are the same as those for PRINT statement. Output instruction.
PAU. Specified contents
PAUS. are programmed 57
after being displayed
for about 0.85
second.
USING U. (1) USING “4... B.-A” Format designation
US. instruction.
usl. (2) PRINT } o 7 Displaying format
ING "FORMAT", ---
USIN. (a) { PAUSE USING "FO for numerical data
PRINT . is designated. 57
tb) { pause | USING:
{3) USING (end of statement) Format designation
¢ is cancelled.
2: or: {colan)
GOTO G. (1) GOTO ¢ expression > Jump instruction.
Go. ” ” Specified line or
character 59
GOT. (2) GOTO | [Character variable] label is executed.
\F (1) IF (expression ) logic operator ( expression) Decision instruction.
execution statement Based on conditions
(2) 1F ( expression ) excution statement the program
(3) \F “character” | . { “character” branches or con- 60
[Character variable] [Character variable] tinues execution.
execution statement
(4) IF {Character variable} execute statement
THEN T. This statement is defined as a execution statement in an Jump instruction.
TH. IF statement. Used only with
THE. Genera! form is the same as that of GOTO statement. an IF statement. 61
State: Abbrovia- General forms Remarks ner.
GOSUB Gos. (1) GOSUB ( expression ) Subroutine jump
GOsu. “character” instruction.
(2) GosuB { [Character variable] } Execution is
shifted to specified 62
line or label, where
subroutine is
executed.
RETURN | RE. RETURN Return instruction.
RET. Used after execu-
RETU. tion of a GOSUB
RETUR. {at end of sub- 62
routine) to return
execution to main
program.
FOR F, (1) FOR [numerical variable] = ( expression 1) TO Starts FOR loop.
FO. (expression 2) Used in combina-
(2) FOR [numerical variable] = ( expression 1) TO tion with NEXT
(expression 2) STEP ( expression 3) statement. 64
(expression 1): Initial value
(expression 2): End value
STEP STE. (expression 3): Increment
NEXT N. NEXT [numerical variable) Ends FOR loop.
NE. This [numerical variable] must correspond to that Used in combina-
NEX. for FOR statement. tion with FOR 64
statement.
STOP s. STOP To stop executing 7”
ST. program. 68
STO.
END E. END To indicate program
EN. end. 68
BEEP B. BEEP ( expression > Beep sound instruc-
BE. tion
BEE, Beep tone is generat-
ed as many times as 68
the number of value
in ( expression ).
CLEAR CL. CLEAR Data memory clear
CLE. (Possible to execute by manual operation) instruction 68
CLEA. CLEAR
DEGREE DEG. DEGREE Angular mode
DEGR. (Possible to execute by manual operation) designation.
DEGRE.| DEGREE Degree {° ) 69
is designated.
RADIAN RA. RADIAN Angular mode
RAD. (Possible to execute by manual operation) designation.
RADI. RADIAN Radian ([rad]) 69
RADIA. is designated.
(number of program
steps and flexible
memories).
. State- Abbrevia- Ref.
6 ments ‘tions General forms Remarks page
GRAD GR. GRAD Angular mode
GRA. {Possible to execute by manual operation) designation. 69
GRAD Grad ([g]}) is
designated.
. The contents
AREAD ‘ AREAD [variable] displayed at start
laure ane of definable
reat naan program is read 69
* into the specified
[variable] .
REM REM ( note) To designate non-
{remark) execute statement 70
in program (notes).
{Command statement) Possible only to execute by manual operation.
RUN R. (1) RUN Program execute
RU. {2) RUN (expression > start instruction. 70
“character” Effective only in
n|
(3) AU (Character variable] } DEF and RUN
modes.
DEBUG dD. The general forms are defined in the same manner as Debugging start
DE. those for RUN statement. instruction.
DEB. Effective only in nN
DEBU. DEF and RUN
modes.
e CONT Cc. CONT To restart an
co. interrupted program.
CON. Effective in DEF nm
and RUN modes.
LIST L. The general forms are defined in the same manner as For listing programs.
Ll. those for RUN statement. Effective in PRO 72
LIS. mode.
NEW NEW In DEF, RUN and
PRO modes,
program memory
and data memory
are completely 73
cleared.
In RESERVE mode,
reserve memory is
cleared.
MEM M. MEM Remaining area of
ME. program memory is
displayed 73
= |@
State- Abbrevia- Ref.
ments tions . . General forms Remarks
( Magnetic tape control statement )
CSAVE cs. CSAVE “file name” Program or reserve 14
(cassette CSA. (Possible only by manual operation) program is recorded
save) CSAV. on magnetic tape.
CLOAD CLO. CLOAD "“‘fite name” Program or reserve
(cassette CLOA. (Possible oniy by manual operation) Program is trans-
load) ferred from magne- 75
tic tape to the
Computer.
CLOAD? | CLO.? CLOAD? “file name” Checks contents of
(cassette CLOA, ? (Possible only by manual operation) program or reserve
load?) program with those 75
placed on magnetic
tape.
CHAIN CH. (1) CHAIN “file name” Program recorded
CHA. (2) CHAIN “file name”, ( expression ) on magnetic tape is
CHAI. “character’’ read in and then
3) CHAIN “file name” 76
(3) mena [Character variable] executed.
{To be executed by program)
PRINT # 1 PL # (1) PRINT # “file name”’ Data memory
PR.¢ (2) PRINT # “‘file name’; [Label of variable] contents are
PRI. (Possible to execute both by program and manual recorded on 78
PRIN. 4 operation) . magnetic tape,
INPUT # 3 (1) INPUT # “file name” Data recorded on
IN. # (2) INPUT # “file name” ; [Label of variable) magnetic tape is
INP. # (Possible to execute both by program and manual transferred into 79
INPU. # operation) data memory of
the Computer.
a KEYBOARD
Display
: : —t
Power OFF key
Reservable keys ENTER key arithmetic
Power ON key (Executes calculation keys
calculations or
enters programs)
Here is a brief explanation of the main keys. For details, refer to the rest of this Manual.
Key Function
cA/aREAK e@ Use to power-on.
@ Breaking (temporarily interrupting) the program being executed.
® Clearing the Computer completely. (Reset after error condition.)
© Press to power-off.
[SHFT} © Secondary functions noted above the keys (such as 7 and A\ symbols)
are activated.
To obtain pi, press following sequence:
ita) yo 7 willbe displayed. Display shows a at left when a
shift function is pending.
@ In ‘‘DEF” mode, press before keying in the predefined function labeled
as A, S, D, etc. (Definable key designation) Example, CAI
@ In “RESERVE” mode, press before activating a key used for labeling a
reserve program. (Reserve key designation) Example,
@ In “PRO” or “RUN” mode, press before activating a key used for
labeling a reserve program. (Reserve key designation)
Example, [SHA
(oj ~ (3) @ Use to enter numbers.
Cs) @ Enters a decimal point.
@ Use to designate abbreviations when inputting instructions.
@ Use to designate a display format in a USING statement instruction.
(See page 57.)
Exp @ Use to input exponents. (This key function is displayed as E.)
: CA} ~ 7Z3 @ These alphabetical keys serve to designate instructions.
: © Specify variables (A to Z memory)
/ @ Use for division instructions.
@ Use for multiplication instructions.
@ Use to input a positive sign for numbers. (Usually omitted.)
@ Use for addition instructions.
: ej @ Use to input a negative sign for numbers.
®@ Use for subtraction instructions.
(SHET} ®@ Use for power calculation instructions.
@ Use to specify the floating decimal! point system (exponent display) for
numerical data in USING statement instructions.
@ Use when inputting logical operators, such as <,< =,<>.
Function
Use when inputting logical operators, such as >, >=, <>.
In assignment statements, use to assign the content (number or
character) on the right for the variable specified on the left.
Use when inputting logical operators, such as =, <=, >=,
Use to input parentheses.
Use to extract square root,
Use to provide space when inputting programs or characters. The space
is ignored in programming, executing operations, etc.
Use to divide two or more statements in one line.
or
Use with PRINT statement instructions, to provide multi-display (two
or more values/contents displayed at a time).
Use with INPUT statement instructions, to provide pauses in comment.
Use with PRINT # statement and INPUT # statement instructions to
provide pause between the instruction and the variable.
eae]
Use to provide pause between two equations in continuous calculation
sequences.
Use with PRINT statement instructions, to provide dual display (two
different values/contents are displayed at a time).
Use with INPUT statement instructions, to provide pause between com-
ments or variables.
Use with CHAIN statement, to provide pause between file and expres-
sion, or between file and label when setting the opening line subsequent
to execution.
aT OE)
Use with USING statement, to provide the instruction to define the
display format of numerical data.
Use with PRINT #and INPUT # statements.
Use with CLOAD? statement.
Use when assigning character variables.
Use to designate and cancel characters.
Use to specify labels.
Use to change modes (DEF, RUN, PRO, RESERVE).
Use to clear incorrect manual input.
Use as an instruction to clear the display contents (such as calculation
results).
Use to reset after error.
) Shifts the cursor to the right (press once to advance one position, hold
down for automatic advance)
Executes playback instructions.
Recalls cursor {in case it is not displayed during program operation;
recalls to right of colon)
10
Key
Function
ie3) © Shifts cursor to the left.
© For other functions, the same as the C=] key.
(ins) @ Inserts one space ( [= appears) of 1-step capacity between the address
(N) indicated by the cursor and the preceding address (N—1).
® Deletes the contents of the address (N) indicated by the cursor.
@ Enters a program line into the Computer.
@ Use when writing in programs or reserve programs (function as above).
@ Requests manual calculation or direct execution of a COMMAND
statement by the Computer.
@ Enters a restart instruction after inputting data required by an INPUT
statement or after executing a PRINT statement.
The (1) , (7) and keys have the following functions, depending on designated modes, as
well as the state of the Computer.
Mode State 77) @
Power off To power-on
RUN Program being BREAKs
or executed (program is
DEF temporarily
INPUT statement being | To display program | To execute interrupted)
executed
PRINT statement just
now executed
Under BREAK
line being executed
or already
executed, hold
this key down
debugging opera-
tion
To execute the
next line
Error condition during
executing program
To display error-
producing line,
hold this key
down.
To clear com-
pletely
PRO (When program line is not being displayed ; e.g. such as when changing to PRO mode)
PRINT statement just To display the Same as left
now executed interrupted line
Under BREAK
Error has been cleared | To display program | Same as left
with any key other
than the key
line in which the
error occurred
To clear com-
pletely
11
Mode State =a) is) (oN)
PRO (When program line is being displayed)
To display the To display the To clear com-
preceeding program | next program line | pletely
line
RESERVE
When a letter or symbol is used in quotations ( "), it is to be considered as a character (input or
displayed that way).
When the A, S, D, F, G, H, J, K, L, =, Z, X. C, v, B, N, M, or SPC keys are pressed, following
the SHFT key,
1. In DEF mode, a program defined with the label of the same character begins execution.
2. In RESERVE mode, a reserve program is recalled or written in.
3. In PRO or RUN mode, the contents reserved by the key is recalled. If nothing is reserved, the
symbol of the key is displayed.
The key does not function when the Computer is executing a calculation or program.
if no key entry is made for about 7 minutes the power is automatically turned off (unless a
program operation is pending, etc.).
Two templates are supplied with your Computer. Use them to identify the functional operation
assigned to the reservable keys or defined programs assigned to the definition keys.
Example: Reserved keys (For reservable key information: refer to page 80.)
SIN cos TAN ASN ACS ATN LN LOG
CLICICICICICLICI LI CIC)
RUN NEW MEM INPUT PRINT AxA BxeB
CICICICICICILICI! |
Example: Program-defined keys (For program-key information defined see page 42.)
SIMPSON § ‘COORDINATE
MeTHOO” © AVERAGE CONVERSIONS
CIFIECICICICICILILI CI
CIM COO eI CI eI cL |
12
~~ SECOND FUNCTION @
You must use the yellow SHFT key to operate the functions printed above each key. When you
press this key, SHFT will appear in the display. If you press this key in error, press it a second time
and SHFT will disappear.
A
Example: > "A is entered.
In this Manual, we'll always show the keys’ second functions as follows;
N
>
Your TRS-80 Pocket Computer has four modes: DEFinable, RUN, PROgram and RESERVE
program. Set mode by pressing the {ood key. 9
Definable mode (DEF): The defined program execution mode.
Perform defined program calculations with this mode.
Run mode (RUN): The calculation execution mode.
Perform program or manual calculations with this mode.
Program mode (PRO): The program writing mode.
Enter programs when in this mode.
Reserve program mode (RESERVE): The reserve program writing mode.
Enter reserve programs when in this mode.
The Moog key changes the mode in the following sequence:
DEF RUN PRO RESERVE ————,
Press — {aoog)
13
@ DISPLAY
Your Pocket Computer has a 24-digit dot matrix liquid crystal display.
Display when the power is on or when the mode is changed:
Angular symbol (DEG RAD GRAD)
Mode symbol
(DEF RUN PRO RESERVE)
DEG RUN Battery indicator (batteries
are OK as jong as this is on)
L_ prompt symbol (shows that the Computer is waiting for a key input)
@ When you turn on the power the first time after battery replacement, the prompt symbol, DEG
and RUN will appear.
®@ When you switch it on other times, the Computer will display the prompt symbol, along with the
angular symbol! and mode symbol which was last displayed (just before power was turned off,
either with or by automatic power-off).
®@ When you change the Computer program mode (by pressing ™oxd key), the Computer will
display the prompt symbol, then the existing angular symbol and the new mode symbol.
r @ To change the angular mode (for trigonometric functions), enter the name of the mode you want
with the alpha keys. E.g. (0) CE) CG) (8) (€) CEI for DEG,CR) (A) (0) 1) (NJ
for RAD and (G(R) (A) (0) for GRAD mode.
Display when you input an ‘expression’ etc. with the keys.
1. RUN mode:
RUN .
tL cursor {indicating the
position of next entry)
2. RESERVE mode:
RESERVE .
Loe rsor
© If you input more than 24 characters, the display ‘‘rolls’’ over to the left to provide a space to
display the new input. (A maximum of 80 characters can be entered per line. The characters
which disappear to the left are not “‘lost’’, just not being displayed.)
14
Display of recalled information
1, RUN mode:
becursor (If the position indicated by the cursor has a character, a block will
alternately flash with the character in that position.)
2. PRO mode:
DEG PRO .
Line number (Displays the line number of the program. Refer to page
31)
Display of calculation result
1. Normal Display
GRAD RUN .
2. Scientific notation
DEG RUN .
Mantissa Exponent
@ Calculation results are always displayed at the right.
Display of Error condition
1. Manual calculation
Leger code
2. Programmed calculation
DEG RUN .
oh
aon on of oS s 8 om Boe oR ROR ow oR on OR
[ Loeror code
Line number (Displays the line number in which an error is detected.)
15
Display of Symbols
e Shift symbol (Appears when the SHFT key is pressed.)
Angular symbol
[ [~ Mode symbol
SHFT DEG RAD GRAD DEF RUN PRO RESERVE 4 Battery indicator
Angular symbols
DEG: Appears when DEGree mode is set.
RAD: Appears when RADian mode is set.
GRAD: Appears when GRAD mode is set.
Mode symbols
DEF: Appears when the DEFinable mode is set.
RUN: Appears when the RUN mode is set.
PRO: Appears when the PROgram mode is set.
RESERVE: Appears when the RESERVE mode is set.
@ Battery indicator
The battery indicator is a dot located in the upper right corner of the display. When this dot
dissappears, the batteries must be replaced. See page 89.
Number of input characters
When you enter numbers, characters and instructions into the Computer (via the keyboard)
this data is stored in an input buffer. When you press the Ges) key, the Computer executes
@ the instructions as required.
The input buffer can hold up to a maximum of 80 characters. When you have entered 80
characters into the input buffer (i.e. 80 characters on a “‘single line’) the cursor will flash in
the last display position. Further inputs will merely change this last position.
A manual calculation will not be correctly executed if it contains more than 80 characters
{including =] key).
This Computer displays a number in the normal manner or with scientific notation system.
Numbers in programmed calculations are displayed according to the designated format, but in
manual calculations, numbers within the following range are displayed in the normal manner, and
other numbers are displayed in scientific notation.
Range of numbers displayed in the normal manner:
—9999999999 <x <-1x 10°
x=0
1x 107° <x < 9999999999
@ Within the range shown above, if a mumber can not be displayed in the normal manner the
display is automatically changed over to scientific notation.
Ex, i 78 > 1.2345678 x 10-4
A calculation result is displayed in either the normal manner or scientific notation, but it is
@ stored in the memory in the form of
Ax 108 (1<1Al<9.999999999, -99 < B< 99)
1
oras 0. 6
INPUTTING DATA ®
To input a number to the Calculator, press or (~) key first to input a sign, and then a
numeric key or the decimal point key. (The operation of the key can be omitted.) To input a
number in the scientific notation system (A x 108), input the mantissa, press the {€xp) key and
input the exponent.
Example: —12.345> (J) 4) 2) @) Cf) Gj
67x 108 + (6) Eze)
-912x100*- | w Be SB
To input data with a mantissa over 10 digits, the most significant 10 digits will be displayed, but
internal calculations are performed using all the data input.
Example: 1234567898765 > displayed as 1.234567898 x 10!”
9.87654321234 > displayed as 9.876543212
0.0000000002345678 > displayed as 2.345678 x 107!°
0.00001234567 24> displayed as 1.234567 x 101°
For the exponent, the last 2 entries are effective.
Example: 3 123 > displayed as 3 x 107
4 (=) 3210 > displayed as 4 x 107!°
More on inputting data when we get to programming.
COMPU ION RAN :
The computing range is —9.999999999 x 10° to —1 x 10°”, 0 and 1 x 10° to 9.999999999 x
10°.
Any calculation results outside of this range will result in an overflow error or 0. (See the
illustration below.)
—9,999999999x 10" —1x10%° 0 1x10%? 9.999999999x 10"
00 | | poo
Computation Regarded Computation E
Error range as 0 range rror
17
MANUAL
1. What is a manual calculation?
Normally you'll program the Pocket Computer in the PRO mode and execute programs in the
RUN or DEF mode. For problems that don’t need programming, you can Input the necessary
data in the RUN (or DEF) mode and obtain immediate answers. This is called the Direct
Execution mode or you might prefer to call it the manual calculation mode.
General form (Expression)
Example: 5 4
Input an expression and press the key. The Computer wil! show the answer for the expres-
sion.
@ Manual calculations given in the following examples are executed in the RUN mode. Set the
Computer to the RUN mode by pressing the key. (The symbo! “RUN” will appear on
the display.)
An Expression is composed of the following instructions:
@ Constant wc O~D, °, 7, Exp
@ Sign .. . wtp r
e Arithmetic operator +, —, & (Multiplication), / {Division}, A (Power)
@ Logic operator ... =, > <, >=, <=, <>
@ Functions . SIN, COS, TAN, ASN, ACS, ATN, LN, LOG, EXP, INT, ABS,
Si
Parenthesis ..
@ Memories
An “Expression’’ can be made by combining these instructions according to a mathematical
formula.
A mathematical formula is defined as an ’‘Expression’’, even if it is composed only of constants or
memories. (Eg. 12, 7, A, etc):
2. For arithmetic calculations
Addition and subtraction
Example: 7—9+14=
—4.2+5-12.3=
Operation Display Note
RUN mode
(elo 719 C514 7-94+14_ Expression
(Bre) 12. Ans.
(el) (=) 4.2495 (£9 12.3 —4, 2+5-12. 3_ Expression
(ore) -11.5 Ans.
18
Multiplication and division NOTE: In the BASIC language
Example: * is used for Multiplication
/ is used for Division
IE is used for Exponent
Operation Display Note
12 (49 24075 12x24/5_ Expression
57.6 Ans.
(CL) 27 (Exe) 3 (#1 4079 12 27E3*4/12_ Expression
9000. — Ans.
Mixed calculation
Example:
Operation Display Note
(CE) 5403 24.3 116.49 | 54424. 3*16. 49_
(7)3.4(=)37.4 | 54424, 3x16. 49/73. 4-37. 4_
134. 455
Note that multiplication and division have priority over addition and subtraction (that is, multipli-
cation and division functions are performed before addition and subtraction). To control priority
of calculation functions, use parentheses as noted later on in these examples.
When utilizing a displayed result in subsequent calculations.
In each of the above examples, the key is pressed first. This operation is intended to clear the
preceding operations or the results of calculations.
If you want to use a calculation result for continued calculations start the next calculation without
pressing the key.
Example 34+45 woe . .
P 3 The result of (1) is incorporated into the expression (2), thus
—8+6= calculation 3 + 4 — 5 +6 = is accomplished with the display of an
intermediate answer.
Operation Display Note
(eL13 C#) 4 (pre 7. (The result of ()
pa ED 7. The result of (1) , (7) is
_ incorporated into the
5 6) 7. ~5+6_ next calculation (2).
8.
L_ After completing a calculation, if you press keys such as ,e),&,
just before inputting another (or further) expression, the preceding calculation
result is incorporated as data for the next calculation.
19
3. Power calculations
Example: 4A 3= (45=)
SAB.2K4A24= (37K 4**=)
AA3A2= (4*%=)
Operation Display Note
4 (ser CAD 3 43 _ Expression
64. Ans.
3 SA) 3.2 343. 2x_ Expression
4 wr(AV 2.4 | 3873. 2* 472. 4_
936. 9836103 Ans.
4 (suet) CA) 3 Suet} CA) 2 4*372_ Expression
262144. Ans.
Note that power calculations have priority over the four arithmetic calculations.
This is due to the calculation
Also note that powers of a negative number do not compute.
process used by the Pocket Computer.
4. Calculations with parentheses
Calculations can be performed by using the (C) and [7] keys in the same manner as you use
parentheses in mathematical formulas.
Example: (72+9)/4 *(21* 168/(7—3)+2))=
Operation Display Note
(et) CO7204 9 43 | (7249) 74*_
TIA GACO 687 | (7 24+9) 44% (21% (684% (7 _
C2130 4412039099 | +9) 74% (21% (687 (7-3) +2)) _
(ere) 8079. 75 Ans.
The use of parentheses results in different calculation sequences as follows. Take special care
when multiplying, dividing or extracting square roots.
B
Ata
A+B
A+B/C
(A+B)/C >
A/CXD
L
BF OB o
A/(C*D) >
A/B/C
t
Oln|> Olar>
AA(B4C) >
v/-A+B > VA+B
Vv CA+B) 2 VAFB
vAkB > BVA
¥ (A*B) ~ VAB
AkB+C - AB+C
A*(B+C) > ACB+C)
20
5. Scientific functions
Your TRS-80 Pocket Computer permits functions to be calculated just the same as in standard @
mathematic formulas.
®@ When performing a functional calculation of a constant or memory, use following form:
SIN 30 or SIN A. in other cases use parentheses such as LN (AB) or SIN (77/2).
Angle mode
The angular mode is designated by the following:
Degree mode: (D)CE](G)(R)CEJCED (“DEG" will appear at the top of the display.)
Radian mode: (CR) (AJ (D)Ci CA (CN) (“RAD" will appear)
Grad mode: Ce] 7 (49 (’GRAD" will appear)
Trigonometric functions (SIN, COS, TAN)
Examples: S| N 30= (sin30=) Set the angular mode to “DEG”.
COS (x/4)= (cos=) RAD mode
TAN 150= (tan150=) GRAD mode
Operation | Display Note
DEG ( DICT RICE Cela “DEG”
| [S72 CN) 30 SIN30_
i 0.5 SIN 30°
RAD ( (RICAIDIO CAIN aes) )
CejC0j 08) 0 SFG) COS (r_ “RAD”
400 |) COS (/4) _ @
7. 071067812E-01 | COS Fmd)
GRAD ({@)CRITAICO em) “GRAD”
(7) C49 1D 150 TAN150_ -1. TAN 150°
Inverse trigonometric functions (ASN, ACS, ATN)
Example: ASN—-0.5= (sin-'(—0.5)=) Set angular mode to DEG
ACS (-0.5+0.1)= (cos-'(—0.5+0.1)=) Set angular mode to RAD
ATN 7/3)= (tan'Z=) Set angular mode to GRAD
ASN: Arcsine
ACN: Arccosine
ATN: Arctangent
Operation Display Note
EG Set DEG
(OCICS 16 ASN-. 5- mode
-30. C°)
RADSAIEICSIC I 3.5 ACS (-. 5_
cio | acs C. 5+. 4) _ Set RADIAN
1. 982313173 (rad)
GRAD (AIGU0NjC7 ATN (7_
Zi | ATN (773) _ Set GRAD
74. 22378832 () )
21
Logarithmic functions (LN, LOG)
Examples: LN7.4= (In7.4=) Note: In X= loggX : Natural logarithm
LOG100= (leg100=) log X = log39X: Common togarithm
Operation Display Note
[NJ7.4 LN7. 4_
eves} 2. 00148 Ans.
(4)(C0}(69 100 LOG100_
ren, 2. Ans.
Exponential function (EXP)
Example: EXP—13.6= (e7'**) Note: EXP is anti-logarithm of LN
Operation Display Note
CENCE =13.6 | EXP -13. 6_
[eres] 1.24049508E-06 Ans.
Roots
Examples: Vv 73= (/B=)
vv 056= (//%§=V256=)
V-(3*3+4*4)= (Y37+47 =)
Operation Display Note
3B | Vv 73.
fore) 8. 544003745 Ans.
256 | vv 256_
4. Ans.
C3 | 3x
34044 | y-(3*34+4%4) _
5. Ans.
Angle conversions (DMS, DEG)
DMS: Decimal degrees > Degrees/minutes/seconds
When converting decimal degrees to degrees/minutes/seconds, the answer is displayed as
follows: integer portion = degrees; 1st and 2nd decimal digits = minutes; 3rd and 4th
digits = seconds; and any remaining decimal digits are decimal degrees.
DEG: Degrees/minutes/seconds > Decimal degrees
To convert an angle given in degrees/minutes/seconds to its decimal equivalent, it must
be entered as integer and decimal numbers as noted above.
Example: Convert 15.4125° to its degree/minute/second equivalent.
Convert 15°24’45" to its decimal equivalent.
22
Operation _ Display Note ®
(BOW 7S7 15.4125 DMS15. 4125_ /
15. 2445 15° 24" 45°
CODE 3069 15.2445 DEG15. 2445_
15. 4125 18.4125"
Integer (INT)
The integer (INT) function converts numerical values to the next lowest integer value: 12.34
becomes 12.; and —2.45 becomes —3.
Examples: | NT (65/3)=
INT (-0.3)=
Operation Display Note
CORD ICD § 73 INT (6573) _
21.
CONE ).3 INT -. 3
41.
Sign function (SGN)
The SGN function takes the following values for numerical values of X. (That is, it returns a
—1 for all negative values, zero for 0 and a +1 for all positive values.)
+1 if X>0
Oo if X=0
-1 if X<o
Example: SGN (5—9) =
Operation Display . Note
CSIT@IGNCO 5(=1909 | SGN (5-9) _
—1.
Absolute value (ABS)
The ABS function finds the absolute value |X! ofa numerical value X. (In simple terms we
might say it strips the sign from a number.)
Example: ABS (5-9)= (15-—9|=)
Operation Display Note
UBIS30I5EI9IO7 | ABS (5-9) _
4.
23
&
6. Logic functions
These functions return 1 when an expression composed using logic operators (=, >, <,>=,<=
and < >) is true, and 0 when false. in other words, x O y (0 is a logic operator) gives us either a
1 or a 0 depending on the relationship of x and y.
Logic
operator
=* lifx=y,
0 if xF#y.
> lifx>y
Oifx<y
< Vifx<y
Oifx ay
>= lifx>y
Oifx<yp
<= lifxsy
Oifx>y
1 if x#y
<>
Oifx=y
Note: < > has the same meaning as #.
%* If you want to use a logical expression relating to contents of a memory (variable name) you
must use the following form: ( expression ) = [memory/variable name]. tf you use [memory/
variable name] = ( expression ) the Computer will treat the statement as a normal assignment
statement; e.g. A = ¢ expression). (Relational equations in IF statements, are not subject to this
exception; i.e. they function normally.)
Examples: (54+8)>(3*4)=
(24/8) <=(2.4* 2)=
Operation Display i Note |
CO54)8 OAS) (5+8) > _
O)3G040 (5+8)> (3*4) _
4. Answer
C475 Ose) (24/75) (=_
92.4 G20 (24/78) (= (2, 4*2) _
4. Answer
Notes:
Logical expressions (AND) and (OR) can be executed using the following form of logical computa-
tions.
@ Logical OR (logical computation) + (logical computation)
Example: (A<0) + (A> 8)
(B >0) +(C>0)
1 is returned if A is smaller than 0 or larger than 8.
1 is returned if B or C is larger than O and 2 is returned if
both B and C are larger than 0.
@ Logical AND (logical computation) * (togical computation)
Example: (B> 1)x*(B<6)
1 is returned if B is larger than 1 and smaller than 6.
24
7, Calculations using memories
The TRS-80 Pocket Computer has two types of data memories: fixed memory (26 in all) and @
flexible memory. In this section we'll give examples of calculations using fixed memories. (For
details, refer to page 45.)
Specifying memories @
The fixed memories are given labels A through Z (each being specified by the CA] through (Zz)
keys).
Example: When memory A is loaded with 4 and memory B with 5.
Ce BGIGE 2 ea 417, (.° 4 bee)
COI GIG > 3. (B) =) 5
Specifying memories @
The fixed memories A through Z can be used as dimension as specified in the form of A(___).
This form is used for storing data in a matrix or array.
Example: (AJC) 2 (7) > Memory A (2), namely memory B, is specified.
IO 2 30 ~> Memory A (5), namely memory E, is specified.
Input to the memories
Numerical values and others are input to the memories in the following forms.
General form [memory] [=] (expression )
Example: (AU(=) 5 E16 ~ Loading the answer of 5 * 6 (30)
into memory A
C2) I) Beren} > Loading the contents of memory A
plusmemory B into memory Y.
(AIC 2600 =) 3 ie} > Loading the answer of 3 + 9 (12)
into memory A (26) (memory Z).
@ When the memories are loaded with new data, they are automatically cleared of their previous
contents.
Recalling the memory contents
The memory contents are recalled using the following form.
General form [memory]
Example: [A] > Recalling the contents of memory A
TOCO 18 OF > Recalling the contents of memory A (18)
(memory R)
8. Successive designation of expressions in manual calculation
In manual calculations, you can designate and solve two or more expressions in succession by
separating them with a comma. However, the computer will display the result of the final
execution only.
General form « Expression ) (2) (Expression) Sit) (37 ( Expression ) ‘=n
:
25
5 87 12
: = = Ca 4 1 =
G: Example When A oa" B 34" Cc Fra’ solve A*xB/C
Operation Display Note
CANCE OICO12E 4 | A=5/ (12-4) _
Sq IBIE 187 AvsenGIA=5/ (12-4), B=87/24, _
TNE NaC? | 7 (12-4), B=87/24, C=127 (7_
G18OSAI | —-4), B=87/24, C=12/7 (748), -
CANCE ICET | = 87/24, C=12/7 (74+8), AXB/C_
2. 83203125
9. Recall function
This function permits you to recall (into display) a portion of your original input so you can
check and/or edit it. This function is activated by pressing either the (=) or (=<) key right
after the key in manual calculations.
Example 1: When an execution is finished without an error message:
Operation Display Note
(AjC=3 1904954 | A=194+54_
73.
&)