diff --git a/app/main/controllers/main_controller.rb b/app/main/controllers/main_controller.rb index 7c67267..edb0b96 100644 --- a/app/main/controllers/main_controller.rb +++ b/app/main/controllers/main_controller.rb @@ -7,6 +7,7 @@ module Main def index init_machine init_classes + init_registers end def about @@ -22,6 +23,14 @@ module Main @interpreter = Interpreter.new @interpreter.start machine.init end + def init_registers + page._registers!.clear + @interpreter.registers.each do |reg , val| + r = Volt::Model.new :name => reg + r._value = val + page._registers << r + end + end def init_classes page._classes!.clear Virtual.machine.space.classes.each do |name , claz| diff --git a/app/main/views/main/index.html b/app/main/views/main/index.html index 7831a13..9ee3683 100644 --- a/app/main/views/main/index.html +++ b/app/main/views/main/index.html @@ -50,7 +50,14 @@