class RiSC16::VM

Defined in:

vm/vm.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(address_space : Array(RiSC16::VM::Addressable), default : RiSC16::VM::Addressable) #

[View source]

Class Method Detail

def self.from_spec(spec, io_override = {} of String => ::Tuple(IO, IO)) #

Build a VM from a specfile. Allow override of IO for easier debugging.

TODO rework bcs it's ugly


[View source]

Instance Method Detail

def add(a : UInt16, b : UInt16) : UInt16 #

[View source]
def halted : Bool #

[View source]
def halted=(halted : Bool) #

[View source]
def load(program, at = 0) #

[View source]
def pc : UInt16 #

[View source]
def pc=(pc : UInt16) #

[View source]
def read(address : Word) : Word #

[View source]
def reg_a #

[View source]
def reg_b #

[View source]
def reg_c #

[View source]
def registers : Array(UInt16) #

[View source]
def registers=(registers : Array(UInt16)) #

[View source]
def run #

[View source]
def segment(address) #

[View source]
def step #

[View source]
def write(address : Word, value : Word) #

[View source]
def write_reg_a(v) #

[View source]