Related articles |
---|
Memory organisation of the Z80 Turbo Pascal compiler lhp+news@toft-hp.dk (Lasse =?iso-8859-1?q?Hiller=F8e?= Petersen) (2021-09-29) |
Re: Memory organisation of the Z80 Turbo Pascal compiler DrDiettrich1@netscape.net (Hans-Peter Diettrich) (2021-09-30) |
Re: Memory organisation of the Z80 Turbo Pascal compiler lhp+news@toft-hp.dk (Lasse =?iso-8859-1?q?Hiller=F8e?= Petersen) (2021-10-02) |
Re: Memory organisation of the Z80 Turbo Pascal compiler gah4@u.washington.edu (gah4) (2021-10-02) |
Re: Memory organisation of the Z80 Turbo Pascal compiler anton@mips.complang.tuwien.ac.at (2021-10-02) |
Re: Memory organisation of the Z80 Turbo Pascal compiler DrDiettrich1@netscape.net (Hans-Peter Diettrich) (2021-10-03) |
From: | gah4 <gah4@u.washington.edu> |
Newsgroups: | comp.compilers |
Date: | Sat, 2 Oct 2021 13:08:36 -0700 (PDT) |
Organization: | Compilers Central |
References: | 21-09-014 21-10-001 21-10-002 |
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 |
In-Reply-To: | 21-10-002 |
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.
Return to the
comp.compilers page.
Search the
comp.compilers archives again.