Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
This still might be true. C is still associated with UNIX but now Mac OS, Android, Linux, IOS and so on are all UNIX based (more or less)

Except VMS had a C compiler available (I was using it in 1981) and Windows has had a C compiler available from the beginning, and DOS and TRS-DOS and CP/M all had C compilers early. The issue might be more that Unix based OS's dominate today, but if you look for example at the OS'S Perl is ported to, and that are all need a C compiler, you see C is the first compiler available on many OS'S.

C++ was initially written to target C as its output language because C could essentially be considered a portable assembler, and targeting C gave C++ immediate reach to every common OS.
[doublepost=1514848381][/doublepost]
You must be thinking BASIC, not Pascal.

And a really, really old version of BASIC at that.
 
  • Like
Reactions: kdarling
I hope we'll be able to run this on our present macs, in an emulator or something. Be fascinating to see the first commercialised GUI (outside of Xerox) functioning.

Re: Pascal v C

Basically Pascal is a sequential language, each line of code is numbered and to call a repeated routine you have to specify the start line of code for that function, dropping out with if/then functions. C is modular code, whereby you write self-contained modules of code that are known as functions, which you then call from either other functions or the main program routine. This makes overall programming simpler to write and enables greater diversification and complexity.

No, pascal doesn’t have line numbers. Pascal had functions (procedures).

PROCEDURE ReadArr(VAR size: Integer; VAR a: IntArrType);
BEGIN
size := 1;
WHILE NOT eof DO BEGIN
readln(a[size]);
IF NOT eof THEN
size := size + 1
END
END;

Pretty c-like other than syntax differences. For example, pointers use ^ instead of *.
 
  • Like
Reactions: vkd
C would have been un-common back in the early 1980's The book describing the C language was problised in 1978 an by 1983 only people working with UNIX used C.

C wasn't quite as common in 1983 as it was in the 1990s, but "only people working with UNIX used C" is… a stretch. Plenty of platforms had C.
 
  • Like
Reactions: kdarling
Yes, today's computers have an immense amount of capability built into them, and built better than ever, yet people think that $1000 is expensive for a [good] computer. It's not. Today's computers are cheap for what you get with them.
[doublepost=1514441757][/doublepost]

Ask and you shall receive. :)

https://en.wikipedia.org/wiki/Comparison_of_Pascal_and_C
or, more jocularly:

Code:
program BottlesOfBeer (output);
{this program plays the 99 bottles of beer song}

const
  BOTTLESSTART = 99;
  BOTTLESEND = 1;

type
  tBottles = BOTTLESEND..BOTTLESSTART;

var
  bottles : tBottles;

begin
  for bottles := BOTTLESSTART downto BOTTLESEND do
  begin
   if bottles > 1 then
   begin
     writeln (bottles,' bottles of beer on the wall, ',bottles, ' bottles of beer.');
     write ('Take one down, pass it around, ');
     writeln (bottles - 1, ' bottles of beer on the wall.');
     writeln
   end
   else
   begin
     writeln ('1 bottle of beer on the wall, one bottle of beer.');
     writeln ('Take one down, pass it around, no more bottles of beer on the wall');
     writeln;
     writeln ('No more bottles of beer on the wall, no more bottles of beer.');
     writeln ('Go to the store and buy some more, 99 bottles of beer on the wall.')  
   end
  end
end.

vs

Code:
#include <stdio.h>
#include <stdlib.h>

static void song( int bottles )
{
   while( (printf("%d bottles of beer on the wall, %d bottles of beer.\n"
              "Take one down and pass it around, %d bottle%s of beer on the wall.\n\n",
              bottles, bottles, bottles-1, bottles>2? "s":""), bottles > 2) )
       while( (--bottles,0) ) {}
   while( (puts("1 bottle of beer on the wall, 1 bottle of beer.\n"
            "Take one down and pass it around, no more bottles of beer on the wall.\n\n"
            "No more bottles of beer on the wall, no more bottles of beer.\n"
            "Go to the store and buy some more, 99 bottles of beer on the wall."),0) ) {}
}

int main()
{
   while( (song(99), exit(0), 0) ) {}
}

from http://99-bottles-of-beer.net
[doublepost=1514889185][/doublepost]

CuriousMarc also has videos of how he and his Computer History Museum colleagues restored the alto. And not a drop of retrobrite was used!
 
Last edited:
  • Like
Reactions: RuralJuror
I found the first Easter Egg! Kind of. It's in a comment, in the module Lisa_Toolkit/"TK Sources 4"/LIBUT-UUNIVTEXT2.TEXT.unix.txt (obscuration by me to pass forum censors):

IF NOT done THEN { This is FATAL !!!}
BEGIN
{$IFC fUniversalTextTrace}
WRITELN('Fatal back up attempt in SeqLpdUTBB');
PrintSecrets(achad, lpd^);
{$ENDC}

HALT; {Die rather than f*** up}
END;
END
 
Here's one historic bit of code in QuickDraw that author Bill Atkinson re-implemented from Xerox:

LISA_OS/LIBS/LIBQD/libqd-BITBLT.TEXT.unix.txt

;--------------------------------------------------------------
;
; PROCEDURE BitBlt(srcBits,dstBits: BitMap;
; srcRect,dstRect: Rect;
; mode: INTEGER; pat: Pattern);
;
; TRANSFERS A RECTANGULAR BLOCK OF BITS WITH NO CLIPPING AT ALL.
; MODE SPECIFIES THE COMBINATION MODE AND WHETHER THE SOURCE SHOULD COME
; FROM THE SOURCE BITMAP OR FROM A REPEATING PATTERN.
;
; COPYRIGHT APPLE COMPUTER INC.
; WRITTEN BY BILL ATKINSON
;
; POSITION INDEPENDENT AND RE-ENTRANT, CLOBBERS ONLY A0.

The name derives from the BitBLT routine for the Xerox Alto, computer, standing for bit-boundary block transfer. Dan Ingalls, Larry Tesler, Bob Sproull, and Diana Merry first coded this function at Xerox PARC in November 1975 for the Smalltalk-72 system. In the Smalltalk language, BitBLT was slow. So Dan Ingalls later reimplemented it in microcode to make it blazingly fast.

This one snippet of code, perhaps more than any other, is what amazed Steve Jobs and his cadre of coders when they visited Xerox PARC in 1979. Until that visit, the key Lisa graphical feature of overlapping windows seemed intractable. Atkinson, head of graphics on Lisa, had no idea how to solve the problem. But once he saw it in action a Xerox Alto, Atkinson knew there was a solution. He reverse engineered what Xerox had done, inventing his own superior concept called "regions". Atkinson then coded routines to efficiently draw text and graphics within these regions, which represented rectangular screen areas that need to be redrawn or left untouched.

From https://www-user.tu-chemnitz.de/~heha/petzold/ch14d.htm
This history of BitBlt is legendary, originating in the Xerox SmallTalk project.
Bitblt (pronounced "bit blit") stands for "bit-block transfer." The BLT originated as an assembly language instruction that did memory block transfers on the DEC PDP-10. The term "bitblt" was first used in graphics in connection with the SmallTalk system designed at the Xerox Palo Alto Research Center (PARC). In SmallTalk, all graphics output operations are based around the bitblt. Among programmers, "blt" is sometimes used as a verb, as in "Then I wrote some code to blt the happy face to the screen and play a wave file."


From https://ethw.org/Milestones:Apple_Macintosh_Computer
Bill Atkinson invented QuickDraw [Ref-5: '545 patent], first for the Apple Lisa and then in an expanded form for the Macintosh. This hugely success application was inspired by Bill’s visit to Xerox PARC in 1979 - see Oral History of Andy Hertzfeld and Bill Atkinson via URL at bottom of page. As Bill was at least initially unaware that the BitBlt graphics code for the Xerox Alto (originally written by Dan Ingalls) was done in microcode, he didn't realize the difficulty of getting high-performance graphics built for the Motorola 68000.

This file is a true collector's item, as CMH's release is, I believe, the first time Atkinsons' code has been made public.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.