Re: Beginning programming question



Joseph Gwinn wrote:
In article <ge-dnfzf47tEZenQnZ2dnUVZ5jCdnZ2d@xxxxxxxxxxxx>,
"Gary A. Gorgen" <tunxis@xxxxxxxxxxx> wrote:

Joseph Gwinn wrote:
In article <E7SdndgjpZp5c-7QnZ2dnUVZ5jWdnZ2d@xxxxxxxxxxxx>,
"Gary A. Gorgen" <tunxis@xxxxxxxxxxx> wrote:

Joseph Gwinn wrote:
In article <ikv9t7$uo9$1@xxxxxxxxxxxxxxxxxxxxxxxxxx>,
Rich Grise <richg@xxxxxxxxxxxxxxxxxxx> wrote:

Jon Elson wrote:
Not too many computers anymore where you can key in the bootstrap loader
program through the front panel switches.

Bootstrap loader? I had to toggle in the whole freakin' program through the
switches and pushbuttons that weren't even _debounced_!
(Scelbi 8H, 8008, mine had 256 bytes of RAM)
Wuss!

We programmed the bootloader by soldering diodes in a matrix on a circuit board. Diode present meant a one, diode absent meant a zero. This was the PROM of the day (SEL 32 computer, early 1970s)

You worked for SEL ? I worked for Interdata.
No, a SEL customer. I was later an Interdata (in the form of Perkin Elmer) customer as well.

And when I started, we programmed in assembly code (~ 70,000 lines), only later sliding over to the new thing, Fortran (~ 60,000 lines, if I recall). There were lots of debates about the practicality of fortran in such applications, given the inefficiency of fortran-generated code, but the combination of the 3:1 or 4:1 reduction in coding effort of high-order languages compared to assembly coupled with the Moores-Law increase in computer power soon pushed assembly code to the margins. It was cheaper to simply overpower the inefficiency.

Did you try Fortran V. It had some good optimising.

Fortran V was in the future. In the early days of the transition, there were lots of marketing claims that Fortran <whatever> was only 10% slower than handcoded assembly language. Well, not really, unless one used only student programmers for the assembly code, and used toy problems for the benchmark.

Where assembly code shone was that there was most often a machine instruction that was just perfect for the purpose at hand, and so one designed one's code around that often oddball instruction. Now, this is easy for an experienced programmer to do, but impossible for a compiler to do. No matter how good the optimizer, the compiler was not going to design and code your program for you.

The classic SEL 32/55 example of the just-perfect machine instruction is the combination of the indexed execute remote instruction and how operant addresses were encoded. To make a long story short, if one arranged things correctly, one could do a triple-indexed execution access through a 3D table of instructions (including subroutine invocation) in a single machine instruction. While we used 3D, there was in fact no limit other than the number of available index registers, which was 8 or 16 (I don't recall which).

One of the support people was working on a benchmark, from a potential
customer, (10,000) lines of code. He compiled it, ran it.
He had the results, from other machines, all > 60 secs.
The program printed k=123, time=0. He asked me, to have the
customer call him, re: time=0, because something wasn't right.

I mentioned this the next time I talked to them.
The reply was "REALLY????".
Some one had put in a lot of time, writing a program that did nothing.

When I looked at the generated code, it was obvious what the compiler
had done.

The optimizer saw that the code was pointless, and elided it. We always inspected the generated code to ensure that things like this didn't happen.

Joe Gwinn

This program was designed, to do nothing.
It's intention, was to check compiler optimisation.
Having times from the Cray 1, CDC 7600, and about every computer
in existence, at the time, just served to confuse the issue.
It's hard convince someone that an Interdata 8/32, is faster than
a Cray 1. For that programme, it was.

Programmers of that generation, had a sense of hummer.

--
Gary A. Gorgen | "From ideas to PRODUCTS"
tunxis@xxxxxxxxxxx | Tunxis Design Inc.
| Cupertino, Ca. 95014
.



Relevant Pages

  • Re: Beginning programming question
    ... There were lots of debates about the practicality of fortran ... increase in computer power soon pushed assembly code to the margins. ... designed one's code around that often oddball instruction. ... No matter how good the optimizer, the compiler was not going to ...
    (rec.crafts.metalworking)
  • Re: Oracle-RDB seminar notes
    ... Ported 300K lines from IBM OS/360 Fortran H Extended Enchanced ... with some IBM assembly code to VAX-11 Fortran 77 with some VAX ... Most of the IBM assembly code was there to do things the IBM Fortran ...
    (comp.os.vms)
  • Re: check if port is open?
    ... now even drivers have no assembly code. ... not sure that now Fortran have more aficionados that Fort e.g.:) ... If you take percentage of all programmers ... In another one the language is alive and well. ...
    (microsoft.public.win32.programmer.networks)
  • Change FPU round mode
    ... The default x87 FPU rounding mode is `round to the nearest'. ... Is there any Fortran command that I can use to change the rounding ... rounding mode using assembly instructions. ... assembly code in Fortran code with the gfortran compiler? ...
    (comp.lang.fortran)