From mboxrd@z Thu Jan 1 00:00:00 1970 From: paul.winalski@gmail.com (Paul Winalski) Date: Mon, 14 Aug 2017 12:09:54 -0400 Subject: [TUHS] origin of string.h and ctype.h In-Reply-To: <2ECAA475-891E-45D0-A354-B0B17284C138@mcjones.org> References: <2ECAA475-891E-45D0-A354-B0B17284C138@mcjones.org> Message-ID: On 8/13/17, Paul McJones wrote: > On Sun, 13 Aug 2017, Dave Horsfall wrote: > >> On Sat, 12 Aug 2017, Steve Johnson wrote: >> >>> A little Googling shows that the IF I mentioned was called the >>> "arithmetic IF". >> >> Ah yes. It was in FORTRAN II, as I recall. 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. -Paul W. > > It turns out the original FORTRAN (manual published in October 1956; code > first shipped around April 1957) included the arithmetic IF as well as the > assigned and computed GOTO statements — see chapter 4 of this manual: > > J.W. Backus, R.J. Beeber, S. Best, R. Goldberg, H.L. Herrick, R.A. Hughes, > L.B. Mitchell, R.A. Nelson, R. Nutt, D. Sayre, P.B. Sheridan, H. Stern, I. > Ziller. The FORTRAN Automatic Coding System for the IBM 704 EDPM : > Programmer's Reference Manual. Applied Science Division and Programming > Research Department, International Business Machines Corporation, October > 15, 1956, 51 pages. > http://www.bitsavers.org/pdf/ibm/704/704_FortranProgRefMan_Oct56.pdf > > (For more on the original FORTRAN compiler, see > http://www.softwarepreservation.org/projects/FORTRAN/.)