3.8.3
PIP
The
PIP
program
is
used to copy files between peripherals, e.g. from disk to
disk, disk to Microcassette tape, from a disk
to
a printer etc. The name comes
from the initial letters
of
the words Peripheral Interchange Program.
PIP
can be used with wildcards (see section 3.2.1)
to
transfer all types
of
files.
It
can also be used to perform other valuable functions such as:
• Remove
part
of
a file either from the beginning, end or the middle.
• Convert all characters into upper case or lower case
• Join a number
of
files together
• Make a backup
of
a file under a different name
• Add sequential numbers to each logical line
of
text
• Reform the page length
of
a text file
There are two ways
PIP
can be used.
1)
When only a single operation
is
required,
PIP
can be used by following
the command
'PIP'
with the command string
of
the operation you wish
to carry out.
On
completion
of
the operation the
CP
1M
prompt will be
returned or the MENU displayed
if
it
is
switched on. When using
PIP
from the MENU the command string can be typed on the MENU com-
mand line, when
PIP
has been selected.
2)
When a number
of
operations are to be performed, the
PIP
program
can be loaded into memory. The
CP
1M
prompt
(A>,
B>
etc)
will be
replaced by a
PIP
prompt indicated by
an
asterisk. The use
of
PIP
in
this manner
is
essentially the same as when only one operation
is
re-
quired.
When
PIP
is
chosen from the MENU, unless
an
additional command
string
is
given, the
PIP
screen will clear and the
PIP
asterisk prompt
will appear.
Pressing the
I
RETURN
I key, the I
STOP
I key or I
CTRL
I -
(g
will return
to
the
MENU screen
or
the
CP
1M
system prompt whichever
is
set.
In
using
PIP
the command
is
written
to
perform the operation
to
a particular
drive or device, from a particular drive
or
device. The location
of
the file being
moved always comes last.
3-34
1. COPYING A
FILE
FROM
DRIVE
TO
DRIVE
Any file with a readlwrite attribute can be copied from one disk to another.
For
example,
C>PIP
H:
=A:INFO.DAT
This copies the file DEMO.DAT from drive A :
to
drive H:
th<:n
returns. to
the system prompt. The same filename will appear
on
the new dnve. The fIle-
name can be changed, for example:
C>PIP
H:NEWNAME.DAT=A:INFO.DAT
By using this option to copy the file
to
the same drive, it can be used
to
make
a backup
of
a file under a different name.
Various options can be added
to
the end
of
the
PIP
command string. These
are listed starting from item 5. For example specifying the
[V]
option causes
the file to be verified as it
is
copied:
C>PIP
H:=A:INFO.DAT[V]
2. COPYING A
FILE
FROM
DISK
TO
PRINTER
This has almost the same effect as pressing I
CTRL
I -
~
then asking the com-
puter
to
TYPE a file:
C >
PIP
LST: = A:LETTER. TXT
The file will be printed character by character, and words which come at the
end
of
a line are likely
to
be split in the middle
of
the word.
This command can also be used
to
list a BASIC file
to
a printer
if
you are
not
in BASIC and do
not
have the BASIC ROM installed.
C >
PIP
LST: = A:DEMO.BAS
The BASIC program
is
sent
to
the printer as
if
you had LLISTed it while in
BASIC. You MUST have saved the BASIC program as
an
ASCII file using
the"
,A"
option in BASIC.,
A refinement
of
this command
is
to
add the option [Pn] where the printer will
3-35