2015-11-19 09:07:27 +01:00
|
|
|
module Register
|
|
|
|
|
2016-12-25 17:11:58 +01:00
|
|
|
# ByteToReg moves a single byte into a register from memory.
|
2015-11-19 09:07:27 +01:00
|
|
|
|
|
|
|
# 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
|
2015-11-19 09:07:27 +01:00
|
|
|
|
|
|
|
end
|
|
|
|
|
2016-12-25 17:11:58 +01:00
|
|
|
# Produce a ByteToReg instruction.
|
2015-11-19 09:07:27 +01:00
|
|
|
# from and to are translated (from symbol to register if neccessary)
|
|
|
|
# but index is left as is.
|
2016-12-25 17:11:58 +01:00
|
|
|
# def self.byte_to_reg source , array , index , to
|
2016-12-11 11:18:11 +01:00
|
|
|
# from = resolve_to_register from
|
|
|
|
# to = resolve_to_register to
|
2016-12-25 17:11:58 +01:00
|
|
|
# ByteToReg.new( source , array , index , to)
|
2016-12-11 11:18:11 +01:00
|
|
|
# end
|
2015-11-19 09:07:27 +01:00
|
|
|
end
|