360 Assembly/360 Instructions/LH

< 360 Assembly < 360 Instructions

LH - Load Halfword - Opcode 48 - RX format Instruction (32 Bit)

Format

LH 2,N2
LH 11,106(8,10)

The specific syntax is

LH 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.

Opcode

RX Instruction (4 bytes)
Byte 1 Byte 2 Bytes 3 and 4
target register Source Address
(In Hex) (8 bits)
Opcode
48
(4 bits)

0..F
(4 bits)
index
register

0..F
(4 bits)
base
register

0..F
(12 bits)
displacement
0..FFF

The target 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 (the displacement) is within 4096 bytes of the value of some base register.

Availability

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

Operation

The LH instruction reads a 16-bit integer value from the memory address specified by the argument and puts it in the low 16 bits of the target register specified by the first argument. The remainder of the register is unchanged.

The source argument address must be aligned to a half-word boundary (i.e. 2 bytes) or an exception will occur. The Condition Code field in the Program Status Word is not changed.

Exceptions and Faults

32-Bit Instructions

64-Bit Instructions

Previous Instruction
LGR
360 Assembly Instructions   Next Instruction
LHI
Previous Opcode
47
Next Opcode
49
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.