Re: Recursion and Code Generation on the Cybers and other stackless machines

dmoisan@shore.net (David Moisan)
4 Jul 1996 15:31:36 -0400

          From comp.compilers

Related articles
Re: Java virtual machine as target language for C/C++ kik@zia.cray.com (1996-05-08)
Re: Optimization of Uncommon Code (Was Java ByteCode ...) wws@renaissance.cray.com (Walter Spector) (1996-07-01)
Re: Optimization of Uncommon Code dwight@pentasoft.com (Dwight VandenBerghe) (1996-07-02)
Re: Optimization of Uncommon Code leichter@smarts.com (Jerry Leichter) (1996-07-03)
Re: Recursion and Code Generation on the Cybers and other stackless ma dmoisan@shore.net (1996-07-04)
| List of all articles for this month |

From: dmoisan@shore.net (David Moisan)
Newsgroups: comp.compilers
Date: 4 Jul 1996 15:31:36 -0400
Organization: DM Productions
References: 96-05-061 96-07-021 96-07-031 96-07-034
Keywords: code, history

Jerry Leichter <leichter@smarts.com> wrote:


>Dwight VandenBerghe commented on the wide use of the 360 (and of
>more-or-less 360 clones) back in the days when FORTRAN (and COBOL) were
>kings.


>The procedure call on the 6600 saved the return address *at a fixed location
>in memory*. More precisely, the address you specified was of the word
>*before* the first instruction of the procedure. The hardware saved the


The Cyber 170 machines--which are probably still running somewhere, used
this method, and this machine I was using in the mid '80's, so it's not as
historical as one would think.


>return address there, then jumped to the next instruction. (Even more
>precisely, what it saved in that word was a jump instruction back to the
>caller! A procedure exited by jumping to its entry point.)


And if you screwed up and tried to enter the routine without an RJ
(return-jump), you found out real fast as the first word being jumped to for
the return would be all zeros and thus cause an illegal-instruction trap.


>There was, of course, no hardware stack. Creating and using one for data
>would be very easy. Pushing the return address - well, the return
>*instruction* - on the stack would cost you three instructions. You'd
>presumably return by simply jumping into the stack. Not too bad - but not


The CDC Pascal compiler did this, as did the Tiny Pascal compiler I wrote
for my senior project.


>done by any of the standard compilers, and certainly not by either of CDC's
>FORTRAN compilers. Recursion was unknown in the FORTRAN world - and the
>COBOL world. Add those together and you have almost all the American
>programming community through the '60's.


Looking at FORTRAN and the Cyber, it's not hard for me to imagine how the
architecture formed. When I was FORTRAN coding as an undergrad (albeit a
different generation than most of you here) and learning COMPASS (the Cyber
assembly language) on my own, I'd swear I could imagine the assembly
instructions ("...SA1 X1*x2....SB0 37...RJ =CPM...") forming as I wrote my
code.


Keeping this on topic (with apologies to the moderator), other than the
recursion limitations, how did you find the Cyber machines for code
generation? Myself, I miss the Cybers. Quirky, but the code was orthogonal
and very easy to write; only the PDP-11 was close IMHO. (I'm trying to
imagine our moderator coding on a PDP-8, being an owner of one myself. I
can't.)


Too bad most of my old printouts are in boxes, or I'd look over my
Pascal compiler and explain more about how I did it, or attempted to.


Sorry for rambling, but I loved the CDC machines...


Dave


| David Moisan, N1KGH Email: dmoisan@shore.net |
| WWW: http://www.shore.net/~dmoisan n1kgh@amsat.org |
| Invisible Disabilities Page: |
| http://www.shore.net/~dmoisan/invisible_disability.html |
--


Post a followup to this message

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