Re: The C Stack in interpreters - why?

Gene Wirchenko <gene@abhost.us>
15 May 2005 16:12:22 -0400

          From comp.compilers

Related articles
[5 earlier articles]
Re: The C Stack in interpreters - why? anton@mips.complang.tuwien.ac.at (2005-05-14)
Re: The C Stack in interpreters - why? haberg@math.su.se (2005-05-14)
Re: The C Stack in interpreters - why? nmm1@cus.cam.ac.uk (2005-05-14)
Re: The C Stack in interpreters - why? Marko.Makela@HUT.FI (Marko =?ISO-8859-1?Q?M=E4kel=E4?=) (2005-05-14)
Re: The C Stack in interpreters - why? marcov@stack.nl (Marco van de Voort) (2005-05-14)
Re: The C Stack in interpreters - why? gah@ugcs.caltech.edu (glen herrmannsfeldt) (2005-05-15)
Re: The C Stack in interpreters - why? gene@abhost.us (Gene Wirchenko) (2005-05-15)
Re: The C Stack in interpreters - why? nmm1@cus.cam.ac.uk (2005-05-15)
Re: The C Stack in interpreters - why? gneuner2@comcast.net (George Neuner) (2005-05-16)
Re: The C Stack in interpreters - why? nmm1@cus.cam.ac.uk (2005-05-16)
Re: The C Stack in interpreters - why? scooter.phd@gmail.com (scooter.phd@gmail.com) (2005-05-18)
| List of all articles for this month |
From: Gene Wirchenko <gene@abhost.us>
Newsgroups: comp.compilers
Date: 15 May 2005 16:12:22 -0400
Organization: Compilers Central
References: 05-05-072 05-05-073 05-05-084 05-05-100
Keywords: architecture
Posted-Date: 15 May 2005 16:12:22 EDT

Marko Mäkelä <Marko.Makela@HUT.FI> wrote:


>John> Are there really systems with a hardware stack that C doesn't use?
>John> I've never seen one.
>
>The 6502 has only 256 bytes of stack. The CC65 compiler
>(http://www.cc65.org/) uses a separate parameter stack in order to
>save the precious hardware stack space for return addresses. The
>compiler also has to emulate 16-bit registers using zero page memory
>locations.
>
>Now you have seen one. :-)


          Life is complete. I can die now. Thank you.


>[Oh, right. How 'bout if I say I never saw a C compiler pass up the
>opportunity to use a usable hardware stack. -John]
                                            ^^^^^^
          Please, please. You should use the correct terminology. Let me
reword that for you:
                    The 6502 does not have a *real*[1] stack.


[1] Not to be confused with floating-point, especially by FORTRAN
programmers.


Sincerely,


Gene Wirchenko


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.