[TUHS] origin of string.h and ctype.h

Paul McJones paul at mcjones.org
Tue Aug 15 03:16:57 AEST 2017


> On Aug 14, 2017, at 9:09 AM, Paul Winalski <paul.winalski at gmail.com> wrote:
> 
>>> ...
> 
> The FORTRAN II arithmetic IF, with its three-way branch, was probably
> introduced to facilitate use of the conditional branch instructions of
> the IBM 704, which test the value of the accumulator and take a branch
> accordingly:
> 
>    TMI (transfer on minus)
>    TMP (transfer on plus)
>    TZE (transfer on zero)
>    TNZ (transfer on not zero)
> 
> It takes at most two of these instructions to implement the arithmetic IF.

And the 709 added CAS (compare accumulator with storage): it skips 0, 1, or 2 instructions depending on whether the contents of the accumulator are algebraically greater, equal, or less than the contents of the referenced memory location. (See page 49 of http://www.bitsavers.org/pdf/ibm/709/709_RefMan_Fortran.pdf.)


More information about the TUHS mailing list