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

Re: Basic compiler



Paul Schlyter wrote:
> In article <1161708151.354200.277150@m73g2000cwd.googlegroups.com>,
> finksterj <finkjsc@yahoo.com> wrote:
>
> > Paul Schlyter wrote:
> >> In article <1161634952.873337.254300@f16g2000cwb.googlegroups.com>,
> >> finksterj <finkjsc@yahoo.com> wrote:
> >>
> >> ................
> >>> I know the Beagle Compiler can "chain" multiple programs together, so
> >>> the limitation on program size is moot as you can split your code into
> >>> smaller segments and chain them using common variables.
> >>
> >> ....but it is a p.i.t.a. to have to split up your programs into chaine'd
> >> modules like that.  If you're unlucky, the program can end up thrashing
> >> between chained modules all the time, making the effective execution of
> >> the program almost grind to a halt.
> >
> > I agree it might be difficult & tedius to chain multiple programs
> > together using the Beagle Compiler, but if you are implying that
> > chaining regular Applesoft programs together is prone to some random
> > trashing between modules, I assure you that is not the case. You can
> > successfully chain multiple problems together with common variables,
> > machine language routines, and the hi-res screen without problems.
>
> If we disregard the cases of incompetent programming, it's the program
> logic which decides how well suited the program is for chaining.  If
> the program is nicely sequential (i.e. it does A, then B, then C, then
> D, then E, then F, and then terminates), it is well suited for
> chaining.  But if the program jumps between all of A,B,C,D,E,F all the
> times, and a large number of times, during execution, then it is less
> well suited for chaining.
>
> --
> ----------------------------------------------------------------
> Paul Schlyter,  Grev Turegatan 40,  SE-114 38 Stockholm,  SWEDEN
> e-mail:  pausch at stockholm dot bostream dot se
> WWW:     http://stjarnhimlen.se/

In general I will agree, however there is a finite amount of memory
available to Applesoft, so any program of even moderate complexity will
require chaining between different modules-usually many times during
execution-while keeping common variables intact and co-existing with
machine language programs and the hi-res screen. This presents no real
difficulty or problems.

For example, Silvern Castle has over a dozen chained modules that are
called multiple times so that most of these chained programs are
executed for a total of over 100 times during the course of an average
30 minute game session.

I have yet to see any ill-efforts or problems due to this multiple
chaining. Not even disk access is much of an issue due to the
relatively small size of the modules-although I do preload the
most-used modules to the ProDOS /RAM drive for best performance.