2014-10-03 11:07:18 +03:00
|
|
|
module Register
|
|
|
|
# load a constant into a register
|
|
|
|
#
|
2015-06-20 23:49:30 +03:00
|
|
|
# first argument is the register the constant is loaded into
|
2014-10-03 11:07:18 +03:00
|
|
|
# second is the actual constant
|
2015-05-31 17:54:36 +03:00
|
|
|
|
2014-10-03 11:07:18 +03:00
|
|
|
class LoadConstant < Instruction
|
|
|
|
def initialize value , constant
|
|
|
|
@value = value
|
|
|
|
@constant = constant
|
|
|
|
end
|
2015-05-31 17:54:36 +03:00
|
|
|
attr_accessor :value , :constant
|
2014-10-03 11:07:18 +03:00
|
|
|
end
|
|
|
|
end
|