CInstructionAdd< T > Class Template Reference

#include <instructions.h>

Inheritance diagram for CInstructionAdd< T >:

CInstruction< T >

List of all members.

Public Member Functions

CInstructionAddfactory ()
 creates a new instance of this instruction
void compile (std::list< std::string > &params)
 parses instruction parameters and prepares the instruction for executing
void execute (CCPU< T > *cpu)
 executes the instruction

Protected Attributes

unsigned m_regidx1
unsigned m_regidx2
unsigned m_regidx3


Detailed Description

template<class T>
class CInstructionAdd< T >

Implementation of assembler command "add" Syntax: add R1, R2, R3 (R1 = R2 + R3)

Member Function Documentation

template<class T>
CInstructionAdd* CInstructionAdd< T >::factory (  )  [inline, virtual]

creates a new instance of this instruction

Methodname:
factory
Parameters:
- 
Returns:
new instruction instance
Global variables used:
none
Exceptions:
none 
Precondition:
none
Postcondition:
none

Implements CInstruction< T >.

template<class T>
void CInstructionAdd< T >::compile ( std::list< std::string > &  params  )  [inline, virtual]

parses instruction parameters and prepares the instruction for executing

Methodname:
compile
Parameters:
params list of parameters of this instruction
Returns:
-
Global variables used:
none
Exceptions:
CInstructionError 
Precondition:
none
Postcondition:
none

Implements CInstruction< T >.

template<class T>
void CInstructionAdd< T >::execute ( CCPU< T > *  cpu  )  [inline, virtual]

executes the instruction

Methodname:
execute
Parameters:
cpu pointer to cpu
Returns:
-
Global variables used:
none
Exceptions:
CInstructionError 
Precondition:
cpu valid (memory, program, registers valid)
Postcondition:
none

Implements CInstruction< T >.


Member Data Documentation

template<class T>
unsigned CInstructionAdd< T >::m_regidx1 [protected]

register number

template<class T>
unsigned CInstructionAdd< T >::m_regidx2 [protected]

register number

template<class T>
unsigned CInstructionAdd< T >::m_regidx3 [protected]

register number


The documentation for this class was generated from the following file:
Generated on Sat May 30 16:32:35 2009 for mycpu by  doxygen 1.5.3