Java Virtual Machine (Java Series)

prev next contents
lrem

modulus of two longs

Jasmin Syntax

lrem Stack

Before

After
value1-word1 result-word1
value1-word2 result-word2
value2-word1 ...
value2-word2
...
Description

Pops two long integers off the operand stack, divides value2 by value1, computes the remainder and pushes the long integer remainder back onto the stack. The remainder is (value2 - ((value1 / value2) * value2)). This is used by the % operator in Java.

Exceptions

ArithmeticException - the divisor (value1) is zero

Bytecode

Type

Description
u1 lrem opcode = 0x71 (113)
See Also

irem, frem, drem


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

Категории