rubyx/lib/register/instructions/set_byte.rb

26 lines
562 B
Ruby
Raw Normal View History

module Register
# SetByte moves a byte into memory from a register.
# indexes are 1 based !
class SetByte < Setter
def to_s
"SetByte: #{register} -> #{array} [#{index}]"
end
end
# Produce a SetByte instruction.
# from and to are translated (from symbol to register if neccessary)
# but index is left as is.
2016-12-11 11:18:11 +01:00
# def self.set_byte source , from , to , index
# from = resolve_to_register from
# index = resolve_index( to , index)
# to = resolve_to_register to
# SetByte.new( source, from , to , index)
# end
end