Site Tools


Sidebar

Smart Card Solution

User Manual

JavaCard API Samples

Java Card Specification

Knowledge Sharing

javacard:jcvm:7.5.105_ssub

7.5.105 ssub

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.

javacard/jcvm/7.5.105_ssub.txt · Last modified: 2017/05/13 04:12 (external edit)