Class CoreData

java.lang.Object
be.lmenten.avr.core.CoreMemoryCell
be.lmenten.avr.core.data.CoreData
Direct Known Subclasses:
CoreRegister

public class CoreData extends CoreMemoryCell
Since:
1.0
Author:
Laurent Menten
  • Constructor Details

    • CoreData

      public CoreData(int address)
    • CoreData

      public CoreData(int address, byte value)
    • CoreData

      public CoreData(int address, byte value, byte defaultValue)
  • Method Details

    • getDataWidth

      public int getDataWidth()
      Description copied from class: CoreMemoryCell
      Get the size in bits of this memory cell.
      • 8 for data
      • 16 for code
      Specified by:
      getDataWidth in class CoreMemoryCell
      Returns:
    • reset

      public void reset()
      Reset this data cell to its default value.
      Overrides:
      reset in class CoreMemoryCell
    • mask

      public byte mask(byte mask)

      Return the value of this data cell ANDed with the given mask.

      !!! Does not trigger event or record accesses.

      Parameters:
      mask -
      Returns:
    • bits

      public byte bits(byte mask)
      several locations in the opcode, the value is packed and can be directly used.
      Parameters:
      mask -
      Returns:
    • toParsedLine

      public void toParsedLine(Core core, ParsedAssemblerLine parsedLine)
      Specified by:
      toParsedLine in class CoreMemoryCell
      Parameters:
      core -
      parsedLine -
    • toString

      public String toString()
      Overrides:
      toString in class CoreMemoryCell