3 ms·
i wish the little CPUs weren't so impoverished.
by joshu 8y ago
i wish the little CPUs weren't so impoverished.
- cjbprime 8y agoOne (general-purpose) register! I guess we should think of it as a distributed systems simulator, not a CPU simulator.
- fpgaminer 8y agoThe 6502 only had one (general-purpose) register and it did just fine.
- cjbprime 8y agoNo, it looks like 6502 has at least accumulator/X/Y/SP. Exapunks only has one of those four, and no main memory.
- fpgaminer 8y agoYou said general purpose, which X, Y, and SP most certainly are not. You can't do much math ops with X and Y; SP is even more restricted. If we're being more generous then EXP clearly wins over the 6502 because it has two registers that can be used interchangeably. T's only failing is its propensity for being overwritten by TEST. EXAs also have attached memory in the form of a file. Accessing that memory takes a "few" more cycles than it takes the 6502 to access the zero page. But it's there none the less.
- boomlinde 8y ago> You said general purpose, which X, Y, and SP most certainly are not. You can't do much math ops with X and Y; SP is even more restricted. In that sense I wouldn't say that the accumulator in 6502 is a general purpose register in the first place, since it's just as useless for addressing as the X and Y registers are for arithmetic and logic operations. Each register in the 6502 has a distinct (but often overlapping) set of available operations, and that you can do arithmetic with one of them doesn't mean that it's a general purpose register.
- Dylan16807 8y agoYou can almost treat the 6502 as if it had 256 registers. Imagine a 6502 with no memory.
- makapuf 8y agoSome of the lower attiny micro like attiny13 have only 32 registers and no ram !
- self 8y agoYou can often treat the T register as a general purpose register. One trick when it comes to loops is that TJMP is true if T holds any value other than 0.
- LanceH 8y agoI was baffled at some of the impressive times people had until I realized that T was a full register and not just a bit.
- babuskov 8y ago> One (general-purpose) register! I'm currently making a hacking puzzle game prototype where you need to manipulate bits of memory to trick CPU into doing the things you want. Having a single register makes it much easier to design puzzles and also solving them. It also makes the gameplay more straightforward.