From 93ff44bb6f96bf13bcae52e9d322e4a3b35c0709 Mon Sep 17 00:00:00 2001 From: Torsten Ruger Date: Tue, 10 Nov 2015 19:28:31 +0200 Subject: [PATCH] improve reinit of interpreter --- ToDo.md | 9 --------- lib/interpreter/interpreter.rb | 2 +- 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/ToDo.md b/ToDo.md index 330dc31b..4cc8aa76 100644 --- a/ToDo.md +++ b/ToDo.md @@ -3,14 +3,10 @@ ToDo Some things that would be nice . . (if you did them :-) ) -- starting to think that a simulator at the register machine level would help with testing - and debugging - Better elf support. I think it should be relatively easy to produce an executable binary (so linking could be skipped). Off course the possibility to link in another library would be nice - utf8 support (string improvements generally) - SOF parser -- more ruby grammar niceties. At the moment i am keeping it simple, so if there is a way around it - i won't implement it. Multi-assignments, all that chique where newline is used as statement demarcation Or the list of things i am not even planning of tackling at the moment @@ -26,8 +22,6 @@ someone with funding. I hope to get the multi-machine architecture done at some point as i also want to port to Arduino -Also i am starting to think an (register machine) interpreter would be a good idea for debugging. - Compliance ---------- @@ -45,6 +39,3 @@ Very nice solutions exist for most of the important things. Like celluloid for c good performance io with or without zero-mq. Fiddle looks nice admittedly. Anyway, as i want to use gpio mostly the whole c wrapping is not too high on the list. - -My first approach would be to monkey patch any gems where they dip into things we don't have. -Or copy/port them to a smaller version. diff --git a/lib/interpreter/interpreter.rb b/lib/interpreter/interpreter.rb index d69331dd..cfd05c02 100644 --- a/lib/interpreter/interpreter.rb +++ b/lib/interpreter/interpreter.rb @@ -29,7 +29,7 @@ module Interpreter end def start instruction - @clock = 0 + initialize set_state(:running) set_instruction instruction end