Class DebuggablePIC_std

java.lang.Object
  |
  +--DigitalComponent_std
        |
        +--PIC_std
              |
              +--DebuggablePIC_std

public class DebuggablePIC_std
extends PIC_std
implements DebuggablePIC


You can read the source of this class here.


Constructor Summary
DebuggablePIC_std()
          Creates a new DebuggablePIC_std without any program.
DebuggablePIC_std(CompiledProgram prog)
          Creates a new DebuggablePIC_std with a program.
DebuggablePIC_std(DigitalComponentUI dui)
          Creates a new DebuggablePIC_std without any program with an UI.
 
Method Summary
 java.lang.String DisplayInstruction()
           
 int getBreakpoint(int n)
          Retunrs the address of the nth breakpoint.
 java.lang.String[] getBreakpointsForDisplay()
          Returns the breakpoints for display.
 DebuggableFileRegisters getFileRegisters()
          Returns the DebuggableFileRegisters.
 java.lang.String[] getFlashForDisplay()
          Returns the program loaded into the flash for display.
 DebuggableFlash getFlashMemory()
          Returns the DebuggableFlash.
 java.lang.String getFlashRefresh(int n, java.lang.String s)
          Refreshes the flash program.
 int getPC()
          Returns the program counter.
 int getSP()
          Returns the stack pointer.
 int getStack(int Level)
          Returns the Level element of the stack.
 java.lang.String[] getStackForDisplay()
          Returns the stack for display.
 java.lang.String[] getStateForDisplay()
          Returns the state of the PIC.
 int getW()
          Returns the W register.
 boolean isBreakpoint(int n)
          Returns true if there already is a breakpoint at address n.
 void removeBreakpoint(int n)
          Removes the breakpoint at address n.
 void ReprogramFlash(CompiledProgram prog)
          Reprograms the PIC.
 void setBreakpoint(int n)
          Sets a breakpoint to address n.
 void setPC(int n)
          Sets the program counter.
 void setSP(int n)
          Sets the stack pointer.
 void setStack(int Level, int n)
          Sets the Level element of the stack.
 void setW(int n)
          Sets the W register.
 void Trace()
          Executes one instruction.
 
Methods inherited from class PIC_std
addComponentToNotify, connectPin, ExecInstruction, getState, notifyOneCycle, Reset, Run, setPinStateDontNotify
 
Methods inherited from class DigitalComponent_std
isPinConnected, refreshDisplay, setPinState
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DebuggablePIC_std

public DebuggablePIC_std()
Creates a new DebuggablePIC_std without any program.

DebuggablePIC_std

public DebuggablePIC_std(DigitalComponentUI dui)
Creates a new DebuggablePIC_std without any program with an UI.

DebuggablePIC_std

public DebuggablePIC_std(CompiledProgram prog)
Creates a new DebuggablePIC_std with a program.
Parameters:
prog - The program.
Method Detail

Trace

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

ReprogramFlash

public void ReprogramFlash(CompiledProgram prog)
Description copied from interface: PIC
Reprograms the PIC.
Overrides:
ReprogramFlash in class PIC_std
Tags copied from interface: PIC
Parameters:
prog - The new program.

getPC

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

setPC

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

getW

public int getW()
Description copied from interface: DebuggablePIC
Returns the W register.
Specified by:
getW in interface DebuggablePIC

setW

public void setW(int n)
Description copied from interface: DebuggablePIC
Sets the W register.
Specified by:
setW in interface DebuggablePIC

getSP

public int getSP()
Description copied from interface: DebuggablePIC
Returns the stack pointer.
Specified by:
getSP in interface DebuggablePIC

setSP

public void setSP(int n)
Description copied from interface: DebuggablePIC
Sets the stack pointer.
Specified by:
setSP in interface DebuggablePIC

getStack

public int getStack(int Level)
Description copied from interface: DebuggablePIC
Returns the Level element of the stack.
Specified by:
getStack in interface DebuggablePIC

setStack

public void setStack(int Level,
                     int n)
Description copied from interface: DebuggablePIC
Sets the Level element of the stack.
Specified by:
setStack in interface DebuggablePIC

getFlashMemory

public DebuggableFlash getFlashMemory()
Description copied from interface: DebuggablePIC
Returns the DebuggableFlash.
Specified by:
getFlashMemory in interface DebuggablePIC

getFileRegisters

public DebuggableFileRegisters getFileRegisters()
Description copied from interface: DebuggablePIC
Returns the DebuggableFileRegisters.
Specified by:
getFileRegisters in interface DebuggablePIC

getStateForDisplay

public java.lang.String[] getStateForDisplay()
Description copied from interface: DebuggablePIC
Returns the state of the PIC.
Specified by:
getStateForDisplay in interface DebuggablePIC

DisplayInstruction

public java.lang.String DisplayInstruction()

getStackForDisplay

public java.lang.String[] getStackForDisplay()
Description copied from interface: DebuggablePIC
Returns the stack for display.
Specified by:
getStackForDisplay in interface DebuggablePIC

getFlashForDisplay

public java.lang.String[] getFlashForDisplay()
Description copied from interface: DebuggablePIC
Returns the program loaded into the flash for display.
Specified by:
getFlashForDisplay in interface DebuggablePIC

getFlashRefresh

public java.lang.String getFlashRefresh(int n,
                                        java.lang.String s)
Description copied from interface: DebuggablePIC
Refreshes the flash program.
Specified by:
getFlashRefresh in interface DebuggablePIC
Tags copied from interface: DebuggablePIC
Parameters:
n - The address of the instruction to refresh.
Returns:
The refreshed instruction.

getBreakpointsForDisplay

public java.lang.String[] getBreakpointsForDisplay()
Description copied from interface: DebuggablePIC
Returns the breakpoints for display.
Specified by:
getBreakpointsForDisplay in interface DebuggablePIC

getBreakpoint

public int getBreakpoint(int n)
Description copied from interface: DebuggablePIC
Retunrs the address of the nth breakpoint.
Specified by:
getBreakpoint in interface DebuggablePIC

setBreakpoint

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

isBreakpoint

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

removeBreakpoint

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