2 ms·
The bit that is probably most striking to modern eyes is the data representation. With 320 instructions there's simply no room for the "obvious" code to transl
by ajross 13y ago
The bit that is probably most striking to modern eyes is the data representation. With 320 instructions there's simply no room for the "obvious" code to translate to and from a display representation. So everything was stored in BCD and operated on one (decimal!) digit at a time using a 4-bit ALU.
- alayne 13y agoI was under the impression that BCD was commonly used in calculators. I know that my HP 48 used BCD and was able to address 4 bit nibbles.
- kens 13y agoYou're right that BCD is very common for calculators. BCD was also commonly used in microcomputers, since you save all the binary-to-ASCII code for I/O. This is why x86 has a bunch of BCD instructions like AAA (ASCII adjust after addition), which was important enough to be a single-byte opcode. The 6502 is notable for its highly-efficient and patented (https://www.google.com/patents/US3991307 https://www.google.com/patents/US3991307) decimal arithmetic mode. I'll write up its interesting circuits sometime. One consequence of the patent is the processor in the NES video game is a 6502 clone that lacks decimal mode.
- Scaevolus 13y agoI had thought the 2A03 didn't have BCD to save silicon-- but apparently they just crudely disabled it by removing 5 transistors[1]! Would Ricoh's second-source 6502 license have been more expensive if they included BCD? [1] http://www.visual6502.org/wiki/index.php?title=6502DecimalMode#Decimal_mode_and_the_NES.27_RP2A03G http://www.visual6502.org/wiki/index.php?title=6502DecimalMo...