3 ms·
>"How can you possibly write anything with only three registers?!" AFAIK you can even go down to 1 register, which is how stack machines work. You might even s
by gruez 8y ago
>"How can you possibly write anything with only three registers?!"
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.
- poizan42 8y agoThere 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.
- blattimwind 8y agoRPN calculators are simple stack machines.
- MaxBarraclough 8y agoA 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)#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.
- tvmalsv 8y agoI was going to say "Man, that'd be terrible to work with!" And immediately realized I'm no different than those 8088 guys in that class :) You work with what you have.