From 85b5fde272be6ab543aa866baebabddc24566bdb Mon Sep 17 00:00:00 2001 From: cheapie Date: Sat, 23 May 2026 20:14:34 -0500 Subject: Add initial content --- c/bigfib/bigfib.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 c/bigfib/bigfib.c (limited to 'c/bigfib/bigfib.c') diff --git a/c/bigfib/bigfib.c b/c/bigfib/bigfib.c new file mode 100644 index 0000000..063c27e --- /dev/null +++ b/c/bigfib/bigfib.c @@ -0,0 +1,23 @@ +/* Fibonacci Sequence for RVController + * A product of Advanced Mesecons Devices, a Cheapie Systems company + * This is free and unencumbered software released into the public domain. + * See http://unlicense.org/ for more information */ + +#include +#include "rvcontroller-ecalls.h" + +uint64_t prev = 0; +uint64_t oldprev = 0; +uint64_t curr = 1; + +void main(void) { + while ((curr & 0x800000000000000) == 0 ) { + printstr("\nH "); + printint(curr/(1LL << 32)); + printstr("\nL "); + printint(curr%(1LL << 32)); + oldprev = prev; + prev = curr; + curr = prev + oldprev; + } +} -- cgit v1.2.3