OK, here it is. A is the accumulator, b is the argument (an unsigned 8-bit
quantity). V, D, and C are booleans which represent the state of the
corresponding flags. NZ is a byte which holds the state of the N and Z
flags. The N flag is set if (NZ & 0x80) is true, and the Z flag is set
if (NZ == 0) is true. w is a 16-bit unsigned scratch location.
These instructions were tested by running a PRODOS program which combined
each of the 256 possible accumulator values with the 256 argument values.
The 64K combinations were output as a 128K file containing a one-byte result
and one byte of flags. The program was edited to produce 8 different
versions: (initial C set/clear)x(initial D set/clear)x(ADC/SBC). The
program versions were run on a Laser 128/EX and on an emulator, and the
results compared. (All of this was done about 20 years ago.)