back to article Mature mainframe madness prints Mandlebrot fractal in TWELVE MINUTES

A programmer better known for work on Arduino has shown off handy vintage mainframe skills, getting an ancient IBM 1401 to buzz away on its 1403 line printer to produce the classic Mandelbrot fractal image. It's not as trivial as it sounds. In this blog post on the “12-minute Mandelbrot”, Ken Shirriff explains that programming …

First truly multi-media computer system in the world:

http://www.wired.com/2015/01/tech-time-warp-week-1977-tablet-computer-took-entire-room/

0
0
Silver badge

Still using dot matrix here

I don't have any mainframe experience, but I do have a love for dot matrix printers. I've got a small collection of good ones, and in fact have one hooked up and turned on most of the time. It works fine for printing out personal stuff, and showing up at the odd meeting with a piece of perforated computer paper does garner a comment or two.

8
0
Silver badge

Re: Still using dot matrix here

We still regularly buy dot matrix printers for our customers.

In the slaughter industry, the scales and Fat-o-Meters are often connected to a DMP in order to print the legal protocol. They are slowly being phased out by tamper-proof memory in the devices, but I guess we order a few dozen Epson FX890s every year. But they are getting darned expensive, because they are made in relatively small batches, due to lack of demand.

1
0
Coat

But will it...

... run Crysis?

3
2

Re: But will it...

Given enough time, anything can run Crysis.

0
0
Anonymous Coward

Re: But will it...

not quite anything

0
0

Re: But will it...

O RLY?

0
0
Anonymous Coward

Dot Matrix?

That looks more like the output from a line printer with a failed hammer (Line printer: has a spinning drum with 132 rings of characters and a bank of 132 hammers. In theory it will print a compolete line in one revolution of the drum.)

29
0
Silver badge

Re: Dot Matrix?

In theory it will print a compolete line in one revolution of the drum.

And makes a hell of a noise doing it, while throwing paper feet into the air if it wasn't in the guides properly. The band printers were slightly better, just a permanent ripping-calico noise, still way louder than dot-matrix, even they could get through a 2000-page box of fanfold in no time flat.

When I first saw a high-speed laser printer in action (looked more like an old-style newspaper press) it was truly eerie to hear how quiet it was, despite the paper spewing from the back.

6
0
Silver badge

Re: Dot Matrix?

There was a Hewlett-Packard drum printer (back from when HP was still a respected name making well-engineered stuff) that had only 44 rings of characters on its drum, and a matching set of hammers, apparently to save on driver electronics and hammer banks. Printing a full line was achieved by shuffling the paper left and right by way of an excenter crank. This somewhat Rube Goldberg-ish contraption needed three drum rotations per line. The line buffer was implemented using shift registers, one per bit.

(insert cobwebs.ico)

1
0

Re: Dot Matrix?

Before about 1987ish, utility bills (phone, water) bore the unmistakable appearance of having been line printed.

0
0

I was a Burroughs/Unisys man, but surely that printout is from a chain/train printer not a dot-matrix?

11
0
Silver badge
Happy

chain printer

Old memories of a thing that sounded like a machine gun (or perhaps a chain gun)

1
0
Anonymous Coward

Re: chain printer

It wasn't always machine gun noise. The chain printer attached to a 1401 in the IBM Data Centre in Newman St., London used to play carols at Christmas. Someone wrote a program with the text to print chosen so the hammers hitting the chain produced the right notes. It was quite a credible rendition...

Also unless my memory isn't what it used to be, assembler didn't seem that hard compared to C++ today!

10
0

Re: chain printer

"Also unless my memory isn't what it used to be, assembler didn't seem that hard compared to C++ today!"

Damn right. A lot easier than writing programs in which most of the statements are compiler directives!

Phil.

2
0
Silver badge

Dot matrix? Pah!

Modern stuff!

Real mainframes used the old line printers, with individual sets of characters on a band that went round and hit the paper like a typewriter letter. From what I remember when we used them on an IBM 370/148 they did about 600 lines per minute. The technology was handy for doing multiple copies as we had lineflo paper with carbon paper interleaved.

A colleague had worked for the Gas Board as an operator some years before, and one of their people had realised that if you printed certain combinations of characters repeatedly you got different sounds from the printer as the bands vibrated. They then worked on the details, and soon had a set of cards ready which, when run, got the printer to play the National Anthem.

I believe that was the same colleague who had a problem one day: the bosses were bringing important guests to see their ultra-modern machine room, but complained afterwards that it had been very dull and boring - they were all just sitting around doing nothing. Of course they were actually in the middle of a long billing run, and the numbers were being crunched. So before the next official visit they prepared a program which they ran as soon as the visitors were spotted: it suspended the real job, and then started lights flashing, printer lids going up and down, tapes rewinding and unmounting etc etc. Not exactly productive, but it impressed the hell out of the visitors!

Ah, the joys of real computers!

20
0

Re: Dot matrix? Pah!

One nice thing about working on billing system for the Gas Board - your work could be made famous by the popular Sunday night consumer affairs show "That's Life".

As I recall, they had regular features about how rubbish computers were, usually because a pensioner had received a gas bill for 2 million quid or whatever.

1
0

Re: Dot matrix? Pah!

@Pen-y-gors The national anthem…?! Pah! Kids stuff! Prepare to have your mind blown…

https://youtu.be/u8I6qt_Z0Cg

Krauts are Krazy - and I wanna know how they do it! Check out the rest of their channel, too, their latest 'release' is the Who Wants To Be A Millionaire? theme.

If that link doesn't work, search YT for 'MIDI Desaster'.

1
0
Silver badge

Re: Dot matrix? Pah!

My uni was bought out by the borg, all of our CS department had sponsored Dell-Windows kit. The one redeeming aspect was that they took the less decrepit old hardware and gave us a "linux lab", with a daisywheel line printer that was free to use from linux (compared to 10p a page for any other printer). I still have several of the more useful RFCs I spent hours printing out on it...

0
1

Re: Dot matrix? Pah!

You're exactly right - standard equipment for a 1401 was a 1403 line printer.

In the early 80s, I worked as a computer operator for about a year - the dinosaur pen had a row of IBM 360/50s, and a bunch of shared devices like tape drives and 3 line printers (not 1403s, a later and even faster model). There is no question that I did permanent damage to my hearing when I ran the printer with the cover up. I don't even remember WHY I would do that - the dang thing spit paper so fast that you couldn't really yank printouts without pausing it. The noise is really indescribable.

One of the fun things the printer had was a "carriage control band" - this was a paper loop that went over two sprockets, and programs could do a form skip to a specific spot on the page, which was nice for printing on forms, or to put the page totals in the same spot on each page without having the program have to count and skip individual lines. If you installed the wrong band, or didn't line it up right, or it slipped off, the printer would yank paper through the tractors so fast that it would fountain up into the air, and it would usually empty an entire box (I want to say 2000 pages but I don't remember) in just a minute or so - you never really wanted to turn your back on the things.

0
0

Zzzzzzzzzt!

Ah, my early days in the pre-Windows era of IT! Mainframes!

I remember how the programmers used to carefully write code to facilitate the oh, so limited memory these oversized, basement situated systems used..

We had a room dedicated to our noisy band printers and dot matrix printers, which were connected via Centronics or Serial (RS232/422) interfaces.

I recall getting ASCII art on 1200ft reel tape and printing it, whoop! Dot matrix art of a Manga-esque girlie in a bikini...

Life was so simple back then... when multimedia was using a Walkman while in the computer room and gaming was trying to beat the mainframe at "hangman" and "tic-tac-toe"

5
0

Re: Zzzzzzzzzt!

I still had a tape reel of ASCII art until relatively recently. Think it finally went when I moved house 3 years or so ago. As I'd not had anything with a tape drive since leaving a previous job (with an ageing AS/400) nearly 15 years before there didn't seem much point in keeping it.

Glen

1
0
Gold badge
Mushroom

Re: Zzzzzzzzzt!

Life was so simple back then... when multimedia was using a Walkman while in the computer room and gaming was trying to beat the mainframe at "hangman" and "tic-tac-toe"

Well you say that. But I found that life soon stopped being simple, when I eschewed the pleasures of Hangman or chess, and decided to play Global Thermonuclear War...

9
0
Silver badge

Re: Zzzzzzzzzt!

I used to play Star Trek on the VAX 11/750.

0
0

Re: Zzzzzzzzzt!

Would that not have been EBCDIC Art, or was that earlier still?

0
0
Anonymous Coward

Did this....

... on a ZX Spectrum in BASIC in the 80s. Took over a day to render. Square root of minus 1 for the win.

5
0
Bronze badge
Happy

Re: Did this....

pahh i accept your spectrum and offer a ZX80 (although with a dodgy memory pack)

0
0
Bronze badge

Re: Did this....

it just took a couple of crashes to complete

0
0

Re: Did this....

Your code can't have been very good, my Spectrum version took 16 hours.

I used to rewrite my old Spectrum Mandelbrot program for every new system / language I worked on. It was impressivley fast on one of those Casio graph calculators and incredibly slow in Visual Basic v1 on a 386.

0
0
Anonymous Coward

Re: Did this....

Same here....Just getting it sorted in javascript and rendering in 3d using Babylon - a wrapper around webGL.

Sub-second rendering times. How times have changed.

The next step is to convert the mandlebrot code to work as a shader algorithm so that the graphics hardware can do the maths.

1
0
Silver badge

Re: Did this....

You did it in BASIC?

I did it in 6502 assembly code on my Atom, sending the output directly to an Epson LX80, with different grey scales representing different divergence rates to infinity, leaving it chuntering away overnight and the next day, and then reassembling the pages to make poster sized Mandelbrot and Julia set images.

Did it again a few years later in 386/387 assembly code, and what used to take all night to create one image ran as an animation with changing Julia set parameters.

0
0

Not Dot Matrix...

1401 had a 1403 chain printer. As far as I recall it printed at 600 lines a minute. 132 characters wide.

2
0

Re: Not Dot Matrix...

"1401 had a 1403 chain printer."

Indeed. It's even shown in the blogpost linked from the article. More details of the 1403 on Wikipedia.

1
0

Re: Not Dot Matrix...

Depending on model the 1403 printer could achieve 1100 lpm (and throw blank paper out at a speed that had a real danger of causing friction fire!).

We (local Electricity Board) were using a 1401 in 1965 as a slave machine to spool bills, final notices & meter sheets 4 times a year for 2.5 million accounts. (From spool tapes produced by the 100k character memory 1410 mainframe). The throughput of the two 1403s was so great that we employed junior operators just to stand behind the printers ready to change boxes of fanfold stationery as soon as they emptied.

1
0
Silver badge
Happy

Re: Not Dot Matrix...

@ Catterbutts

I visited a customer, a bank's data center, all IBM and with all that came with it, like raised floors and the like. Around 73 I think. There was one of those "drum" printers, from the printer's last pages of paper there was a string tied to the leg of an operator sitting at his desk warning him about paper out slightly in advance. Hightech, who cares.

Looking at the printout it's very easy to see what kind of printer was used. If the character jump up and down on the line it's made on one of those drums.

The first laser printers where huge too in those years.

0
0
Silver badge
Pint

Complex Sums

Calculating the Mandlebrot Set involves dealing with complex numbers. A beer, or three, for anyone who cares to tackle complex numbers in assembler, regardless of how old the machine is.

6
4
Bronze badge
Thumb Down

Re: Complex Sums

Complex does not mean complcated.... if you can do integers and fp in assembler you can represent 'complex' numbers. Read up m'boy.

17
0
Joke

Re: Complex Sums

@Richard Taylor 2: Your statement deserves 0001 0000 0000 upvotes.

Seriously though, computer arithmetic is a very interesting subject when you see where approximations are made, and how errors can propagate.

Integers can be used for many assumed floating operations that do not change scale. e.g. molecular distance calculations. However, often the hardware is optimised for approximate fixed point calculations, and double precision is a tragedy in GPU computing....

P.

1
0

Ken Sheriff

Was also one of the authors of Fractint

5
0
Anonymous Coward

Re: Ken Sheriff

Fractint...now there's a word I haven't heard for many, many years.

Getting slightly dewy-eyed for the "good old days"...which sometimes weren't that good actually.

1
0
Silver badge

Reminds me of the story of a machine at a certain Establishment in Berkshire that was programmed to run Space Invaders.

It printed out a screen in ASCII (or EBCDIC?) characters, waited for user input of Left, Right or Fire, then printed the next screen.

As immortalised in Dave Langford's "The Leaky Establishment" - but taken from an actual event.

2
0
Silver badge

Sheriff?

Ken Shirriff, surely? Also known for his reverse-engineered Sinclair Scientific, see his blog at http://www.righto.com/

0
0

A real hacker would have given us some dot-matrix pr0n...

0
0

Punched Cards

God, that takes me back.......I remember debugging a print run for The Mona Lisa.

Trays and trays of the things.

I had a LOT of patience then.

2
0
Silver badge

I remember a 5-line piece of BASIC to generate the set ... ran on a BBC micro I believe.

I used Fractint as a performance benchmark for some years - I had a 3.5" floppy with speeds of machines scrawled on the label (initially straight then the writing filled gaps up the side :-) ) starting with an 80186 and finishing at something like the second generation Pentium.

2
0
Silver badge

Pi in the, er, print

The IBM 1620 I once programmed used binary coded decimal arithmetic. That meant one could manipulate very long numbers. I used it to calculate pi to 300 places.

Part of that calculation involved finding the square root of three to 300 places, which entailed a loop in which a 600 place number was divided by a 300 place number. A single hardware divide instruction took about one second to do that, as shown by the flashing lights.

The real use of BCD is in finance, to represent billions of dollars to the nearest cent without rounding errors for simple addition and subtraction. Percentages and currency conversions still have to be rounded, of course. VAX computers included BCD instructions for use with their COBOL compilers and variables of type COMPUTATIONAL.

Nowadays this long-length arithmetic would be useful for cryptography.

1
0
Silver badge

Re: Pi in the, er, print

Indeed. The VAX had the usual integer and float types, plus BCD, which, if I remember correctly, stores two decimal digits per byte, plus zoned decimal, which is essentially ASCII, one decimal character per byte with a sign bit added to the least significant digit. Zoned decimals were much used in the DIBOL language.

I'm also reasonably sure that I remember using BCD on a 16-bit microprocessor, but I can't recall which one. There must have been some kind of support for BCD for me to have thought of using it.

0
0
Anonymous Coward

Re: Pi in the, er, print

Why would BCD help you "represent billions of dollars to the nearest cent without rounding errors for simple addition and subtraction"? Any fixed-point representation (binary, decimal, duodecimal or whatever) would avoid rounding errors for addition and subtraction. If you also want to avoid overflow then you need arbitrary precision integers, and if you need exact division then you need a proper implementation of rational numbers, but a 64-bit signed integer (or a long long in C) representing a number of cents takes you up to 92233 billions of dollars even if you use proper European billions.

0
0
Anonymous Coward

The 6502 had a decimal mode

So I expect several 16-bit processors did. Though arguably the 6502 was a 16-bit processor, seeing as it used 16-bit addresses.

0
1

Re: Pi in the, er, print

'Why would BCD help you "represent billions of dollars to the nearest cent without rounding errors for simple addition and subtraction"?'

I'm not sure that it does. But it does make it a damn sight easier to print out the resulting numbers on a display because many CPUs of the time didn't have a divide instruction. It's trivial to divide by 10 in BCD.

0
0

Page:

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon

Forums

Biting the hand that feeds IT © 1998–2017