Sharp PC-1500A Instruction Manual page 114

Hide thumbs Also See for PC-1500A:
Table of Contents

Advertisement

All
and more
about
Sharp PC-1500
at
http:/lwww.PC-1500.info
5. Use of the
MERGE
Command
The
MERGE
command allows you
to store
many programs in
the computer
memo
ry at the
same
time.
For
example,
let's as.sume
the computer memory contains the following
program
:
10:
PRINT
"DEPRECIATION ALLOWANCE"
20:
INPUT "Enter
method
:
"
;
A
At this point
you
c
mcrnber that
you have
a
similar
prooram
portion
on tape
undier the filcnomc
"DEPl"'.
You
will,
of course, want to see
if this
program
has
sections
useful
in the
program you
are
currently
constructing.
The
first step
is
to find the
tape
with
"
DEPl"
on
it.
Cue the tape to
the place at
whicll
'
'
DEP 1
"starts.
Now
type:
MERGE
"DEPI
"
and press
lunu
l
The
computer
will now load
"DEPl
"
into
memory
IN ADDITION
to
the
above
program.
After
"DE
Pl
"is
loaded. you
might find
something
in
memory
similar to
this:
10:
PR INT
"DEPREC
IATION
ALLOWAN
CE"
20: INPUT "Enter
method:
";
A
10: "DEP1"
:
REM
>
>
Second
Module
<<
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 LI
NKING
MERGED
MODULES
-
below).
It
is
important
that
you
review the following
information before
proceeding
\Vi
th
any further
editing or
programing:
IMPORTANT
NOTES:
Once
a
MERGE is performed,
no INSERTIONS. DELETIONS,
or CHANGES
are allowed to
previously existing program
lines.
Example
:
f1o
"A"
REM This is existing
program
I
20
FORT
"
1to100
30 LPRINT
T
40 NEXT
T
(Etc)
BEFORE doing
a MERGE
of
the
next
program,
make any necessary changes
to
this
program.
Then
MERGE
the next
program: MERGE
"PROG2"
(example)
10
"B"
REM
This
is
MERGED
program
20
INPUT
"Enter
depreciation
:
"
;
D
30
INPUT
"
Number
of
Years:
";
Y
40
.
Etc.
Now
you
may
make
changes
to the
above
program since it
was the last
MERGED
portion
.
.
If
you
need
10
make
further changes
to
the first
program
~hen
follow this
procedure:
112
Do
not sale this PDF
!!!

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents