rubyx/lib/virtual/instructions/virtual_main.rb
Torsten Ruger 50da6a40f2 Move the Main instruction from register to virtual
also needs a branch in register.
This way the register level is self sufficient
(noticed while writing debugger)
2015-07-17 13:21:57 +03:00

20 lines
443 B
Ruby

module Virtual
# This starts the Virtual machine machine at the given function.
# The implementation is most likely a jump/branch , but since we have the extra layer
# we make good use of it, ie give things descriptive names (what they do, not how)
class VirtualMain < Instruction
include Positioned
def initialize method
@method = method
end
attr_reader :method
def word_length
4
end
end
end