News for hackers. Stuff that matters.
Re:X86 assembly doesn’t have to be scary by gruez on Monday June 18, 2018 @03:19PM (#17340913)
>"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.

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.

Re:X86 assembly doesn’t have to be scary by poizan42 on Monday June 18, 2018 @03:40PM (#17341066)
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.
Re:X86 assembly doesn’t have to be scary by tvmalsv on Monday June 18, 2018 @11:39PM (#17343638)
I 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.