Due to time limitation, what is the fastest way to clear an array without using "For ...next" loop?
Any idea?
Due to time limitation, what is the fastest way to clear an array without using "For ...next" loop?
Any idea?
Originally Posted by Pic2008
But then, that clears everything.Code:CLEAR
The fastest way really depends on the PIC, and the array size.
Using FSR's will always be fastest.
But this one's really easy with PBP 2.60 (fast too).
Code:ArraySize CON 64 MyArray VAR BYTE[ArraySize] ARRAYWRITE MyArray,[REP 0\ArraySize]
Last edited by Darrel Taylor; - 20th March 2010 at 04:39.
DT
"Clear" means clear all variables in the RAM, or does it clear the register to the default state also eg TRISA, PORTB etc?
Bookmarks