4 ms·
Indeed. Chuck Moore, the inventor, added the "A" register to his machine Forth for holding addresses and temporary values to reduce "stackrobatics".
by lebuffon 5y ago
Indeed. Chuck Moore, the inventor, added the "A" register to his machine Forth for holding addresses and temporary values to reduce "stackrobatics".
- kragen 5y agoHe explained that this was in part due to hardware considerations. I don't really understand why, although unlike stack machines, I can speculate. But then he got to like it. He also eliminated all the stack operations from machineForth except DUP, DROP, and OVER. Not even SWAP!
- protomyth 5y agoPostScript has the ability to assign values to variables.
- kragen 5y agoCan you elaborate on how this relates?
- protomyth 5y agoA more general solution than Chuck Moore's A register but solving the same problem.
- kragen 5y agoHmm, I don't think assigning values to variables in PostScript with "def" is solving the same problem or even a related problem as the A register. Instead, it solves the same problem that assigning values to variables in Forth solves. As I understand it, the A register, introduced in the MuP21, solved some problems having to do with on-die fanout, fanin, and path length that limited the performance of the Novix NC4016 and the Harris RTX 2000. It also allows you to do operations like memset and memcpy without having to fetch and store the pointers to RAM (at fixed addresses!) for every byte/word read or written, which improves performance dramatically, makes the code a lot more readable (especially with its incrementing addressing modes), and makes the code more compact. None of these are problems that exist in the PostScript world. You can't use the A register in the MuP21 or F18A as a local variable, because it isn't local; it's shared with whatever subroutines you call and whatever subroutine called you. Moreover, the A register is the only way to read and write memory, so they can't avoid overwriting it if they need to read or write memory. [I've programmed in PostScript, and I've written a little Forth, but I've never programmed any of the chips mentioned above.]