Paul Koning wrote:
Actually, carry is easy. There's a simple trick I
learned on the
Alpha, but it applies anywhere.
Given UNSIGNED variables:
c = a + b;
if (c < a)
{ /* you got a carry */ }
Jerome Fine replies:
Fortunately on the PDP-11, the carry is automatic
in assembler, just "ADC" to the next word to be
included in the sum before adding the next pair of
words. Likewise for subtraction.
Multiplication and addition are a bit more complicated,
of course.
Sincerely yours,
Jerome Fine
--
If you attempted to send a reply and the original e-mail
address has been discontinued due a high volume of junk
e-mail, then the semi-permanent e-mail address can be
obtained by replacing the four characters preceding the
'at' with the four digits of the current year.