The RCA CDP1802 processor has a successor, the CDP1804/5/6 family. The members of that family implement the same instruction set, extended from the 1802, and differ only in availability of on-chip ROM and RAM. I'll refer to this extension as "the 1804".
One of the extensions are instructions for performing addition and subtraction on bytes containing packed BCD data. As I wanted to add support for these instructions to my 1802 emulator, I needed to understand exactly what they are doing.
BCD arithmetic is easy on paper (see link above), but when reviewing existing 1802 emulators, I found that no two emulators contained equivalent implementations. Also the manufacturer's documentation for the 1804 BCD instructions only describes their operations in general terms, e.g. referring to "decimal adjust" without ever