Wednesday, 02 August, 2006

Turbo Pascal

Yesterday's entry got me thinking about integrated development environments (IDEs), and inevitably led me to remembering my first experience with Turbo Pascal in 1983.  Like every other Pascal programmer at that time, I had spent my $29.95 on JRT Pascal only to find that it was slow, buggy, and not worth the diskette it came on.  A friend and I even split the cost (several hundred dollars, as I recall) of Pascal MT+ with the Speed Programming Package. (You can download Pascal MT+ and many other Digital Research products from

MT+ worked, but compilation was painfully slow.  On my Osborne I computer with 64 kilobytes of memory and two 90-kilobyte drives, it went something like this:

  1. Place the disk containing the source code in drive B.
  2. Place the editor disk in drive A.
  3. Edit the program.
  4. Remove the editor disk from drive A and insert the compiler disk.
  5. Run the compiler.
  6. Repeat steps 2 through 5 until you get a clean compile.
  7. Remove the compiler disk from drive A and insert the linker disk.
  8. Run the linker.
  9. Repeat steps 2 through 8 until you get a clean link.
  10. Run the resulting program from drive B.

As painful as it was, I was delighted to have a working Pascal compiler, and had great fun building programs.

Some time in 1983 I saw the advertisement for Turbo Pascal 1.0, promising blazing fast compile speeds and a compiler that was integrated with the editor.  Best of all, the ad implied that I could edit, compile, and test my programs without having to change diskettes.  It sounded too good to be true, but I sent off my order for the not-yet-release product along with my check for $50 plus shipping.  After the JRT experience I was pretty sure that I'd get ripped off, but I just had to try it.

The product came sometime in late November or early December and I wasted no time starting the new IDE.  I loaded one of my programs into the editor and then pressed the "compile" key.  It compiled almost instantly and I was sure that it didn't work.  Nothing could compile that fast.  On a lark I pressed the "run" key and my program started running!  I was dumbfounded.  And then I figured it out:  nothing had actually happened, I thought.  I guessed that it had just run the old copy of the .COM file that was left from the last MT+ compile.

I actually exited the IDE, deleted the executable files from my data disk, rebooted the computer, restarted the IDE and went through the whole exercise again.  Compile.  Yep, I got screwed.  I just knew it.  There's no way the program could compile that fast.  But then it ran.  Just to make sure that the IDE wasn't being clever and un-erasing the .COM file, I made a few changes to the source code and went through the whole compile/run cycle again.  I simply couldn't believe that a $50 compiler/editor package could work so well.  I spent the next week showing all my friends this amazing new program that put my old 4 MHz computer into warp speed.

At that same time I was writing COBOL for a mainframe system, using a line editor and a compiler that took 10 or 15 minutes to build a 2,000 line program.  Turbo Pascal could compile an equivalent program on my little Osborne I in under a minute.

With Turbo Pascal 1.0, Borland International revolutionized the whole idea of what a programming environment should be, and it wasn't long before we had fully integrated development environments complete with better editors and source-level debuggers.  10 years later Microsoft was building Visual Basic 1.0, which popularized the whole visual programming model that served as the model for Delphi, Visual Studio, Microsoft .NET, and even the Eclipse project that I mentioned yesterday.

I just realized that the environment I'm currently using for Flash development is more primitive than that first version of Turbo Pascal.  I feel like I've stepped back in time 25 years, but I'm having a heck of a good time with it.