Hey, I am using the HiTech compiler, since I know this might be compiler dependent. I was hoping for some advice/corrections on dynamically allocating memory. My understanding is this: 1. The device has X bytes of memory. 2. I can assign the address of memory I wish to use to a pointer, and work from there. 3. I need to somehow make sure I don't use memory which is already assigned by the compiler. 4. I _assume_ the compiler will use the lower memory ranges, so if I know how much memory the compiler has assigned, I can use any other above that address? I can determine this from the following output: Memory Summary: Program space used 8DEh ( 2270) of 8000h bytes ( 6.9%) Data space used A9h ( 169) of 600h bytes ( 11.0%) EEPROM space used 0h ( 0) of 100h bytes ( 0.0%) External data memory None available ID Location space used 0h ( 0) of 8h nibbles ( 0.0%) Configuration bits used 7h ( 7) of 7h words (100.0%) >From here I figured, I can choose an address range based on the following data: 1. I have a PIC 18F2520. 2. It has 1536 bytes of SRAM (600h), as seen in row 2 of the summary above. 3. The compiler assigned 169 bytes (A9h) of memory. Then chosen as follows: Any addresses above A9, and to accommodate future changes, use any above 200, and carefully monitor my compiles? Alternatively. I had a quick glance over the compiler's manual, and noticed memory areas called "psects", which can be user defined with #pragma psect, but I don't see how I can use this for the described purpose. Any/all advice would be appreciated. Quintin Beukes -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist