Extra Explanation portSAVE_CONTEXT() ?

stevend8 wrote on Thursday, August 26, 2010:

Hello all,
I have 2 questions, hope to hear from you.

1. Am I correct in saying that if you do: " MOVFF WREG, PREINC1"
that you save the WREG on the first not used part of the FSR? if not, how do I have to see it?

2. On the section about “/* Store the .tempdata and MATH_DATA areas as described above. */”

there are 13 times: MOVFF POSTINC0, PREINC1
……1. can’t we write the code in a way that we use portCOMPILER_MANAGED_MEMORY_SIZE so it’s more generic?
……2. I dont understand the code fully: for postinc0 : so you copy the value of fsr, then you increase, for preinc1: you increment again and save value? is it that way because of 16bit? then i understand…

thanks in advance for help!!!

davedoors wrote on Friday, August 27, 2010:

Are you talking about a PIC18?

stevend8 wrote on Sunday, August 29, 2010:

yes, sorry forgot to mention that