I am using the PIC18LF4320 and the C18 compiler. I am running very close to the end of my GPR RAM and sometimes cannot fit due to RAM space issues(linker errors). Thus, I have been "trying" to learn about how the memory is allocated looking at my .map file, the linker script and the user manual and have four questions about how I might use some of what looks like unused memory. I have no external memory. The 1st 128 bytes is "access RAM"(000-07F). The next group seems to be for my use(080-0FF). Next, the linker script has allocated 256 bytes for the stack (from (100-1ff). So that I understand is off limits - right? The SFRs are using up the last 128B of RAM(F80-FFF). I hope you are following me here - it is hard without a picture of the memory map. This leads me to the following assumption/questions: 1)All of the variables I have created in code are stuck at the 128B(080-0FF) between the end of ACCESS RAM and the beginning of my STACK. If my code required more than 128 I am out of luck and must reduce my number of variables/storage right? 2) Looking at my memory map (.map) file the "stuff" in the ACCESS RAM is only using 000 - 014h - leaving a bunch of unused space in ACCESS RAM from 014h to 080h. Can I use a PRAGMA and force some of my variables to make use of this space? 3) The 1st page of the data sheet does say I have 512B of RAM available (which seems to add up if it is 000-1FF; however, I was wandering if the 128 bytes in BANK15 (F00-F7F)(the SFRs are using the upper 128B) exist and is useable? Or is that wishful thinking? 4)Is there any way to learn how much STACK I really need - maybe I could define it smaller than the default 256B, which uses up 1/2 of my available memory? Thanks for any help all, Shawn -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist