[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: What exactly WAS Apple Pascal?



In article <cd7lc2$q52$1@ottoman.cs.fiu.edu>,
Zorin the Lynx  <yakko@zorin.org> wrote:

> I was an Apple II user for many years in the 80's and early 90's, but I 
> never actually found out exactly what Apple Pascal was, and references 
> online seem to be nonexistent.
> 
> It seemed to be a disk format, operating system, and possibly a 
> programming environment all built into one.. Hell, many utilities could 
> copy files to and from "Apple Pascal" format disks, but what was the 
> environment like?

Apple Pascal was a port of UCSD Pascal to the Apple II environment.

The idea of UCSD Pascal was to try to make also the binaries
portable.  So UCSD Pasal defined a dialect of Pascal (several
extensions and a few restrictions compared to Wirth Pascal) where the
Pascal source code was compiled to a portable P-code, which in turn
was interpreted by a "P-machine".  Almost all P-machines were
implemented in software only, the only exception was Western Digitals
"Pascal Micro Engine", a hardware CPU which executed P-code directly;
it wasn't successful.

Everyting in UCSD Pascal, except the P-machine, was written in UCSD
Pascal: the IDE, the editor, the Pascal compiler, the library
functions, the assembler.  The assembler was named TLA (The Last
Assembler) and it was intended to be a universal assembler -
opcodes/etc for specific CPU's were defined in an accompanying data
file.  The dream of those who wrote that assembler was obviously that
no other assembler would ever need to be written -- as we all now
know, this dream didn't come true.

UCSD Pascal was a 16-bit environment with all the limitations that
comes with such an environment such as max 64K address space.  Even
the Z-machine (the interpreter used for Zork and other Infocom games)
had expanded a bit on that and used a 24-bit address space.

The UCSD Pascal file system was quite primitive: files had to always
be stored in one contiguous disk space.  If disk space had become
too fragmented for a file to be stored even though there was enpugh
free disk space, there was a special "Krunch" command in the IDE
which moved files until all free space was gathered in one
contuguous part of the disk.  Even Apple DOS 3.1 did better than
that and allowed files to be stored on any free sectors, contiguous
or not....

UCSD Pascal was ported to a number of systems.  The Apple II and ///
port was called "Apple Pascal" and is perhaps the most well known of
the ports.  In the earliest days of the IBM PC, you could choose
among three different OS'es when you bought it: Microsoft's MS-DOS,
Digital Research's CP/M-86, and UCSD Pascal.  And it seems like there
was an UCSD Pascal for early Macintoshes too.

> Was it a full-featured Pascal compiler? An OS? A file format? Or all of 
> the above?

All of the above....

> Did anyone here develop in it?

I played with it for awhile, but abandoned it as soon as Turbo Pascal
appeared which I got for my Apple CP/M system.  Then I wrote - in
Turbo Pascal - a utility to tansfer Apple Pascal text files to CP/M
disks, transferred the few Apple Pascal files I had, and then I
hardly ever touched Apple Pascal again.

> What was it like?

Did you ever program in Turbo Pascal?  Apple Pascal was similar, but
much much slower: the compile times were enormously longer (about
one source line per second, compared to Turbo Pascal's hundreds of
lines per seconds), and also the run time was some 10-30 times slower
in UCSD Pascal compared to Turbo Pascal.

And the floating-point precision was worse in UCSD Pascal, which used
4-byte floating-point numbers (7 digits of precision) while Turbo
Pascal used 6-byte floating-point numbers (12 digits of precision).
Even good ol' Applesoft used 5-byte floating-point numbers (9-10
digits of precision).

One significant difference between Apple/UCSD Pascal and Turbo Pascal
though was that in Turbo Pascal there was an "Exit" command by which
you could get out of the IDE and back to the OS.  In Apple/UCSD
Pascal there was no way to get out of the IDE, except rebooting the
computer; that's of course because Apple Pascal also WAS the OS.
It's similar to the "SYSTEM" command which is available in Microsoft
MBASIC/BASICA/GWBASIC but is absent from Applesoft Basic (although
"CALL -151" is kind of a way out of Applesoft).

> I had exactly ONE program that used Apple Pascal, and that was SmartCom 
> I, which drove my MicroModem IIe. (Note: This was the most useless comm 
> program ever. It had no industry-standard file transfer protocols and 
> had a goofy design. But hey, it got me on BBS's!)
> 
> A pointer to a FAQ or other document explaining Apple Pascal would be 
> great too...
> 
> - A curious Z

A Google search on "Apple Pascal" found this:

http://www.callapple.org/apple2/software/tribby/apascal.html
http://member.nifty.ne.jp/apple2tree/manual/manual4.htm
http://www.threedee.com/jcm/psystem/

-- 
----------------------------------------------------------------
Paul Schlyter,  Grev Turegatan 40,  SE-114 38 Stockholm,  SWEDEN
e-mail:  pausch at stockholm dot bostream dot se
WWW:     http://www.stjarnhimlen.se/
         http://home.tiscali.se/pausch/