Site Tools


Sidebar

Smart Card Solution

User Manual

JavaCard API Samples

Java Card Specification

Knowledge Sharing

javacard:jcvm:7.5.81_s2b

7.5.81 s2b

Convert short to byte

Format

s2b

Forms

s2b = 91 (0x5b)

Stack

…, value → …, result

Description

The value on top of the operand stack must be of type short. It is popped from the top of the operand stack, truncated to a byte result, then sign-extended to a short result. The result is pushed onto the operand stack.

Notes

The s2b instruction performs a narrowing primitive conversion. It may lose information about the overall magnitude of value. The result may also not have the same sign as value.

javacard/jcvm/7.5.81_s2b.txt · Last modified: 2017/05/13 04:10 (external edit)