Site Tools


Sidebar

Smart Card Solution

User Manual

JavaCard API Samples

Java Card Specification

Knowledge Sharing

javacard:jcvm:7.5.28_iadd

7.5.28 iadd

Add int

Format

iadd

Forms

iadd = 66 (0x42)

Stack

…, value1.word1, value1.word2, value2.word1, value2.word2 → …, result.word1, result.word2

Description

Both value1 and value2 must be of type int. The values are popped from the operand stack. The int result is value1 + value2. The result is pushed onto the operand stack.

If an iadd instruction overflows, then the result is the low-order bits of the true mathematical result in a sufficiently wide two's-complement format. If overflow occurs, then the sign of the result may not be the same as the sign of the mathematical sum of the two values.

Notes

If a virtual machine does not support the int data type, the iadd instruction will not be available.

javacard/jcvm/7.5.28_iadd.txt · Last modified: 2017/05/13 04:09 (external edit)