home *** CD-ROM | disk | FTP | other *** search
/ The Fred Fish Collection 1.5 / ffcollection-1-5-1992-11.iso / ff_disks / 300-399 / ff384.lzh / NorthC / Questions < prev    next >
Text File  |  1990-10-23  |  10KB  |  222 lines

  1.  
  2. (c) 1990 Steve Hawtin.
  3.  
  4.   Over the last few months, since NorthC was first released, quite a few 
  5. people have written to me to ask about NorthC, usually they also add some 
  6. supplementary questions, I thought it would be worth putting down the answer 
  7. to some of these queries so that you have to think of more interesting ones.
  8.  
  9.  
  10. 1. What books on 'C' should I buy?
  11.  
  12.   Since 'C' is the current "fashionable language" there are a vast number 
  13. of books on 'C' around, mostly written by the people who were writing 
  14. books on Artificial Intelligence a couple of years ago and know just as 
  15. much about 'C'.  If you want to buy a book on 'C' here are some that I can 
  16. recommend.
  17.  
  18.   "The C programming language" by Kernigan & Ritchie.
  19.  
  20.   If you want to learn 'C' this is the best book, it may be hard going at 
  21. first but unlike many "easy" books you will still be using after a year of 
  22. 'C' programming.  This is the book that professional 'C' programmers use 
  23. as a reference.  You will find a copy almost everywhere 'C' is used 
  24. seriously, normally dog-eared and grey from overuse.  There are two 
  25. editions of this book, the original edition and the ANSI edition, you 
  26. should not worry about which on you get, although the ANSI one is more up 
  27. to date most 'C' compilers will be closer to the old edition for some time 
  28. to come.
  29.  
  30.   "C traps and pitfalls" by Koenig
  31.  
  32.   For the experienced 'C' programmer this book is a must, it points out 
  33. many of those nice little quirks that trap everybody from time to time.  
  34. This book collects together a vast body of 'C' experience, once you know 
  35. the difference between a union and a structure this book will tell you all 
  36. the things you didn't realise you didn't know.
  37.  
  38.   "Standard C" by Plauger & Brodie
  39.  
  40.   The best book I have seen on the ANSI standard, this book is a reference 
  41. guide rather than a "how to" book.
  42.  
  43.   "Amiga ROM Kernel:Libraries & Devices" by CATS
  44.   "Amiga ROM Kernel:Includes & Autodocs" by CATS
  45.  
  46.   These two books are the complete guides for the Amiga specific bits, 
  47. most of the examples are in 'C', but you will have to get hold of the 
  48. include files.  The first book introduces AmigaDOS and gives examples of 
  49. how to do things with the machine, the second is the ultimate reference 
  50. book for Amiga specific programming.  If you are buying these make sure 
  51. you get the right version for your version of workbench, currently the 
  52. ones in the blue covers for Workbench 1.3.
  53.  
  54.  
  55. 2. Is NorthC ANSI compatible?
  56.  
  57.   The answer to this question is no, although I have tried to use ANSI 
  58. functions where I can there are still many areas where the compiler falls 
  59. short of the standard.  The "Bugs.doc" file outlines the areas that do not 
  60. conform.
  61.  
  62.   The ANSI standard clearly states that compiler writers are not allowed 
  63. to claim ANSI conformance unless they implement everything in the 
  64. standard, however this has not stopped certain companies claiming to have 
  65. ANSI 'C' compilers when they do not support multibyte characters and 
  66. locales.  As yet I have not managed to find a true ANSI 'C' compiler.
  67.  
  68.  
  69. 3. Is NorthC shareware or public domain?
  70.  
  71.   The answer to this question is no, NorthC is neither public domain or 
  72. shareware.  Shareware programs are programs that are distributed by the 
  73. public, but if you use them, or want an up to date copy, you must send 
  74. some money to the authors.  Public domain programs are programs that you 
  75. can do anything with, they belong to the public.
  76.  
  77.   Most of NorthC is copyright to the original authors, myself, Charlie 
  78. Gibbs, the Software Distillary and so on, however the copyright holder has 
  79. allowed other people, this means you, to copy their programs and data 
  80. provided you stick to certain rules.  These rules normally just say that 
  81. you are not allowed to use the stuff for commercial gain, see the 
  82. individual files on the disk to find out the full set of restrictions for 
  83. each program.
  84.  
  85.   If you feel that I deserve some money for the hard work that I have put 
  86. into this disk send £15 or $25 to your national spastics charity, they 
  87. need it more than I do.  If you feel that some of the other people that 
  88. contributed deserve some recognition please send them any money direct.
  89.  
  90.  
  91. 4. Why isn't the NorthC disk bootable?
  92.  
  93.   Well the reason for this is that I could not create a bootable disk 
  94. without including some programs by Commodore.  It is easy to create a 
  95. bootable NorthC floppy, just copy your workbench floppy, delete all the 
  96. bits you don't need, the ".icon" files, all the fonts except topaz, the 
  97. commands you don't want.  Then move "NorthC", "A68K", "Blink", and "make" 
  98. to the Utilities directory, move the contents of the "include" directory 
  99. on to the disk, create a directory called "clibs" and move "crt0.o" and 
  100. "libc.a" into it, and add the lines
  101.  
  102.     assign clibs: :clibs
  103.     setenv INCLUDE df0:include
  104.     newshell "newcon:0/10/640/246/NorthC 1.2 Shell"
  105.  
  106. into "s:startup-sequence" to replace the "loadwb" line.  On NTSC systems 
  107. the newcon command should of course read
  108.  
  109.     newshell "newcon:0/10/640/190/NorthC 1.2 Shell"
  110.  
  111.   If you have problems fitting all this on a single floppy I have been 
  112. told that "Power Packer" by Nico Francois is a useful tool for squeezing 
  113. more programs on a disk, it is distributed by Fred Fish, ask your local PD 
  114. supplier for the disk.
  115.  
  116.   Once you have created a bootable floppy in this way you are not allowed 
  117. to give copies away, that would break some of the rules for copying the 
  118. programs.
  119.  
  120.  
  121. 5. Where do I get the AmigaDOS include files?
  122.  
  123.   You will notice that the NorthC 1.2 disk does not contain the AmigaDOS 
  124. include files, I asked Commodore if I could put them on the disk but they 
  125. refused.  To get them you can either type them in from "Includes & 
  126. Autodocs" or you can write to Commodore and ask to become a "registered 
  127. developer", this will cost about £20 in the UK, presumably a similar 
  128. amount elsewhere.  Commodore will send you the include files and various 
  129. other useful bits and pieces.  I have been told that it is well worth 
  130. doing.  See the "README" file on the NorthC disk for more details.
  131.  
  132.  
  133. 6. Why do you give away your software?
  134.  
  135.   This is one of the most difficult questions I am asked, here is a 
  136. selection of answers
  137.  
  138.   0. Because its needed.
  139.   1. Because its there.
  140.   2. Because I cannot sell it.
  141.   3. For the money.
  142.   4. Because I think more Amiga users should have access to 'C'.
  143.   5. Because software should be free.
  144.   6. To encourage users to purchase Lattice C.
  145.   7. As an Erisian it is my duty to spread knowledge.
  146.   8. For the fame.
  147.   9. Just because...
  148.  
  149.   Some of these answers are true, some are false and some are meaningless, 
  150. you will have to sort them out yourself.
  151.  
  152.  
  153. 7.  How did you port NorthC
  154.  
  155.   Before I answer this question I should point out that I have written 
  156. programming languages before, in the last ten years I have written a 
  157. "Forth" interpreter, a "Scheme" interpreter and compiler, and been 
  158. professionally involved in "Common Lisp" interpreters and compilers.  So 
  159. the idea of porting a 'C' compiler was not as horrendous as it should have 
  160. been.
  161.  
  162.   When I bought my Amiga in December 1989 I assumed that I would be able 
  163. to get hold of a complete 'C' system in the public domain, in fact what I 
  164. found was
  165.  
  166.   1) Sozobon C, on FISH 171, an "almost ported" 'C' compiler.
  167.   2) SmallC, on FISH 141, a working but very limited 'C' compiler.
  168.   3) A68K, on FISH 186, a working assembler.
  169.   4) Blink, on FISH 40, a working linker.
  170.   5) SmallLib, on FISH 92, a small library for assembler programmers.
  171.  
  172. one problem with Sozobon was that the output was not compatible with any 
  173. of the Amiga public domain assemblers.  So my first step was to create a 
  174. program "convert" that read a ".s" file produced by Sozobon and converted 
  175. it into a ".asm" file that A68K could deal with.  I wrote the first 
  176. version in SmallC, this finally convinced me that SmallC was not the 
  177. language for me.  I now could compile 'C' programs in three steps,
  178.  
  179.   1) hcc test.c
  180.   2) convert test.s test.asm
  181.   3) a68k test.asm
  182.  
  183. using this I created some 'C' library functions, and used these to create 
  184. a new version of "convert".  I then ran the Sozobon compiler through this 
  185. three stage compilation process, the resulting program summoned the guru 
  186. of course.  After two months of continual work modifying the Sozobon 
  187. source I managed to get the compiler sort of working.  Once I had a 
  188. version of the compiler that could compile itself I changed the output 
  189. routines to make the "convert" program unnecessary.
  190.  
  191.   As soon as the system was stable I released it, I thought that it was 
  192. worth sending out a version that was incomplete so that people could start 
  193. to play with 'C'.  I called this first release NorthC 1.0 because the 
  194. original source has been so heavily hacked the program was sure to contain 
  195. many new and exciting bugs, this was distributed by Fred Fish on FISH 
  196. 340.  After two more months I had a version I felt happy with, I released 
  197. this at the start of May as NorthC 1.1.  Having spent almost every evening 
  198. for more than four months working on NorthC I decided to give it a rest.
  199.  
  200.   As a passing thought if I had just bought a copy of Lattice when I 
  201. started I would have saved myself a large amount of time and money.  
  202. However I would not know as much about 'C' as I now do.
  203.  
  204.  
  205. 8.  Are you trying to replace Lattice?
  206.  
  207.   In a sense the answer to this question is yes, when I first started 
  208. working on NorthC I could have got an illicit copy of Lattice and used 
  209. that to develop my 'C' programs, however I felt that it would be better to 
  210. have a legitimate 'C' compiler.  So I hope that NorthC and the other 
  211. public domain 'C' compilers will replace all the illegal copies of Lattice 
  212. that are floating about.
  213.  
  214.   Of course the Lattice compiler is a professional piece of software, the 
  215. documentation is better, and in hard copy, I would assume the code produced 
  216. is quicker and more compact, and the software support on Lattice is better.  
  217. If the size and speed of the final program matters enough to spend the 
  218. money then you should go out and buy a professional compiler.  Until that 
  219. time comes you can carry on using NorthC, any code you write should work in 
  220. any half descent 'C' compiler.
  221.  
  222.