• Aucun résultat trouvé

LEMEGETON SAVED AND SEALED

Dans le document Concepts and Facilities CP·6 (Page 66-71)

>SYS DD !OFF

EE CON=OO:OO:14:23 EX=OO:OO:03.97 SRV=OO:OO:10.10

P~vffi=

1238 CHG=

5.76

Figure 6-4. Sample CP-6 Program - Part 4

Building a Program

EDIT is a context edit for the creation, modification, and manipulation of textual files. EDIT is designed for on-line use; batch users without access to a time-sharing terminal generally punch programs on to cards.

All EDIT data is stored on disk in keyed files of variable length records. Through EDIT, a user can:

• Create a sequenced text file.

• Insert, delete. reorder and replace lines or groups of records within a file.

• Print and renumber file lines selectively.

• Merge part of one file into another.

• Select records for intra-record editing based on the presence or absence of specified character strings.

• Perform context editing operations that delete, move, and substitute character strings within a previously selected set of records.

• Maintain files. The user can build, copy and delete whole files of text lines.

Appendix C is a summary of EDIT commands.

6-8

Building a Program CE26-02_DRAFT

The CP-6 Programming Environment Compiling a Program

I B EX (Interactive and Batch Executive) is the C P-6 command processor. I B EX is an interface between the user and the operating system. IBEX interprets the CP-6 execution control language, the repertoire of IBEX commands. These commands control the construction and execution of programs and provide communication between a program and its environment.

CP-6 processors are called by specifying the processor name in an IBEX control command. All jobs require the use of execution control language.

Appendix A is a summary of IBEX control commands.

Linking and Executing a Program

The LI N K processor controls the linking of programs. LI N K accepts as input object units (which are the output of compilers or assemblers), resolves any linkage, and produces run units as output.

An overlaid program is a tree-structured program that has only one node (the root node) resident in main memory for the duration of the program execution. The other nodes are called for"by a resident node and brought in as needed. They may reside (at different times) in the same main memory area, thus reducing the amount of main storage required to contain the entire program.

If the program is to be overlaid, the overlay specification is given to the LI N K processor in the LI N K command. It is the user's responsibility to plan the relationship of the nodes within the program.

The example in Figure 6-5 consists of four paths, anyone of which may be present in main storage at any given time. Node A is the root of the program and is never overlaid by another node. Any path may be loaded into main storage and overlaid as many times as required by the program. All nodes of the run unit file are saved in disk storage. When a node that has been· overlaid is called again by the executing program, the original copy is loaded from the disk. Therefore. any communication between two overlay segments (e.g., D and E in Figure 6-5) must be done in a part of the backward path common to both. Although Figure 6-5 illustrates a single· tree structure, most actual overlaid programs consist of two parallel trees:

one for data and one for programs. Both are fetched by a single node load call.

The user can direct IBEX to initiate execution of user programs that are in run unit form in two ways:

1. Simply by specifying the file identification of the file that contains the run unit.

2. Through the START command.

CE26-02_DRAFT Linking and Executing a Program

6-9

The CP-6 Programming Environment Debugging a Program

DELTA is a universal debugger used for non-interpretive languages. Each language processor produces a debug schema defining the location and characteristics of each symbol defined within a program. This schema allows the programmer to communicate with DELTA using the exact symbols that appear on the program listing or the source program line numbers.

DELTA operates in both the batch and on-line access modes. In time-sharing, conditions in the user program are reported directly to the user's terminal. The user then interacts with DELTA to correct errors. In batch, the user must pre-plan the debugging session, entering the desired commands to DELTA within the IBEX command stream; the user is restricted only in that immediate interaction with

0

E L TA is not possible.

LI NK A ( C (D) (E») (8 (G ) ( F) ON SAMPLETREE E

I

c

D

I

I

A

G I

8

F

I

Figure 6-5. Sample Tree Structure

Tracing ability is provided at several levels: on all entry points, on a specific entry point, or on any condition which causes a break in the sequence of instruction execution. Additionally, a history mode can be set to save trace information for later examination. The DELTA user can:

• Interrupt the flow of program execution according to specified conditions.

• Examine, insert, and modify program elements such as instructions and data.

• Trace the flow of program execution.

• Obtain snapshots of post-mortem dumps.

The user directs DELTA activities through directives. DELTA directives can be categorized into three groups:

6-10 Debugging a Program C E26-02_D RA FT

The

CP-6

Programming Environment 1. Processor Directives that set parameters for the debugging session and cause DELTA to

perform functions not related to the program itself.

2. Execution Control Directives that set procedure. data. and event breakpoints.

3. Memory Display and Modification Directives that print and/or modify memory.

These directives are considered direct, stored, or attachable depending on the time of activation.

A direct directive is activated immediately. A stored directive is activated when a specified condition occurs. An attachable directive can either be invoked directly or as part of a stored command.

Appendix

B

is a summary of DELTA directives.

. . ' .. }

CE26-02_DRAFT Debugging a Program

6-11

The CP-6 Programming Environment

6-12 Debugging a Program CE26-02_DRAFT

Section 7 CP-6 File and Device Management

CP-6 file and device management provides significant data organizing and input/output services. CP-6 I/O is device independent, allowing programs to be written without specific knowledge of the file or device at which I/0 will actually take place. Default device assignments make specific selection necessary only when the programmer wishes to perform an unusual task.

Pack sets and the EFT (Efficient File Transfer) processor provide protection from file destruction in the event of disaster. In addition, support of ANS tape formats allows the programmer to transfer information to and from other computer systems.

Dans le document Concepts and Facilities CP·6 (Page 66-71)