Programming Hotes
1.MOVE WITH KEY can be used in a loop
to move a variable number of bytes
of any length, as follows:lOOP EHD
LAMVCK BC AR
AR
SR
B
RW,256
D1(R1,B1),D2(B2),R3
8,EHDB 1 ,RW B
2
,RW R 1 ,RW LOOP 2. The performance of MOVE WITH KEY on
most models may be significantly
slower than that of theMOVE (MVC) and MOVE LOHG instructions. There
fore,MOVE WITH KEY should not be
used if the key of the source and
the target are the same.PROGRAM CAll PC [5]
'B218'
o 1620 31
A two-level lookup is performed to
locate an entry-table entry (ETE). The
ETE contains an authorization-key mask;
anASH; an entry parameter, which is
loaded into general register 4; and
information to update the PSW-key mask
in control register 3 and to replace the
problem-state bit and instruction
address in the PSW. The original
contents of the control-register and the
PSW fields are saved in general regis
ters 3 and 14.
The ETE also causes a space-switching
operation to occur if it specifies a
nonzero ASH. When the ETE specifies a
zero ASH, the operation is calledPROGRAM CALL to current primary (PC-cp); when the ETE specifies a nonzero ASH,
the operation is calledPROGRAM CALL with space switching (PC-ss). When
space switching is specified, the new
PASH is loaded into control register 4
from the ETE and is used in a two-level
lookup to locate an ASH-second-table
entry (ASTE). From this ASTE, a new
PSTD, AX, and LTD are loaded into
control registers 1, 4, and 5, respec
tively. Whether or not space switching
is specified, the previousPASH and PSTD are placed in the SASH and SSTD, respec
tively, and the previousPASN is saved
in general register 3.PROGRAM CALL PC-Humber Translation
The second-operand address is not used
to address data; instead, the rightmost20 bits of the address are used as a PC number and have the following format:
Second-Operand Addressr------PC 1////////////1 LX EX
o 12 24 31
Linkage Index (LX): Bits 12-23 of the
second-operand address are the linkage
index and are used to select an entry
from the linkage table designated by the
linkage-table designation in control
register 5.
Entry Index (EX): Bits 24-31 of the
second-operand address are the entry
index andare used to select an entry
from the entry table designated by the
linkage-table entry.
Bits0-11 of the second-operand address
are ignored.
The linkage-table and entry-table lookup
process is depicted in part 1 of the
figure "Execution ofPROGRAM CALL." The
detailed definition for this table
lookup process is in the section"PC-Humber Translation" in Chapter 5, "Program Execution." The entry-table
entry has the following format:
AKMASH I 0-0 1 IA 1 P I 0 16 32 40 63
PARM EKM1/////////1 64 96 112 127
LTE bits 1-7 and ETE bits 32-39 must be
zeros; otherwise, aPC-translation specification exception is recognized. After the entry-table entry has been
fetched, if the currentPSW specifies
the problem state, the currentPSW-key mask in control register 3 is tested
against the AKM field in the entry-table
entry to determine whether the program
is authorized to access this entry. The
AKM andPSW-key mask are AHDed, and if
the result iszero, a privileged
operation exceptionis recognized. When PROGRAM CALL is executed in the supervi
sor state, the AKM field is ignored.
If the result of the AHD of the AKM and
thePSW-key mask is not zero, or if the CPU is in the supervisor state, the
execution of the instruction continues.Chapter 10. Control Instructions 10-25
1.
to move a variable number of bytes
of any length, as follows:
LA
AR
SR
B
RW,256
D1(R1,B1),D2(B2),R3
8,EHD
2
,RW
most models may be significantly
slower than that of the
fore,
used if the key of the source and
the target are the same.
'B218'
o 16
A two-level lookup is performed to
locate an entry-table entry (ETE). The
ETE contains an authorization-key mask;
an
loaded into general register 4; and
information to update the PSW-key mask
in control register 3 and to replace the
problem-state bit and instruction
address in the PSW. The original
contents of the control-register and the
PSW fields are saved in general regis
ters 3 and 14.
The ETE also causes a space-switching
operation to occur if it specifies a
nonzero ASH. When the ETE specifies a
zero ASH, the operation is called
the operation is called
space switching is specified, the new
PASH is loaded into control register 4
from the ETE and is used in a two-level
lookup to locate an ASH-second-table
entry (ASTE). From this ASTE, a new
PSTD, AX, and LTD are loaded into
control registers 1, 4, and 5, respec
tively. Whether or not space switching
is specified, the previous
tively, and the previous
in general register 3.
The second-operand address is not used
to address data; instead, the rightmost
Second-Operand Address
o 12 24 31
Linkage Index (LX): Bits 12-23 of the
second-operand address are the linkage
index and are used to select an entry
from the linkage table designated by the
linkage-table designation in control
register 5.
Entry Index (EX): Bits 24-31 of the
second-operand address are the entry
index and
from the entry table designated by the
linkage-table entry.
Bits
are ignored.
The linkage-table and entry-table lookup
process is depicted in part 1 of the
figure "Execution of
detailed definition for this table
lookup process is in the section
entry has the following format:
AKM
PARM EKM
LTE bits 1-7 and ETE bits 32-39 must be
zeros; otherwise, a
fetched, if the current
the problem state, the current
against the AKM field in the entry-table
entry to determine whether the program
is authorized to access this entry. The
AKM and
the result is
operation exception
sor state, the AKM field is ignored.
If the result of the AHD of the AKM and
the
execution of the instruction continues.