Website Summary Files Commits Branches @commit @diff @stats
path: root / homework / 81281 / brainf***Interpreter / testPrograms / pr.b
diff options
context:
space:
mode:
1 files changed, 21 insertions, 0 deletions
-rw-r--r--homework/81281/brainf***Interpreter/testPrograms/pr.b21
diff --git a/homework/81281/brainf***Interpreter/testPrograms/pr.b b/homework/81281/brainf***Interpreter/testPrograms/pr.b
new file mode 100644
index 0000000..1dce918
--- /dev/null
+++ b/homework/81281/brainf***Interpreter/testPrograms/pr.b
@@ -0,0 +1,21 @@
+Calculate the value 256 and test if it's zero
+If the interpreter errors on overflow this is where it'll happen
+++++++++[>++++++++<-]>[<++++>-]
++<[>-<
+ Not zero so multiply by 256 again to get 65536
+ [>++++<-]>[<++++++++>-]<[>++++++++<-]
+ +>[>
+ # Print "32"
+ ++++++++++[>+++++<-]>+.-.[-]<
+ <[-]<->] <[>>
+ # Print "16"
+ +++++++[>+++++++<-]>.+++++.[-]<
+<<-]] >[>
+ # Print "8"
+ ++++++++[>+++++++<-]>.[-]<
+<-]<
+# Print " bit cells\n"
++++++++++++[>+++>+++++++++>+++++++++>+<<<<-]>-.>-.+++++++.+++++++++++.<.
+>>.++.+++++++..<-.>>-
+Clean up used cells.
+[[-]<]