360 Assembly/360 Instructions/AL

AL - Add Logical - Opcode 5E

Format

 * AL 2,N2
 * AL 11,106(0,10)

The specific syntax is
 * AL target register,offset(index register,base register)

Where the offset, index register and base register values will be determined automatically by the assembler if the USING pseudo-instruction has been used, and the target address label used is within 4096 bytes of the value of some base register.


 * The first argument is a target register which contains the first summand before the operation and the result after the operation.
 * The second argument is the source value (the second summand) location.
 * The mask, base_register and index_register values are 0 to 15. The offset value is 0 to 4095.

Availability
The AL instruction is available on all models of the 360, 370 and z/System.

Operation
The AL instruction reads 32-bit integer value from the memory address specified by the argument and adds it to the value of register specified by the first argument. The least significant 32 bits of the 33-bit result sum is placed to the target register. The Condition Code field in the Program Status Word is changed according to the resulting value (sum), treated as unsigned integer (see below).

The source argument address shall be aligned to word boundary (i.e. 4 bytes).

Condition Codes
The least significant bit of CC field of the PSW is set if sum is not zero and cleared otherwise. The most significant bit of CC field of the PSW keeps carry bit (i.e. the most significant bit of the 33-bit sum).

Exceptions and Faults

 * The source address must be within the range of valid memory or an operation exception occurs.
 * The storage key for the source address must be the same as the current process or a memory protect violate exception occurs.

Related instructions

 * To add value logically from register, see ALR.
 * To add value arithmetically from memory, see A.
 * To subtract integer value, see S, SR, SH, SL or SLR.
 * To check condition code, see BC or BCR.