/* 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 <stdint.h>
#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;
	}
}
