For reference, the Burroughs B5000 and Inmos Transputer were stacked machines. DEC PDP11 had such flexible addressing modes that it could be used as a stack machine. I think Niklaus Wirth Lilith may have been a stack machine (more than 20 years ago my mind slides :-)
They really did not have a register name / number in the instructions for finding operands, because they were on the stack.
Instructions can load instant (constant) values ββonto the stack or load / store in memory.
Thus, they were not add.w r0, r1, r5 or add.w eax, [#fe34] . It was add.w
So, an example (not entirely accurate, it was more complex) of the assembler sequence could be
loadstack 0xfe34
To compute and load a value in an array, the stack can be used because there cannot be an indexed addressing mode.
Thus, the instructions were small, and a lot of work was done implicitly with the stack and stack pointer. IIRC transporters actually had a stack of three values, and the compiler (or developers) had to ensure that this was supported.
XMOS now sells the modern "equivalent" and is used by some of the same people.
More than 20 years have passed since I wrote Transputer code, so sorry for being a bit vague.
The UCSD Pascal system used a virtual machine defined by software, which was a stacked machine. The idea was to do something that was portable for new computers, but also easy to write, easy to compile, and wise to work. This virtual machine was defined in Pascal's own dialect. When it was ported to real computers, registers will be used to store the stack pointer and probably some ingenuity in how the top of the stack was processed (using registers) to get reasonable performance.
gbulmer
source share