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
Branch if short comparison with zero succeeds (wide index)
Format
if_w
branchbyte1
branchbyte2
Forms
ifeq_w = 152 (0x98) ifne_w = 153 (0x99) iflt_w = 154 (0x9a) ifge_w = 155 (0x9b) ifgt_w = 156 (0x9c) ifle_w = 157 (0x9d)
Stack
…, value → …
Description
The value must be of type short. It is popped from the operand stack and compared against zero. All comparisons are signed. The results of the comparisons are as follows:
If the comparison succeeds, the unsigned bytes branchbyte1 and branchbyte2 are used to construct a signed 16-bit branchoffset, where branchoffset is (branchbyte1 _w instruction. The target address must be that of an opcode of an instruction within the method that contains this if_w instruction.
Otherwise, execution proceeds at the address of the instruction following this if_w instruction.