Class Debugger_std

java.lang.Object
  |
  +--Debugger_std
Direct Known Subclasses:
GraphicalDebugger

public abstract class Debugger_std
extends java.lang.Object
implements Debugger


You can read the source of this class here.


Constructor Summary
Debugger_std()
           
Debugger_std(DigitalComponentUI dui)
           
 
Method Summary
 void Animate()
          Runs the PIC and display state after each instruction.
 void AssembleAndLoadSource()
          Assembles and loadsthe source code.
 void DisplayAll()
          Displays state, stacl, current instruction and file registers
 void DisplayBreakpoints()
          Displays the breakpoints.
 int GetBreakpoint(int n)
          Returns the nth breakpoint.
 int getLabelAddress(int index)
          Returns the address of the indexth label.
 int getPC()
          Returns the program counter of the PIC.
 PIC getPIC()
          Returns the PIC so that links to other DigitalComponent can be made.
 boolean IsBreakpoint(int n)
          Returns true if there is a breakpoint at address n.
 void LoadProgram(CompiledProgram prog)
          Loads a program into the PIC.
 void LoadProgram(java.lang.String fn)
          Loads a program into the PIC.
 void LoadSource(java.lang.String filename)
           
 void RemoveBreakpoint(int n)
          Removes the breakpoint at address n.
 void Run()
          Runs the PIC.
 boolean Running()
          Returns the running state of the PIC.
 void SaveProgram(java.lang.String filename)
          Saves the loaded program.
 void SaveSource(java.lang.String filename)
          Saves the source that's in the editor.
 void SetBreakpoint(int n)
          Sets a breakpoint to address n.
 void setPC(int n)
          Sets the program counter.
 void StepOver()
          Executes one instruction but steps over calls.
 void Stop()
          Stops the PIC.
 void Trace()
          Executes one instruction.
 void UpdateSource(java.lang.String s)
          Updates the source code.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Debugger_std

public Debugger_std()

Debugger_std

public Debugger_std(DigitalComponentUI dui)
Method Detail

getPIC

public PIC getPIC()
Description copied from interface: Debugger
Returns the PIC so that links to other DigitalComponent can be made.
Specified by:
getPIC in interface Debugger

Animate

public void Animate()
Description copied from interface: Debugger
Runs the PIC and display state after each instruction.
Specified by:
Animate in interface Debugger

Trace

public void Trace()
Description copied from interface: Debugger
Executes one instruction.
Specified by:
Trace in interface Debugger

StepOver

public void StepOver()
Description copied from interface: Debugger
Executes one instruction but steps over calls.
Specified by:
StepOver in interface Debugger

Run

public void Run()
Description copied from interface: Debugger
Runs the PIC.
Specified by:
Run in interface Debugger

Stop

public void Stop()
Description copied from interface: Debugger
Stops the PIC.
Specified by:
Stop in interface Debugger

Running

public boolean Running()
Description copied from interface: Debugger
Returns the running state of the PIC.
Specified by:
Running in interface Debugger

getLabelAddress

public int getLabelAddress(int index)
Description copied from interface: Debugger
Returns the address of the indexth label.
Specified by:
getLabelAddress in interface Debugger

LoadProgram

public void LoadProgram(CompiledProgram prog)
Description copied from interface: Debugger
Loads a program into the PIC.
Specified by:
LoadProgram in interface Debugger
Tags copied from interface: Debugger
Parameters:
prog - CompiledProgram to load.

LoadProgram

public void LoadProgram(java.lang.String fn)
Description copied from interface: Debugger
Loads a program into the PIC.
Specified by:
LoadProgram in interface Debugger
Tags copied from interface: Debugger
Parameters:
fn - File name of the file containing the program to load.

SaveProgram

public void SaveProgram(java.lang.String filename)
Description copied from interface: Debugger
Saves the loaded program.
Specified by:
SaveProgram in interface Debugger
Tags copied from interface: Debugger
Parameters:
filename - Name of the file.

UpdateSource

public void UpdateSource(java.lang.String s)
Description copied from interface: Debugger
Updates the source code.
Specified by:
UpdateSource in interface Debugger
Tags copied from interface: Debugger
Parameters:
s - New source code.

LoadSource

public void LoadSource(java.lang.String filename)

SaveSource

public void SaveSource(java.lang.String filename)
Description copied from interface: Debugger
Saves the source that's in the editor.
Specified by:
SaveSource in interface Debugger
Tags copied from interface: Debugger
Parameters:
filename - Name of the file.

AssembleAndLoadSource

public void AssembleAndLoadSource()
Description copied from interface: Debugger
Assembles and loadsthe source code.
Specified by:
AssembleAndLoadSource in interface Debugger

DisplayAll

public void DisplayAll()
Description copied from interface: Debugger
Displays state, stacl, current instruction and file registers
Specified by:
DisplayAll in interface Debugger

DisplayBreakpoints

public void DisplayBreakpoints()
Description copied from interface: Debugger
Displays the breakpoints.
Specified by:
DisplayBreakpoints in interface Debugger

GetBreakpoint

public int GetBreakpoint(int n)
Description copied from interface: Debugger
Returns the nth breakpoint.
Specified by:
GetBreakpoint in interface Debugger

SetBreakpoint

public void SetBreakpoint(int n)
Description copied from interface: Debugger
Sets a breakpoint to address n.
Specified by:
SetBreakpoint in interface Debugger

IsBreakpoint

public boolean IsBreakpoint(int n)
Description copied from interface: Debugger
Returns true if there is a breakpoint at address n.
Specified by:
IsBreakpoint in interface Debugger

RemoveBreakpoint

public void RemoveBreakpoint(int n)
Description copied from interface: Debugger
Removes the breakpoint at address n.
Specified by:
RemoveBreakpoint in interface Debugger

getPC

public int getPC()
Description copied from interface: Debugger
Returns the program counter of the PIC.
Specified by:
getPC in interface Debugger

setPC

public void setPC(int n)
Description copied from interface: Debugger
Sets the program counter.
Specified by:
setPC in interface Debugger