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
Subtract short
Format
ssub
Forms
ssub = 67 (0x43)
Stack
…, value1, value2 → …, result
Description
Both value1 and value2 must be of type short. The values are popped from the operand stack. The short result is value1 - value2. The result is pushed onto the operand stack.
For short subtraction, a - b produces the same result as a + (-b). For short values, subtraction from zeros is the same as negation.
Despite the fact that overflow or underflow may occur, in which case the result may have a different sign than the true mathematical result, execution of a ssub instruction never throws a runtime exception.