prev next contents
fstore

store float in local variable

Jasmin Syntax


    fstore <varnum>
or
    wide
    fstore <varnum>

In the first form, <varnum> is an unsigned integer in the range 0 to 0xFF. In the second (wide) form, <varnum> is an unsigned integer in the range 0 to 0xFFFF.

Stack

Before

After
value
...
...

Description

Pops a single-precision float off the stack and stores it in local variable <varnum>. The fstore instruction takes a single parameter, <varnum>, an unsigned integer which indicates which local variable is used. <varnum> must be a valid local variable number in the current frame.

Example


fconst_2        ; push 2.0 onto the stack
fstore 3        ; pop 2.0 off of the stack and store it in local variable 3
Bytecode

For local variable numbers in the range 0-255, use:

Type

Description
u1
fstore opcode = 0x38 (56)
u1
<varnum>
There is also a wide format for this instruction, which supports access to all local variables from 0 to 65535:

Type

Description
u1
wide opcode = 0xC4 (196)
u1
fstore opcode = 0x38 (56)
u2
<varnum>
See Also

lstore, istore, dstore, astore, wide


prev next contents
Java Virtual Machine, by Jon Meyer and Troy Downing, O'Reilly Associates