Hacker News new | past | comments | ask | show | jobs | submit login

Pascal was the Mac OS programming language. The API had data types Str255 (Pascal string, maximum 255 character, in a 256-byte memory block), Str15 (same, max 15 characters, in a 16 byte block) and the like, and many of the higher-level calls used Pascl calling conventions (lower-level calls used a mish-mash of conventions for speed. For example, low-level file calls used a register to pass pointers to parameter blocks.

In the rather unlikely case you want to know, read http://filibeto.org/unix/macos/lib/dev/documentation/Carbon/..., which details how you (sort of) transparently could call 68K code from PPC code and vice versa.

The section "Special Case Calling Conventions" lists all special cases. You get such cases as "Parameters are passed to the routine in registers A3 and D7, and output is returned in registers D2, D3, and D4".




Not to be pedantic, but because I think it's interesting:

The Lisa's OS was written in Pascal.

http://www.cs.oberlin.edu/~jwalker/lisa-legacy/

"The majority of Lisa programs were written in the Pascal language by Apple with a few programs written in 68000 assembly language. To give an idea of the size of this effort the Lisa operating system was written in around 90,000 lines of Pascal and each Lisa program (eg LisaWrite) contained somewhere around 50,000 lines each."

http://en.wikipedia.org/wiki/Pascal_(programming_language)#H...

Like others in this thread, I learned Pascal early on and was befuddled by C for a long time. I wrote some Pascal on my Apple //e, played with Lisa (had access thru work), completely missed the Mac boat, cut my teeth on TurboPascal. Gods, I loved Borland.


Amazingly this looks a lot like Borland's Turbo Pascal (later Borland Pascal, later Borland Delphi, then Embaradero something), which had lots of OO extensions over the years, designed by Andreas Hejlsberg (who went on to make C#).

In the golden age of Delphi, the language was pretty on par with today's Objective-C: Classes, late binding, properties, reference counting, modern strings, etc.

I wonder how much influence there was between the two.


Turbo Pascal 5.5 objects were based in Object Pascal done by Apple.


Makes sense. As far as I can see, it was not directly copied from the Mac dialect; there are some differences, like how the Mac code requires methods in the declaration to be declared fully qualified with the full class name ("PROCEDURE TEraseAll.IEraseAll (view: TImageView);").




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: