top | item 26237945

(no title)

helicalspiral | 5 years ago

Sorry for hijacking your response but I have a question that you might know the answer to: how did using compilers work back in the punch card days?

Say I write a deck of FORTRAN code. What do I do with it next? Do I stack the a deck of cards labelled "FORTRAN COMPILER" and append my stack of code and a card printer pops out cards punched out with machine code?

discuss

order

kens|5 years ago

On the IBM 1401, there wasn't an operating system so compiling a program was like you said: you put a stack of cards with the compiler and your program in the card reader. The compiler ran in literally 63 phases since there wasn't enough memory to do very much at one time. Compilation took about 3 minutes plus .76 seconds per statement. Your executable got punched onto a stack of cards that you could then run.

Things were faster if you had a tape drive. Your source code would normally be on cards, but the compiler would be on tape.

You can see a video of FORTRAN II compilation on the 1401 here: https://www.youtube.com/watch?v=uFQ3sajIdaM

Other comments described a later system such as the IBM System/360, where you had an operating system so you could use a card specifying Fortran compilation and you were set.

Description of the compiler: http://ibm-1401.info/1401-IBM-Systems-Journal-FORTRAN.html

ngcc_hk|5 years ago

If no one reply you on that old machine I can answer for ibm machine which still use card reader concept in its jcl card deck.

The cards you put up with has two // These are you control cards One of these will be program card The next card with dd * you will be your program ...

An example is on p.88 of this manual http://www.computinghistory.org.uk/downloads/9041 , in fact follow up you have many details.

jonjacky|5 years ago

You could do just that, but the usual way was to put a single "control card" that invoked the FORTRAN compiler before you own code. This invoked a compiler that was already stored in the system, on tape or disk.

The computer center had stacks of control cards for different functions like this - they were color coded - so you had to remember to get a pink card and put it before your program deck.

It was possible to punch a binary output deck of your compiied program or even store it on disk or tape - there were different control cards for that.