Smart Card Solution
User Manual
- R502 Manual
JavaCard API Samples
- Algorithm
Java Card Specification
Knowledge Sharing
Smart Card Solution
User Manual
JavaCard API Samples
Java Card Specification
Knowledge Sharing
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.