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

Re: Low-level vs. High-level programming (was My First Computer)



Mike Pender wrote:

>Eric Smith <eric-no-spam-for-me@brouhaha.com> wrote in message
>qh4r1ahxw7.fsf@ruckus.brouhaha.com">news:qh4r1ahxw7.fsf@ruckus.brouhaha.com...
>> "Michael Pender" <mpender@hotmail.com> writes:
>> > Apple Pascal was a half-baked implementation of the language that
>offered
>> > very limited system access.
>>
>> I'm not sure what you mean by "half-baked" and "very limited system
>access".
>> Apple Pascal was a port of UCSD Pascal, and generally offered *more*
>> capabilities and system access than standard Pascal as defined in
>> _Pascal User Manual and Report_ by Jensen and Wirth.
>
>By "very limited system access" I meant that a person had to "cheat" to be
>able to call machine code subroutines from Apple Pascal.  There were ways to
>'peek' and 'poke' using pointers, but at the time I couldn't find a way to
>call machine code subroutines by address.

Actually, Apple Pascal had a very clean interface for calling
procedures written in assembly language.  They looked to the
calling program like Pascal procedures--it can't get much cleaner
than that!

Many of the Apple-specific routines--graphics and sound--were
written in just this way, and the full assembler was provided for use.

If you really wanted to, you could easily write "PEEK" and "POKE"
yourself, though they are much less useful in the Pascal environment
than you might think.

<snip>

>> > It was a compiled Fortran program that
>> > inherited all of the limitations of the Fortran language, as well as
>those
>> > of Pascal.
>>
>> The compiler was itself written in Pascal, and was derived from the
>> Zurich P2 Portable Compiler.  I don't have the source code for Apple
>> Pascal, but below I've attached the first few lines of the compiler
>> source code (file COMPA.TXT) from UCSD Pascal release I.3.
>
>Apple Pascal is based on UCSD Pascal release II.1 as noted on the splash
>screen:
>----------------------------------------------------------------------------
>--
>Command: E(dit, R(un, F(ile, C(omp, L(ink, X(ecute, A(ssem, D(ebug,? [1.1]
>
>Welcome FORT1, to Apple II Pascal 1.1
>
>Based on UCSD Pascal II.1
>
>Current date is 16-Jan-80
>
>(C) Apple Computer Inc. 1979, 1980
>(C) U.C. Regents 1979
>----------------------------------------------------------------------------

And therefore it is derived from the same source as UCSD Pascal I.3.
What is your point?

>One of the reasons I thought Apple Pascal may have been coded in ForTran is
>because they named the two disks "FORT1" and "FORT2."
>
>I suppose it *might* just be a coincidence.

No, those disks are the FORTRAN compiler.  The Pascal compiler and
system are on "APPLE0", "APPLE1", and "APPLE2".

-michael

Check out amazing quality 8-bit Apple sound on my
Home page:  http://members.aol.com/MJMahon/