Sujet : Re: The joy of FORTRAN-like languages
De : tnp (at) *nospam* invalid.invalid (The Natural Philosopher)
Groupes : alt.folklore.computers comp.os.linux.miscDate : 30. Sep 2024, 13:17:23
Autres entêtes
Organisation : A little, after lunch
Message-ID : <vde4sj$268qv$25@dont-email.me>
References : 1 2 3 4 5 6 7 8 9
User-Agent : Mozilla Thunderbird
On 30/09/2024 06:46, Charlie Gibbs wrote:
On 2024-09-29, Lawrence D'Oliveiro <ldo@nz.invalid> wrote:
On Sun, 29 Sep 2024 04:26:08 GMT, Charlie Gibbs wrote:
>
That's assuming your machine has a stack, which the IBM 360 didn't.
>
Presumably there was a software-defined stack in the ABI. Otherwise how
would a language like PL/I handle recursion?
The subroutine calling convention required the calling program
to pass a pointer to a register save area. A recursive routine
would have to allocate a save area in each instance (and, of
course, free it before exiting). If they wanted local variables,
they'd have to allocate and free them as well.
Exactly . At the end of the day., someone looked at how code was developing and said 'y'know, all this would be a piece of piss if we invented a STACK'
No need to explicitly allocate and free memory.
I think it was ALGOL that first used a stack for all that - not sure.
-- "Fanaticism consists in redoubling your effort when you have forgotten your aim." George Santayana