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

stbu (Store Byte with Update) Instruction


Stores a byte of data from a general-purpose register into a specified location in memory and possibly places the address in another general-purpose register.


stbu RS,D(RA)


The stbu instruction stores bits 24-31 of the source general-purpose register (GPR) RS into the byte in storage addressed by the effective address (EA).

If GPR RA is not 0, the EA is the sum of the contents of GPR RA and D, a 16-bit signed two's complement integer sign-extended to 32 bits. If GPR RA is 0, then the EA is D.

If RA does not equal 0 and the storage access does not cause an Alignment Interrupt, then the EA is stored in GPR RA.

The stbu instruction has one syntax form and does not affect the Fixed-Point Exception Register or Condition Register Field 0.


RS Specifies source general-purpose register of stored data.
D Specifies a 16-bit, signed two's complement integer sign-extended to 32 bits for EA calculation.
RA Specifies source general-purpose register for EA calculation and possible address update.


The following code stores bits 24-31 of GPR 6 into a location in memory and places the address in GPR 16:

.csect data[rw]
buffer: .long 0
# Assume GPR 6 contains 0x0000 0060.
# Assume GPR 16 contains the address of csect data[rw].
.csect text[pr]
stbu 6,buffer(16)
# GPR 16 now contains the address of buffer.
# 0x60 is stored at the address of buffer.

Related Information

Fixed-Point Processor.

Fixed-Point Load and Store with Update Instructions.

[ Previous | Next | Contents | Home | Search ]