|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfi.hu.cs.titokone.RunDebugger
This class produces objects describing what has changed due to the last command having been run.
Field Summary | |
static short |
ALU_OPERATION
constant numerical value for ALU-operation type |
static short |
BRANCH_OPERATION
constant numerical value for branching operation type |
private java.util.LinkedList |
changedMemoryLines
List of changed memory lines |
static short |
COMP_OPERATION
constant numerical value for Comparing operation type |
private int |
compareBit
Compare bit tells compare status of status register. |
static short |
DATA_TRANSFER_OPERATION
constant numerical value for Data transfer operation type |
private int |
deviceValue
|
private static java.lang.String |
DIRECT
constant String for comment line memory addressing |
private static java.lang.String |
DIRECT_ADDRESSING
constant String for comment line memory addressing |
private static java.lang.String |
INDIRECT_ADDRESSING
constant String for comment line memory addressing |
private RunInfo |
info
Runinfo for each command line of the program |
private java.lang.String |
memoryComment
String for memory part of comment |
static short |
NO_OPERATION
constant numerical value for operation type NOP |
private java.lang.String[] |
parameters
String array for the comment message |
static short |
STACK_OPERATION
constant numerical value for stack operation type |
static short |
SUB_OPERATION
constant numerical value for subroutines operation type |
static short |
SVC_DATE
constant short for supervisor call Date |
static short |
SVC_HALT
constant short for supervisor call Halt |
static short |
SVC_OPERATION
constant numerical value for SVC operation type |
static short |
SVC_READ
constant short for supervisor call Read |
static short |
SVC_TIME
constant short for supervisor call Time |
static short |
SVC_WRITE
constant short for supervisor call Write |
Constructor Summary | |
RunDebugger()
This constructor initializes the RunDebugger. |
Method Summary | |
void |
addChangedMemoryLine(int row,
MemoryLine changedMemoryLine)
This method tells debugger that one or more memorylines were changed. |
RunInfo |
cycleEnd()
This method return the current runinfo after the line is executed |
void |
cycleStart(int lineNumber,
java.lang.String lineContents)
This method tells debugger that a new cycle has been started. |
void |
runCommand(int command)
This method tells what was operation run and its parts. |
void |
setALUResult(int result)
This method sets the result of ALU operation. |
private void |
setComments()
Sets the comment message of the current RunInfo. |
void |
setCompareResult(int whichBit)
This method tells what was the result of compare operation. |
void |
setIN(int deviceNumber,
int value)
This method tells debugger that something was read from the given device. |
void |
setNewPC(int newPC)
Sets value of new PC. |
void |
setOperationType(int opcode)
This method sets the type of operation. |
void |
setOUT(int deviceNumber,
int value)
This method tells debugger that something was written to the given device. |
void |
setRegisters(int[] registers)
This method tells debugger that one or more registers were changed. |
void |
setSecondFetchValue(int secondFetchValue)
This method sets value of second memory fetch. |
void |
setSVCOperation(int operation)
This method tells debugger which SVC operation was done. |
void |
setValueAtADDR(int value)
This method tells debugger what value was found from the ADDR part of the command. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final short NO_OPERATION
public static final short DATA_TRANSFER_OPERATION
public static final short ALU_OPERATION
public static final short COMP_OPERATION
public static final short BRANCH_OPERATION
public static final short SUB_OPERATION
public static final short STACK_OPERATION
public static final short SVC_OPERATION
public static final short SVC_HALT
public static final short SVC_READ
public static final short SVC_WRITE
public static final short SVC_TIME
public static final short SVC_DATE
private static final java.lang.String DIRECT
private static final java.lang.String DIRECT_ADDRESSING
private static final java.lang.String INDIRECT_ADDRESSING
private java.lang.String memoryComment
private java.lang.String[] parameters
private int deviceValue
private RunInfo info
private java.util.LinkedList changedMemoryLines
private int compareBit
Constructor Detail |
public RunDebugger()
Method Detail |
public void cycleStart(int lineNumber, java.lang.String lineContents)
lineNumber
- Tells the number of the current command line in memory.lineContents
- String containing symbolic command.public void setOperationType(int opcode)
opcode
- Operation code of command.public void runCommand(int command)
command
- TTK91 command.public void setValueAtADDR(int value)
value
- int containing the value.public void setRegisters(int[] registers)
registers
- Array containing new values.public void addChangedMemoryLine(int row, MemoryLine changedMemoryLine)
row
- The index of the changed line in memory.changedMemoryLine
- The changed memory line.public void setALUResult(int result)
result
- Value of result.public void setCompareResult(int whichBit)
whichBit
- Number of SR bit set.public void setSecondFetchValue(int secondFetchValue)
secondFetchValue
- Value which have got at second memory fetch.public void setIN(int deviceNumber, int value)
deviceNumber
- Number of the device.value
- Value written.public void setOUT(int deviceNumber, int value)
deviceNumber
- Number of the device.value
- Value written.public void setSVCOperation(int operation)
operation
- Int containing operation type.private void setComments()
public void setNewPC(int newPC)
newPC
- Value of new PC.public RunInfo cycleEnd()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |