Punch Card Programming - Computerphile

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
The thing you used to dread more than anything else was to take these out of the box in which you carefully stacked them up and then accidentally dropped them on the floor. There is no quicker way to discover what n factorial means when you start trying to put them back together in the right order Armed only with your knowledge of ALGOL programs and which order these things must have occurred in We have here in the department a legacy deck of punch cards dating at my best guess from about 1971 it was left behind by a Statistic student of that era can act in it just is like a blast from the past We'll put this on the classic black background provided by the cover of an iPad What could be better old meets new? At the top of the deck we used to have to put a colored card Basically stating who we were and what this job was about Now I think the first thing to draw your attention to on any sample of these cards is You look at them against the light and if you remember that a card reader is reading vertically to get its characters [boom] Run like that not horizontally... The most amazing thing you then discover which threw me for a while because I'd rather forgotten It works like this is that if you now put the card down on a black background And will use another card as a ruler just look what happens every single character and if you look very carefully as well as the whole pattern That denotes a character it can also be printed out at the top of the card although the printing Ribbon was pretty faded without these nevermind every single character has got a different hole punch pattern but there's never more than two holes that are punched. Now that might seem very strange and as I say I gave me a jolt at all. How on Earth does that get converted into a character code which is going to be a bit pattern representing an ASCII character or whatever you can't just port ASCII character punching down here if you did you get into all sorts of problems. Because some ASCII characters have got lots of one bits in them and if the situation is that you chose that every one bit was a hole some characters would make this thing look like confetti. It would be like having a terraform... you know the [beasts] [only] [holes]... that the actual mechanical substrate of the card will be very fragile So this is the reason that there are various choices of two holes here out of 11 rows in total and that gives enough combinations to give a unique code for a fairly limited alphabet admittedly, but it works So perhaps another thing to point out is that these are cards for an ICL 1900 computer which was mentioned in the previous video The ICL 1900 series internally did not hold its characters in 8 bits as would be done nowadays. It held them in 6 bits So pretty well all of you out there are familiar with the fact that nowadays if you like the standard for years has been that you have a computer whose integers are held in 32 bits? but if you want those 32 bit entities called words are broken up into four 8-bit bytes Nowadays, it's the bytes that are addressed not the words and that particular architecture of byte address machines been optionally groupable into longer units to hold either instructions or integers or whatever that really did start with IBM mainframes they were the first to go in for byte addressing and 8-bit bytes ICL on the other hand did not have 32-bit words with four 8-bit characters it had 24-bit words with four 6-bit characters. Why are here you cry the answer is it's cheaper You've got rather less memory to provide rather simpler adders to do you only need 6-bit adder circuitry not 8-bit adder circuitry and it's as simple as that LCL could make their computers a little bit cheaper than IBM although they were arguably as well a little bit slower and so on So this is what these hole punchings are all about. They are equating by specialized circuitry in the card reader to it being able to recognize these patterns and say oh That's the 6 bit character such-and-such, and it will put that into a temporary file behind the scenes Now when you're preparing these card decks you really did have to take huge care First of all the yellow card announces that this is a job for the computer to do - big surprise there There's a NUPMS They're Nottingham (?) University Physics and Maths I think that stands for. This is ken's identifier PMSKA for Ken Akin (?), and I think this thing at the end announces the global terminator for this deck of cards which will come right at the bottom for our [perros] Okay Then there's a little piece of job control here basically saying I want the Nottingham (?) University EXECutive program which was our own sort of homebrew addition to ICL's GEORGE operating system And you notice at the end here. It says BY C in this added module to the operating system You could say how desperately urgent this job was or not. You were given a certain number of notional pounds to spend every month for every user. And you could opt to spend less money and have it run at low priority But you could either spend it by a which means I want the job doing right now Or you could say I'll go overnight and you were charged as a much lower rate. The next card we see here announces that this is an ALGOL job, the following cards will be in the ALGOL language So this is a signal to the operating system though to read all this in but when it's been read in it has to be fed in to the ALGOL compiler and the operating system knows where that's kept you don't unlike Unix Linux, whatever these days you don't get very close to the operating system. It's there It doesn't do much for you except run your jobs You just have to trust to it more or less Notice here for those of you at all familiar with things like ALGOL and Pascal It's beginning to look fairly sensible: BEGIN. That's a reserved word in the ALGOL language It's a bit like open curly-brace ("{") in C But ALGOL use BEGIN and END instead of open curly ("{") and closed curly ("}") Notice that it's signaled as being a reserved special word because it uses prime or Single quote symbols, it's quote begin quote ('BEGIN') Quote procedure quote ('PROCEDURE'). That's another reserved word in the ALGOL language And it's defining this procedure E01AAA with these formal parameters or arguments. There we are then you're sitting in front of a card punch you type in just like you would do on a ordinary keyboard these days except this thing is electromechanical So it's going to splash splash splash splash all the time. Every character you hit is punching out holes electromechanically and at the same time is hammering out a typewriter record on the top of exactly what all these holes mean. Every time you hit the return key whereas even on the dumb terminal you find the cursor going zonk back from from the right hand side of the screen to the left as you look at it what would happen when you hit return on one of these is that the card would as if by magic? Be taken away from the punching station and propelled I think with sort of compressed air to a catcher tray So one after another you would build up a stack of cards in order That would later be fed into the machine So when it's all completed and of course the advantage is with having these things written out on top if you could see any mistakes on a quick scan through you can always punch another card and replace the bad card with a good card You would end up with a job to be submitted can stack is a particularly short one It just seemed to be running this routine and using it to generate a small amount of data to be printed out So there we are, a very very small job. In order to stay sane what you need to do is the following? First of all decide whether your card punch like to have these beveled corners at the top left or top right Faintly recall that ICL and IBM probably did them different ways around, but that was the thing to help you get your cards aligned and stop you turning one accidentally upside down and thereby reading in the wrong hole pattern in the wrong order You used to make sure the bevels were in place and like that, so that's one self-protection mechanism Another one that was optionally available on some better quality card punches with support at the far right of the card typically, I think in columns 72 to 80 because these are 80-columned cards You could put a sequencing number here, okay? You can have them automatically sequence the numbered as you punch them out on the card punch The thing you used to dread more than anything else was to take these out of the box in which you carefully stacked them up and then accidentally dropped them on the floor There is no quicker way to discover what n factorial means when you start trying to put them back together in the right order armed only with your knowledge of ALGOL programs and which order these things must have occurred in So all sorts of subterfuge is used to be used, but the best was to have them numbered if possible and then if you could afford one of these things that were actually card collecting machines where if you put in a randomized of cards they could electromechanically sort them for you I can't recall I ever used one of those perhaps. I was careful enough or perhaps the university couldn't afford one I don't know. Another common trick to use which I'm actually port marker pen markings at the top of these if you did or you wrote a word here You could get them broadly back in the correct order by just making your patterns at the top look correct and get them back in roughly the way they should have been. So here we have you see a much more substantial ALGOL job, I think most of this is programmed there's a little bit of data at the bottom. -So would you have one of these cards for every line? would that be kind of... - Every line of the program? Yeah, would have a card. -Line and you could only fit one line for your copy. -Yeah, yeah, one lamp guard. Right at the end of this lodge of stuff Let's put it down here as a separate card of its own you see that magic word END and that is the final end of the program And just as in other languages you're open ("{") and closed curly braces ("}") can be nested inside each other So also in ALGOL the BEGIN END blocks could be nested inside one another So that END then is the final card of the program But then look what happens you get a full asterisks card The four asterisks is a marker to say that's the end of my program, but there's still another section of my stuff to come After four asterisks you give the reserved word DATA and this is such a simple program I think from what I can make out it takes these three integers here and uses them to generate yet more data which will be of use in some other programs, so that is it. There's the data that's the end of the pack. If you had a program that generated more data for input to another program a favorite thing you could do was to specify in your job control at the very top that what you would like is not just a line printer output of your answers, but to punch out another deck of cards For use in putting it into some other program later on -So that basically provides you with a set of data to use with a different [program] Yes, and you might say well, why not just pocket in a disk file You've got to remember. This is the early seventies. You did not have a personal allocation of files on disk Yes, then would be a disk backing up this computer But use entirely by the operating system Full of temporary files holding your jobs for you, feeding them in an order and all that, but in the very early days You in person did not get a personal account to hold your files You wanted to run something later on then you had to print it out So whereas nowadays a lot of you know if you want to punch out date for use another program you can either use a Unix pipe and pipe it directly into another program or you can use the Unix greater than symbol and send it into a file Much more complicated in these days you had to announce ahead of time that you would be punching out results as well as printing them out That's interesting. What would a computer do with a hanging Chad? The admission of Richard Stallman's name was not intentional I was thinking of him actually as I spoke I was tempted for a while and many of my friends told me to try this on with you But maybe not It would tend that the compressed air is a lot of compressed air used in these machines to move the cars through very quickly
Info
Channel: Computerphile
Views: 633,359
Rating: undefined out of 5
Keywords: computers, Computer Programming (Professional Field), computer science, International Computers Limited (Organization), University Of Nottingham (Organization), Computer Programming In The Punched Card Era, Punched Card (Invention)
Id: KG2M4ttzBnY
Channel Id: undefined
Length: 14min 55sec (895 seconds)
Published: Wed Aug 21 2013
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.