from Herb:
Thanks guys, I completely understand now.
well, good ... and that puts you a step ahead of the guys who write most of the official books ... let’s take another look at that screen shot posted by my distinguished colleague, Alaric ... (note: the part that he circled is OK ... but) ...
actually the operation of the Count Down Underflow Bit UN (bit 11) could more accurately be described as follows:
=================================================================
IS SET WHEN:
accumulated value wraps around to +32,767 (from -32,768) and continues counting down from there ...
specifically, the official text basically has the two values (and their signs) reversed ...
=================================================================
AND REMAINS SET UNTIL ONE OF THE FOLLOWING:
a RES instruction having the same address as the CTD instruction is enabled ... (that first part is OK) ... OR the count is equal to +32,767 and then wraps around to -32,768 when incremented with a CTU instruction ...
specifically, you cannot increment the value to be GREATER THAN +32,767 ... and if you increment the value to be EQUAL TO +32,767 then the UN bit still stays SET ...
=================================================================
notice that they came “closer” with the Instruction Set Reference Manual for the SLC500 and MicroLogix1000 ...
case in point: we're all human - and we ALL make mistakes ... even the guys who write the official books ...
side note to Alaric: which book did you get your screen shot from? ... I can’t seem to find the same copy ... this one needs to go in my collection ...