> Bit confusing that's for sure, but technologically 8bit PIC uses registers > only and have no RAM. It looks like a duck, it quacks like one... I certainly don't know any other CPU architecture that has indexed access to its registers! > 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. The PIC isntruction set technically a mix of 'single-accumulator' and 'memory-memory' architecture. >> 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. Why? C has clear requirements about variables, and (without recursion or reentrancy) these can equally be met by a static stack or a real stack (and by allocating all variables to unique locations - but takes takes more memory). > 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. Yes, but that is because recursion and reentrancy make sense on 18F PICs. Without recursion and reentrancy you (as user/programmer) can't tell the difference between a static stack and a real 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