Ted Harding writes:
Well, I suppose it's swings and roundabouts again. Nothing stops you programming arbitrary-precision arithmetic in binary throughout -- indeed it's probably simpler that way. [...] However, when it comes to presenting the decimal output to the user, it gets more complicated.
I guess this is the point I was missing; essentially you work in integers either way (and keep track of where the decimal point should be seperately). But when it comes to handling the integers, BCD is best if you have a simple (low intelligence) display to drive.
I'm guessing that 'bc' uses integers throught, for example, but not BCD - but whilst I've had occassional cause to use bc I've never looked at its code.
But I'd first learned the chip on the Sinclair ZX-81, actually disassembling the ROM by hand with pencil and paper (and the Z80 ref manual to hand).
I'm probably showing my (lack of) age here, but the ZX81 was my first exposure to computing (£79.99 mail order, as I recall, and we had to wait ages for it). I was probably around 11 at the time. I didn't start playing with Z80 assembly until the Spectrum, by which time I was using it to write code which I transfered via serial cable to a prom blower to program EPROMs for a bizzare clock-radio-cum-timing-device which I designed and programmed for my O-Level Computing course - great fun, as the teacher hadn't a clue what I was doing. I'm sure I passed tha course by default because the examiner hadn't a clue either :-)
I never disassembled the ZX-81/Spectrum ROMs, but I did get the Spectrum ROM dissassembly book from the library (the village library only had about 5 computing books to choose from), and I enjoyed reading it.
Funnily enough, I never had many friends at that age.