Searching \ for 'multiple calls on 12c509' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: techref.massmind.org/techref/index.htm?key=multiple+calls+12c509
Search entire site for: 'multiple calls on 12c509'.

Truncated match.
PICList Thread
'multiple calls on 12c509'
1999\01\11@123949 by Kennedy, William L

flavicon
face
Has anyone dealt with the issue of calling a sub that in turn makes multiple
calls and returns and then needs to return from the sub.  Is there a way to
save the initial return address to use later on to get back?  It seems that
there is only a 2 deep stack on this chip.

THanks in advance for any suggestions.

1999\01\12@083313 by James Cameron

flavicon
face
Kennedy, William L wrote:
> Has anyone dealt with the issue of calling a sub that in turn makes
> multiple calls and returns and then needs to return from the sub.  Is
> there a way to save the initial return address to use later on to get
> back?  It seems that there is only a 2 deep stack on this chip.

Yes, the stack is only two levels deep on that chip.
Very simple macros to help alleviate this problem ...

http://www.phanderson.com/PIC/
http://www.phanderson.com/PIC/12C509/stack.html

--
James Cameron                                      (spam_OUTcameronTakeThisOuTspamstl.dec.com)

OpenVMS, Linux, Firewalls, Software Engineering, CGI, HTTP, X, C, FORTH,
COBOL, BASIC, DCL, csh, bash, ksh, sh, Electronics, Microcontrollers,
Disability Engineering, Netrek, Bicycles, Pedant, Farming, Home Control,
Remote Area Power, Greek Scholar, Tenor Vocalist, Church Sound, Husband.

"Specialisation is for insects." -- Robert Heinlein.

1999\01\13@035839 by Caisson

flavicon
face
> Van: Kennedy, William L <.....WLKennedyKILLspamspam@spam@CRT.XEROX.COM>
> Aan: PICLISTspamKILLspamMITVMA.MIT.EDU
> Onderwerp: multiple calls on 12c509
> Datum: maandag 11 januari 1999 18:29
>
> Has anyone dealt with the issue of calling a sub that in turn makes
multiple
> calls and returns and then needs to return from the sub.  Is there a way
to
> save the initial return address to use later on to get back?  It seems
that
> there is only a 2 deep stack on this chip.
>
> THanks in advance for any suggestions.

Store the "return" address (before calling) into (a) File register(s).
"Return" to this adres by loading the PCL (/ PCLATH).
Voilla ! a "pseudo" stack (1 address deep ;-)

Greetz,
 Rudy Wieser

More... (looser matching)
- Last day of these posts
- In 1999 , 2000 only
- Today
- New search...