Jump to content

Peripheral Interchange Program

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Niceguyedc (talk | contribs) at 03:22, 2 October 2012 (WPCleaner v1.16 - Repaired 1 link to disambiguation page - (You can help) - Computer console). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Peripheral Interchange Program (PIP) was a utility to transfer files on and between devices on Digital Equipment Corporation's computers. It was first implemented on the PDP-6 architecture by Harrison "Dit" Morse early in the 1960s. It was subsequently implemented for DEC's operating systems for PDP-10 and PDP-11 architectures.

History

It is said that during development it was named ATLATL, which is an acronym for "Anything, Lord to Anything, Lord."[1] This humorously described both its purpose as a device-independent file copying tool and the difficulties at the time of safely copying files between devices.

The original PIP syntax was

PIP destination←source /switches 

as the Flexowriter keyboards of the time, which used ASCII-1963, had the left-arrow symbol in their character set; as other terminals that used later versions of ASCII, lacking the left-arrow, were introduced, PIP allowed the syntax

PIP destination=source

The underscore (_) character, which was in the ASCII position that left-arrow had occupied, was still supported to separate the destination and source specifications.

Source and destination were ""file specification"" strings. These consisted of a device name, typically 2 characters for device type such as DK (disk), LP (line printer), MT (magnetic tape), etc. and a unit number from 0 to 7, a colon (:), filename and extension.

Copying was generally permitted between any filespec to any other where it made sense.

As late as the mid 1980s, PIP was still in common use on TOPS-10, TOPS-20 and PDP-11 systems.

PIP in CP/M

Gary Kildall, who developed CP/M, based much of the design of its file structure and command processor on operating systems from Digital Equipment, such as RSTS/E for the PDP-11. Besides accessing files on a floppy disk, the PIP command in CP/M could also transfer data to and from the following "special files":

  • CON:console (input and output)
  • AUX: — an auxiliary device. In CP/M 1 and 2, PIP used PUN: (paper tape punch) and RDR: (paper tape reader) instead of AUX:
  • LST: — list output device, usually the printer
  • PRN: — as LST:, but lines were numbered, tabs expanded and form feeds added every 60 lines
  • NUL: — null device, akin to /dev/null
  • EOF: — input device that produced end-of-file characters, ASCII 0x1A
  • INP: — custom input device, by default the same as EOF:
  • OUT: — custom output device, by default the same as NUL:

These were not true device files, however, because their handling was limited to PIP. The two custom devices INP: and OUT: were implemented as calls to fixed locations at the start of the PIP program; the intention was that the user, or the OEM, could patch these locations to add their own input or output devices. 246 bytes of free space were left in the program for this purpose.

In addition to the usual PIP destination=source syntax, PIP under CP/M still allowed the old PIP destination_source form. This behaviour was not documented, and CP/M generally did not have a standard for which characters could appear in file names; therefore other programs could and did create filenames containing underscore characters, which PIP could not handle.

See also

References