• Keine Ergebnisse gefunden

EXAMPLES OF EDITING REQUESTS

Im Dokument Programmer's PDP-8 (Seite 61-79)

APPENDIX 3 PATCH FILE FORMAT

6 EXAMPLES OF EDITING REQUESTS

This chapter contains illustrations of one complete iteration through the modification process usi ng the Ed itor.

Figure 6-1 shows the assembly listing of a sample input file.

Figure 6-2 shows the same I isting marked for correction.

Figures 6-3A and 6-3B show the hard-copy output of the editing session. The sequence numbers at the right marg in are not program generated, but were added later for reference.

Figure 6-4 is the assembly listing of the new, edited file showing the results of the editing run.

ISUBROUTINE PACK, 7-8IT CHARS TO lOPS ASCII.

PDP-9 TEXT EDITOR

ISUB~OUTINE PACKI 7-BIT LEFT-AD~ruSTED CHARS TO NON-HEADEhED lOPS IASCII. ON RETURNI AC HOLDS TOTAL WO~US OCCUPIED BY PACKED ARRAY.

>D

Figure 6-3B Hard-Copy Output of Editing Session {continued}

65 66

ISUBROUTINE PACK, 7-RIT LEFT-ADJ~STED CHARS TO NON-HEADERED lOPS

Figure 6-4 File Resulting From Editing Session

APPENDIX 1

SUMMARY OF EDITING COMMANDS Editor-Monitor Communication

Command Abbreviation Activity Li ne Number* Section

EXIT nla Transfer control to Monitor. 124 4.24

-

File Housekeeping

Command Abbreviation Activity Line Number Section

OPEN nm ext nla Prepare input file (named "nm 2 4. 1

ext") for editing.

CLOSE nla Terminate editing on input fi Ie. 121 4.2

Locative Requests

FIND string F Bring first line beginning with 3,68 4.5

"string" to work area.

LOCATE string L Bring first line containing "string" 12,52 4.6 to work area.

NEXT N Bring next consecutive I ine to 15,70 4.3

work area.

BOTTOM B Bring last line of file to work area. 100 4.8

TOP T Reset pointer to beginning of file 110 4.14

PRINT P Print the current I ine on the Teletype 20,58 4.4

Manipulative Requests

DELETE D Discard the current line. 47,61 4.7

RETYPE string R Replace current line with "stringll . 71,94 4.9

I NSERT string Add "string", as a complete line, 99 4.10

to the file after (below) the current line.

CHANGE /string 1/string2/ Replace, in the current line, the 25,27,38 4.13 C first occurrence of "stringl11 with

"string211 .

OVERLAY

0

Replace multiple lines. 5, 102 4.16

APPEND string A Add II string II at the rightmost end 14,16,19 4.17 of the current line.

*Entries under II Line Number" refer to line sequence numbers (in Figure 6-3) where examples of com-mand usage are to be found.

PDP-9 TEXT EDITOR

Mode Control

Command Abbreviation Activity Line Number Section

----VERIFY {ON Set verify mode to print (ON) 54,57 4 .. 15

OFF V

or ignore printing (OFF) lines after processing CHANGE,

LOCA TE, and FIND requests.

{ON n/a Set program to operate in block 4" 19

BLOCK OFF

mode (ON) or in line-by-line mode (OFF).

{ON n/a Set brief mode to print truncated 37,44 4" 18

BRIEF OFF

(ON) or full (OFF) lines Input/Outeut Reguests

READ n/a Fill block buffer from input file. 4 .. 21

WRITE n/a Add block buffer to output fi Ie. 4 .. 22

GET G Add I ines from subsidiary input 4 .. 12

device after (below) current line.

M isce Ilaneous Regu.ests

SIZE S Set total lines to occupy block 4 .. 20

buffer.

INSERT Change mode to input. 30 4 .. 11

Al-2

Section

4.4.1

Table 3-1

3-2 4-1 4-2 4-3 4-4

PIP-9 Operation Characters . . . • . . . . • . . . • . . . • . . . PI P-9 Device Names . . . • . . • . . . Legal Operation/Switch Combinations . . . . Legal Switch Combinations for Transfer Fi Ie (T) . . . . Legal Operation/Switch Combinations . . . . Lega I Switch Combinations for Transfer Fi Ie . . . . • • . . . . • . . . • . . .

3

4

6 6 9 9

1 • INTRODUCTION

PIP-9 (for Peripheral Interchange Program) is a utility program in the PDP-9 ADVANCED Software System used to transfer data fi les from one standard peripheral device to another. PIP operates under Monitor control, using the Monitor I/O device handlers.

Files may be verified, renamed, deleted, combined or split into segments. Entire DECtapes, or individual DECtape blocks, may be copied and verified. File directories may be listed or initialized.

Some of these functions and other subsidiary functions may be combined by inserting optional switches when the user types a command string to PIP-9.

The following peripheral devices may be used as either input (source) or output (destination):

DECtape (TC02 Control Unit with TU55 Transports) Paper Tape Reader/Punch (PC02)

Line Printer (Type 647) (output on Iy) Teletype (KSR 33 or KSR 35)

Card Reader (CROl E or CR02B)

Mnemonic DTn

PR (Reader) PP (Punch) LP

TT CR

Later versions of PIP-9 will also transfer fi les on magnetic tape and disk.

2. DEVICE ASSIGNMENTS

Before using PIP, the user mus't be sure that the peripheral devices he plans to use are as-signed to positive slots in the Monitor1s Device Assignment Table. This is for use by PIP. When typing his command string, the user specifies devices by writing mnemonic codes, such as DT2, PR or TT.

2. 1 I/O Mon i tor System

In paper tape I/O Monitor systems, where the Device Assignment Table is fixed, the user need not be concerned with. DAT slot assignments. Line Printer and card reader users must be certain that the appropri ate handlers are inc luded in their systems.

2.2 Keyboard Monitor

In Keyboard Monitor systems, the user must be sure that the devices he will use are assigned . DAT slots. He should use the Monitor REQUEST PIP command to get a typeout of all current. DAT slot assignments. If a device he plans to use is not listed, he may use an ASSIGN command to assign that device to any positive .DAT slot, with the exception of .DAT slot 1 which must always be assigned to the system device. The most complete handler, (e.g. DTA, PPA, etc.), must be assigned. If the same device is to be used as both the source and destination device, it must be assigned to two .DAT slots.

PIP-9

Since these • DAT slot assignments are for use by PIP, they need not be remembered by the user. Systems distributed by DEC initially have the assignments shown below in Table 2-1.

Table 2-1

Initial .DAT Slot Assignments .DAT Slot No. an--other command upon completion of the current one.

2

Multiple spaces are ignored by the command string processor. In fact, delimiters are absolutely required only following the operation character, device names and file names.

Example: TL....JDT1L-JNEWNAM BIN (B)"'-L..JDT2L...JOLDNAML-IBIN#

OR T DT1:NEWNAM;BIN (B)+-

L..JDT2:0LDNAM;BIN~

The elements in the preceding example are:

T

DT1, DT2

NEWNAM, OLDNAM BIN

B

3. 1 i Operation Character

PIP-9 Transfer Fi Ie operati on

DECtape 1 is the destination device, DECtape 2 is the source device.

File names

Fi Ie name extension

Transfer direction indicator (right to left, i • e ., D T2 to D T 1 )

Switch option

The first character in a PIP-9 command string must

be

an operation character defining the main function to be performed. It must be followed by a space. Legal operational characters are listed in Table 3-1 below.

Table 3-1

PIP-9 Operation Characters

(T) Transfer Fi Ie (V) Verify File

(L) List Directory (S) Segment Fi Ie

(D) Delete File (B) Block Copy

(C) Copy (N) New Directory

(R) Rename File

3.2 Device Name

Because the PDP-9 ADVANCED Software System provides more than one device handler for some peripherals, a 2-letter mnemonic (corresponding to the first two letters of the handler name) is used for device name specification in PIP. Table 3-2 lists legal device names. For multi-unit periph-erals, e.g., DECtape, the unit number, 0-7, appears after the device manemonic, e.g., DT7. The device name delimiter must be a colon (:) or a space.

PIP-9

3.4.2 Subsidi ary Operations

(G) Correct Bad Parity/checksum lines (E) Convert tabs to spaces

4

(C) Convert multiple spaces to tabs (S) Create new system directory (N) New directory

(Y) Segment fi Ie

(W)*

Combine several source files, or tapes, stripping • EOT's and .END's from intermediate tapes.

or

(W)*

Comgine several binary files, stripping EOF's from intermediate files.

Im Dokument Programmer's PDP-8 (Seite 61-79)