class RiSC16::VM
- RiSC16::VM
- Reference
- Object
Defined in:
vm/vm.crConstructors
Class Method Summary
-
.from_spec(spec, io_override = {} of String => ::Tuple(IO, IO))
Build a VM from a specfile.
Instance Method Summary
- #add(a : UInt16, b : UInt16) : UInt16
- #halted : Bool
- #halted=(halted : Bool)
- #load(program, at = 0)
- #pc : UInt16
- #pc=(pc : UInt16)
- #read(address : Word) : Word
- #reg_a
- #reg_b
- #reg_c
- #registers : Array(UInt16)
- #registers=(registers : Array(UInt16))
- #run
- #segment(address)
- #step
- #write(address : Word, value : Word)
- #write_reg_a(v)
Constructor Detail
Class Method Detail
Build a VM from a specfile. Allow override of IO for easier debugging.
TODO rework bcs it's ugly