rubyx/lib/risc/instructions/byte_to_reg.rb

19 lines
475 B
Ruby
Raw Normal View History

module Risc
2016-12-25 17:11:58 +01:00
# ByteToReg moves a single byte into a register from memory.
# indexes are 1 based (as for slots) , which means we sacrifice a byte of every word
# for our sanity
2016-12-25 17:11:58 +01:00
class ByteToReg < Getter
end
2016-12-25 17:11:58 +01:00
# Produce a ByteToReg instruction.
# from and to are translated (from symbol to register if neccessary)
# but index is left as is.
def self.byte_to_reg( source , array , index , to)
ByteToReg.new( source , array , index , to)
end
end