PDA

View Full Version : Finding variables in RAM



Charles Linquis
- 5th October 2010, 01:48
I need to pass large arrays between PBP and ASM - larger than the BANKA limit. If I define an array in PBP, what is the best way to find the start location (in RAM) of that array in ASM? I'm using an 18F8723.

Charles Linquis
- 5th October 2010, 02:26
I guess another question could be - does CH?RP work for RAM variables?

Charles Linquis
- 5th October 2010, 02:42
I ran a test. It does. Problem solved.

Darrel Taylor
- 5th October 2010, 18:15
Charles,

Since you are using an 18F. You might want to use the FSR's and the LFSR instruction to access your arrays.



LFSR FSR0, _MyArray
MOVF _Idx, W
MOVFF PLUSW0, _Destination

Charles Linquis
- 6th October 2010, 02:48
Thank you Darrel. I'll try it tomorrow.