class RiSC16::Instruction
- RiSC16::Instruction
- Reference
- Object
Overview
A RiSC16 instruction
Defined in:
risc16.crConstructors
- .decode(instruction : Word) : self
- .new(opcode : RiSC16::ISA, reg_a : UInt16 = 0_u16, reg_b : UInt16 = 0_u16, reg_c : UInt16 = 0_u16, immediate : UInt16 = 0_u16)
Instance Method Summary
-
#encode
return the instruction encoded as a 16 bit integer.
- #immediate : UInt16
- #opcode : ISA
- #reg_a : UInt16
- #reg_b : UInt16
- #reg_c : UInt16
Constructor Detail
def self.new(opcode : RiSC16::ISA, reg_a : UInt16 = 0_u16, reg_b : UInt16 = 0_u16, reg_c : UInt16 = 0_u16, immediate : UInt16 = 0_u16)
#