GA22-7000-10 IBM System/370 Principles of Operation Sept 1987
Pagei(2 of 558)
Publication Number GA22-7000-10 IBM System/370 Principles of Operation File Number S370-01
Eleventh Edition (September 1987) This major revision obsoletes and replaces GA22-7000-8, GA22- 7000-9, and Technical Newsletters GN22-0644 and GN22-0683. Significant changes or additions to the text and illustrations are indicated by a vertical line to the left of the change. Changes are made occasionally to the using this publication in connection equipment, refer to the latest IBM Processors Bibliography, GC20-000I7 applicable and current. information herein; before with the operation of IBM System/370, 30xx, and 4300 for the editions that are IBM may have patents or pending patent applications covering subject matter described herein. Furnishing this publication does not constitute or imply a grant of any license under any patents, patent applications, trademarks, copyrights, or other rights of IBM or of any third party, or any right to refer to IBM in any advertising or other promotional or marketing activities. IBM assumes no responsibility for any infringement of patents or other rights that may result from the use of this publication or from the manufacture, use, lease, or sale of apparatus described herein. licenses under IBM's utility patents are available on reasonable and nondiscriminatory terms and conditions. Inquiries relative to licensing should be directed, in writing, to: IBM Corpora tion, Director of Contracts and licensing, Armonk, NY, USA 10504. References in this publication to IBM products, programs, or services do not imply that IBM intends to make these available in all countries in which IBM operates. Publications are not stocked at the address given below. Requests for IBM publications should be made to your IBM repre sentative or to the IBM branch office serving your locality. A form for reader's comments is provided at the back of this publication. If the form has been removed, comments may be addressed to: IBM Corporation, Central Systems Architecture, Department E57, PO Box 390, Poughkeepsie, NY, USA 12602. IBM may use or distribute whatever information you supply in any way it believes appropriate without incurring any obligation to you. ec) Copyright International Business Machines Corporation 1970, 1972, 1973, 1974, 1980, 1981, 1987
Publication Number GA22-7000-10 IBM System/370 Principles of Operation File Number S370-01
Eleventh Edition (September 1987) This major revision obsoletes and replaces GA22-7000-8, GA22- 7000-9, and Technical Newsletters GN22-0644 and GN22-0683. Significant changes or additions to the text and illustrations are indicated by a vertical line to the left of the change. Changes are made occasionally to the using this publication in connection equipment, refer to the latest IBM Processors Bibliography, GC20-000I7 applicable and current. information herein; before with the operation of IBM System/370, 30xx, and 4300 for the editions that are IBM may have patents or pending patent applications covering subject matter described herein. Furnishing this publication does not constitute or imply a grant of any license under any patents, patent applications, trademarks, copyrights, or other rights of IBM or of any third party, or any right to refer to IBM in any advertising or other promotional or marketing activities. IBM assumes no responsibility for any infringement of patents or other rights that may result from the use of this publication or from the manufacture, use, lease, or sale of apparatus described herein. licenses under IBM's utility patents are available on reasonable and nondiscriminatory terms and conditions. Inquiries relative to licensing should be directed, in writing, to: IBM Corpora tion, Director of Contracts and licensing, Armonk, NY, USA 10504. References in this publication to IBM products, programs, or services do not imply that IBM intends to make these available in all countries in which IBM operates. Publications are not stocked at the address given below. Requests for IBM publications should be made to your IBM repre sentative or to the IBM branch office serving your locality. A form for reader's comments is provided at the back of this publication. If the form has been removed, comments may be addressed to: IBM Corporation, Central Systems Architecture, Department E57, PO Box 390, Poughkeepsie, NY, USA 12602. IBM may use or distribute whatever information you supply in any way it believes appropriate without incurring any obligation to you. ec) Copyright International Business Machines Corporation 1970, 1972, 1973, 1974, 1980, 1981, 1987
GA22-7000-10 IBM System/370 Principles of Operation Sept 1987
Pageiii(4 of 558)
This pUblication provides, for reference purposes, a detailed definition of the machine functions performed by System/370. The publication applies only to systems operating in the System/370 mode. The IBM 370-XA Principles of Operation, SA22-7085, should be consulted regarding the functions of the architecture which apply to systems operating in the 370-XA mode, and the IBM 4300 Processors Prin ciples of Operation for ECPS:VSE Mode, GA22-7070, should be consulted regarding the functions of the architecture which apply only to systems operating in the VSE mode. The publication describes each function at the level of detail needed to prepare an assembler-language program that relies on that function. It does not, however, describe the notation and conventions that must be employed in preparing such a program, for which the user must instead refer to the appropri ate assembler-language publication. The information in this publication is provided principally for use by assembler-language programmers, although anyone concerned with the functional details of System/370 will find it useful. This publication is written as a refer ence and should not be considered an introduction or a textbook. It assumes the user has a basic knowledge of data processing systems. IBM publications relating to System/370 are listed and described in the IBM System/370, 30xx, and 4300 Processors Bibliography, GC20-0001. All facilities discussed in this publi cation are not necessarily available on every model. Furthermore, in some instances the definitions have been structured to allow for some degree of extendibility, and therefore certain capabilities may be described or implied that are not offered on any model. Examples of such capabilities are the number of channel-mask bits in the control register, the size of the CPU address, and the number of CPUs sharing main storage. The allowance for this type of extendibility should not be construed as implying any intention by IBM to provide such capabilities. For information about the characteristics and availability of facilities on a specific model, see the functional char acteristics publication for that model. Largely because this publication is arranged for reference, certain words ; PREFACE and phrases appear, of necessity, earli er in the publication than the principal discussions explaining them. The reader who encounters a problem because of this arrangement should refer to the index, which indicates the location of the key description. The information presented in this publi cation is grouped in 13 chapters and several appendixes: Chapter 1, Introduction, highlights some of the major facilities of System/370. Organization, describes the major groupings within the system --the central processing unit (CPU), storage, and input/output --with some attention given to the composition and character istics of those groupings. Chapter d, Storage, explains the infor mation formats, the addressing of stor age, and the facilities for storage protection. It also deals with dynamic address translation (OAT), which, coupled with special programming support, makes the use of a virtual storage possible in System/370. Dynamic address translation eliminates the need to assign a program to a fixed in real storage and thus reduces the addressing constraints on system and problem programs. Chapter Control, describes the facil ities for the switching of system status, for special externally initiated operations, for debugging, and for timing. It deals specifically with CPU states, control modes, the program status word (PSW), control registers, program-event recording, timing facili ties, resets, store status, and initial program loading. Chapter 2, Program Execution, explains the role of instructions in program execution, looks in detail at instruc tion formats, and describes briefly the use of the program-status word (PSW), of branching, and of interruptions. It contains the principal description of the dual-address-space (DAS) facility. It also details the aspects of program execution on one CPU as observed by other CPUs and by channels. Chapter Interruptions, details the mechanism that permits the CPU to change its state as a result of conditions external to the system, within the system, or within the CPU itself. Six classes of interruptions are identified and described: machine-check interrup tions, program interruptions, super visor-call interruptions, external iii
interruptions, input/output interrup tions, and restart interruptions. Chapter 7, General Instructions, contains detailed descriptions of logical and binary-integer data formats and of all unprivileged instructions except the decimal and floating-point instructions. Chapter Decimal Instructions, describes in detail decimal data formats and the decimal instructions. The deci mal instructions are a part of the commercial instruction set. Chapter 1, Floating-Point Instructions, contains detailed descriptions of floating-point data formats and the instructions provided by the floating point facility and by the extended precision floating-point facility. Chapter 1!, Control Instructions, contains detailed descriptions of all of the semiprivileged and privileged instructions except for the I/O instructions. Chapter 11, describes the correcting, malfunctions. Machine-Check Handling, mechanism for detecting, and reporting machine Chapter lZ, Operator Facilities, describes the basic manual functions and controls available for operating and controlling the system. Chapter 11, Input/Output Operations, explains the programmed control of I/O devices by CPUs and by channels. It includes detailed descriptions of the I/O instructions, channel-command words, and other I/O-control formats. The Appendixes include: • Information about number represen tation • Instruction-use examples • Lists of the instructions arranged in several sequences • A summary of the condition-code settings • A list of the System/370 facilities • A table of the powers of 2 • Tabular information helpful in dealing with hexadecimal numbers • An EBCDIC chart • tv A discussion of changes compatibility between and System/370 affecting System/360 • A discussion of changes affecting compatibility within System/370 SIZE NOTATION In this publication, the letters K and M denote the multipliers 2 10 and 2 20 , respectively. Although the letters are borrowed from the decimal system and stand for kilo (10 3 ) and mega (10 6 ), they do not have the decimal meaning but instead represent the power of 2 closest to the corresponding power of 10. Their meaning in this pUblication is as follows: Symbol Value K (kilo) 1,024 = 2 10 M (mega) 1,048,576 = 2 20 The following are some examples of the use of K and M: 2,048 is expressed as 2K. 4,096 is expressed as 4K. 65,536 is expressed as 64K (not 65K). 224 is expressed as 16M. When the words "thousand" and "million" are used, no special power-of-2 meaning is assigned to them. BYTES, CHARACTERS, AND CODES Although the System/360 architecture was originally designed to support the Extended Binary-Coded-Decimal Inter change Code (EBCDIC), the instructions and data formats of the architecture are for the most part independent of the external code which is to be processed by the machine. For most instructions, all 256 possible combinations of bit patterns for a particular byte can be processed, independent of the character which the bit pattern is intended to represent. For instructions which use the zoned format, and for those few instructions which are dependent on a particular external code, the instruc tion TRANSLATE may be used to convert data from one code to another code. Thus, a machine operating in the System/370 mode can process EBCDIC, ASCII, or any other code which can be represented in eight or fewer bits per character. In this publication, unless otherwise specified, the value given for a byte is the value obtained by considering the 4 bits of the byte to represent a binary, code. Thus, when a byte is said to