Permalink
Browse files

Added a max-cycles definition.

Probably will change this again later on, I just want it for rude debugging right now.
  • Loading branch information...
1 parent d817dfe commit f0580bfc06d8ca7784e3dad9dcdb220c68ba402d @totallymike committed Apr 11, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 vm.c
View
@@ -4,6 +4,7 @@
/* A and B equate to how far to shift
* to get that section of the current word.*/
+#define MAX_CYCLES 100000
#define A 4
#define B 10
@@ -323,6 +324,8 @@ int main(int argc, char *argv[]) {
} // End of opcodes.
if (sigint_received)
break;
+ if (cycles > MAX_CYCLES)
+ break;
}
printf("Cycles: %d\n", cycles);

0 comments on commit f0580bf

Please sign in to comment.