home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sys / amiga / programm / 12952 < prev    next >
Encoding:
Internet Message Format  |  1992-09-01  |  10.3 KB

  1. Path: sparky!uunet!stanford.edu!rutgers!ub!galileo.cc.rochester.edu!rjw
  2. From: rjw@merlin.cvs.rochester.edu (Robert Wilson)
  3. Newsgroups: comp.sys.amiga.programmer
  4. Subject: Tips For The Beginning Amiga C Programmer
  5. Message-ID: <1992Sep1.160223.17477@galileo.cc.rochester.edu>
  6. Date: 1 Sep 92 16:02:23 GMT
  7. Sender: news@galileo.cc.rochester.edu
  8. Organization: University of Rochester, Rochester NY
  9. Lines: 213
  10. Nntp-Posting-Host: merlin.cvs.rochester.edu
  11.  
  12. Tips For The Beginning Amiga C Programmer 
  13.  
  14. Last Major modification: July 6, 1992
  15.  
  16. Disclaimer:  most of this advice has _absolutely nothing_ to do with my
  17. opinions.  I got all of this from other people on the net.  Please
  18. do not blame me for any misleading or useless information.  My place
  19. of employment, of course, has no connection to any of the opinions
  20. expressed here.  I am in no way affiliated with Commodore Business
  21. Machines.
  22.  
  23. I first made this article in October of 1991.  I was a programmer who'd
  24. used a bunch of different computers, and operating systems, but was 
  25. completely new to the Amiga.  I posted an article asking for advice on
  26. what books to get, and any other general advice that people could offer.
  27. The first couple of drafts of this article were only filled with other
  28. people's opinions and ideas.  Now I've added some of my own opinions, but
  29. all the ideas still come from other people.
  30.  
  31. A word about future versions of this file: Obviously this file is
  32. incomplete.  There are some things I've never heard of, and new programs
  33. and books coming out all the time.  If you hear of something, please write
  34. to me and explain.  General advice about programming the Amiga is also 
  35. accepted.  Comments like, "You listed such-and-such a book.  I don't like it.
  36. I think it's a bad idea." don't do me much good.  I list the books because
  37. SOMEONE ELSE recommended it.  I'm not going to remove it just because you
  38. don't like it.  If you want to warn *me*, I'll appreciate it.  Otherwise it
  39. probably won't get passed on.
  40.  
  41. ****************** AmigaDOS versions 1.3 and 2.0 ********************
  42.  
  43. This is an exciting, and sometimes frustrating time to be jumping into
  44. Amiga programming.  The charming folks at Commodore have come out with a
  45. new version of the operating system: 2.0 (actually, they were up to 2.04
  46. the last time I looked, but the major change was the "2").
  47.  
  48. There have been some additions made.  As an example, gadgets (if you 
  49. program macs, you call them "controls", if you program X Windows you call 
  50. them "widgets") can now be programmed through something called gadtools.
  51.  
  52. What this means to you, the user:
  53.     Some programs you will encounter won't deal well with the change.
  54. It depends how they're written.  Commodore tells you at many points in
  55. their documentation, "Don't rely on this feature to be consistent in 
  56. future applications."  Some people ignore that, and their programs crash
  57. in later systems.
  58.  
  59. What this means to you, the programmer:
  60.     Thankfully, most of what applies to AmigaDOS 1.3 still applies to 2.0.
  61. This means that if you get a book that explains how to program in version
  62. 1.3, the information will still apply for the most part.  On the other hand,
  63. you'll miss out on all the new advances, and be behind the times.  Your 
  64. decision.
  65.  
  66.     In terms of which system to use: keep in mind that everybody is moving
  67. towards 2.0, so almost all of the books and code you'll see in the future
  68. will be 2.0 based.  On the other hand, at the moment there are still a lot
  69. of people running 1.3 on their machines.  It comes down to who you're writing
  70. for.  If you want a wide-ranging current audience, keep 1.3 compatibility in
  71. mind.  If you want what people *will* be using, or you're just writing for
  72. yourself and you want the most up-to-date system, use 2.0.
  73.  
  74. What this means to me, the file writer:
  75.     I have to try to keep in mind what resources apply to what version. If
  76. I mess up, please mail to me.
  77.  
  78. ************************* Recommended books *************************
  79.  
  80. THE recommended books are the Rom Kernal Reference Manuals (more commonly
  81. called RKMs), put out by the folks at Commodore themselves.  Unlike the
  82. Inside Macintosh books, where they tag on a new book each time a modification
  83. is made, and you have to check each book to see what it has to say about
  84. a given subject, the folks at Commodore have rewritten the RKMs entirely
  85. for the new version.  When looking for them / ordering them, make sure you
  86. get the 2.0 versions (the ones with the black covers).
  87.  
  88. Personally, I think the RKMs are really great.  I find them complete,
  89. easy to understand, and written in a very easy-going style.
  90.  
  91. (ISBN numbers thanks to a posting by Kevin Taddeucci)
  92. 1) "Includes and AutoDocs" (ISBN 0-201-56773-3)
  93. 2) "Libraries"           (ISBN 0-201-56774-1)
  94. 3) "Devices"            (ISBN 0-201-56775-X)
  95. Also, from the same series, get
  96. 4) _Amiga Hardware Reference Manual_  (ISBN 0-201-56776-8)
  97. 5) _Amiga User Interface Style Guide_ (ISBN 0-201-57757-7)
  98.  
  99. The source code from the RKMs for AmigaDos 1.3 is on Fish disk 344,
  100. in archived form.
  101.  
  102. Another recommended manual is 
  103. _The AmigaDOS Manual_, from Bantam.
  104. The RKMs don't cover the disk operating system, so this is the official 
  105. manual for AmigaDos.
  106.  
  107. Books that give instruction are more varied.  It depends on what
  108. level you're at, and what you want to learn.
  109.  
  110. I'm told that a good book to learn from is _Programmer's Guide to
  111. the Amiga_ by Robert Peck.  A *lot* of people recommended this one.
  112.  
  113. The biggest controversy I've seen about books is whether the set that
  114. Abacus puts out are worthwhile.  Just putting it in this article puts me
  115. at risk of starting a flame war.  Let me just say that some people I've
  116. heard from really like them, and some people really, really hate them.
  117. The books I've seen so far are for AmigaDOS version 1.3, so be careful.
  118.  
  119. Some of the Abacus books:
  120.     _Amiga C for Beginners_
  121.     _Amiga C for Advanced Programmers_
  122.     _Advanced System Programmer's Guide_
  123.     _Amiga Graphics Inside and Out_
  124.     _Amiga System Programmers Guide_
  125.  
  126. Recommended magazines:
  127.     Amazing Computing's Tech journal, P.i.M Publications  --  800-345-3360
  128.  
  129. Until recently there was an AmigaWorld technical journal, but a recent
  130. "business decision" has killed it.
  131.  
  132.  
  133. ************************* Other reference *************************
  134.  
  135. The Fred Fish disks (if you don't know what those are, read the
  136. FAQ sheet posted to comp.sys.amiga.intro, or mail to me for a copy of
  137. that FAQ sheet) have a C manual, in disks 456 and 457.  WARNING: the
  138. advice contained therein is for versions previous to 2.0.  On the other
  139. hand, they also contain lots of source code (annotated and commented),
  140. explanations of everything, and example programs.
  141.  
  142. It's free (though you can send them a contribution if you want), so you
  143. don't have much to lose by trying it.
  144.  
  145. ************************* C Compilers *************************
  146.  
  147. Okay, I'm sure I don't know all the C compilers there are out there.  Feel
  148. free to mail to me with details (name, cost, where-to-get, gen'l comments)
  149. of ones I don't list.
  150.  
  151. The 3 most mentioned in the Usenet Amiga newsgroups are SAS/C
  152. (a commercial compiler), Manx Aztec C (also commercial), and DICE, by
  153. Matthew Dillon.  A crippled version of DICE is available in binary-only 
  154. on Fred Fish disk 491.  I've heard that even the crippled version is good,
  155. and that he only asks $50 for the full-fledged version.  Not bad!
  156.  
  157. I'm also told of HCC: Sozobon, available on Fish Disk 508.  I'm told that
  158. there is limited documentation, but if you know C and compilers you should
  159. do alright.
  160.  
  161. ************************* Misc advice *************************
  162.  
  163. Remember: this is not _my_ advice.  These are things that people told
  164. me, and I'm passing on.
  165.  
  166. 1) I'm told it used to be pretty easy to become a registered developer
  167. with commodore, but no longer.  However, they come out with a mailing called 
  168. AmigaMail that is highly recommended, and is available to non-developers as
  169. well as developers.  Amigamail is available through CATS (Commodore Amiga
  170. Technical Support) and comes out every two months.
  171.  
  172.    To apply to become a registered developer, call CATS (Commodore Amiga
  173. Technical Support), which is (215) 431-9180 in the U.S.A., and request an
  174. application.
  175.  
  176.    Other materials are available for non-registered and users from 
  177.             Department C
  178.         Commodore Business Machines Inc.
  179.               1200 Wilson Drive
  180.             West Chester, PA 19380
  181.  
  182. 2) For beautiful user interfaces, get PowerWindows.  It lets you set up
  183. the interface graphically, and then produces code that you can compile.
  184. Pretty much guaranteed to save you a _lot_ of time.  However, the last
  185. version that I saw is for AmigaDOS version 1.3, so the usual restrictions
  186. apply.  Also, people used to using ResEdit on the Macintosh are bound
  187. to be disappointed.
  188.  
  189. Another person recommended GadToolsBox, on Fish disk 570.  Someone wrote
  190. saying there's something called TplEdit on Fish disk 583, which isn't as 
  191. full featured as GadToolsBox "although it isn't bad", I'm told.
  192.  
  193. One person from Sweden said that it was hard to get PowerWindows over 
  194. there ("over here" to those of you reading this in Sweden :-), but 
  195. this person uses PowerSource for the same purpose, available on Fish
  196. disk 547.
  197.  
  198. 3) One person recommended CygnusEd Professional Release 2 from ASDG 
  199. as a replacement for LSE, if you use SAS/C.  Another recommended
  200. TurboText from OXXI.  Yet another recommended DME (by Matt Dillon).
  201. Then there's AZ, on Fish disk 346.  Seems like everyone has a favorite.
  202. A few more and I'll have to make a formal list.
  203.  
  204. Those of you coming from other environments may be overjoyed to find that
  205. Commodore has included MicroEmacs with the 2.0 operating system.
  206.  
  207. 4) When trying to write portable code, don't depend on hardware timing
  208. loops, since their execution varies greatly on various machines.  You
  209. can use the system timer device, VBLANK, or the CIA registers.  If using
  210. VBLANK, keep in mind what the refresh rate is on your monitor, and that
  211. there are people who won't have the same rate.
  212.  
  213. 5) Don't make calls to system hardware.  Tempting, yes, but additions and
  214. changes have already made a large number of programs obsolete.  Don't let
  215. it happen to you!
  216.  
  217. 6) There is a FAQ sheet for the Amiga newsgroups, available from 
  218.     random@presto.UUCP (the writer of the FAQ)
  219.     rjw@cvs.rochester.edu (me)
  220.  
  221. 7) People used to other platforms, especially Unix, may be pleased to know
  222. that the Free Software Foundation's GNU software (such as gcc, g++, and 
  223. their version of emacs) are becoming more and more available as people 
  224. port them to the amiga.
  225.