The PIC16C5X has a stack which is only 2 deep, and,
as a result, only two nested calls can be made (i.e., only
one call within a call routine). If more than two levels of
subroutine nesting is required, this application note can
be used to implement a stack manager to handle the
flow of the calls. AN527
Software Stack Management
Author: Stan D’Souza IMPLEMENTATION
Microchip Technology Inc.
This application note implements a 5-deep stack, so
5 nested calls can be made without overowing the
stack. NCALL is dened as a MACRO which will be
INTRODUCTION used instead of the mnemonic CALL, when a
The PIC16C5X has a stack which is only 2 deep, and, subroutine call is made. ……