registers back (non updating)

This commit is contained in:
Torsten Ruger 2015-07-29 21:05:02 +03:00
parent 9383f0d75e
commit a2f3daa828
2 changed files with 19 additions and 3 deletions

View File

@ -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|

View File

@ -50,7 +50,14 @@
</div>
<div class="registers-view">
registers.each do |r , oid|
RegisterView interpreter: interpreter , register: r
end
{{ page._registers.each do |reg| }}
<div class="register-view">
<div>
{{ reg._name }}
</div>
<div>
{{ reg._value }}
</div>
</div>
{{end}}
</div>