Path: csiph.com!weretis.net!feeder6.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end From: gah4 Newsgroups: comp.compilers Subject: Re: Memory organisation of the Z80 Turbo Pascal compiler Date: Sat, 2 Oct 2021 13:08:36 -0700 (PDT) Organization: Compilers Central Lines: 27 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <21-10-003@comp.compilers> References: <21-09-014@comp.compilers> <21-10-001@comp.compilers> <21-10-002@comp.compilers> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="59668"; mail-complaints-to="abuse@iecc.com" Keywords: history, Fortran Posted-Date: 02 Oct 2021 16:20:53 EDT X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com In-Reply-To: <21-10-002@comp.compilers> Xref: csiph.com comp.compilers:2711 On Saturday, October 2, 2021 at 10:35:45 AM UTC-7, Lasse Hillerøe Petersen wrote: (snip) > (Now where did I put my Z80 CP/M emulator? :-) ) > [This isn't the same thing, but in IBM 360 Fortran, the suroutine prolog copied scalar > parameters into locals and epilog copied them out. It didn't have indirect > addressing so that let it use the same base register as for the other locals. Fortran > didn't allow recursive calls but if you used aliased arguments you could get > confusing results. -John] This comes up in comp.lang.fortran every time someone mentions that Fortran uses pass-by-reference. Fortran still allows for this calling method. (If you put slashes around the dummy argument, OS/360 uses actual pass by reference.) Also, in some cases Fortran requires a contiguous array, such that a copy is made before a subroutine call, and copy back after return, in the case of a (potentially) discontiguous array. Since PL/I has internal procedures, a procedure pointer (ENTRY variable in PL/I terms) includes a reference to the appropriate set of variables available to callers of such. (And it even allows nested internal procedures.) Getting that right slowed down the addition of pointers to internal subroutines to the Fortran standard by many years.