jmce - 1_02

jmce.sim
Class BreakPointRead

java.lang.Object
  extended by jmce.sim.BreakPoint
      extended by jmce.sim.BreakPointRead
All Implemented Interfaces:
MemoryReadListener
Direct Known Subclasses:
BreakPointExec

public class BreakPointRead
extends BreakPoint
implements MemoryReadListener

Break point on memory read.

This class handle break point fired when a specific memory location is readed.

Version:
1.00
Author:
Mario Viara

Field Summary
 
Fields inherited from class jmce.sim.BreakPoint
address, cpu, enabled, enabled1, fireCounter, listener, memory, name
 
Constructor Summary
  BreakPointRead(CPU cpu, BreakPointListener l, Memory memory, int address)
           
protected BreakPointRead(CPU cpu, java.lang.String name, BreakPointListener l, Memory memory, int address)
           
 
Method Summary
 void destroy()
          Destroy the break point.
 int readMemory(Memory m, int a, int value)
          Called when the memory is readed.
 
Methods inherited from class jmce.sim.BreakPoint
fireBreakPoint, formatMsg, getAddress, getFireCount, getMemory, isEnabled, setEnabled, setEnabled1, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BreakPointRead

protected BreakPointRead(CPU cpu,
                         java.lang.String name,
                         BreakPointListener l,
                         Memory memory,
                         int address)

BreakPointRead

public BreakPointRead(CPU cpu,
                      BreakPointListener l,
                      Memory memory,
                      int address)
Method Detail

readMemory

public int readMemory(Memory m,
                      int a,
                      int value)
               throws SIMException
Description copied from interface: MemoryReadListener
Called when the memory is readed.

This is method is called to notify a read at the specified memory loction.

Specified by:
readMemory in interface MemoryReadListener
Parameters:
m - - Memory readed.
a - - Address where the operation occours.
value - - Value readed from the phisical memory or from previus installed listener.
Returns:
Value readed from the memory.
Throws:
SIMException

destroy

public void destroy()
Description copied from class: BreakPoint
Destroy the break point.

Must unregister all memory read / write listener and free all used resources.

Specified by:
destroy in class BreakPoint

jmce - 1_02