Site Tools


Sidebar

Smart Card Solution

User Manual

JavaCard API Samples

Java Card Specification

Knowledge Sharing

javacard:jcvm:7.5.32_icmp

7.5.32 icmp

Compare int

Format

icmp

Forms

icmp = 95 (0x5f)

Stack

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

Description

Both value1 and value2 must be of type int. They are both popped from the operand stack, and a signed integer comparison is performed. If value1 is greater than value2, the short value 1 is pushed onto the operand stack. If value1 is equal to value2, the short value 0 is pushed onto the operand stack. If value1 is less than value2, the short value -1 is pushed onto the operand stack.

Notes

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

javacard/jcvm/7.5.32_icmp.txt · Last modified: 2017/05/13 04:11 (external edit)