> Yeah, Microchip. I have to explain each year (in my PIC class) that what > the rest of the world calls RAM is called "general purpose file > registers" in PIC datasheets, and that is only the start... Bit confusing that's for sure, but technologically 8bit PIC uses registers only and have no RAM. For example on AVR you have to load the value of a RAM location to a register, then you can make some calculations and then have to store it back. In PIC it is not necessary as all RAM location is treated as a register therefore there is no difference in between RAM or registers and has a direct access to the whole area by every instruction. > A static stack is (except for the ban on recursion/reentrancy) > completely invisible to the user. And it takes the same amount of RAM as > a real data stack. Fair enough, I just have a bad feeling on automatic decisions which variable is like that. With C18 you can choose if the default storage is auto, static or overlay and also can choose that one by one in the source using these directives - so I have a better control over it. Still the RAM (register :-) ) location of these overlayed variables are placed automatically by the compiler - pretty much the same way as with any other compiler. Tamas On Fri, Oct 24, 2008 at 8:46 AM, Wouter van Ooijen wrote: > > As you can see in C18 it is not only me who calls this as an overlay :-) > - > > Yeah, Microchip. I have to explain each year (in my PIC class) that what > the rest of the world calls RAM is called "general purpose file > registers" in PIC datasheets, and that is only the start... > > > And no, it was not me who designed C18 :-) Anyway, I would not mind > calling > > it as static or pseudo stack but I do think that this naming is > misleading. > > Overlays were already used in the early TurboPascal compilers (and > probably long before that, guess why compilers were often written in > separate passes?), to break the 64K code limit. IIRC the programmer had > to specify which code parts overlayed, so I think the term overlay is > more commonly associated with a mechanism that it visible to and/or > managed by the programmer. > > A static stack is (except for the ban on recursion/reentrancy) > completely invisible to the user. And it takes the same amount of RAM as > a real data stack. > > -- > > Wouter van Ooijen > > -- ------------------------------------------- > Van Ooijen Technische Informatica: www.voti.nl > consultancy, development, PICmicro products > docent Hogeschool van Utrecht: www.voti.nl/hvu > > -- > http://www.piclist.com PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > -- Rudonix DoubleSaver http://www.rudonix.com -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist