# const-string

## Purpose

Move a reference to the string specified by the given index into the specified register.

## Details

Op & Format | Mnemonic / Syntax | Arguments
--- | --- | ---
1a 21c | const-string vAA, string@BBBB | `A:` destination register (8 bits) `B:` string index
1b 31c | const-string/jumbo vAA, string@BBBBBBBB | `A:` destination register (8 bits) `B:` string index

## Constraints

- A must be a valid register index in the current stack frame.
- B must be a valid index into the string constant pool.

## Behavior

- A new java.lang.String object S is allocated on the heap and filled with the contents of string pool entry B.
- A reference to an internalized version of the new object is moved into register vA, that is, the instruction behaves as if vA' = S.intern() was called.
- If v(A-1) is the lower half of a register pair, v(A-1)' becomes undefined.
- If v(A+1) is the upper half of a register pair, v(A+1)' becomes undefined.

## Exceptions

None.