[net.micro.amiga] bugs in ROM manual examples

fnf@unisoft.UUCP (12/01/85)

<munch... munch.. munch. munch munc mun mu m>

Ok, so I have finally gotten around to going though my manual set in
depth.  I started with the ROM Kernel Manual which claims to be rev
1.0 8.27.85.

On pages 4-5 to 4.6 is a listing of a minimal example of creating a
task.  I typed it in verbatum, and except for needing to add the
following lines

	#include <exec/types.h>
	#include <exec/tasks.h>
	#include <exec/ports.h>

it compiled without error.  Although it did give a lot of warnings, and
warned about "mytask" not being used.  Fine.  Link it with Lstartup.obj
and amiga.lib and lc.lib.  Fine.

Type "run junk" and hold breath.  Get message "Thanks for msg, going
to sleep now" then guru meditation time (#00000004.0001C3E0).

Now go back and examine warnings more closely.  Hmmm, "structure as
function argument"  looks suspicious.  Find that childport is passed
to WaitPort and GetMsg.  Look them up and find out they need pointers
instead, stick '&' in front of childport's as arguments and try again.
No dice, more guru meditation.

Go back and add missing declaration

	extern struct Message *WaitPort ();

and cast values of &mystack[<number>] to APTR.  Fine.  Now compiles without
complaint except for no reference to mysterious "mytask".  Try again.
More guru meditation.

I am using workbench version 1.00 and Lattice C version V3.02.
Does anyone know what needs fixing.  Guess if I dig far enough, I'll
find it, but on first blush I'm kinda disappointed in the examples.
Hope they aren't all like this.  If so, they should be called 
debugging exercises.  (Granted, I probably am learning a lot more
this way, maybe that's the object :-).

-Fred

===========================================================================
Fred Fish    UniSoft Systems Inc, 739 Allston Way, Berkeley, CA  94710  USA
{ucbvax,dual}!unisoft!fnf	(415) 644 1230 		TWX 11 910 366-2145
===========================================================================