Searching \ for 'Software Stack Return on Long Call' 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=software+stack+return
Search entire site for: 'Software Stack Return on Long Call'.

Truncated match.
PICList Thread
'Software Stack Return on Long Call'
1999\01\06@234906 by Eric Seeley

flavicon
face
I am looking for advice on implementing a software stack (say 5 deep) on
a 12C509, similar to that in App. Note 527.  My problem is that the
Nreturn subroutine always returns to the first half of the page because
the movwf PCL command clears PC<8>.

Does anyone know a way to modify the routine so that I can call a
subroutine (I am also using Long Calls as in AN 581) and "return" to the
"bottom" half of a page?

Thanks in advance.

Eric Seeley

1999\01\10@221212 by James Cameron

flavicon
face
Eric Seeley wrote:
> Does anyone know a way to modify the routine so that I can call a
> subroutine (I am also using Long Calls as in AN 581) and "return" to
> the "bottom" half of a page?

You mean the top half.  The half with higher value of PC<8>.  ;-)

The only way I know how to do it is with a vector.  Messy.  Have the
macro save the current "$", add a "goto" to a place in bottom half
(PC<8> = 0) of program memory, encode a long call there, and then a goto
to return to the current code address.

The limits on 12C509 with respect to GOTO and CALL and number of file
registers have already pushed me to a data stack architecture for almost
all file register usage ... I may go to a manual return stack as well,
and build a sort of token interpreter.  Needs more thinking.

I wonder why I am trying to cram so much into a 12C509 when I should go
buy something with more ROM and same number of legs?  ;-)

--
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.

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