Macintosh programming

Jeff Avery on the Web

HOME        SITEMAP        ABOUT        CONTACT        INTERESTS

 

It didn’t take me long to start writing programmes for the Macintosh. I started in 1985 when I received a copy of Microsoft BASIC. I had a collection of computer magazines that contained programmes written in BASIC and I started by typing them in and running them. Then I would change them in various ways. Early programmes were:

Macintosh programming

BASIC Programme


Serendipitous Circles

Lunar Lander

Quinti-Maze

Spirograph

Fractal Outlines

Life

Escher Sketch Pad

3-D Fractals

Hilbert

Quadratic Surfaces

Magazine


Byte

Kilobaud

Byte

Byte

Byte

Unknown

Creative Computing

Creative Computing

Byte

Byte

Issue


August 1977

December 1977

September 1982

February 1984

September 1984

March 1985

May 1985

July 1985

June 1986

December 1986

However, the programme that consumed my interest was one I wrote after reading A.K. Dewdney’s “Computer Recreations” column in the August 1985 issue of Scientific American magazine. The article described “The Mandelbrot Set” which is named for Benoit B. Mandelbrot, a research fellow at IBM. With a very simple algorithm, the programme creates stunning visual interpretations of the fractal set. Actually, that’s getting a bit ahead of the game because in 1985 it was the 128K Mac with it’s 9” black and white screen. It was later Macintoshes that brought out the stunning renditions in colour. But even in black and white on a 9” screen, the results were amazing.

macintosh3a.html

The BASIC programme that I wrote in 1985 I called “Mandelbrot”. The calculations were intensive and, coupled with interpreted BASIC and the (from today’s perspective) slow speed of the 128K Mac, the programme took a long time to run. On the right is the output from one of those runs, one that took 36 hours and 28 minutes to complete! Click on it to see a larger version.


In the quest for more speed, I decided to move from the BASIC interpreter to a compiled language. The Macintosh operating system was written in a computer language called Pascal and so I decided that going with that was my best approach. Jacquie bought me the TML Pascal compiler for Christmas 1986.

macintosh3b.html

I immediately set about learning Pascal and found that I needed to know about the internal Macintosh routines (called the Toolbox). There was no Internet in those days so this meant buying the five volumes entitled “Inside Macintosh”. Since they were about $40 each (a lot in 1986 dollars!), I ended up buying them one at a time over the next few years, each time picking the one that had become most essential to my programming needs.


So I set about rewriting my Mandelbrot programme in Pascal. The results were rewarding in that the calculations ran much faster and 36-hour runs were no longer required. And, as we upgraded to each new Macintosh, the processing speed increased and the programme ran faster and faster. Today, on my MacBook Pro, calculations appear to be instantaneous. But again, that’s getting ahead of the game.


Since 1977, one of my hobbies has been to design and construct microcomputers at the chip level (see list). In 1977, to convert microcomputer assembler language to machine language, I wrote a COBOL programme that ran on a mainframe. Now it was time to rewrite the programme in Pascal. I called the programme JAssembler and, over the years, I have added the ability to assemble code for each new microprocessor I worked with. I also wrote JDisassembler to disassemble machine code into assembler code.


During this time I had upgraded TML Pascal to TML Pascal II but eventually TML Pascal became unsupported. So, in 2001, I switched to CodeWarrior. This was short-lived, however, because in 2002 Apple brought out its new Macintosh operating system named OS X and it was written in Objective-C, not Pascal. Apple supplied a free Objective-C compiler but support for Pascal seemed to have disappeared. So I started to learn C. However I found C to be a frustrating language to learn and didn’t maintain enough interest to stay the course.


Instead, I went back to using BASIC after finding a downloadable freeware version called Chipmunk Basic. This met my needs for many years as each new model of the Macintosh computer was faster than its predecessor and so running an interpreted BASIC programme was very fast. I used Chipmunk Basic to write many programmes, most of which revolved around solving logic puzzles like Sudoku and Kenken.

 

<-Computers             Macintosh Page:     <-Prev             1             2             3             4               Next->