I have the following at the top of my code to initialise a 65 byte array to 0:
<code>
for x = 0 to 64
ch[x] = 0
next
</code>
This initialises my array to all 0 values. Problem is that any PauseUS I use after this have an overhead of 16uS, so a PauseUs 8 becomes 24uS.
If I comment out the For...Next loop then the time penalty goes, although I get crap in the array. I assume I must be crossing a code boundary or some such thing and this causes the extra overhead when bank switching occurs.
Any one have any idea ?? I don't really need my PauseUS to be accurate for this, but I am interested how a simple change could cause so much of a latency in another statement.
Any tips on optimisation ??
Using PBP2.47
Thanks,
Bill.
Bookmarks