⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 jcvm07instr.html

📁 JAVA CARD 开发包规格说明,版本为2.2.2
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<P CLASS="Paragraph"><A NAME="pgfId-7120"></A>Format</P><BR><TABLE CLASS="Titled" BORDER=1 BORDERCOLORLIGHT="#FFFFFF" BORDERCOLORDARK="#000000" CELLPADDING=5 CELLSPACING=0 BORDER="1" DIR="LTR"><CAPTION></CAPTION><TBODY><TR><TD SCOPE="ROW" ROWSPAN="1" COLSPAN="1"><P CLASS="TableText"><A NAME="pgfId-18676"></A><I CLASS="Variable">arraylength</I></P></TD></TR></TBODY></TABLE><BR><P CLASS="Paragraph"><A NAME="pgfId-7122"></A>Forms</P><P CLASS="Paragraph"><A NAME="pgfId-7123"></A>arraylength = 146 (0x92)</P><P CLASS="Paragraph"><A NAME="pgfId-7124"></A>Stack</P><P CLASS="Paragraph"><A NAME="pgfId-7125"></A>..., arrayref -&gt;<BR>..., length</P><P CLASS="Paragraph"><A NAME="pgfId-7126"></A>Description</P><P CLASS="Paragraph"><A NAME="pgfId-7127"></A>The arrayref must be of type reference and must refer to an array. It is popped from the operand stack. The length of the array it references is determined. That length is pushed onto the top of the operand stack as a short.</P><P CLASS="Paragraph"><A NAME="pgfId-7128"></A>Runtime Exception</P><P CLASS="Paragraph"><A NAME="pgfId-7129"></A>If arrayref is null, the arraylength instruction throws a NullPointerException.</P><P CLASS="Paragraph"><A NAME="pgfId-26645"></A>Notes</P><P CLASS="Paragraph"><A NAME="pgfId-26646"></A>In some circumstances, the arraylength instruction may throw a SecurityException if the current context (<A HREF="JCVM03structVM.html#33311" CLASS="XRef">Section 3.4, Contexts</A>) is not the owning context (<A HREF="JCVM03structVM.html#33311" CLASS="XRef">Section 3.4, Contexts</A>) of the array referenced by arrayref. The exact circumstances when the exception will be thrown are specified in Chapter 6 of the <EM CLASS="Emphasis">Runtime Environment Specification, Java Card Platform, Version 2.2.2</EM>.</P><H3 CLASS="Head2"><A NAME="pgfId-7130"></A>7.5.9	<A NAME="marker-54567"></A>astore</H3><P CLASS="Paragraph"><A NAME="pgfId-7131"></A>Store reference into local variable</P><P CLASS="Paragraph"><A NAME="pgfId-7132"></A>Format</P><BR><TABLE CLASS="Titled" BORDER=1 BORDERCOLORLIGHT="#FFFFFF" BORDERCOLORDARK="#000000" CELLPADDING=5 CELLSPACING=0 BORDER="1" DIR="LTR"><CAPTION></CAPTION><TBODY><TR><TD SCOPE="ROW" ROWSPAN="1" COLSPAN="1"><P CLASS="TableText"><A NAME="pgfId-21329"></A><I CLASS="Variable">astore</I></P></TD></TR><TR><TD SCOPE="ROW" ROWSPAN="1" COLSPAN="1"><P CLASS="TableText"><A NAME="pgfId-21331"></A><I CLASS="Variable">index</I></P></TD></TR></TBODY></TABLE><BR><P CLASS="Paragraph"><A NAME="pgfId-7135"></A>Forms</P><P CLASS="Paragraph"><A NAME="pgfId-7136"></A>astore = 40 (0x28)</P><P CLASS="Paragraph"><A NAME="pgfId-7137"></A>Stack</P><P CLASS="Paragraph"><A NAME="pgfId-7138"></A>..., objectref -&gt;<BR>...</P><P CLASS="Paragraph"><A NAME="pgfId-7139"></A>Description</P><P CLASS="Paragraph"><A NAME="pgfId-7140"></A>The index is an unsigned byte that must be a valid index into the local variables of the current frame (<A HREF="JCVM03structVM.html#13656" CLASS="XRef">Section 3.5, Frames</A>). The objectref on the top of the operand stack must be of type returnAddress or of type reference. The objectref is popped from the operand stack, and the value of the local variable at index is set to objectref.</P><P CLASS="Paragraph"><A NAME="pgfId-7141"></A>Notes</P><P CLASS="Paragraph"><A NAME="pgfId-7142"></A>The astore instruction is used with an objectref of type returnAddress when implementing Java's finally keyword. The aload instruction cannot be used to load a value of type returnAddress from a local variable onto the operand stack. This asymmetry with the astore instruction is intentional.</P><H3 CLASS="Head2"><A NAME="pgfId-7143"></A>7.5.10	<A NAME="marker-54568"></A>astore_&lt;n&gt;</H3><P CLASS="Paragraph"><A NAME="pgfId-7144"></A>Store reference into local variable</P><P CLASS="Paragraph"><A NAME="pgfId-7145"></A>Format</P><BR><TABLE CLASS="Titled" BORDER=1 BORDERCOLORLIGHT="#FFFFFF" BORDERCOLORDARK="#000000" CELLPADDING=5 CELLSPACING=0 BORDER="1" DIR="LTR"><CAPTION></CAPTION><TBODY><TR><TD SCOPE="ROW" ROWSPAN="1" COLSPAN="1"><P CLASS="TableText"><A NAME="pgfId-18678"></A><I CLASS="Variable">astore_&lt;n&gt;</I></P></TD></TR></TBODY></TABLE><BR><P CLASS="Paragraph"><A NAME="pgfId-7147"></A>Forms</P><P CLASS="Paragraph"><A NAME="pgfId-7148"></A>astore_0 = 43 (0x2b)<BR>astore_1 = 44 (0x2c)<BR>astore_2 = 45 (0x2d)<BR>astore_3 = 46 (0x2e)</P><P CLASS="Paragraph"><A NAME="pgfId-7149"></A>Stack</P><P CLASS="Paragraph"><A NAME="pgfId-7150"></A>..., objectref -&gt;<BR>...</P><P CLASS="Paragraph"><A NAME="pgfId-7151"></A>Description</P><P CLASS="Paragraph"><A NAME="pgfId-7152"></A>The &lt;n&gt; must be a valid index into the local variables of the current frame (<A HREF="JCVM03structVM.html#13656" CLASS="XRef">Section 3.5, Frames</A>). The objectref on the top of the operand stack must be of type returnAddress or of type reference. It is popped from the operand stack, and the value of the local variable at &lt;n&gt; is set to objectref.</P><P CLASS="Paragraph"><A NAME="pgfId-7153"></A>Notes</P><P CLASS="Paragraph"><A NAME="pgfId-7154"></A>An astore_&lt;n&gt; instruction is used with an objectref of type returnAddress when implementing Java's finally keyword. An aload_&lt;n&gt; instruction cannot be used to load a value of type returnAddress from a local variable onto the operand stack. This asymmetry with the corresponding astore_&lt;n&gt; instruction is intentional.</P><P CLASS="Paragraph"><A NAME="pgfId-7155"></A>Each of the astore_&lt;n&gt; instructions is the same as astore with an index of &lt;n&gt;, except that the operand &lt;n&gt; is implicit.</P><H3 CLASS="Head2"><A NAME="pgfId-7156"></A>7.5.11	<A NAME="marker-54569"></A>athrow</H3><P CLASS="Paragraph"><A NAME="pgfId-7157"></A>Throw exception or error</P><P CLASS="Paragraph"><A NAME="pgfId-7158"></A>Format</P><BR><TABLE CLASS="Titled" BORDER=1 BORDERCOLORLIGHT="#FFFFFF" BORDERCOLORDARK="#000000" CELLPADDING=5 CELLSPACING=0 BORDER="1" DIR="LTR"><CAPTION></CAPTION><TBODY><TR><TD SCOPE="ROW" ROWSPAN="1" COLSPAN="1"><P CLASS="TableText"><A NAME="pgfId-18680"></A><I CLASS="Variable">athrow</I></P></TD></TR></TBODY></TABLE><BR><P CLASS="Paragraph"><A NAME="pgfId-7160"></A>Forms</P><P CLASS="Paragraph"><A NAME="pgfId-7161"></A>athrow = 147 (0x93)</P><P CLASS="Paragraph"><A NAME="pgfId-7162"></A>Stack</P><P CLASS="Paragraph"><A NAME="pgfId-7163"></A>..., objectref -&gt;<BR>objectref</P><P CLASS="Paragraph"><A NAME="pgfId-7164"></A>Description</P><P CLASS="Paragraph"><A NAME="pgfId-7165"></A>The objectref must be of type reference and must refer to an object that is an instance of class Throwable or of a subclass of Throwable. It is popped from the operand stack. The objectref is then thrown by searching the current frame (<A HREF="JCVM03structVM.html#13656" CLASS="XRef">Section 3.5, Frames</A>) for the most recent catch clause that catches the class of objectref or one of its superclasses.</P><P CLASS="Paragraph"><A NAME="pgfId-7166"></A>If a catch clause is found, it contains the location of the code intended to handle this exception. The pc register is reset to that location, the operand stack of the current frame is cleared, objectref is pushed back onto the operand stack, and execution continues. If no appropriate clause is found in the current frame, that frame is popped, the frame of its invoker is reinstated, and the objectref is rethrown.</P><P CLASS="Paragraph"><A NAME="pgfId-7167"></A>If no catch clause is found that handles this exception, the virtual machine exits.</P><P CLASS="Paragraph"><A NAME="pgfId-7168"></A>Runtime Exception</P><P CLASS="Paragraph"><A NAME="pgfId-26543"></A>If objectref is null, athrow throws a NullPointerException instead of objectref.</P><P CLASS="Paragraph"><A NAME="pgfId-26722"></A>Notes</P><P CLASS="Paragraph"><A NAME="pgfId-1001784"></A>In some circumstances, the athrow instruction may throw a SecurityException if the current context (<A HREF="JCVM03structVM.html#33311" CLASS="XRef">Section 3.4, Contexts</A>) is not the owning context (<A HREF="JCVM03structVM.html#33311" CLASS="XRef">Section 3.4, Contexts</A>) of the object referenced by objectref. The exact circumstances when the exception will be thrown are specified in Chapter 6 of the <EM CLASS="Emphasis">Runtime Environment Specification, Java Card Platform, Version 2.2.2</EM>.</P><H3 CLASS="Head2"><A NAME="pgfId-1001795"></A>7.5.12	<A NAME="marker-1001794"></A>baload</H3><P CLASS="Paragraph"><A NAME="pgfId-1001796"></A>Load byte or boolean from array</P><P CLASS="Paragraph"><A NAME="pgfId-7172"></A>Format</P><BR><TABLE CLASS="Titled" BORDER=1 BORDERCOLORLIGHT="#FFFFFF" BORDERCOLORDARK="#000000" CELLPADDING=5 CELLSPACING=0 BORDER="1" DIR="LTR"><CAPTION></CAPTION><TBODY><TR><TD SCOPE="ROW" ROWSPAN="1" COLSPAN="1"><P CLASS="TableText"><A NAME="pgfId-18682"></A><I CLASS="Variable">baload</I></P></TD></TR></TBODY></TABLE><BR><P CLASS="Paragraph"><A NAME="pgfId-7174"></A>Forms</P><P CLASS="Paragraph"><A NAME="pgfId-7175"></A>baload = 37 (0x25)</P><P CLASS="Paragraph"><A NAME="pgfId-7176"></A>Stack</P><P CLASS="Paragraph"><A NAME="pgfId-7177"></A>..., arrayref, index -&gt;<BR>..., value</P><P CLASS="Paragraph"><A NAME="pgfId-7178"></A>Description</P><P CLASS="Paragraph"><A NAME="pgfId-7179"></A>The arrayref must be of type reference and must refer to an array whose components are of type byte or of type boolean. The index must be of type short. Both arrayref and index are popped from the operand stack. The byte value in the component of the array at index is retrieved, sign-extended to a short value, and pushed onto the top of the operand stack.</P><P CLASS="Paragraph"><A NAME="pgfId-7180"></A>Runtime Exceptions</P><P CLASS="Paragraph"><A NAME="pgfId-26431"></A>If arrayref is null, baload throws a NullPointerException.</P><P CLASS="Paragraph"><A NAME="pgfId-26657"></A>Otherwise, if index is not within the bounds of the array referenced by arrayref, the baload instruction throws an ArrayIndexOutOfBoundsException.</P><P CLASS="Paragraph"><A NAME="pgfId-26663"></A>Notes</P><P CLASS="Paragraph"><A NAME="pgfId-26664"></A>In some circumstances, the baload instruction may throw a SecurityException if the current context (<A HREF="JCVM03structVM.html#33311" CLASS="XRef">Section 3.4, Contexts</A>) is not the owning context (<A HREF="JCVM03structVM.html#33311" CLASS="XRef">Section 3.4, Contexts</A>) of the array referenced by arrayref. The exact circumstances when the exception will be thrown are specified in Chapter 6 of the <EM CLASS="Emphasis">Runtime Environment Specification, Java Card Platform, Version 2.2.2</EM>.</P><H3 CLASS="Head2"><A NAME="pgfId-26658"></A>7.5.13	<A NAME="marker-54571"></A>bastore</H3><P CLASS="Paragraph"><A NAME="pgfId-26659"></A>Store into byte or boolean array</P><P CLASS="Paragraph"><A NAME="pgfId-7185"></A>Format</P><BR><TABLE CLASS="Titled" BORDER=1 BORDERCOLORLIGHT="#FFFFFF" BORDERCOLORDARK="#000000" CELLPADDING=5 CELLSPACING=0 BORDER="1" DIR="LTR"><CAPTION></CAPTION><TBODY><TR><TD SCOPE="ROW" ROWSPAN="1" COLSPAN="1"><P CLASS="TableText"><A NAME="pgfId-18684"></A><I CLASS="Variable">bastore</I></P></TD></TR></TBODY></TABLE><BR><P CLASS="Paragraph"><A NAME="pgfId-7187"></A>Forms</P><P CLASS="Paragraph"><A NAME="pgfId-7188"></A>bastore = 56 (0x38)</P><P CLASS="Paragraph"><A NAME="pgfId-7189"></A>Stack</P><P CLASS="Paragraph"><A NAME="pgfId-7190"></A>..., arrayref, index, value -&gt;<BR>...</P><P CLASS="Paragraph"><A NAME="pgfId-7191"></A>Description</P><P CLASS="Paragraph"><A NAME="pgfId-1001829"></A>The arrayref must be of type reference and must refer to an array whose components are of type byte or of type boolean. The index and value must both be of type short. The arrayref, index and value are popped from the operand stack. The short value is truncated to a byte and stored as the component of the array indexed by index.</P><P CLASS="Paragraph"><A NAME="pgfId-1001830"></A>Runtime Exceptions</P><P CLASS="Paragraph"><A NAME="pgfId-1001831"></A>If arrayref is null, bastore throws a NullPointerException.</P><P CLASS="Paragraph"><A NAME="pgfId-7195"></A>Otherwise, if index is not within the bounds of the array referenced by arrayref, the bastore instruction throws an ArrayIndexOutOfBoundsException.</P><P CLASS="Paragraph"><A NAME="pgfId-26672"></A>Notes</P><P CLASS="Paragraph"><A NAME="pgfId-26673"></A>In some circumstances, the bastore instruction may throw a SecurityException if the current context (<A HREF="JCVM03structVM.html#33311" CLASS="XRef">Section 3.4, Contexts</A>) is not the owning context (<A HREF="JCVM03structVM.html#33311" CLASS="XRef">Section 3.4, Contexts</A>) of the array referenced by arrayref. The exact circumstances when the exception will be thrown are specified in Chapter 6 of the <EM CLASS="Emphasis">Runtime Environment Specification, Java Card Platform, Version 2.2.2</EM>.</P><H3 CLASS="Head2"><A NAME="pgfId-7196"></A>7.5.14	<A NAME="marker-54572"></A>bipush</H3><P CLASS="Paragraph"><A NAME="pgfId-7197"></A>Push byte</P><P CLASS="Paragraph"><A NAME="pgfId-7198"></A>Format

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -