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 def index
init_machine init_machine
init_classes init_classes
init_registers
end end
def about def about
@ -22,6 +23,14 @@ module Main
@interpreter = Interpreter.new @interpreter = Interpreter.new
@interpreter.start machine.init @interpreter.start machine.init
end 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 def init_classes
page._classes!.clear page._classes!.clear
Virtual.machine.space.classes.each do |name , claz| Virtual.machine.space.classes.each do |name , claz|

View File

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