Recent

Author Topic: Source code of Lisa OS (in Pascal) available  (Read 725 times)

jwdietrich

  • Hero Member
  • *****
  • Posts: 1210
    • formatio reticularis
Source code of Lisa OS (in Pascal) available
« on: January 22, 2023, 11:28:36 am »
In order to celebrate the 40th anniversary of the release of Apple's legendary Lisa system, the Computer History Museum made the source code of Lisa OS 3.1 available. Lisa OS was written in Clascal, an early variant of Object Pascal. It may be possible to compile the code, with a few modifications, with Lazarus and Free Pascal.

Of note, the original OS of Lisa's small successor, the Mac, was written in Object Pascal as well.

See https://twitter.com/SciPasTips/status/1616506106381209602?s=20&t=9JBzywfXfxl3Xcn8i2ZJJA and https://info.computerhistory.org/apple-lisa-code for details and links.
function GetRandomNumber: integer; // xkcd.com
begin
  GetRandomNumber := 4; // chosen by fair dice roll. Guaranteed to be random.
end;

http://www.formatio-reticularis.de

Lazarus 2.2.6 | FPC 3.2.2 | PPC, Intel, ARM | macOS, Windows, Linux


jwdietrich

  • Hero Member
  • *****
  • Posts: 1210
    • formatio reticularis
function GetRandomNumber: integer; // xkcd.com
begin
  GetRandomNumber := 4; // chosen by fair dice roll. Guaranteed to be random.
end;

http://www.formatio-reticularis.de

Lazarus 2.2.6 | FPC 3.2.2 | PPC, Intel, ARM | macOS, Windows, Linux

GetMem

  • Hero Member
  • *****
  • Posts: 4077
Re: Source code of Lisa OS (in Pascal) available
« Reply #3 on: January 22, 2023, 12:24:00 pm »
Actually it was written mostly in Motorola 68000 assembly language and partly in Clascal.

jwdietrich

  • Hero Member
  • *****
  • Posts: 1210
    • formatio reticularis
Re: Source code of Lisa OS (in Pascal) available
« Reply #4 on: January 22, 2023, 12:36:53 pm »
Actually it was written mostly in Motorola 68000 assembly language and partly in Clascal.

In the core "OS" folder 37 files are in assembly language and 84 are in Clascal. The ratio is very similar in the other folders, but the hardware drivers were mainly written in assembly (but there is some Pascal code, too).
function GetRandomNumber: integer; // xkcd.com
begin
  GetRandomNumber := 4; // chosen by fair dice roll. Guaranteed to be random.
end;

http://www.formatio-reticularis.de

Lazarus 2.2.6 | FPC 3.2.2 | PPC, Intel, ARM | macOS, Windows, Linux

GetMem

  • Hero Member
  • *****
  • Posts: 4077
Re: Source code of Lisa OS (in Pascal) available
« Reply #5 on: January 22, 2023, 01:03:40 pm »
Actually it was written mostly in Motorola 68000 assembly language and partly in Clascal.

In the core "OS" folder 37 files are in assembly language and 84 are in Clascal. The ratio is very similar in the other folders, but the hardware drivers were mainly written in assembly (but there is some Pascal code, too).
Yes of course, pascal played a big role in developing Lisa which is great. I wonder though, why they dropped pascal in favor of objective c? It was some kind of limitation of the language or just a trend?

jwdietrich

  • Hero Member
  • *****
  • Posts: 1210
    • formatio reticularis
Re: Source code of Lisa OS (in Pascal) available
« Reply #6 on: January 22, 2023, 01:45:41 pm »
I think it was a mixture of trend and external influences.

The classic Mac OS was written in Object Pascal (which had been developed by Niklaus Wirth in collaboration with Apple on the basis of Clascal and was later adopted by Borland for Turbo Pascal). Mac OS continued to be written in Object Pascal until version 6.0.8L in 1992. System 7, which was released in 1991, was the first one, which was partly coded in C++, but established code fragments were kept in Object Pascal. This applied to all newer versions of classic Mac OS from 7.0 to 9.2.2.

When Apple merged with NeXT they adopted Objective C, which had been used by Next for their operating systems (NeXTSTEP and OPENSTEP that laid the foundation for Rhapsody, Mac OS X and subsequently the plethora of OS X implementations like iOS, iPadOS, macOS, watchOS and tvOS). Later Apple switched from Objective C to Swift.

Thanks to Lazarus and FPC it is still possible to develop in Pascal and Object Pascal for the Apple ecosystem. Now, Delphi supports development for macOS and iOS as well, but it was probably the pressure exerted by the Cheetah movement that motivated them to extend their scope.
function GetRandomNumber: integer; // xkcd.com
begin
  GetRandomNumber := 4; // chosen by fair dice roll. Guaranteed to be random.
end;

http://www.formatio-reticularis.de

Lazarus 2.2.6 | FPC 3.2.2 | PPC, Intel, ARM | macOS, Windows, Linux

 

TinyPortal © 2005-2018