FORTRAN 77 on PDP-11
Jerome H. Fine
jhfinexgs2 at compsys.to
Thu Jul 28 18:22:07 CDT 2005
>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.
More information about the cctalk
mailing list