Module de.carne.mcd

Interface Instruction


  • public interface Instruction
    Interface for all kind of decodable instructions.
    • Method Detail

      • save

        void save​(java.io.DataOutput out)
           throws java.io.IOException
        Saves these instruction's parameters to the given DataOutput for later loading via InstructionFactory.loadInstruction(java.io.DataInput).
        Parameters:
        out - the DataOutput to store to.
        Throws:
        java.io.IOException - if an I/O error occurs.
      • decode

        void decode​(long ip,
                    InstructionOpcode opcode,
                    MCDInputBuffer in,
                    MCDOutputBuffer out)
             throws java.io.IOException
        Decodes this instruction.
        Parameters:
        ip - the current instruction pointer.
        opcode - the instruction opcode.
        in - the MCDInputBuffer to read any additional instruction data from.
        out - the MCDOutputBuffer to decode to.
        Throws:
        java.io.IOException - if an I/O error occurs.