Path: utzoo!mnetor!uunet!husc6!bbn!rochester!udel!burdvax!sdcrdcf!ism780c!news From: news@ism780c.UUCP (News system) Newsgroups: comp.arch Subject: Re: FORTRAN Horror Message-ID: <9545@ism780c.UUCP> Date: 25 Mar 88 02:03:02 GMT References: <24861@yale-celray.yale.UUCP> <1135@pembina.UUCP> <25461@yale-celray.yale.UUCP> <793@houxs.UUCP> Reply-To: marv@ism780.UUCP (Marvin Rubenstein) Organization: Interactive Systems Corp., Santa Monica CA Lines: 44 In article <793@houxs.UUCP> beyer@houxs.UUCP (J.BEYER) writes: > > >The funny thing is that the CAS (Compare Accumulator with Storage) instruction >was not used by the FORTRAN compiler for some reason. They used TZE and TPL >or something like that. There were both positive and negative zeros because >it was a sign-magnitude machine. Maybe this was in floating point as well >(it's been a long time since I used a 704). > Actually the *compiler* did use CAS. But the programs it generated didn't use CAS :-). The reason that CAS was not generated is that FORTRAN (and FORTRAN II) did not have any compare operators. The only IF statement was the arithmetic if whose form is: IF ( ) ,, So in general there were no operands that could be compared. And yes, there were two forms for a floating zero. Also +0.0 was greater than -0.0 when compared with CAS. But fortunately, the difference between +0.0 and -0.0 did produce zero when tested with TZE (transfer on zero). One could speculate that the pecular behavior of CAS when comparing zeros is the reason that the comparsion operators and the logical-if were not in the original FORTRAN. But I personally suspect the reason is more mundane, no one thought of it. I last used a 704 in 1958, but I am producing this note based on the 704 reference manual that I have in front of me is I type. An intresting feature of the 704 and its sucessors (709, 7090, 7094, 7044) was that the accumulator was 2 bits wider than a word. Thus one could produce 4 overflows before any information was lost. There were some other interesting statements in the original FORTRAN that reflects the 704 archetecture. IF OVERFLOW tested (and reset) the sticky overflow indicator IF SENSE SWITCH tested operator controled switches SENSE LIGHT ON|OFF turned on (or off) lights on the operators console IF SENSE LIGHT tested the state of a sense light Marv Rubinstein -- Computer architecture historian