• Keine Ergebnisse gefunden

ASSEMBLER CODING FORM

Im Dokument 0 0 (Seite 43-48)

7. DIAGNOSTIC AND DEBUGGING AIDS

1.3. ASSEMBLER CODING FORM

To convert your written program to a form that can be conveniently input to the computer, you enter your written work in the form of 80-column card images. To make the job of the programmer, keypunch operator, and any other person who may reference this program easier, there are conventions for writing and reading programs and reference materials. A useful tool is the assembler coding form. (See Figure 1—1.)

Theoretically, you could write your program on a plain sheet of paper, as long as you observe the assembly language formatting rules. Using an assembler coding form, however, will ease the job of preparing your input card images.

UP-8832 SPERRY UNIVAC OS/3 1-6 SUPERVISOR MACROINSTRUCTIONS

The following subsections describe the conventions and rules that apply to the use of this form. Following these rules will result in a stylized assembly listing that is easy to read and use, in addition to ensuring that your program executes properly. The assembler user guide, UP-8913 (current version) gives a detailed description of how to use the coding form. However, some of the rules and conventions are included here for your convenience.

LABEL LOPERATIONA OPERAND

1 10 16 72

Figure 1—1. Assembler Coding Form

1.3.1. Label Field

The first eight columns of the assembler coding form may contain a symbol. This symbol can be used to identify a line of coding, or to identify a main storage or constant area. The rules for using the label field are:

1. The symbol must start in column 1.

2. The symbol must begin with an alphabetic or special character.

3. The symbol must not exceed eight characters in length.

4. The symbol must not contain embedded blanks or other special characters.

5. The field must be terminated by a blank.

6. An asterisk (*) entered in column 1 indicates to the assembler that the entry on this line is to be treated as comments.

1 .3.2. Operation Field

The operation code is written in the operation field (columns 10 through 14). These codes specify the operation to be performed. The rules for using this field are:

1. The operation code must not contain embedded blanks.

2. The operation code must be written exactly as shown in the list of mnemonics for application instructions, directives, and macro or proc instructions.

3. The operation field must be terminated by a blank.

4. An operation code consisting of six characters (for example, the macroinstruction ATTACH), will fall in columns 10 through 15. In this case, column 16 must be blank to terminate the operation field.

UP-8832 SPERRY UNIVAC OS/3 1-7 SUPERVISOR MACROINSTRUCTIONS

1.3.3. Operand Field

The operand field begins in column 16 and usually ends in or before column 71. The operands that form part of the assembler statements are written in this field. The rules for using this field are:

1. The operand field is terminated by a blank that is not enclosed by an apostrophe.

2. Operands may be continued onto the next line by placing a nonbiank character in column 72. The continuation line starts at column 16. Up to two continuation lines are permitted.

1.3.4. Comments Field

Program documentation is as important to the programmer writing the program as it is to those who must refer to it later. Operand specification is usually completed by column 40, thus leaving column 41 through 71 free for comments. There must be at least one blank between the end of the operand specification and the start of the comments. Long comments can be entered by coding an asterisk in column 1.

1.3.5. Continuation Column

When the operand specification is to be continued onto the next line, a nonblank character must be written in column 72. Do not confuse this with continuing a comment. An operand specification can be continued for a total of three lines. The second and third continuation lines start in column 16.

1.3.6. Sequence Field

Columns 73 through 80 may be used for entering sequence numbers. This is done by assigning consecutive numbers to each line of coding and is useful for updating the input card images as needed. It is good practice to number the lines in multiples of 1 0, or even 100. This allows you to insert additional coding lines without having to renumber the card images already in the program. Some programmers use letters in addition to the numbers.

This is useful in identifying the program from which card images have come if they have been removed for any reason.

1.4. MACROINSTRUCTIONS

1.4.1. Declarative Macroinstructions

Declarative macroinstructions generate nonexecutable code sequences in the user program and are used to allocate areas in main storage containing control information for various system services.

UP-8832 SPERRY UNIVAC OS/3 1-8

SUPERVISOR MACROINSTRUCTIONS Update D

1 .4.2. Imperative Macroinstructions

Imperative macroinstructions generate executable code sequences in the user program.

These code sequences make up the interface between the user program and the supervisor. Imperative macroinstructions are used to request services of the supervisor or to direct the operation of the user program.

1 .4.3. Summary of Supervisor Macroinstructions

Table 1—1 lists the QS/3 supervisor macroinstructions and gives a brief description of their function, along with the page number where the format for each appears. ARGLST, DTFPF, PCA, SAT, TCA, ECB, and DDCPF are the declarative macroinstructions in this list;

the remainder are imperative macroinstructions. The macroinstructions are arranged in this manual in the same groups as they appear in this table.

Table 1—1 Supervisor Macroinstructions (Part 1 of 3)

PROGRAM MANAGEMENT Format

Program Loader Page

LOAD Load a program phase and return control. 2—4

LOADR Load a program phase, relocate address-constants, and return control. 2—6 LOADI Locate a program phase and store its phase header in a workarea. 2—8

FETCH Load a program phase and branch. 2—10

Job and Task Termination

EOJ Terminate a job step normally. 2—13

CANCEL Terminate a job abnormally. 2—14

Timer Services

GETIME Obtain current time and date. 2—17

SETIME Set an elapsed time counter for the requesting task. 2—21 Subroutine Linkage

CALL/VCALL Call a program 2—29

ARGLST Generate an argument list 2—30

SAVE Save register contents 2—31

RETURN Restore registers and return 2—32

Island Code Linkage

STXIT Link to island code subroutine. . 2—38

EXIT Exit from island code subroutine. 2—41

System Information Control

GETCOM Retrieve data from job communication area. 2—54

PUTCOM Place data into job communication area. 2—55

GETINF Retrieve data from system control tables. 2—55

GETLDA Transfer data from LDA 2—56a

PUTLDA Transfer data to LDA 2—56b

Control Stream Reader

GETCS Retrieve embedded data file submitted in job control stream. 2—60

SETCS Reset pointer to embedded data file. 2—61

UP-8832 SPERRY UNIVAC OS/3 1-9 SUPERVISOR MACROINSTRUCTIONS

Table 1—1. Supervisor Macroinstructions (Part 2 of 3)

Format DISK AND DISKETTE SPACE MANAGEMENT

Page Disk

OBTAIN Access VTOC user block. 3—2

Diskette

OBTAIN Obtain diskette label information. 3—4

SYSTEM ACCESS TECHNIQUE (SAT) Disk SAT

DTFPF Define a partitioned file. 4-11

PCA Define a partition control appendage. 4—14

OPEN Open a disk file. 4—19

GET Retrieve next logical block. 4-20

PUT Output a logical block. 4—21

WAITF Wait for block transfer. 4—22

READE Search track by key, equal. 4—23

READH Search track by key, equal or higher. 4-23

SEEK Access a physical block. 4—24

CLOSE Close a disk file. 4—25

Tape SAT

SAT Defines magnetic tape file. 4-45

TCA Defines a tape control appendage. 4_47

OPEN Open a tape file. 4-51

GET Get next logical block. 4-52

PUT Output next logical block. 4-53

WAITF Wait for block transfer. 4—53

CNTRL Control tape unit functions. 4_54

CLOSE Close a tape file. 4-55

MULTITASKING

Task Management

ECB Generate an event control block.

ATTACH Create and activate an additional task. 7 DETACH Terminate a task normally. 59

TYIELD Deactivate a task. 510

AWAKE Reactivate an existing nonactive task. 5_li

CHAP Change the priority of a task. 512

Task Synchronization

WAIT Wait for a task request to complete. 5 14

WAITM Wait for one of several task requests to complete. 5_i 55

POST Activate the waiting task. 16

TPAUSE Deactivate one or more tasks other than the issuing task. 517

TGO Reactivate one or more tasks other than the issuing task. 5—18

UP-8832 SPERRY UNIVAC OS/3 1-10

SUPERVISOR MACROINSTRUCTIONS Update A

Table 1—1. Supervisor Macroinstructions (Part 3 of 3)

DIAGNOSTIC AND DEBUGGING Format

Page Storage Displays

SNAP/SNAPF Printout portions of main storage and return control. 7-2

DUMP Printout the job main storage and terminate the job step. 7-7

Checkpoint Facility

CHKPT Record a checkpoint. 7-12

DDCPF Define a SAT checkpoint file. 7-1 5

DCPOPN Open a SAT checkpoint file. 7-15

DCPCLS Close a SAT checkpoint file. 7-16

Monitor and Trace

// OPTION TRACE Monitor from start of job. 7-20

(This is a job control statement, not a macroinstruction.) SPOOLING

DMBRK Create a breakpoint in a spool output file. 6—5

Im Dokument 0 0 (Seite 43-48)