summaryrefslogtreecommitdiff
path: root/c/bfhello/bfhello.c
diff options
context:
space:
mode:
authorcheapie <no-email-for-you@example.com>2026-05-23 20:14:34 -0500
committercheapie <no-email-for-you@example.com>2026-05-23 20:14:34 -0500
commit85b5fde272be6ab543aa866baebabddc24566bdb (patch)
treeb4f2e3bb634effe51c2bdc5585ca4ea8b98d6dfa /c/bfhello/bfhello.c
downloadrvcontroller-85b5fde272be6ab543aa866baebabddc24566bdb.tar
rvcontroller-85b5fde272be6ab543aa866baebabddc24566bdb.tar.gz
rvcontroller-85b5fde272be6ab543aa866baebabddc24566bdb.tar.bz2
rvcontroller-85b5fde272be6ab543aa866baebabddc24566bdb.tar.xz
rvcontroller-85b5fde272be6ab543aa866baebabddc24566bdb.zip
Add initial content
Diffstat (limited to 'c/bfhello/bfhello.c')
-rw-r--r--c/bfhello/bfhello.c91
1 files changed, 91 insertions, 0 deletions
diff --git a/c/bfhello/bfhello.c b/c/bfhello/bfhello.c
new file mode 100644
index 0000000..95d2209
--- /dev/null
+++ b/c/bfhello/bfhello.c
@@ -0,0 +1,91 @@
+/* This is a translation of bfhello.b, generated by bftoc.py (by Paul Kaefer)
+ * It was generated on Sunday, May 17, 2026 at 12:17AM
+ */
+
+#include "rvcontroller-ecalls.h"
+
+void main(void)
+{
+ int size = 1000;
+ int tape[size];
+ int i = 0;
+
+ /* Clearing the tape (array) */
+ for (i=0; i<size; i++)
+ tape[i] = 0;
+
+ int ptr = 0;
+
+ tape[ptr] += 8;
+ while (tape[ptr] != 0)
+ {
+ ptr += 1;
+ tape[ptr] += 9;
+ ptr -= 1;
+ tape[ptr] -= 1;
+ }
+ ptr += 1;
+ printchar(tape[ptr]);
+ tape[ptr] += 29;
+ printchar(tape[ptr]);
+ tape[ptr] += 7;
+ printchar(tape[ptr]);
+ printchar(tape[ptr]);
+ tape[ptr] += 3;
+ printchar(tape[ptr]);
+ ptr += 1;
+ tape[ptr] += 4;
+ while (tape[ptr] != 0)
+ {
+ ptr += 1;
+ tape[ptr] += 8;
+ ptr -= 1;
+ tape[ptr] -= 1;
+ }
+ ptr += 1;
+ printchar(tape[ptr]);
+ ptr += 1;
+ tape[ptr] += 5;
+ while (tape[ptr] != 0)
+ {
+ ptr -= 1;
+ tape[ptr] += 11;
+ ptr += 1;
+ tape[ptr] -= 1;
+ }
+ ptr -= 1;
+ printchar(tape[ptr]);
+ ptr += 1;
+ tape[ptr] += 4;
+ while (tape[ptr] != 0)
+ {
+ ptr -= 1;
+ tape[ptr] += 6;
+ ptr += 1;
+ tape[ptr] -= 1;
+ }
+ ptr -= 1;
+ printchar(tape[ptr]);
+ tape[ptr] += 3;
+ printchar(tape[ptr]);
+ tape[ptr] -= 6;
+ printchar(tape[ptr]);
+ tape[ptr] -= 8;
+ printchar(tape[ptr]);
+ ptr += 1;
+ tape[ptr] += 3;
+ while (tape[ptr] != 0)
+ {
+ ptr += 1;
+ tape[ptr] += 11;
+ ptr -= 1;
+ tape[ptr] -= 1;
+ }
+ ptr += 1;
+ printchar(tape[ptr]);
+ ptr += 1;
+ tape[ptr] += 10;
+ printchar(tape[ptr]);
+ return;
+}
+