Sujet : Re: The joy of FORTRAN-like languages
De : news (at) *nospam* alderson.users.panix.com (Rich Alderson)
Groupes : alt.folklore.computers comp.os.linux.miscDate : 30. Sep 2024, 21:51:33
Autres entêtes
Organisation : PANIX Public Access Internet and UNIX, NYC
Message-ID : <mddbk046f1m.fsf@panix5.panix.com>
References : 1 2 3 4 5 6 7 8
User-Agent : Gnus v5.7/Emacs 22.3
The Natural Philosopher <
tnp@invalid.invalid> writes:
On 29/09/2024 05:26, Charlie Gibbs wrote:
That's assuming your machine has a stack, which the IBM 360 didn't.
Well there are probably other ways to implement a stack than having it
built into a computer.
Like a having a general purpose register reserved for a stack pointer
and manually creating push pop call and return as macros
Or actual machine instruction codes, as on the PDP-6 and PDP-10:
PUSH ac,address ;any accumulator can be a stack pointer
POP ac,address
PUSHJ ac,address ;address of next instruction on stack, jump to address
POPJ ac, ;pop address from stack and jump to it
There are also subroutine call instructions which do not use a stack, instead
using either the "save return address in first instruction of subroutine" or
"save the return address in an accumulator". The former is nonreentrant; the
latter allows placing parameters inline, with address manipulation via indexing
to access and later skip over them.
Lovely machines to program.
-- Rich Alderson news@alderson.users.panix.com Audendum est, et veritas investiganda; quam etiamsi non assequamur, omnino tamen proprius, quam nunc sumus, ad eam perveniemus. --Galen