[comp.sys.amiga.tech] Abacus books

jesup@cbmvax.commodore.com (Randell Jesup) (07/05/90)

In article <1990Jun20.162550.7498@warwick.ac.uk> cstxqbt@warwick.ac.uk (CrisP of Truth and Justice) writes:
>>In article <11891@cbmvax.commodore.com> jesup@cbmvax (Randell Jesup) writes:
>>>
>>>	As a personal opinion, I dislike most of the Abacus Amiga books.
>>>They tend to encourage poor programming practices (like not using symbolic
>>>constants, not using standard include files, making direct rom references,
>>>making MAJOR assumptions about how system tasks work (assuming that clearing
>>>a bit in some system task's structure will stop it from running), etc, etc.)
>>>Note that is a personal opinion.
...
>I would like to use symbolic contants in my programms. But I don't. I tend
>only to have those I defined myself. I tend not to use all those system
>constants defined in the include files. The reason for this is they take so
>long to load from floppy.

	There are plenty of solutions for this if you must use a floppy-
only system.  Many good assemblers, and both commercial C compilers, allow
you to precompile include files.  To reassemble trackdisk takes only a
minute or so, and all of Dos only takes about 5 or so (and you rarely have
to recompile or assemble an entire module, unless you like monsterous
source files instead of small modules.)

>releaf from all that time wasted loading up include files. I admit this is
>not a very good thing to do. I have started defining them myself at the
>begging of my source. I am thinking of writing my own include files that
>arn't full of such a big heap of cheese.

	It also means that a) no one else can easily read your source, b)
even you may have trouble reading your source after not working on it for
a while (this is where the term "write-only code" comes from), and c) any
time the include files change, and you want to use any of it, you must
revise all your source by hand (and may well miss some, introducing subtle
bugs).

>  I would just like to say that making direct ROM references to a complete
>no no. I am not aware of a book that actualy tells people to do it. There
>the mentioning of actual addresses. This is just a waste of space. But not
>as big a waste of space as the heap of cheese that fills out the RKMs.

	The abacus books encourage you to do this, directly or indirectly.

>  As for major assumptions it's hard to tell the assumptions from the leagal
>stuff without sifting through all that waffle in the RKMs. I can understand
>about altering system structures. I don't do this as they tend to be full of
>such a great heap of cheese.

	The abacus books I've looked at were sprinkled with assumptions that
the system software would never change it's internals.

>  Buy the way how do you stop a running task that has no intention of
>stopping?

	Simple.  You don't.  Any attempt to do so is going to cause major 
problems, if not immediately then later (or when your timing is unlucky).
For example, clearing the bit the trackdisk was waiting on might stop it,
or if your timing is bad it might not even slow it down (it could be waiting
on other signals, for example, or might not be waiting at all).

>  I suppose a exposing a less experianced programmer to these things may give
>some wrong ideas. But if the system software was better thought out you would
>not have so much dad programming practices being used. For those who love the
>RKMs: Do you know just how much easier it is to program the hardware directly
>than it is to use the system software?

	I program the hardware (since I work on system modules like trackdisk).
I guarantee you that using the defined interfaces is much easier, neater, and
faster for me than banging on the hardware.  Plus I have an intense dislike
of any program that disables or shuts down multitasking, doesn't work on 
newer, faster amigas, etc, etc.  This includes games (which are the worst
offenders).

>P.S. does anyone know if the Abacus book on Amiga disk drives is any good?

	As far as I can tell, it's the worst of the lot.  There are many
dubious or dangerous practices, things that are just plain wrong, or break
under things like 2.0 (or even 1.3, if you try to use the hardcoded
addresses they list).

Disclaimer: these are my own personal opinions, not those of Commodore or
anyone else (I'll rent them real cheap, though...)

p.s.  This is my last post on this topic.  I only posted this because no one
else had responded yet.

-- 
Randell Jesup, Keeper of AmigaDos, Commodore Engineering.
{uunet|rutgers}!cbmvax!jesup, jesup@cbmvax.cbm.commodore.com  BIX: rjesup  
Common phrase heard at Amiga Devcon '89: "It's in there!"