<!-- ##### SECTION Title ##### -->
Code Disassembly

<!-- ##### SECTION Short_Description ##### -->
Functions for code disassembly.

<!-- ##### SECTION Long_Description ##### -->
<para>
Credits
Information for the instructions was obtained from
<ulink url="http://mrl.nyu.edu/~meyer/jvmref/ref-Java.html"/>
</para>

<!-- ##### SECTION See_Also ##### -->
<para>

</para>

<!-- ##### MACRO OP_LENGTH_UNPREDICTABLE ##### -->
<para>
The length of the operands is unpredictable.
</para>



<!-- ##### ENUM OperandType ##### -->
<para>
Operand types.
</para>

@OP_TYPE_NONE: No operand.
@OP_TYPE_BYTE: The operand is a signed byte.
@OP_TYPE_UNSIGNED_BYTE: The operand is an unsigned byte.
@OP_TYPE_BYTE_ARRAY_TYPE: The operand is an unsigned byte representing a 
	primitive array type. Possible values are listed in the ArrayType enum.
	You can also use the jclass_code_array_name() function to get a string with 
	the name.
@OP_TYPE_BYTE_CONSTANT_INDEX: The operand is an unsigned byte index in the constant
     pool for a constant.
@OP_TYPE_UNSIGNED_BYTE_USELESS: The operand is an unsigned byte which is useless.
     See the documentation for the invokeinterface instruction to see what I mean.
@OP_TYPE_SHORT: The operand is a signed short integer.
@OP_TYPE_UNSIGNED_SHORT: The operand is an unsigned short integer.
@OP_TYPE_SHORT_OFFSET: The operand is a short offset from the pc of the instruction.
@OP_TYPE_SHORT_CLASS_INDEX: The operand is a short integer which is the index 
     of a class in the constant pool.
@OP_TYPE_SHORT_METHOD_INDEX: The operand is a short integer which is the index 
     of a method in the constant pool.
@OP_TYPE_SHORT_FIELD_INDEX: The operand is a short integer which is the index 
     of a field in the constant pool.
@OP_TYPE_SHORT_CONSTANT_INDEX: The operand is a short integer which is the 
     index of a constant in the constant pool.
@OP_TYPE_INT: The operand is a 32-bit signed integer.
@OP_TYPE_INT_OFFSET: The operand is a signed integer offset from the pc of th instruction.
@OP_TYPE_INSTRUCTION: The operand is an instruction (See wide instruction).
@OP_TYPE_TABLESWITCH: The operand is a tableswitch. 
    It is always aligned at a 4-byte boundary.
	The "page" or whatever you want to call it starts at the first byte of the code.
@OP_TYPE_LOOKUPSWITCH: The operand is a lookupswitch. 
    It is always aligned at a 4-byte boundary.
@OP_TYPE_ERROR: Some kind of error occured.

<!-- ##### ENUM ArrayType ##### -->
<para>
Primitive array type values. This enumeration is used in the newarray instruction
to indicate the type of the primitive array. The operand is OP_TYPE_BYTE_ARRAY_TYPE.
</para>

@ARRAY_TYPE_BOOLEAN: boolean array.
@ARRAY_TYPE_CHAR: char array.
@ARRAY_TYPE_FLOAT: float array.
@ARRAY_TYPE_DOUBLE: double array.
@ARRAY_TYPE_BYTE: byte array.
@ARRAY_TYPE_SHORT: short array.
@ARRAY_TYPE_INT: int array.
@ARRAY_TYPE_LONG: long array.

<!-- ##### STRUCT TableSwitchOperand ##### -->
<para>
Operand for the tableswitch instruction.
</para>

@num_pairs: 
@default_target: 
@low_value: 
@target: 

<!-- ##### STRUCT LookupSwitchOperand ##### -->
<para>
Operand for the lookupswitch instruction.
</para>

@num_pairs: 
@default_target: 
@value: 
@target: 

<!-- ##### MACRO MAX_LEGAL_OPCODE ##### -->
<para>
The maximum legal opcode for an instruction.
</para>



<!-- ##### FUNCTION jclass_code_instruction_name ##### -->
<para>

</para>

@opcode: 
@Returns: 


<!-- ##### FUNCTION jclass_code_instruction_ops ##### -->
<para>

</para>

@opcode: 
@Returns: 


<!-- ##### FUNCTION jclass_code_instruction_ops_length ##### -->
<para>

</para>

@opcode: 
@Returns: 


<!-- ##### FUNCTION jclass_code_instruction_op_type ##### -->
<para>

</para>

@opcode: 
@operand_number: 
@is_wide: 
@Returns: 


<!-- ##### FUNCTION jclass_code_read_byte ##### -->
<para>
</para>

@code: 
@pc: 
@Returns: 


<!-- ##### FUNCTION jclass_code_read_ubyte ##### -->
<para>
</para>

@code: 
@pc: 
@Returns: 


<!-- ##### FUNCTION jclass_code_read_short ##### -->
<para>

</para>

@code: 
@pc: 
@Returns: 


<!-- ##### FUNCTION jclass_code_read_ushort ##### -->
<para>

</para>

@code: 
@pc: 
@Returns: 


<!-- ##### FUNCTION jclass_code_read_int ##### -->
<para>

</para>

@code: 
@pc: 
@Returns: 


<!-- ##### FUNCTION jclass_code_read_tableswitch ##### -->
<para>

</para>

@code: 
@pc: 
@Returns: 


<!-- ##### FUNCTION jclass_code_read_lookupswitch ##### -->
<para>

</para>

@code: 
@pc: 
@Returns: 


<!-- ##### FUNCTION jclass_code_lookupswitch_operand_free ##### -->
<para>

</para>

@operand: 


<!-- ##### FUNCTION jclass_code_tableswitch_operand_free ##### -->
<para>

</para>

@operand: 


<!-- ##### MACRO JCLASS_CODE_ALIGN_PC ##### -->
<para>
Aligns the PC at a 4-byte boundary.
Useful for tableswitch and lookupswitch.
</para>
<example>
<title>Read a tableswitch operand</title>
<programlisting>
<![CDATA[
pc = JCLASS_CODE_ALIGN_PC(pc);
					
/* get default target offset */
default_target = jclass_code_read_int(code->code, &pc);
/* low */
low = jclass_code_read_int(code->code, &pc);
/* high */
high = jclass_code_read_int(code->code, &pc);

/* store the targets in an array */
target = (uint32*) malloc(sizeof(uint32) * ((high - low) + 1));
for(count = 0; count < (high - low) + 1; count++)
	target[count] = instruction_pc + jclass_code_read_int(code->code, &pc);

]]>
</programlisting>
</example>

@pc: The current pc.


<!-- ##### FUNCTION jclass_code_array_name ##### -->
<para>

</para>

@array_number: 
@Returns: 


