Machine Format Op Code 49 4 o o Assembler Format Op Code R
t ,02(X
2
,B 2 ) CH 4,X'30'(0,13) is executed, the contents of locations 16080-16081 are fetched, expanded to 32
bits (the sign bit is propagated to the
left), and compared with the contents of
register 4. Because the two numbers are
equal, condition code0 is set. COMPARE LOGICAL (CL, CLC, CLI, CLR) The COMPARE LOGICAL instruction differs
from the signed-binary comparison
instructions ec,CH, CR) in that all
quantities are handled as unsigned bina
ry integers or as unstructured data.CLC Example
TheCOMPARE LOGICAL (CLC) instruction
can be used to perform the byte-by-byte
comparison of storage fields up to 256
bytes in length. For example, assume
that the following two fields of data
are in storage:
Field 1
1886 18911011061C81051E210610516BIC114BIC214BI Field 2 1900 190B I D1 1061C81D51E2106lD516BIC114BIC314BI Also assume:
Register 9 contains00 00 18 80. Register 7 contains 00 00 19 00. Execution of the instruction:
Machine FormatOp Code L 05 OB 9 0061 7 0001 Assembler Format CLC 6(12,9),0(7)
sets condition codeI, indicating that
the contents of field 1 are lower in
value than the contents of field 2.
Because the collating sequence of theEBCDIC code is determined simply by a
logical comparison of the bits in the
code, theCLC instruction can be used to
collateEBCOIC-coded fields. For exam
ple, inEBCDIC, the above two data
fields are:
Field 1:JOHHSOH,A.B. Field 2: JOHHSOH,A.C. Condition code 1 indicates that JOHHSOH,A.B. should precede JOHHSOH,A.C. for the fields to be in alphabetic
sequence.CLI Example
TheCOMPARE LOGICAL (CLI) instruction
compares a byte from the instruction
stream with a byte from storage. For
example, assume that:
Register10 contains 00 00 17 00. Storage location 1703 contains 7E.
Execution of the instruction:
Machine FormatOp Code 95 AF A
Assembler FormatCLI 3(10),X'AF'
sets condition code 1, indicating that
the first operand (the quantity in main
storage) is lower than the second (imme
diate) operand.
Appendix A. Humber Representation andInstruction-Use Examples A-13
t ,02(X
2
,B 2 )
bits (the sign bit is propagated to the
left), and compared with the contents of
register 4. Because the two numbers are
equal, condition code
from the signed-binary comparison
instructions ec,
quantities are handled as unsigned bina
ry integers or as unstructured data.
The
can be used to perform the byte-by-byte
comparison of storage fields up to 256
bytes in length. For example, assume
that the following two fields of data
are in storage:
Field 1
1886 1891
Register 9 contains
Machine Format
sets condition code
the contents of field 1 are lower in
value than the contents of field 2.
Because the collating sequence of the
logical comparison of the bits in the
code, the
collate
ple, in
fields are:
Field 1:
sequence.
The
compares a byte from the instruction
stream with a byte from storage. For
example, assume that:
Register
Execution of the instruction:
Machine Format
Assembler Format
sets condition code 1, indicating that
the first operand (the quantity in main
storage) is lower than the second (imme
diate) operand.
Appendix A. Humber Representation and