
called, this destination address is copied into the program counter, and the
program continues from the new address. At the same time, the return ad-
dress (the one following the CALL) is pushed onto the stack, which is a
block of memory dedicated to this purpose. In the PIC, there are 8 stack ad-
dress storage levels, which are used in turn. The return addresses may thus
be viewed as a stack of items, which must be added and removed in the same
sequence.
The subroutine is terminated with a RETURN instruction, which causes the
program to go back to the original position and continue. This is achieved by
pulling the address from the top of the stack ...