Re:X86 assembly doesn’t have to be scary
by MaxBarraclough on Monday June 18, 2018 @05:22PM
(#17341802)
A one-register machine is not the equivalent of a pure stack machine.
Wikipedia has a section on accumulator machines: https://en.wikipedia.org/wiki/Accumulator_(computing)#Accumu...
Assuming Wikipedia's article on the PDP-8 is correct, the PDP-8 had just two public registers: the program counter, and the general-purpose 'accumulator' register.
There are many simple microcontroller architectures with only one register, usually called A (accumulator) or W (work register). You just need to constantly load memory to and from the register, nothing weird in that. Sometimes they will call their memory locations registers, in which case they have lots of registers - the terminology gets quite unclear when everything is on the same chip anyways.
A true stack machine does not have any registers, so that would be 0.
Re:X86 assembly doesn’t have to be scary
by blattimwind on Monday June 18, 2018 @04:33PM
(#17341481)
RPN calculators are simple stack machines.
AFAIK you can even go down to 1 register, which is how stack machines work. You might even say it’s 0 registers because it’s not something you can directly access.