Site Tools

Sidebar

Smart Card Solution

User Manual

JavaCard API Samples

Java Card Specification

Knowledge Sharing

javacard:jcvm:3.10_instruction_set_summary

3.10 Instruction Set Summary

The Java Card virtual machine instruction set is quite similar to the Java virtual machine instruction set. Individual instructions consist of a one-byte opcode and zero or more operands. The pseudo-code for the Java Card virtual machine's instruction fetch-decode-execute loop is the same. Multi-byte operand data is also encoded in big-endian order.

There are a number of ways in which the Java Card virtual machine instruction set diverges from that of the Java virtual machine. Most of the differences are due to the Java Card virtual machine's more limited support for data types. Another source of divergence is that the Java Card virtual machine is intended to run on 8-bit and 16-bit architectures, whereas the Java virtual machine was designed for a 32-bit architecture. The rest of the differences are all oriented in one way or another toward optimizing the size or performance of either the Java Card virtual machine or Java Card programs. These changes include inlining constant pool data directly in instruction opcodes or operands, adding multiple versions of a particular instruction to deal with different datatypes, and creating composite instructions for operations on the current object.

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