360 Assembly/360 Instructions/LR

< 360 Assembly < 360 Instructions

LR - Load Register - RR Instruction - Opcode 18

Format

LR 2,6 Copy the contents of register 6 into register 2, replacing the existing contents of register 2

The specific syntax is

LR target register, source register.

Opcode

RR Instruction (2 bytes)
Byte 1
bits (0-7)
Byte 2
target register
(8-11)
source register
(12-15)
(in hex) Opcode
18
(4 bits)
0..F / (dec 0..15)
(4 bits)
0..F / (dec 0..15)

Example usage

The LR instruction is used to copy the contents of the second register argument (the source register) into the first register argument (the target register), replacing the contents of the target register with the contents of the source register. The following is an example of how the instruction would assemble in various forms from an assembly language listing:

1826        LR   2,6
1892        LR   9,2
18FA        LR   15,10

Typical Usage

When it is necessary to copy the contents of a register in order to preserve the value in the original register, or where the purpose is to propagate the value contained in one register to another register.

Availability

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

Operation

The LR instruction copies the 32-bit value from the register specified by the second argument to the register specified by the first argument.

Register 0 is valid for either register and is not ignored as in some other instructions.

Condition Codes

Condition codes are not changed.

Exceptions and Faults

None.

32-Bit Instructions

64-Bit Instructions

Previous Instruction
LPXR
360 Assembly Instructions
{{{name}}}
Next Instruction
LRA
Previous Opcode
17
Next Opcode
19
360 Assembly Language
360 Family Introduction · Basic FAQ · 360 Family · 360 Architecture
360 Instruction Set 360 Instructions · Branch Instructions · Data Transfer Instructions · Control Flow Instructions · Arithmetic Instructions · Logic Instructions · Shift and Rotate Instructions · Other Instructions
Syntaxes and Assemblers 360 Assemblers· Pseudo Instructions
Instruction Extensions Floating Point · High-Level Languages
This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.