Correct me if I'm wrong, but the number of digits/pixels in the display is also hardcoded?
Or if it's about accessing a custom length textfile etc for displaying, maybe this video by Ben Heck could get you going?
[url]http://www.element14.com/community/docs/DOC-49215/l/episode-49-see-ben-hecks-pocket-computer-episode
[/url]
I don't know if these are doing something nasty, but for me they work at least (and I'm only creating them once anyway):
Code:
#include <WProgram.h>
/*
//Increase HEAP size, if wanted:
#define CHANGE_HEAP_SIZE(size) __asm__ volatile ("\t.globl _min_heap_size\n\t.equ _min_heap_size, " #size "\n")
CHANGE_HEAP_SIZE(65536);
extern __attribute__((section("linker_defined"))) char _heap;
extern __attribute__((section("linker_defined"))) char _min_heap_size;
*/
void* operator new(size_t const n)
{
void* m = malloc(n);
return m;
}
void* operator new[] (size_t const n)
{
void* m = malloc(n);
return m;
}
void operator delete(void* const m)
{
free(m);
}
void operator delete [](void* const m)
{
free(m);
}