[comp.sys.amiga] Sources needed

MCARTSHA@UREGINA1.BITNET (Shan Mcarthur) (07/13/89)

Hello.  I am in desperate need of some C sources that I can use as examples
to aid in my learning C on the Amy.  I already know C , but this operating
system is different than what I am used to.  I have a few books, but they
either don't have examples or are FAR too simple and have no real applications.
I would like to find some examples on gadgets, menus, m/tasking, dos operations
, ect. ect.
  Also, here in Regina, we can't get Robert Peck's  PROGRAMMERS GUIDE TO THE
AMIGA (Sybex).  This is totally frustrating.  I hear it is a good book.  If
anyone out there wants to part with a used copy, or knows how I can actually
get it PLEASE forward something to me at MCARTSHA@UREGINA1.

  I have RKM includes & Autodocs, Amiga Programmer's Handbook, and Inside
the Amiga with C and have found all of them to be either way too simple and
not informative, or way too informative and no examples of how things
operate together.   IE:  none of them show me how to non-busy wait for
a number of different signals.  I would like to know how to accept input
from a string gadget at the strike of a return key.

  i am totally frustrated at the lack of docs for this computer, but I hear
that Peck's book is what I really need.

Again, I am just waiting to learn, but am short on some good examples.

Shan

kevin@uts.amdahl.com (Kevin Clague) (07/13/89)

In article <8907122057.AA08021@jade.berkeley.edu> MCARTSHA@UREGINA1.BITNET (Shan Mcarthur) writes:
>Hello.  I am in desperate need of some C sources that I can use as examples
>to aid in my learning C on the Amy.  I already know C , but this operating
>system is different than what I am used to.  I have a few books, but they
>either don't have examples or are FAR too simple and have no real applications.
>I would like to find some examples on gadgets, menus, m/tasking, dos operations
>, ect. ect.
>  Also, here in Regina, we can't get Robert Peck's  PROGRAMMERS GUIDE TO THE
>AMIGA (Sybex).  This is totally frustrating.  I hear it is a good book.  If

Yes.  It is a GOOD book. Too bad you can't get one.  Have you looked
at mail order places?

>
>  I have RKM includes & Autodocs, Amiga Programmer's Handbook, and Inside
>the Amiga with C and have found all of them to be either way too simple and
>not informative, or way too informative and no examples of how things
>operate together.   IE:  none of them show me how to non-busy wait for
>a number of different signals.  I would like to know how to accept input
>from a string gadget at the strike of a return key.

If you want to Wait() for many signals, just or the Signal's SigMasks
together and pass them to wait.

Example:

  aSigMask = 1 << aSigBit;
  bSigMask = 1 << bSigBit;
  cSigMask = 1 << cSigBit;

  allMask = aSigMask | bSigMask | cSigMask;

  gotSigMask = Wait(allMask);

  if (GotSigMask & aSigMask) service_aSig();
  if (GotSigMask & bSigMask) service_bSig();
  if (GotSigMask & cSigMask) service_cSig();


Nice and simple....

I extracted this from MandelVroom sources that were posted in
comp.sources.amiga.  There are about 400K of source there in a relativly
full figured program.  You might want to start with main.c which
contains the main Wait() loop.

>
>  i am totally frustrated at the lack of docs for this computer, but I hear
>that Peck's book is what I really need.

It is not that there is a lack of docs.  It is that you lack access to
docs.  The Amiga docs have gotten a lot better especially due to the
efforts of Rob Peck (a really nice guy.)  Back when there were no
docs, I used sources off the Fish disks.  I gave the sources to
MandelVroom away, so people like you could have working examples to
many nice features available on the Amiga.

MandelVroom spawns off tasks to do picture Mandelbrot and Julia picture
generation, so you can look at the code for how to handle Multitasking.

>
>Again, I am just waiting to learn, but am short on some good examples.

If you need help sorting through the MandelVroom sources, let me know
and I'll help.   Good luck!

>
>Shan

Kevin
-- 
UUCP:  kevin@uts.amdahl.com
  or:  {sun,decwrl,hplabs,pyramid,seismo,oliveb}!amdahl!kevin
DDD:   408-737-5481
USPS:  Amdahl Corp.  M/S 249,  1250 E. Arques Av,  Sunnyvale, CA 94086

[  Any thoughts or opinions which may or may not have been expressed  ]
[  herein are my own.  They are not necessarily those of my employer. ]

sneakers@heimat.UUCP (Dan "Sneakers" Schein) (07/14/89)

In Message <8907122057.AA08021@jade.berkeley.edu>, MCARTSHA@UREGINA1.BITNET (Shan Mcarthur) writes:

>Hello.  I am in desperate need of some C sources that I can use as examples
>to aid in my learning C on the Amy.  I already know C , but this operating
>system is different than what I am used to.  I have a few books, but they
>either don't have examples or are FAR too simple and have no real applications.

   I wrote a series of C examples for the 88 Amiga DevCon (while still @ CATS).
  They started with a simple window and built to a custom screen with a window
  that had menus, gadgets, and accepted keyboard input.

   This may be on the track of what your looking for, if you think it is then
  drop some e-mail to cbmvax!carolyn and check on the distribution policy.
  (Sorry but I really don't know what it is)

   When I was first learning C and the Amiga in addition to pesting Carolyn I
  learned alot from the code on early FISH disks. (Seems the later ones don't
  have as much source code in the form of examples)

  Sneakers

--
                                      ___
    Dan "Sneakers" Schein            ////          BERKS AMIGA BBS
    Sneakers Computing              ////   80+ Megs of software & messages
    2455 McKinley Ave.      ___    ////         12/2400 Baud - 24 Hrs
    West Lawn, PA 19609     \\\\  ////              215/678-7691
                             \\\\////
    {pyramid|rutgers|uunet}!cbmvax!heimat!sneakers   

rap@peck.ardent.com (Rob Peck) (07/15/89)

In article <8907122057.AA08021@jade.berkeley.edu> MCARTSHA@UREGINA1.BITNET (Shan Mcarthur) writes:
>Hello.  I am in desperate need of some C sources that I can use as examples
>to aid in my learning C on the Amy.  I already know C , but this operating
>, ect. ect.
>  Also, here in Regina, we can't get Robert Peck's  PROGRAMMERS GUIDE TO THE
>AMIGA (Sybex).  This is totally frustrating.  I hear it is a good book.  If
>anyone out there wants to part with a used copy, or knows how I can actually


ANNOUNCEMENT Time...   (hey - we just passed 20,000 in sales, and it's
			now available in German, Italian and Danish)

The Programmer's Guide To The Amiga, by Rob Peck (ME), Sybex, 1987
(now in its 5th printing, with all known typos corrected) is available
directly from the Author at its list price of $24.95.  An accompanying
diskette with Lattice/Manx compatible C source code is also available,
for $15.00 separately (as shown in the coupon in the back of the book)
or for $7.50 when purchased with the book.

No charge for surface mail, and I pay the California sales tax for
California residents.

This is "news" to many people such as the poster, but what makes it
news-ier is that RSN (well, maybe a coupl-a-more weeks) I expect
to have in hand a complete Benchmark Modula translation of the disk.
AND the M2Amiga and M2S folks are working on the TDI Modula disk that
I gave them and both of them also expect to have a translation available
lets say in the forseeable future.  (Probably M2S sooner than the others
because the language is SO similar to TDI).  The Modula disks are sold
on the same basis as the C disk.

SO now the Programmers Guide will also be usable by Amiga programmers
who want to learn Modula... read the book, which tells about the
routines, and study the source code on the disk.

(Is there anyone who has done an Assembler translation of the disk?
 I paid someone to do the Manx [from original Lattice] conversion;
 and I betcha Chris Gray has a Draco version available, though I have
 not asked him about it)

** OR - if you can prove you already have the book (a photocopy of the
coupon in the back is sufficient), my C or any one of the Modula disks
is $7.50, delivered, first class mail in the US.

Secondary Announcement:  For additional examples in C (and Modula too),
I still offer an AUDIOTOOLS disk.  Current version number is 3.0, which
includes simplified source/object for accessing Amiga audio and an updated
version of the Amiga World article that I did in July/August 1987.

The AUDIOTOOLS have functions for controlling the channels, play notes,
frequencies, and sampled sounds, let you enqueue notes for the channels
to play, and synchronize the graphics and the sound from the AUDIO end,
(not play this note in response to this drawing command, but do this
drawing as a result of this note beginning to play.  Uses the audio
device itself, for extremely low overhead.  Soon to include functions
for reading 8SVX sampled sounds (did an article for next issue of
Compute's Amiga Resource) and any other enhancements we can manage
in spare time for a 3.x or maybe even a 4.0 release.   Unknown whether
the final version of the Addison Wesley RKM has info about queueing sounds
to the channels but the 1.2 and prior versions did NOT have it and the
tools are, I believe, the best place to look to find reasonable
SOURCE material to supplement the RKM's.  (RKM and Inside The Amiga With C
both reserve the audio channels, then write directly to the hardware.
AUDIOTOOLS uses the audio device as it was designed to be used... queue
up a whole song if you wish, though not using IFF quite yet.

Well, here's the access address:  DATAPATH, POBox 1828, Los Gatos, CA 95031
Max response time should be two weeks or less... we are out of books, it
takes a little while for SYBEX to get more to us.

I have emailed abbreviated info about the audiotools to Edwin Hoogerbeets
in the hopes that he'd add it as ",AUD" to the monthly intro posting of
comp.sys.amiga (or tech, actually), but apparently my email drops into a
black hole somewhere between here and there.  I know he'd have responded
if he'd have received it.  

Rob Peck

rap@peck.ardent.com (Rob Peck) (07/15/89)

In article <055E02KL3eqd01@amdahl.uts.amdahl.com> kevin@amdahl.uts.amdahl.com (Kevin Clague) writes:
>>  Also, here in Regina, we can't get Robert Peck's  PROGRAMMERS GUIDE TO THE
>>AMIGA (Sybex).  This is totally frustrating.  I hear it is a good book.  If
>
>Yes.  It is a GOOD book. Too bad you can't get one.  Have you looked
>at mail order places?

I forgot to mention in my Announcement posting that BRIWALL, and
COMPUTER DISCOUNT both are carrying the book.  And I understand that
Walden books has it too, if not in the stores, then available on special
order from their warehouse.  BRIWALL (mail order) advertises in
Amiga World.  Their July ad featured the book (with disk) in a 1/8 page
insert.  COMPUTER DISCOUNT's mail order newspaper catalog (many many
pages) has a 1/2 page ad for the Programmer's Guide.  :-)

Rob Peck