ca.processor
Class Processor

java.lang.Object
  extended by ca.processor.Processor

public class Processor
extends java.lang.Object

This class encapsulates all of the information about a single processor.


Constructor Summary
Processor(Element pi)
          This function creates a new Processor object by parsing the corresponding XML.
 
Method Summary
 Opcode findOpcode(java.util.List<java.lang.Integer> data)
          This method finds the opcode corresponding to the given data.
 java.util.List<Opcode> findPossibleOpcodes(int[] binary, int start, int length)
           
 java.lang.String getCpuName()
          This method returns the CPU processor name.
 int getDataSpacing()
          This method returns the maximum length of the printed opcode data.
 java.util.List<MnemonicFamily> getMnemonicFamilies()
          This method returns the list of MnemonicFamiles.
 MnemonicFamily getMnemonicFamily(java.lang.String mnemonicSetName)
          This method returns the MnemonicFamily info for the given name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Processor

public Processor(Element pi)
This function creates a new Processor object by parsing the corresponding XML.

Parameters:
pi - the XML element
Method Detail

findPossibleOpcodes

public java.util.List<Opcode> findPossibleOpcodes(int[] binary,
                                                  int start,
                                                  int length)

findOpcode

public Opcode findOpcode(java.util.List<java.lang.Integer> data)
This method finds the opcode corresponding to the given data.

Parameters:
data - the data to disassemble
Returns:
the opcode or null if not found

getMnemonicFamilies

public java.util.List<MnemonicFamily> getMnemonicFamilies()
This method returns the list of MnemonicFamiles.

Returns:
list of all mnemonic families for this processor

getCpuName

public java.lang.String getCpuName()
This method returns the CPU processor name.

Returns:
the CPU processor name

getMnemonicFamily

public MnemonicFamily getMnemonicFamily(java.lang.String mnemonicSetName)
This method returns the MnemonicFamily info for the given name. If the name is null then the default family is returned.

Parameters:
mnemonicSetName - name of the mnemonic family or null for the default
Returns:
the target mnemonic family

getDataSpacing

public int getDataSpacing()
This method returns the maximum length of the printed opcode data.

Returns:
max size of the printed opcode data string