From 2842c903e19655beab7f5fcedeb59456e4e3f6c2 Mon Sep 17 00:00:00 2001 From: Torsten Ruger Date: Thu, 22 Oct 2015 14:42:23 +0300 Subject: [PATCH] fix integers and clock reset --- lib/interpreter/interpreter.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/interpreter/interpreter.rb b/lib/interpreter/interpreter.rb index bd32d8ed..a70a87cb 100644 --- a/lib/interpreter/interpreter.rb +++ b/lib/interpreter/interpreter.rb @@ -31,6 +31,7 @@ module Interpreter end def start bl + @clock = 0 set_state(:running) set_block bl end @@ -100,7 +101,8 @@ module Interpreter def object_for reg id = get_register(reg) - Virtual.machine.objects[id] + object = Virtual.machine.objects[id] + object.nil? ? id : object end # Instruction interpretation starts here