|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.github.croesch.micro_debug.commons.AbstractCodeContainer
com.github.croesch.micro_debug.console.MemoryInterpreter
public final class MemoryInterpreter
Interpreter of a memory, can print code and stack read from the memory.
| Constructor Summary | |
|---|---|
MemoryInterpreter(Memory mem)
Constructs an interpreter of a memory, can print code and stack read from the memory. |
|
| Method Summary | |
|---|---|
protected int |
getFirstPossibleCodeAddress()
Returns the address where the first possible code is stored. |
String |
getFormattedLine(int line)
Returns the formatted line. |
protected int |
getLastPossibleCodeAddress()
Returns the address where the last possible code is stored. |
protected int |
printCodeLine(int addr)
Prints the line with the given number to the user. |
void |
printContent(int pos1,
int pos2)
Prints the content of the memory between the given addresses. |
void |
printStack(int elementsToHide)
Prints the content of the stack. |
| Methods inherited from class com.github.croesch.micro_debug.commons.AbstractCodeContainer |
|---|
formatIntToHex, printCode, printCode, printCodeAroundLine |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MemoryInterpreter(Memory mem)
mem - the memory to interprete| Method Detail |
|---|
protected int printCodeLine(int addr)
AbstractCodeContainer
printCodeLine in class AbstractCodeContaineraddr - the line number of the code instruction to print
public void printContent(int pos1,
int pos2)
pos1 - the address to start (inclusive)pos2 - the address to end (inclusive)public void printStack(int elementsToHide)
elementsToHide - the number of elements to hide. The first possible element is the one the initial stack
pointer points to.public String getFormattedLine(int line)
line - the number of line to fetch.
String representing the given line numberprotected int getFirstPossibleCodeAddress()
AbstractCodeContainer
getFirstPossibleCodeAddress in class AbstractCodeContainerprotected int getLastPossibleCodeAddress()
AbstractCodeContainer
getLastPossibleCodeAddress in class AbstractCodeContainer
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||