# vim: ts=2 sw=2 et ft=ruby
# Call with a binary number on the tape:
# $ turing.rb add_one.stm 1111010101

0. right :goto   => 1
1. cond  :if => 'B', :then => 2, :else => 0
2. left  :goto   => 3
3. cond  :if => '1', :then => 4, :else => 5
4. write :symbol => '0', :goto => 2
5. write :symbol => '1', :goto => 6
6. right :goto   => 7
7. cond  :if => 'B', :then => 8, :else => 6
8. halt
