com.cmpware.fastmodel
Class NullFunction

java.lang.Object
  extended by com.cmpware.fastmodel.Function
      extended by com.cmpware.fastmodel.NullFunction

public class NullFunction
extends Function

This class defines the null function. It has a size zero and is used primarily at start-up to avoid null pointers.

Copyright (c) 2008 Cmpware, Inc. All Rights Reserved.

Author:
SAG

Field Summary
static java.lang.String copyright
          Copyright string
 
Constructor Summary
NullFunction()
           
 
Method Summary
 void exec(long addr)
          This abstract method implements the instruction execution.
 void extractFields(java.math.BigInteger instr)
          This abstract method is used to copy the field values into local variables where thay are used by the instruction exec() routine.
 Field[] getFormat()
          This method returns an array of fields describing the instruction format.
 int getSize()
          This abstract method returns the size of the instruction in bits.
 java.lang.String toString()
          This method is used to display a string of the Function.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

copyright

public static final java.lang.String copyright
Copyright string

See Also:
Constant Field Values
Constructor Detail

NullFunction

public NullFunction()
Method Detail

getFormat

public Field[] getFormat()
Description copied from class: Function
This method returns an array of fields describing the instruction format.

Specified by:
getFormat in class Function
Returns:
this method returns an array of fields describing the instruction format.

getSize

public int getSize()
Description copied from class: Function
This abstract method returns the size of the instruction in bits.

Specified by:
getSize in class Function
Returns:
this abstract method returns the size of the instruction in bits.

extractFields

public void extractFields(java.math.BigInteger instr)
Description copied from class: Function
This abstract method is used to copy the field values into local variables where thay are used by the instruction exec() routine.

Specified by:
extractFields in class Function
Parameters:
instr - the instruction word.

toString

public java.lang.String toString()
Description copied from class: Function
This method is used to display a string of the Function. This should be a list of the fields as displayed in a typical disassembly. This method is used by the disassembler (along with the instruction name) to produce a disassemble string of the instruction.

Specified by:
toString in class Function

exec

public void exec(long addr)
          throws MemoryAccessException,
                 IllegalRegisterException,
                 IllegalOpcodeException
Description copied from class: Function
This abstract method implements the instruction execution.

Specified by:
exec in class Function
Parameters:
addr - the address of this instruction.
Throws:
MemoryAccessException - if an illegal memory access is attempted.
IllegalRegisterException - if an illegal register access is attempted.
IllegalOpcodeException - if an illegal opcode access is attempted.