Path: ...!weretis.net!feeder9.news.weretis.net!panix!.POSTED.2602:f977:0:1::5!not-for-mail From: Rich Alderson <news@alderson.users.panix.com> Newsgroups: alt.folklore.computers,comp.os.linux.misc Subject: Re: The joy of FORTRAN-like languages Date: 30 Sep 2024 16:51:33 -0400 Organization: PANIX Public Access Internet and UNIX, NYC Lines: 32 Sender: alderson+news@panix5.panix.com Message-ID: <mddbk046f1m.fsf@panix5.panix.com> References: <pan$96411$d204da43$cc34bb91$1fe98651@linux.rocks> <vd8o1s$178gk$5@dont-email.me> <llr46dFmeudU2@mid.individual.net> <vd9r10$1d6gq$4@dont-email.me> <vd9rub$18mq$2@gal.iecc.com> <vd9see$1d6gq$5@dont-email.me> <AF4KO.179529$1m96.177503@fx15.iad> <vdarvh$1l4ch$6@dont-email.me> Injection-Info: reader1.panix.com; posting-host="2602:f977:0:1::5"; logging-data="2991"; mail-complaints-to="abuse@panix.com" X-Newsreader: Gnus v5.7/Emacs 22.3 Bytes: 2225 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