If you just need to clear all RAM (variables) then use the CLEAR command.
If you want to start over from location 0 simulating a power-up condition, and clear RAM without a hardware reset, then use;
@ clrf PCLATH
@ goto 0
And place CLEAR as the first BASIC instruction.
If you have a security check routine that needs to clear RAM when a switch changes state, use the CLEAR command on entry to the routine.
Lots of options.




Bookmarks