fi.hu.cs.titokone
Class RunInfo

java.lang.Object
  extended byfi.hu.cs.titokone.DebugInfo
      extended byfi.hu.cs.titokone.RunInfo

public class RunInfo
extends DebugInfo

This class tells GUIBrain what the processor has done. RunDebugger creates objects from this class and passes them to onwards.


Field Summary
private  int addr
          This field represents the address
private  int aluResult
          This field contains the value of ALU-operation
private  int binary
          This field contains the command in binary format.
(package private)  java.util.LinkedList changedMemoryLines
          This list contains all changed memory lines.
private  java.lang.String colonString
          This String contains the colon-representation of current line
private  int compareStatus
          This field contains the compare status of status register.
private  java.lang.String deviceName
          This String value contains the name of the device
private  int deviceNumber
          This value contains the value of the device
private  boolean externalOperation
          This boolean value tells is the operation in or out -operation
private  boolean isIN
          This boolean value is set true if operation is in operation, otherwise false
private  java.lang.String lineContents
          This field contains contents of the line,
private  int lineNumber
          This field contains line number.
private  int newPC
          This field contains value of new PC.
private  int numberOfMemoryfetches
          This int represents the number of memoryfetches
private  int operationType
          This field contains the number of operation type.
private  int[] registers
          This array contains the current values of registers 0-7
private  int Ri
          This field contains index register.
private  int Rj
          This field contains first operand of the command.
private  int secondFetchValue
          This field contains the value of second memory fetch
private  java.lang.String svcOperation
          This value contains the String representation of SVC-operation
private  int valueAtADDR
          This field contains the value of address field
private  int valueOfDevice
          This value contains the value read or written from / to device
 
Fields inherited from class fi.hu.cs.titokone.DebugInfo
 
Constructor Summary
RunInfo(int lineNumber, java.lang.String lineContents)
          This constructor initializes the RunInfo and sets its starting values.
 
Method Summary
 int getADDR()
          This method returns value of the ADDR part of the command.
 int getALUResult()
          This method returns the result of the ALU operation.
 int getBinary()
          This method returns the binary command.
 java.util.LinkedList getChangedMemoryLines()
           
 java.lang.String getColonString()
          This method gets the colon-presentation of the command.
 int getCompareStatus()
          Gets compare status of status register.
 int getFirstOperand()
          This method returns register number of the first operand.
 int getIndexRegister()
          This method returns number of the index register.
 java.lang.String getLineContents()
          This method returns the symbolic command found on the line..
 int getLineNumber()
          This method returns the number of the line.
 int getMemoryfetches()
          This methot tells GUIBrain how many memoryfetches were made.
 int getNewPC()
          Gets the value of new PC.
 int getOperationtype()
          This method tells GUIBrain what kind of operation happened.
 int[] getRegisters()
          Returns register array.
 int getSecondFetchValue()
          This method gets value of second memory fetch.
 java.lang.String getSVC()
          This method returns type of the SVC operation.
 int getValueAtADDR()
          This method returns value found at the ADDR.
 boolean isExternalOp()
          This method tells is external operation executed
 boolean isInOp()
          This method tells is external operation in or out
 void setADDR(int addr)
          This method sets the value of the ADDRess field.
 void setALUResult(int result)
          This sets the result of performed ALU operation
 void setBinary(int binary)
          This method sets the binary command.
 void setChangedMemoryLines(java.util.LinkedList changedMemoryLines)
           
 void setColonString(java.lang.String colonString)
          This method sets the colon-presentation of the command.
 void setCompareOperation(int whichBit)
          This method tells info that a compare operation was made and what SR bit was changed to what value.
 void setFirstOperand(int Rj)
          This method sets the first operand.
 void setIN(java.lang.String deviceName, int device, int value)
          This method tells info what was read from given device and what was the value.
 void setIndexRegister(int Ri)
          this method sets the index register.
 void setNewPC(int newPC)
          Sets the value of new PC.
 void setNumberOfFetches(int fetches)
          This method sets the number of fetches.
 void setOperationType(int type)
          This method sets the type of operation performed.
 void setOUT(java.lang.String deviceName, int device, int value)
          This method tells info what was written to the given device and what was the value.
 void setRegisters(int[] registers)
           
 void setSecondFetchValue(int secondFetchValue)
          This method sets value of second memory fetch.
 void setSVCOperation(java.lang.String operation)
          This method sets what kind of SVC operation was made.
 void setValueAtADDR(int value)
          This method sets the value found at ADDR.
 java.lang.String whatDevice()
          This method returns name of the used device.
 int[] whatIN()
          This method tells GUIBrain what was result of an IN command (device and value.
 int[] whatOUT()
          This method tells GUIBrain what was result of an OUT command (device and value).
 
Methods inherited from class fi.hu.cs.titokone.DebugInfo
getComments, getStatusMessage, setComments, setStatusMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

operationType

private int operationType
This field contains the number of operation type.


lineNumber

private int lineNumber
This field contains line number.


lineContents

private java.lang.String lineContents
This field contains contents of the line,


binary

private int binary
This field contains the command in binary format.


registers

private int[] registers
This array contains the current values of registers 0-7


colonString

private java.lang.String colonString
This String contains the colon-representation of current line


numberOfMemoryfetches

private int numberOfMemoryfetches
This int represents the number of memoryfetches


Rj

private int Rj
This field contains first operand of the command.


newPC

private int newPC
This field contains value of new PC.


Ri

private int Ri
This field contains index register.


addr

private int addr
This field represents the address


valueAtADDR

private int valueAtADDR
This field contains the value of address field


secondFetchValue

private int secondFetchValue
This field contains the value of second memory fetch


aluResult

private int aluResult
This field contains the value of ALU-operation


compareStatus

private int compareStatus
This field contains the compare status of status register. 0 - greater, 1 - equal, 2 - less.


externalOperation

private boolean externalOperation
This boolean value tells is the operation in or out -operation


isIN

private boolean isIN
This boolean value is set true if operation is in operation, otherwise false


deviceName

private java.lang.String deviceName
This String value contains the name of the device


deviceNumber

private int deviceNumber
This value contains the value of the device


valueOfDevice

private int valueOfDevice
This value contains the value read or written from / to device


svcOperation

private java.lang.String svcOperation
This value contains the String representation of SVC-operation


changedMemoryLines

java.util.LinkedList changedMemoryLines
This list contains all changed memory lines. List contains object arrays, whose first element is a Integer and second a MemoryLine. Integer tells the row where MemoryLine is in memory.

Constructor Detail

RunInfo

public RunInfo(int lineNumber,
               java.lang.String lineContents)
This constructor initializes the RunInfo and sets its starting values.

Parameters:
lineNumber - Line number of current line.
lineContents - String containing symbolic command.
Method Detail

setRegisters

public void setRegisters(int[] registers)

setOperationType

public void setOperationType(int type)
This method sets the type of operation performed.

Parameters:
type - Type of operation.

setColonString

public void setColonString(java.lang.String colonString)
This method sets the colon-presentation of the command.

Parameters:
colonString - The colon-presentation of the command, eg. 0:1:0:2:3 (for NOP R1, =3(R2)).

getColonString

public java.lang.String getColonString()
This method gets the colon-presentation of the command.

Returns:
The colon-presentation of the command.

setIndexRegister

public void setIndexRegister(int Ri)
this method sets the index register.

Parameters:
Ri - Number of the register.

setFirstOperand

public void setFirstOperand(int Rj)
This method sets the first operand.

Parameters:
Rj - Number of the register.

setNumberOfFetches

public void setNumberOfFetches(int fetches)
This method sets the number of fetches.

Parameters:
fetches - Number of fetches.

setADDR

public void setADDR(int addr)
This method sets the value of the ADDRess field.

Parameters:
addr - Int containing the ADDR.

setValueAtADDR

public void setValueAtADDR(int value)
This method sets the value found at ADDR.

Parameters:
value - Value found at the ADDR.

setChangedMemoryLines

public void setChangedMemoryLines(java.util.LinkedList changedMemoryLines)

setALUResult

public void setALUResult(int result)
This sets the result of performed ALU operation

Parameters:
result - Result of the operation.

setCompareOperation

public void setCompareOperation(int whichBit)
This method tells info that a compare operation was made and what SR bit was changed to what value.

Parameters:
whichBit - Number of the bit.

isExternalOp

public boolean isExternalOp()
This method tells is external operation executed

Returns:
boolean true if command is an external operation

isInOp

public boolean isInOp()
This method tells is external operation in or out

Returns:
true if external operation is in operation, otherwise false.

setIN

public void setIN(java.lang.String deviceName,
                  int device,
                  int value)
This method tells info what was read from given device and what was the value.

Parameters:
deviceName - Name of the device.
device - Number of the device.
value - Value read.

setOUT

public void setOUT(java.lang.String deviceName,
                   int device,
                   int value)
This method tells info what was written to the given device and what was the value.

Parameters:
deviceName - Name of the device.
device - Number of the device.
value - Value written.

setSVCOperation

public void setSVCOperation(java.lang.String operation)
This method sets what kind of SVC operation was made.


setNewPC

public void setNewPC(int newPC)
Sets the value of new PC.

Parameters:
newPC - Value of the new PC.

getNewPC

public int getNewPC()
Gets the value of new PC.

Returns:
Value of the new PC.

getCompareStatus

public int getCompareStatus()
Gets compare status of status register.

Returns:
Compare status of status register. 0 = grater, 1 = equal, 2 = less.

getOperationtype

public int getOperationtype()
This method tells GUIBrain what kind of operation happened.

Returns:
int value which represents operation type.

getMemoryfetches

public int getMemoryfetches()
This methot tells GUIBrain how many memoryfetches were made.

Returns:
int How many fetches were made.

getLineNumber

public int getLineNumber()
This method returns the number of the line.

Returns:
int containing the line number.

getLineContents

public java.lang.String getLineContents()
This method returns the symbolic command found on the line..

Returns:
String String containing the symbolic command.

getBinary

public int getBinary()
This method returns the binary command.

Returns:
int Integer containing the binary command.

setBinary

public void setBinary(int binary)
This method sets the binary command.

Parameters:
binary - Contains the binary command.

getRegisters

public int[] getRegisters()
Returns register array.

Returns:
int[] int array containing values of the registers.

getChangedMemoryLines

public java.util.LinkedList getChangedMemoryLines()

whatOUT

public int[] whatOUT()
This method tells GUIBrain what was result of an OUT command (device and value).

Returns:
int[] Integer array containing device number and new value.

whatIN

public int[] whatIN()
This method tells GUIBrain what was result of an IN command (device and value.

Returns:
int[] Integer array containing device number and new value.

whatDevice

public java.lang.String whatDevice()
This method returns name of the used device.

Returns:
String devicename.

getFirstOperand

public int getFirstOperand()
This method returns register number of the first operand.

Returns:
Register number of the first operand.

getIndexRegister

public int getIndexRegister()
This method returns number of the index register.

Returns:
Number of the index register.

getADDR

public int getADDR()
This method returns value of the ADDR part of the command.

Returns:
int Integer containing the value of the ADDR part of command.

getValueAtADDR

public int getValueAtADDR()
This method returns value found at the ADDR.

Returns:
int Integer containing the value found at ADDR..

setSecondFetchValue

public void setSecondFetchValue(int secondFetchValue)
This method sets value of second memory fetch. Indirect memory accessing mode needs two memory fetches.

Parameters:
secondFetchValue - Value which have got at second memory fetch.

getSecondFetchValue

public int getSecondFetchValue()
This method gets value of second memory fetch. Indirect memory accessing mode needs two memory fetches.

Returns:
Value which have got at second memory fetch.

getALUResult

public int getALUResult()
This method returns the result of the ALU operation.

Returns:
int Integer containing the result.

getSVC

public java.lang.String getSVC()
This method returns type of the SVC operation.

Returns:
int Integer containing the operation type.