> >Could you please explain a little this feature and its workaround? >Is it about arrays or about having too many global variables? > >....for us who are trying to decide what C compiler to buy. > >Thanks > >Carlos V. Gutierrez Fragosa - Hermosillo, Mexico >carlosg@sca.com.mx http://www.sca.com.mx Here goes, Carlos: The 16C505, for instance, has 72 RAM locations. The CCS compiler, without any workarounds, only recognizes 24 RAM locations because of a limitiation they use in the number of bits of address space for this RAM. So if you declare more than 24 bytes of RAM, you get an "OUT OF RAM" error. The workaround is like this: #BYTE x 0x30 // declares an integer variable X at the first RAM location in bank #2 of RAM or LONG Y; #BYTE y = 0x31 // declares a long integer Y at the second and third ram location in BANK #2 of RAM. For ram in Bank 0, the compiler keeps track of whether you have used a variable, whether it is a temporary variable that can be used by another funciton, or whther it is a global variable, etc. For Ram in Bank 1+ YOU must keep track of this information, the compiler will happily walk on your variables if you tell it to. Just like the old days with assembler. Likewise, the RETLW instruciton does not work in the CCS compiler for table lookups. THe workaround is to use the more standard C syntax: BYTE CONST TABLE [16] = { 0,2,1,3,4,5,4,5,3,6,7,3,4,5,4,3} x = table[5]; // looks up constant data number 5 This code generates the RETLW instruction in the assembled version, and RETLW works fine if the compiler generates it, just not if YOU type it. Other than these problems I've been able to work pretty smoothly with CCS. So far, I am voting for sticking with the CCS compiler. Last week I was really hacked off at it, and would have chucked it out the window. I do this with my cars, scopes, meters, computers, etc.etc. on a regular basis. (get mad, I mean, not chuck them out the window.) So far I'd say the CCS compiler is worth the money, thier tech support is adequate but not excellent, thier compiler works adequately but not excellently, and you get what you pay for. Realizing I paid the minimum price for this software, it is meeting my minimum expectations. If you can't afford a better package, it will meet your needs. If I can ever scrape up $600 or $700 I'll try out the other guys.