Download Print this page

Radio Shack TRS-80 Manual page 36

Micro computer system
Hide thumbs Also See for TRS-80:

Advertisement

TmNT)
'.hVpT"!
iS
"Tern,
1
'
,
V0U
haVG
"
!nPUt inStmCti0n
(!NPUT)
'
ou
^
^ruction
^
(PRINT) and end
instruction
(END)
plus
the
steps required to process
the calculation procedures.
%
Input
instruction:
Provides input data
for
memory.
Output
instruction:
Provides display of
calculation
results (or
other output).
The
tables
below summarize
the writing
and
execution of
Program
1.
Operation
[Writing]
Set to the
PRO
mode.
CBCSCES
10
mmmcBti]
HE
(sRpg
\jj
no
[enter)
20CHCiDE]CDQD
HDCHmCE
CBCEm
[enter]
30
CB CE CD UD CD
CH
[enter
|
40CECECB
[enter]
Display
[Execution]
Set to the
RUN
mode.
[MOOEJ [MODE] [mODE[
CECEm
|ewteb|
(
Prompt symbol
>
>
1
I
NPUT_
1
I
NPUTA'
B_
1
:
I
NPUT
A
>
B
20C=/(A_
20C=/(A*A
+ B_
20C=/(A*A
+ B*B)
_
20
:
C=/(A*A
+ B*B)
30PRI NT_
30PRI NTC_
30
:
PRINT
C
40END_
40
:
END
>
RUN
?
3_
?
4_
5.
[enter)
I
)
Repeat
these operations inputting
different values.
Thus you
can
Pythagoras's
theorem.
Note
Press
(moo§
key
to display
PRO
(i.e.
program mode).
Clears
program
memory.
Number
and
instruction
is
entered. (Input instruction}
Line
10
is
"written"
into
Computer.
Number
and
instruction
is
>
entered.
(Operation
instruction)
Line
20
is
written
into
Computer.
Number
and
instruction
is
enters
.
(Output
instruction)
Line
30
is
written
into
Computer.
Number
and
instruction
is
entered.
(End
instruction)
Line
40
is
written
into
Computer.
RUN
will
be
displayed.
RUN
tells
Computer
program
to
start
execution.
Execution
is
started;
the display
asks
you
to input
a variable.
A
variable, 3,
is
put
in.
The
variable
is
written
in
(3
is
loaded
on
memory
A); the
display asks
you
to
input
another
variable.
A
variable, 4,
is
put
in.
The
variable
is
written
in (4
is
loaded
on
memory
8); calcula-
tion
result
is
displayed.
Execution
is
terminated,
calculate
many
problems
using
§
Thus, once
a
program
is
written,
you
can execute
it
simply,
any
number
of times
you
want.
33

Advertisement

loading

This manual is also suitable for:

26-3501