Micro Vibe

My Micro Hobby Projects

  • Increase font size
  • Default font size
  • Decrease font size
Home CPM 80 Using CPM PIP Utility

PIP Utility

Print
The PIP.COM utility program is used to copy information between peripherals connected to the CPM computer system. The CPM user shell, the CPP does not include a command to copy files. The PIP.COM utility fills that need. The PIP utility can also copy data to or from any of the serial devices. The PIP utility can operate in single command mode or interactive mode. If the PIP utility is started with no parameters the program will enter interactive mode and great you with an asterisk character as a prompt. You can exit interactive mode by pressing the enter key at the prompt with no parameters. In either mode the PIP utility parameters are the same.
The basic syntax for of a PIP transfer request is "destination=source[options]". The "destination" and "source" could be a logical devices or a file names.
 
Using PIP to copy disk files:
 
When copying files the destination may be as short as a disk device identifier and may contain wild-card characters. When the "source" contains wild-card characters any file that matches the source file name will be copied to the destination. The source may contain more then one file name separated by a comma character. The simplest case of a file copy is when the destination file name and the source file name are fully qualified.
 
> PIP B:STAT.BAK=B:STAT.COM
Copy the file "STAT.COM" on the disk device "B" to a new file called "STAT.BAK" on the disk device "B". The source file and the destination file will use the current user area code.
 
> PIP B:ED.COM=A:ED.COM
Copy the disk file "ED.COM" from disk "A" to the file "ED.COM" on disk "B". The source file and the destination file will use the current user area code.
A shorter form of the command could be used because the destination file name is the same as the source file name.
 
> PIP B:=A:ED.COM 
A short version of the previous example.
 
Another form of a PIP command includes wild-card characters in the source file name. This form of a PIP command uses a drive letter as the "destination" file name.
 
> PIP B:=A:*.COM
Copy all files with a ".COM" extension on disk "A" in the current user area code to disk "B" in the current user area code.
 
A PIP command may contains a "destination" file name with wild-card characters. In this case the wild-card characters in the "destination" file name are replaced by the characters from the "source" file name and the non wild-card characters are used as is for the "destination" file name.
 
> PIP *.BAK=*.COM
Copy all the files with a ".COM" file extension to a file with the same file name but change the extension to ".BAK". The files are are the selected disk device in the current user area code.
 
> PIP B:PRG2??.*=A:PRG1??.*
Copy all the files on disk "A" that start with "PRG1" and have a file name that is five characters long before the file extension. The number "1' is replace with a "2" and the files are written to disk "B".
 
The PIP utility supports a number of options. Options are placed at the end of the "source" file name and are enclosed in square brackets ("[" and "]"). If multiple options are used options are separated by a space character.
 
> PIP B:=A:*.COM [G9]
Copy the files from disk "A" user area code "9" that have a ".COM" file extension to disk "B" in the current user area code. The "G" option only applies to the source of the copy there is no similar command that applies to the destination of a copy command.
 
> PIP B:=A:*.COM [G9 V]
Same as the above example but the written files are read verified after being written.
 
Using PIP to copy serial device data:
 
Most of the time the PIP utility is used to copy disk files. The PIP utility can also use a serial device for the source and/or destination of a copy.
 
Device Direction Description
CON: source/destination current console device
LST: destination current printer device
RDR: source current reader device
PUN: destination current punch device
PRN: destination same as LST: with options [T8NP]
NUL: source 40 null bytes to advance punch tape
EOF: source single end of file character ^Z
INP: source user code at 103h in pip
OUT: destination user code at 106h in pip
TTY: source/destination hard copy terminal
CRT: source/destination video terminal device
UC1: source/destination user terminal device
LPT: destination line printer device
UL1: destination user printer device
PTR: source paper tape reader
UR1: source user reader 1
UR2: source user reader 2
PTP: destination paper tape punch
UP1: destination user punch 1
UP2: destination user punch 2
List of serial devices that can be used by the PIP Utility.
 
Serial Devices used as the source can be concatenated together separating each device name (with full colon) with a comma.
 
> PIP LST:=CPM22.PRN, SKBIOS.PRN[T8]
Copy the files CPM22.PRN and SKBIOS.PRN to the current printer device expand tabs on 8 characters boundaries.
 
> PIP A:PROG.HEX=UC1:[H]
Copy the data from the user console device in Intel hex format and save the hex data into a file on disk device "A" named PROG.HEX in the current user area code.
 
Option Description (n - number, s - string)
A Copy files with the archive attribute not set and set the archive attribute after the file is copied.
B Buffer input until the buffer is full or an ASCII DC3 (XOFF 13h) character then write the buffer.
Dn Truncate input text line to n characters in length.
E Echo all data to the console device as it is copied.
F Remove form feed characters (0Ch) before writing destination.
Gn Look for source file under user area code n.
H Indicates an Intel hex file transfer. The stream is checked for correct hex format. If the format is not valid the copy is aborted.
I Drop "00:" records in a hex file transfer.
L Convert all upper case ASCII characters to lower case characters.
N1 Add two digit sequence numbers "xx:" to each line of text.
N2 Add sequence numbers "xxxxxxxx, TAB" to each line of text.
O Indicates a binary transfer ASCII SUB (^Z 1Ah) is not the end of the file marker.
Pn Insert a form feed every n line of text.
Qs Stop the copy when the character string s is written to the destination.
R Read the file even if the file has the SYS attribute set.
Ss Skip the input data until the string s is seen.
Tn Replace tabs with spaces to simulate tab settings every n characters. If n is not set a value of 8 is used.
U Convert all lower case ASCII characters to upper case characters.
V Perform a read verify of each block written to a destination file.
W Ignore the read-only file attribute on the destination file and do not prompt the user.
List of options that can be used in a PIP transfer command.
Last Updated on Tuesday, 31 August 2010 22:03