home *** CD-ROM | disk | FTP | other *** search
/ Amiga Elysian Archive / AmigaElysianArchive.iso / prog / c / pdc.lzh / File20 < prev    next >
Text File  |  1991-08-04  |  7KB  |  209 lines

  1.     PDC - a Publicly Distributable C Compiler
  2.         Version 0.92 - 24 July 1988
  3.             by Jeff Lydiatt
  4.                and Olaf Seibert
  5.  
  6.  
  7.             COPYRIGHT NOTICE
  8.  
  9.  
  10.  
  11. Matthew Brandt, the original author holds the commercial rights to the
  12. original version.  The modification to PDC by both Olaf Seibert and Jeff
  13. Lydiatt are also copyrighted.  Permission is given to freely redistribute
  14. the compiler and associated support programs, but not for profit.  All
  15. commercial rights are reserved.
  16.  
  17.  
  18.  
  19.             SYNOPSIS
  20.  
  21.  
  22.  
  23. A Publicly Redistributable C Compiler system targetted for the Amiga's
  24. operating system.  This is an update from the C compiler found on Fred
  25. Fish disk #110.  Major enhancements include:
  26.  
  27.     o compiler now implements "typedef", and "unsigned".    |Thanks
  28.     o initialization of auto variables            | Olaf!
  29.     o full 32 bit multiply, divide and modulus operations.    |
  30.     o better register tracking.
  31.  
  32.     o a full fledged macro preprocessor
  33.     o a new version of make
  34.     o a front end program for automating the compile-assemble-
  35.       Blink process.
  36.     o a small PD version of Amgia.lib
  37.     o limited stdio library support.
  38.  
  39. THis version is not a full-fledged compiler yet however.  Floating point
  40. variables are not supported, nor are bit fields. You will also need to
  41. order the include files that map the Amiga's operatings system from
  42. Commodore if you want to compile any heavy duty programs that need access
  43. to the Amiga's nicer features or it's hardware.  A kit is available from
  44. Commodore for $20 - more on this below.
  45.  
  46. Although this compiler has a long way to go compared to a commercial
  47. system, suprisingly you will find you can successfully compile and run
  48. most public domain software with this version.  As such PDC makes a good
  49. choice for the beginner who wants to see what C is about, or even the
  50. expert who does not want to put out the price of a full fledged C
  51. compiler.  A number of examples are included to give you a flavour.
  52.  
  53.  
  54.  
  55.  
  56.                 SETUP
  57.  
  58.  
  59.  
  60. For a one or two disk system, I suggest you make a stripped down version
  61. of your workbench by removing the system directory and all the demos.
  62.  
  63.     o copy the PDC0.92/c directory contents to the workbench c directory.
  64.  
  65.     o copy the PDC0.92/lib directory contents to your workbench lib dir-
  66.       ectory.
  67.  
  68.     o make a directory called "include" in the root directory.  Copy
  69.       the pdc0.92/include into the new workbench include directory.
  70.  
  71.     o in your startup-sequence in your s directory, add the commands
  72.  
  73.         assign PDC: df0:
  74.         stack 20000
  75.         path add PDC:c
  76.  
  77.       Another alternative is to simply name the Workbench disk "PDC"
  78.       using the relabel command and skip the assign command.
  79.  
  80.     o if you have commodore's include files, you can also copy these
  81.       to the workbench include directory.  You may want to remove all
  82.       the assembler include files first as they won't be needed by pdc.
  83.       These files all end with ".i".  Don't forget to use the all option -
  84.           "copy commodore:include pdc:include all" to retain the directory
  85.       structure!
  86.  
  87. For a hard drive system (lucky guy), I would suggest making a separate
  88. directory called PDC on your hard drive, and simply copy the entire PDC
  89. disk to that directory using the all option.  Add the commands:
  90.  
  91.         assign PDC:  DHx:PDC
  92.         stack 20000
  93.         path add PDC:c
  94.  
  95. to your startup-sequence. Replace DHx: by the device name for your hard
  96. drive of course!
  97.  
  98.  
  99.  
  100.             WHAT'S HERE
  101.  
  102.  
  103. Here's what's provided in this package.  The Docs directory will give
  104. further detail on most of the commands:
  105.  
  106.  
  107. CPP
  108.  
  109. Cpp is a C pre-processor which reads a C source file, expanding macros and
  110. include files, and writing an input file for the PDC compiler.  Cpp was
  111. written by Martin Minow.  Cpp is believed to be originally released on a
  112. Decus tape.
  113.  
  114. PDC
  115.  
  116. An optimizing C compiler that generates motorola 68000 assembler source
  117. from C source code.  Matthew Brandt originally wrote the compiler and
  118. released a version that ran on an IBM PC.  A large vote of thanks goes to
  119. Matt for the great job he did on the design, and for releasing the code
  120. for non- commercial use.  Both Olaf Siebert and myself, Jeff Lydiatt, have
  121. added major extensions to PDC as well as fixed a large number of bugs in
  122. the original code.
  123.  
  124. A68K
  125.  
  126. A publicly redistributable assembler that translates assembler source code
  127. to a binary format that a linker can accept.  A68k was originally written
  128. in modula 2 by Brian Anderson.  A68k was ported to C by Charlie Gibbs, who
  129. also added a large number of extensions, not to mention the bug fixes.
  130. A68k attempts to remain compatible with the metacomco assembler.
  131.  
  132. BLINK
  133.  
  134. Blink is a well known and widely distributed publicly redistributable
  135. linker released by "The Software Distillery" boys.  This is version 6.7,
  136. the last publicly redistributable version put out.  Later versions of the
  137. linker are used by the Lattice compiler.
  138.  
  139. CC
  140.  
  141. CC is a front end for the PDC compiler that makes the calls to the cpp
  142. macro preprocessor, PDC, A68k, and Blink much less tedious.  With cc, it
  143. is possible to type:
  144.  
  145.         "cc hello.c"
  146.  
  147. on the command line, and wind up with a runnable program called "hello."
  148. Cc was originally written by Fred Fish, and I added the extensions to make
  149. it work with PDC, and to compile under the Manx compiler.
  150.  
  151. MAKE
  152.  
  153. Make is a public domain program posted to usenet net.source.  Steve Walton
  154. ported it to the Amiga, and "Manxified" it.  Steve claims it's a better
  155. than the Manx-supplied make.
  156.  
  157. LIBRARIES
  158.  
  159. Also included is startup code, stdio, string manipulation routines,
  160. and interface stubs to the Amiga's operating system.
  161.  
  162. PDCStart.obj is the startup code which must be the first module that
  163. Blink sees.
  164.  
  165. PDC.lib is the stdio support for gets(), printf(), read(),
  166. write() etc, as well as support for the string library functions like
  167. strlen(), strcpy().  The stdio support is written in PDC by me. The
  168. string lib support is written by Henry Spencer at the University of
  169. Toronto.
  170.  
  171. Ami.lib is a Public Domain abbreviated version of Amiga.lib that I put
  172. together since commodore's Amiga.lib is copyrighted and requires a
  173. licence to release.  Ami.lib has the advantage of being about 1/2 the
  174. size of Amiga.lib.  Missing however are all the math support stubs,
  175. the stdio code, and the _LVO definitions which aren't needed by PDC.
  176.  
  177.  
  178. EXAMPLES
  179.  
  180. Several examples are provided to show the range of PDC.  All examples
  181. are either taken from Fred Fish disks, or are publicly redistributable
  182. examples taken from other sources.
  183.  
  184. The examples are in two varieties.  Those in the StdIO directory can
  185. be run with the provided programs and libraries since they don't need
  186. to interface to the Amiga's underlying hardware or it's operating system
  187. except through the support provided in PDC.lib and Ami.lib.
  188.  
  189. The examples in the Amiga directory however will require the include
  190. files that describe the layout of important data structures in the
  191. Amiga's operating system.  If you already have Lattice C or Aztec C
  192. on the Amiga, you may be able to use the include files from those
  193. compilers.  The include files are available from commodore for a nominal
  194. $20 fee.  Write to:
  195.  
  196.         Commodore Business Machines
  197.         Software Department
  198.         1200 Wilson Drive
  199.         West Chester, PA 19380
  200.  
  201. Ask for the "AmigaDos 1.2 Native Developer Upgrade".  The kit contains all
  202. the assembler and C include files, the libraries, autodocs, readme files,
  203. alink, and the library offsets.  It comes on 3 or 4 disks - well worth the
  204. $20.
  205.  
  206. ...........
  207.  
  208. Happy C'ing - Jeff Lydiatt
  209.