jmce - 1_02

jmce.intel.mcs51
Class Interrupt8051

java.lang.Object
  extended by jmce.sim.Interrupt
      extended by jmce.intel.mcs51.Interrupt8051
All Implemented Interfaces:
MCS51Constants, MemoryWriteListener

public class Interrupt8051
extends Interrupt
implements MemoryWriteListener, MCS51Constants

Interrupt sub system for MCS51 processor.

All interrupt in the 8051 are generaed setting one or more bit in a SFR so the interrupt are generate automatically when the relative bit in the SFR memory is written and the interrupt is enabled.

Version:
1.02
Author:
Mario Viara

Field Summary
 
Fields inherited from class jmce.sim.Interrupt
vector
 
Fields inherited from interface jmce.intel.mcs51.MCS51Constants
ACC, AUXR1, B, DPH, DPL, IE, IE_EA, IE_EC, IE_ES, IE_ET0, IE_ET1, IE_ET2, IE_EX0, IE_EX1, P0, P0M1, P0M2, P1, P1M1, P1M2, P2, P2M1, P2M2, P3, P3M1, P3M2, PSW, PSW_AC, PSW_CY, PSW_F0, PSW_F1, PSW_OV, PSW_P, PSW_RS0, PSW_RS1, SBUF, SCON, SCON_RI, SCON_TI, SP, TCON, TCON_TF0, TCON_TF1, TCON_TR0, TCON_TR1, TH0, TH1, TL0, TL1, TMOD, TMOD_C_T0, TMOD_C_T1, TMOD_GATE0, TMOD_GATE1, TMOD_T0_M0, TMOD_T0_M1, TMOD_T1_M0, TMOD_T1_M1
 
Constructor Summary
Interrupt8051(MCS51 cpu, java.lang.String name, int v)
           
 
Method Summary
 void addInterruptCondition(int sfr, int mask)
           
 void writeMemory(Memory m, int address, int value, int oldValue)
          Called when a memory write event occours.
 
Methods inherited from class jmce.sim.Interrupt
addInterruptManager, checkReady, getCounter, getName, getVector, isActive, isAutoReset, isEnabled, isNmi, isReady, resetCounter, setActive, setAutoReset, setEnabled, setVector, startISR, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Interrupt8051

public Interrupt8051(MCS51 cpu,
                     java.lang.String name,
                     int v)
              throws SIMException
Throws:
SIMException
Method Detail

addInterruptCondition

public void addInterruptCondition(int sfr,
                                  int mask)

writeMemory

public void writeMemory(Memory m,
                        int address,
                        int value,
                        int oldValue)
                 throws SIMException
Description copied from interface: MemoryWriteListener
Called when a memory write event occours.

This method is called when a memory write operation occours in the specified memory.

Specified by:
writeMemory in interface MemoryWriteListener
Parameters:
m - - Memory involved in the write operation.
address - - Address written.
value - - Value written.
oldValue - - Old value of this memory location.
Throws:
SIMException

jmce - 1_02