Sujet : Re: The joy of FORTRAN-like languages
De : news0009 (at) *nospam* eager.cx (Bob Eager)
Groupes : alt.folklore.computers comp.os.linux.miscDate : 30. Sep 2024, 21:58:35
Autres entêtes
Message-ID : <lm0hnrFmmqaU31@mid.individual.net>
References : 1 2 3 4 5 6 7 8 9
User-Agent : Pan/0.145 (Duplicitous mercenary valetism; d7e168a git.gnome.org/pan2)
On Mon, 30 Sep 2024 16:51:33 -0400, Rich Alderson wrote:
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
Unfortunately not well known, but the ICL 2900 series has a good stack
implementation.
It has a stack frame pointer (ONB, or Local Name Base), a stack front
pointer (SF) as well as off stack bases. The accumulator is variable size
(32, 64, 128).
There are 32 address mode, including those that use the top of stack. So
ST.T stores the accumulator at top of stack, and LSS.T (also LSD.T and
LSQ.T for the larger sizes) to unstack. Most other instructions can
equally well use top of stack in the same way.
(yes, there's just one accumulator, but the stack etc. are heavily
cached).
-- Using UNIX since v6 (1975)...Use the BIG mirror service in the UK: http://www.mirrorservice.org