[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Is it too hard to program for the Apple?
In article <WKGdnd-OD9HIOR7WnZ2dnUVZ_qKdnZ2d@giganews.com>,
"Michael J. Mahon" <mjmahon@aol.com> wrote:
> D Finnigan wrote:
[...]
> > Slower even than Applesoft? That's not the impression that I got.
[...]
> Pascal compiled to p-code, or C compiled to runtime library calls,
> runs perhaps twice as fast as compiled Applesoft, unless it does
> a lot of floating-point arithmetic or graphics library calls, in
> which case the speed is more comparable.
While Apple's UCSD Pascal p-code system trades speed for space, Kyan
Pascal offers an interesting variation: it can either compile to runtime
library calls or compile to inline routines. Here's an example that
inlines the floating point libraries. Of course, the program is just an
interpreter itself!
<http://home.roadrunner.com/~jbmatthews/a2/calc.html>
I like being able to optimize critical sections of code in assembly, and
most development tools provide some way to do so. Applesoft has & and
USR() vectors; UCSD Pascal has a linker; Kyan has inline assembly; and
typical C compilers offer both.
NadaNet is surely a premier example of mixing Applesoft and assembly:
<http://home.comcast.net/~mjmahon/NadaNet.html>
Here's an example using Kyan's inline approach to list volumes and tally
the ProDOS volume bitmap of each:
<http://home.roadrunner.com/~jbmatthews/apple2.html#df>
Here's an example using UCSD Pascal to link separate assembly routines:
<http://home.roadrunner.com/~jbmatthews/a2/zap.html>
--
John B. Matthews
trashgod at gmail dot com
<http://sites.google.com/site/drjohnbmatthews>