Hi Daniel,
We have some very fast interrupt code (high speed/load input capture compare) and 128bit encryption which all use the first page.
If this makes a big difference, I can certainly try moving one of the 64byte buffers out of zero page and replace that with a heap of 8bit / 16bit varibles. (I ran out of RAM yesterday and noticed I had 64 bytes free in zero page, so i just dumped a 64 byte buffer in there). Should I do this?
Regarding passing of arguments, its much nicer in C than assembly, I have my code mostly setup to use a couple of structures which contain various logical states of operation and driver information, so the functions just point to that structure or pass pointers to other varibles. Its certainly far easy to read and work on this C code than assembly, the code only took a week to write, but several weeks in assembly!
Having a quick read through some of the assembly, its quite clear that some functions do not compile to well, I am thinking I might rewrite some of the string functions as they take up excessive space (mostly due to allowing for return results I will never use).
Is there some documentation on 'writing effectient C code'? I can spend a few trying various option to learn what works and doesnt by trial and error, but, Im always trying to find the quickest way out!