Programming  Notes  
1•   Examples  of  the  use  of  the  COMPARE   LOGICAL   instruction  are  given  in  
Appendix A.
2.COMPARE   LOGICAL   treats  all  bits  of  
each operand alike as part ofa   field  of  unstructured  logical  data.  
ForCOMPARE   LOGICAL   (CLC),  the  
comparison may extend to field
lengths of 256 bytes.COMPARE   LOGICAL   CHARACTERS  UNDER  MASK  
o 8 12 1620   31  
The first operand is compared with the
second operand under control ofa   mask,  
and the result is indicated in the
condition code.
The contents of the M3 field are used as
a mask. These four bits, left to right,
correspond one for one with the four
bytes, left to right, of general regis
terR  t  •   The  byte  positions  correspond  
ing to ones in the mask are considered
asa   contiguous  field  and  are  compared  
with the second operand. The second
operand isa   contiguous  field  in   storage,  starting  at  the  second-operand  
address and equal in length to the
number of onesin   the  mask.  The   bytes  in   the  general  register  corresponding  to  
zeros in the mask do not participatein   the  operation.  
The comparison proceeds left to right,
byte by byte, and ends as soon as aninequality   is   found  or  the  end  of  the  
fieldsis   reached.  
When the maskis   not  zero,  exceptions  
associated with storage-operand access
are recognized for no more than the
number of bytes specified by the mask.
Access exceptions mayor may not be
recognized for the portion ofa   storage  
operand to the right of the first
unequal byte. When the mask is zero,
access exceptions are recognized for one
byte at the second-operand address.
Resulting Condition Code:
o
1
2
3Operands   equal,  or  mask  bits  
all zeros
First operand low
First operand high
Program Exceptions:
Access (fetch, operand 2)
Programming Note
An example of the use of theLOGICAL   CHARACTERS  UNDER  MASK  
tionis   given  in  Appendix  A.  COMPARE   LOGICAL   LONG   CLCL  [RR]  'OF'   o  8  12  15  COMPARE   instruc-  
The first operand is compared with the
second operand, and the result is indi
cated in the condition code. The short
er operandis   considered  to  be  extended  
on the rightwith   padding  bytes.  
The Rt andR2   fields  each  
even-oddpair   of  general  
must designate an
register; otherwise, a
exception is recognized.
designate an
registers and
even-numbered
specification
The location of the leftmost byte of the
first operand and second operand is
designated bybits   8-31  of  general  
registers Rt and R
2
, respectively. The
number of bytes in the first-operand and
second-operand locations is specified by
bits 8-31 of general registers Rt + 1
andR2   +  1,  respectively.  Bit  positions  0-7   of  general  register  R2   +  1  contain  
the padding byte. The contents of bit
positions0-7   of  general  registers  Rt,  
R21 and Rt + 1 are ignored.
The contents of the registers just
described are as follows:
R t1////////1   First-Operand  Address  
o 8 31\////////1   First-Operand   Length  
o 8 31
//////////Second-Operand   Address/  
o 8 31
PadSecond-Operand   Length  
o 8 31
Chapter 7. General Instructions 7-15
1
Appendix A.
2.
each operand alike as part of
For
comparison may extend to field
lengths of 256 bytes.
o 8 12 16
The first operand is compared with the
second operand under control of
and the result is indicated in the
condition code.
The contents of the M3 field are used as
a mask. These four bits, left to right,
correspond one for one with the four
bytes, left to right, of general regis
ter
ing to ones in the mask are considered
as
with the second operand. The second
operand is
address and equal in length to the
number of ones
zeros in the mask do not participate
The comparison proceeds left to right,
byte by byte, and ends as soon as an
fields
When the mask
associated with storage-operand access
are recognized for no more than the
number of bytes specified by the mask.
Access exceptions mayor may not be
recognized for the portion of
operand to the right of the first
unequal byte. When the mask is zero,
access exceptions are recognized for one
byte at the second-operand address.
Resulting Condition Code:
o
1
2
3
all zeros
First operand low
First operand high
Program Exceptions:
Access (fetch, operand 2)
Programming Note
An example of the use of the
tion
The first operand is compared with the
second operand, and the result is indi
cated in the condition code. The short
er operand
on the right
The Rt and
even-odd
must designate an
register; otherwise, a
exception is recognized.
designate an
registers and
even-numbered
specification
The location of the leftmost byte of the
first operand and second operand is
designated by
registers Rt and R
2
, respectively. The
number of bytes in the first-operand and
second-operand locations is specified by
bits 8-31 of general registers Rt + 1
and
the padding byte. The contents of bit
positions
R21 and Rt + 1 are ignored.
The contents of the registers just
described are as follows:
R t
o 8 31
o 8 31
//////////
o 8 31
Pad
o 8 31
Chapter 7. General Instructions 7-15
 
             
            













































































































































































































































































































































































































































































































































































 
             
             
            