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

Re: pascal system



In article <1149562618.439863.103970@i40g2000cwc.googlegroups.com>,
mdj <mdj.mdj@gmail.com> wrote:

> Paul Schlyter wrote:
> 
>> Unfortunately, Apple Pascal didn't run on a standard Apple II, sans
>> "language card"....
> 
> There was a 48k version of the runtime up to 1.1. You couldn't run the
> development environment without a language card though.
> 
> The operating system switch issues on the Apple II weren't in reality
> any worse than switching between DOS and CP/M ...

Otoh you dodn't have to reboot to switch languages in CP/M.  You DID
have to reboot to switch languages in the Apple Pascal system - and you
only had two languages to choose among: Apple Pascal and Apple Fortran.
 
>> Anyway, I remembered one actual advantage of Apple Pascal compared to
>> TP (versions 1 to 3): the ability to create modules (called "units" in
>> UCSD Pascal jargon - units was a UCSD Pascal extension which was
>> absent in the Pascal standard), i.e. separately compiled pieces of
>> code.  Early versions of TP required the whole program in one single
>> source file available at compilation time.  The limitations due to
>> this was in TP overcome by $include statements (which allowed the
>> source to be split up into several files, even though it logically
>> still was one file) and overlays (if the generated object code became
>> too large).  And of course TP was so much faster at compiling than
>> Apple Pascal that usuallyTP was still faster even though it had to
>> recompile all source code for each new compile.
> 
> Yes, and units implemented true shared libraries as well, which saved a
> lot of disk space in a big application. Having UNITS link automatically
> at runtime was a big advantage, and once you got used to it, the
> programs you compiled ended up being fairly small.
> 
> There was a version of UCSD Pascal for z-80 systems, but I never used
> it, and I don't think there was an Apple CP/M port.

Of course there wasn't!  UCSD Pascal had its own OS - it didn't run on
top of some other OS.

In the early days of the IBM PC, there were three OS'es to choose among:
Microsoft's PC-DOS, Digital Research's CP/M-86, and the UCSD P-system.
 
>> If you're referring to the 6502 f.p. routines in the Integer Basic
>> ROM's -- sorry, they were no help.  They too were 4-byte
>> floating-point numbers, the more or less standard 32-bit f.p. format
>> used in e.g.  Apple Pascal.  Perhaps you modified them to extend the
>> precision?  Or perhaps you instead borrowed the f.p. routines from
>> Applesoft?  If the latter: they were written not by Woz but by
>> Microsoft - probably by Gates and/or Allen.
> 
> Ah, sorry, you're right... the REAL type was essentially the IEEE-754
> floating point, I'll dig out the implementation I used, obviously they
> were intended for double precision.
> 
> This was done as a part of a mathematics program for graphing - which
> also used some assembly trickery to calculate trig functions quickly.
> In the end, so much code ended up optimised for speed I seriously
> contemplated moving the whole thing over to ProDOS, but the DHR code I
> was using at the time was written in Pascal, and I couldn't be bothered
> porting it.
> 
> Matt

Bob S-C (the guy who wrote the S-C assembler) also wrote a double precision
package for Applesoft Basic.  It employed the "&" operator for doing its
stuff, and each double precision number was stored in an array of two
normal Applesoft floating-point numbers.  The S-C double precision format
used 10 bytes for its reals: one byte for the sign and exponent, and the
remaining 9 bytes for the mantissa, yielding some 21 digits of precision.

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