rename register to risc
seems to fit the layer much better as we really have a very reduced instruction set
This commit is contained in:
21
lib/risc/instructions/reg_to_byte.rb
Normal file
21
lib/risc/instructions/reg_to_byte.rb
Normal file
@ -0,0 +1,21 @@
|
||||
module Risc
|
||||
|
||||
# RegToByte moves a byte into memory from a register.
|
||||
|
||||
# indexes are 1 based !
|
||||
|
||||
class RegToByte < Setter
|
||||
|
||||
end
|
||||
|
||||
# Produce a RegToByte instruction.
|
||||
# from and to are translated (from symbol to register if neccessary)
|
||||
# but index is left as is.
|
||||
def self.reg_to_byte( source , from , to , index)
|
||||
from = resolve_to_register from
|
||||
index = resolve_to_index( to , index)
|
||||
to = resolve_to_register to
|
||||
RegToByte.new( source, from , to , index)
|
||||
end
|
||||
|
||||
end
|
Reference in New Issue
Block a user