com.monkeycoder.monkeynes.hardware
Class ExecutedInstructionInfo

java.lang.Object
  |
  +--com.monkeycoder.monkeynes.hardware.ExecutedInstructionInfo

public class ExecutedInstructionInfo
extends Object

This class represents an instruction that was just executed by the CPU.

Originally part of the MonkeyNES project.

Author:
David Stephens

Constructor Summary
ExecutedInstructionInfo(int inCycles, int inOpCode, int inParam1, int inParam2)
          Creates a new ExecutedInstructionInfo record with the supplied information.
 
Method Summary
 int getCycles()
          Gets the number of cycles the CPU took to execute this instruction.
 int getOpCode()
          Gets the index of the OpCode that was executed.
 int getParam1()
          Gets the first byte of param data used by this executed instruction.
 int getParam2()
          Gets the second byte of param data used by this executed instruction.
 String getSyntaxFormatted()
          Produces a String containing the 6502 assembly language version of this instruction as it was executed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExecutedInstructionInfo

public ExecutedInstructionInfo(int inCycles,
                               int inOpCode,
                               int inParam1,
                               int inParam2)
Creates a new ExecutedInstructionInfo record with the supplied information.

Parameters:
inCycles - The number of cycles this instruction actually took in the CPU.
inOpCode - The OpCode that was executed.
inParam1 - The first byte of parameter data used by the instruction.
inParam2 - The second byte of parameter data used by the instruction.
Method Detail

getCycles

public int getCycles()
Gets the number of cycles the CPU took to execute this instruction.

Returns:
The number of cycles the CPU took to execute this instruction.

getOpCode

public int getOpCode()
Gets the index of the OpCode that was executed.

Returns:
The index of the OpCode that was executed.

getParam1

public int getParam1()
Gets the first byte of param data used by this executed instruction.

Returns:
The first byte of param data used by this executed instruction.

getParam2

public int getParam2()
Gets the second byte of param data used by this executed instruction.

Returns:
The second byte of param data used by this executed instruction.

getSyntaxFormatted

public String getSyntaxFormatted()
Produces a String containing the 6502 assembly language version of this instruction as it was executed.

Returns:
The 6502 assembly formatted code.