[ Previous | Next | Contents | Home | Search ]
AIX Version 4.3 Assembler Language Reference

addic. or ai. (Add Immediate Carrying and Record) Instruction


Performs an addition with carry of the contents of a general-purpose register and an immediate value.


addic. RT,RA,SI
ai. RT,RA,SI

See "Extended Mnemonics of Fixed-Point Arithmetic Instructions" for more information.


The addic. and ai. instructions place the sum of the contents of general-purpose register (GPR) RA and a 16-bit signed integer, SI, into the target GPR RT.

The 16-bit integer SI provided as immediate data is sign-extended to 32 bits prior to carrying out the addition operation.

The addic. and ai. instructions have one syntax form and can set the Carry Bit of the Fixed-Point Exception Register. These instructions also affect Condition Register Field 0.


RT Specifies target general-purpose register where result of operation is stored.
RA Specifies source general-purpose register for operation.
SI Specifies 16-bit signed integer for operation.


The following code adds a 16-bit signed integer to the contents of GPR 4, stores the result in GPR 6, and sets the Fixed-Point Exception Register Carry bit and Condition Register Field 0 to reflect the result of the operation:

# Assume GPR 4 contains 0xEFFF FFFF.
addic. 6,4,0x1000
# GPR 6 now contains 0xF000 0FFF.

Related Information

Fixed-Point Processor.

Fixed-Point Arithmetic Instructions.

[ Previous | Next | Contents | Home | Search ]