360 Assembly/360 Instructions/A

< 360 Assembly < 360 Instructions

A - Add - Opcode 5A

Format

A 2,N2
A 11,106(0,10)

The specific syntax is

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

RX Instruction (4 bytes)
Byte 1 Byte 2 Bytes 3 and 4
target register Source Address
(8 bits)
Opcode
5A
(4 bits)

0..F
(4 bits)
index
register

0..F
(4 bits)
base
register

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

Availability

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

Operation

The A 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 Condition Code field in the Program Status Word is changed according to the resulting value.

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

Condition Codes

If signed integer overflow occurs, i.e. sum is not between -2**31 and 2**31-1, CC is set to 3. Otherwise, CC is set to 0, 1 or 2, if sum is equal to zero, below zero or above zero accordingly.

Exceptions and Faults

Previous Instruction
ZAP
360 Assembly Instructions
{{{name}}}
Next Instruction
AD
Previous Opcode
59
Next Opcode
5B
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.