Class Instruction

java.lang.Object
be.lmenten.avr.core.CoreMemoryCell
be.lmenten.avr.core.instruction.Instruction
Direct Known Subclasses:
BREAK, Data, EICALL, EIJMP, ELPM, ICALL, IJMP, Instruction_b3, Instruction_k12, Instruction_k22, Instruction_K4, Instruction_Rd2, Instruction_Rd3, Instruction_Rd4, Instruction_Rd5, Instruction_RdP4, Instruction_Rr4, Instruction_Rr5, Instruction_s3, LPM, NOP, RET, RETI, SLEEP, SPM, WDR

public abstract class Instruction extends CoreMemoryCell
  • Constructor Details

    • Instruction

      public Instruction()
  • Method Details

    • execute

      public void execute(Core core)
      Execute an instruction. When entering this method, program counter points next instruction
      Parameters:
      core -
    • bit8

      public boolean bit8()
    • bit9

      public boolean bit9()
    • bit10

      public boolean bit10()
    • bit11

      public boolean bit11()
    • bit12

      public boolean bit12()
    • bit13

      public boolean bit13()
    • bit14

      public boolean bit14()
    • bit15

      public boolean bit15()
    • bit8

      public void bit8(boolean state)
    • bit9

      public void bit9(boolean state)
    • bit10

      public void bit10(boolean state)
    • bit11

      public void bit11(boolean state)
    • bit12

      public void bit12(boolean state)
    • bit13

      public void bit13(boolean state)
    • bit14

      public void bit14(boolean state)
    • bit15

      public void bit15(boolean state)
    • getInstructionSetEntry

      public abstract InstructionSet getInstructionSetEntry()
      Returns:
    • is32bits

      public boolean is32bits()
      Returns:
    • getOpcodeSize

      public int getOpcodeSize()
      Get opcode size in words
      Returns:
    • getOpcodeBytesSize

      public int getOpcodeBytesSize()
      Get opcode size in bytes
      Returns:
    • getDataWidth

      public final 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:
    • setOpcode

      public final void setOpcode(int opcode)
    • getOpcode

      public final int getOpcode()
    • getSecondWord

      public Data getSecondWord()
    • toParsedLine

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