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