HLASM - CLCL = Compare Logical Characters Long

The opcode of the CLCL instruction is X'0F'.

Usage

  1. Compare nonnumeric data fields longer than 256 bytes.
  2. Compare nonnumeric data fields of unequal lengths.

Arguments

  1. Even-odd register pair containing first comparand address and length:
  2. Even-odd register pair containing second comparand address, length and padding value:

Function

  1. The processor compares the data from both fields. If their lengths are unequal, the shorter field is treated as if it were extended with as many padding characters as needed to make it as long as the other field.
  2. The processor sets the condition code as follows:

Special Cases

  1. If both lengths are 0, then the fields are considered equal.

Related Instructions

  1. CLC compares fields up to 256 bytes (inclusive) without padding.
  2. CLCLE compares fields longer than 16M bytes.

Hardware

  1. The CLCL instruction was not in the original instruction set, but has been around for a very long time.

Remarks

  1. The PSW's Amode setting determines how many bits are used for both comparand field addresses.
  2. CLCL is an interruptible instruction. That is, its execution can be interrupted and later resumed by the operating system. To the programmer this is a transparent process, but in dumps intermediate results may show up. This happens because the processor will adjust the contents of the four registers according to the progress made.
  3. After CLCL completes the contents of the four input registers are destroyed.

Examples

         YREGS                          * Define register names
         ...
         L     R0,TABLE                 * Point to field
         L     R1,TABLE_END             * Point end of field
         SR    R1,R0                    * Obtain length
         XR    R14,R14                  * No comapre data required
         XR    R15,R15                  * Length = 0, Pad = X'00'
         CLCL  R0,R14                   * Whole table = X'00' ??
         ...

To the Opcodes Overview.
To the English Homepage for Hlasm.com.
To the General Homepage for Bixoft and Hlasm.com.

This site is a member of WebRing.
You are invited to browse the list of mainframe-loving sites.
Running Tyrannosaurus Rex Dinos are not dead. They are alive and well and living in data centers all around you. They speak in tongues and work strange magics with computers. Beware the dino! And just in case you're waiting for the final demise of these dino's: remember that dinos ruled the world for 155-million years!
Dinos and other anachronisms
[ Join Now | Ring Hub | Random | << Prev | Next >> ]
 

Below you find the logo of our sponsor and logos of the web-standards that this page adheres to.