same renames for bytes (set/get_byte)
This commit is contained in:
@ -1,11 +1,11 @@
|
||||
module Register
|
||||
|
||||
# GetByte moves a single byte into a register from memory.
|
||||
# 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
|
||||
|
||||
class GetByte < Getter
|
||||
class ByteToReg < Getter
|
||||
|
||||
# If you had a c array (of int8) and index offset
|
||||
# the instruction would do register = array[index]
|
||||
@ -18,12 +18,12 @@ module Register
|
||||
|
||||
end
|
||||
|
||||
# Produce a GetByte instruction.
|
||||
# Produce a ByteToReg instruction.
|
||||
# from and to are translated (from symbol to register if neccessary)
|
||||
# but index is left as is.
|
||||
# def self.get_byte source , array , index , to
|
||||
# def self.byte_to_reg source , array , index , to
|
||||
# from = resolve_to_register from
|
||||
# to = resolve_to_register to
|
||||
# GetByte.new( source , array , index , to)
|
||||
# ByteToReg.new( source , array , index , to)
|
||||
# end
|
||||
end
|
@ -1,6 +1,6 @@
|
||||
module Register
|
||||
|
||||
# Getter is a base class for get instructions (SlotToReg and GetByte , possibly more coming)
|
||||
# Getter is a base class for get instructions (SlotToReg and ByteToReg , possibly more coming)
|
||||
#
|
||||
# The instruction that is modelled is loading data from an array into a register
|
||||
#
|
||||
|
@ -1,21 +1,21 @@
|
||||
module Register
|
||||
|
||||
# SetByte moves a byte into memory from a register.
|
||||
# RegToByte moves a byte into memory from a register.
|
||||
|
||||
# indexes are 1 based !
|
||||
|
||||
class SetByte < Setter
|
||||
class RegToByte < Setter
|
||||
|
||||
end
|
||||
|
||||
# Produce a SetByte instruction.
|
||||
# Produce a RegToByte instruction.
|
||||
# from and to are translated (from symbol to register if neccessary)
|
||||
# but index is left as is.
|
||||
# def self.set_byte source , from , to , index
|
||||
# def self.reg_to_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)
|
||||
# RegToByte.new( source, from , to , index)
|
||||
# end
|
||||
|
||||
end
|
@ -1,5 +1,5 @@
|
||||
module Register
|
||||
# Setter is a base class for set instructions (RegToSlot and SetByte , possibly more coming)
|
||||
# Setter is a base class for set instructions (RegToSlot and RegToByte , possibly more coming)
|
||||
#
|
||||
# The instruction that is modelled is loading data from a register into an array
|
||||
#
|
||||
|
Reference in New Issue
Block a user