/**
 * This interface describes the services a debugger must offer.
 * <BR>You can read the source of this interface <A HREF="./Debugger.java.html"> here</A>.
 */
public interface Debugger {

	/**
	 * Returns the PIC so that links to other DigitalComponent can be made.
	 */
	public PIC getPIC();

	/**
	 * Returns the address of the indexth label.
	 */
	public int getLabelAddress(int index);

	/**
	 * Runs the PIC and display state after each instruction.
	 */
	public void Animate();

	/**
	 * Executes one instruction.
	 */
	public void Trace();

	/**
	 * Executes one instruction but steps over calls.
	 */
	public void StepOver();

	/**
	 * Runs the PIC.
	 */
	public void Run();

	/**
	 * Stops the PIC.
	 */
	public void Stop();

	/**
	 * Returns the running state of the PIC.
	 */
	public boolean Running();

	/**
	 * Loads a program into the PIC.
	 * @param fn File name of the file containing the program to load.
	 */
	public void LoadProgram(String fn);

	/**
	 * Loads a program into the PIC.
	 * @param prog CompiledProgram to load.
	 */
	public void LoadProgram(CompiledProgram prog);

	/**
	 * Saves the loaded program.
	 * @param filename Name of the file.
	 */
	public void SaveProgram(String filename);

	/**
	 * Updates the source code.
	 * @param s New source code.
	 */
	public void UpdateSource(String s);

	/**
	 * Assembles and loadsthe source code.
	 */
	public void AssembleAndLoadSource();

	/**
	 * Saves the source that's in the editor.
	 * @param filename Name of the file.
	 */
	public void SaveSource(String filename);

	/**
	 * Displays the file registers.
	 */
	public void DisplayFileRegisters();

	/**
	 * Displays the flash.
	 */
	public void DisplayFlash();

	/**
	 * Displays the state of the PIC.
	 */
	public void DisplayState();

	/**
	 * Displays the current instruction.
	 */
	public void DisplayInstruction();

	/**
	 * Displays the stack.
	 */
	public void DisplayStack();

	/**
	 * Refreshes instruction n of the flash.
	 */
	public void RefreshFlash(int n);

	/**
	 * Displays state, stacl, current instruction and file registers
	 */
	public void DisplayAll();

	/**
	 * Displays the breakpoints.
	 */
	public void DisplayBreakpoints();

	/**
	 * Returns the nth breakpoint.
	 */
	public int GetBreakpoint(int n);

	/**
	 * Sets a breakpoint to address n.
	 */
	public void SetBreakpoint(int n);

	/**
	 * Returns true if there is a breakpoint at address n.
	 */
	public boolean IsBreakpoint(int n);

	/**
	 * Removes the breakpoint at address n.
	 */
	public void RemoveBreakpoint(int n);

	/**
	 * Returns the program counter of the PIC.
	 */
	public int getPC();

	/**
	 * Sets the program counter.
	 */
	public void setPC(int n);
}