Stores a halfword of data from a general-purpose register into a specified location in memory.
sth | RS,D(RA) |
The sth instruction stores bits 16-31 of general-purpose register (GPR) RS into the halfword of 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.
The sth instruction has one syntax form and does not affect the Fixed-Point Exception Register or Condition Register Field 0.
The following code stores bits 16-31 of GPR 6 into a location in memory:
.csect data[rw] buffer: .long 0 # Assume GPR 4 contains the address of csect data[rw]. # Assume GPR 6 contains 0x9000 3000. .csect text[pr] sth 6,buffer(4) # buffer now contains 0x3000.
Floating-Point Load and Store Instructions.