Em 31/5/2011 15:27, Gordon Williams escreveu: > Using a pic16f886. > > Is there a way to determine stack depth so that it can be output for > diagnostic purposes? > > The docs say "There are no Status bits to indicate stack > overflow or stack underflow conditions." > > I just thought that I would ask as there might be a work around. > > Gordon Williams As the docs say, there is no means to access or change the stack or its pointer. Some compiler (such as Hi-Tech PICC) may give a compile-time report on estimated stack usage. This report is fairly accurate, unless you use fancy things like function-pointers. Best regards, Isaac --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .