Website Summary Files Commits Branches @commit @diff @stats
path: root / homework / 81281 / brainfsckInterpreter / testPrograms / pr.b
diff options
context:
space:
mode:
Commit5288b0429fcdac891be3bced8e21787bd452d44a (patch)
Author
 Dimitar Trendafilov <dimitar@coherent-labs.com>
2018-11-27 22:31:13 +0200
Committer
 Dimitar Trendafilov <dimitar@coherent-labs.com>
2018-11-27 22:31:13 +0200
Filesb2fa00659b2ba23a5750300967197c39c42299dd /homework/81281/brainfsckInterpreter/testPrograms/pr.b
IPL-5288b0429fcdac891be3bced8e21787bd452d44a.tar
IPL-5288b0429fcdac891be3bced8e21787bd452d44a.tar.gz
IPL-5288b0429fcdac891be3bced8e21787bd452d44a.zip
Parent94ea551501a130b45a795c372d49a8aede276950 (diff)
Fixed cloning the repo on Windows
1 files changed, 21 insertions, 0 deletions
-rw-r--r--homework/81281/brainfsckInterpreter/testPrograms/pr.b21
diff --git a/homework/81281/brainfsckInterpreter/testPrograms/pr.b b/homework/81281/brainfsckInterpreter/testPrograms/pr.b
new file mode 100644
index 0000000..1dce918
--- /dev/null
+++ b/homework/81281/brainfsckInterpreter/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.
+[[-]<]