class RiSC16::Instruction

Overview

A RiSC16 instruction

Defined in:

risc16.cr

Constructors

Instance Method Summary

Constructor Detail

def self.decode(instruction : Word) : self #

[View source]
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) #

[View source]

Instance Method Detail

def encode #

return the instruction encoded as a 16 bit integer.


[View source]
def immediate : UInt16 #

[View source]
def opcode : ISA #

[View source]
def reg_a : UInt16 #

[View source]
def reg_b : UInt16 #

[View source]
def reg_c : UInt16 #

[View source]