home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / e / em.lha / em.doc next >
Encoding:
Text File  |  1995-01-01  |  5.6 KB  |  145 lines

  1.  
  2.                              E Module Generator
  3.  
  4.                                      by
  5.                                Jesse McClusky
  6.                             (thought@eskimo.com)
  7.  
  8.  
  9. SUMMARY:
  10.  This program compiles E Module (.m) files for the Amiga E Compiler, version
  11.  2.1b (Copyright by Wouter van Oortmerssen.)
  12.  
  13.  Since I don't have a hard drive (yet), and the only Aminet CD-ROM I have is
  14.  the first one (it came with my CD Drive), that's the only version I've used
  15.  so far.  Therefore, I have no idea if the modules generated by this are
  16.  evenusable by the newer versions of Amiga E.  I do, however, plan on making
  17.  them compatible as soon as I get either (1) a newer Aminet CD-ROM, or (2) a
  18.  hard drive.  Number 2 should be occuring within a month, so not to worry.
  19.  (:
  20.  
  21. FORMAT:
  22.  The file format this program accepts as input is similar in many respects
  23.  to E code itself, but should be adhered to strictly.  I haven't fully
  24.  tested all possible compinations of invalid syntax, so try not to put much
  25.  of it in there.  However, if you do accidentally do so, and discover that
  26.  it either crashes or generates incorrect output without warning you, let me
  27.  know (at the above address, preferably with the code that bombed it).
  28.  
  29.  That said, the format for each of the 3 types follows:
  30.  
  31. CONST name=val
  32.  
  33.  Creates a constant of the given name with the given value.  This is almost
  34.  exactly like the E keyword of the same spelling.  If the name is not
  35.  capitalized, it will be by the E Module compiler (EM from here on).  The
  36.  val may be any legal constant value as used by the E language (IE, integer,
  37.  float (4.903), hex ($4fD), binary (%100110), and negative of any of the
  38.  preceding types).
  39.  
  40.  If you wish to specify more than one constant at a time, you may separate
  41.  them with 1 or more 'space' characters.  A 'space' character is defined as
  42.  any character with an ASCII value of less than 48 (30 hex), excluding the
  43.  "-" and "." characters (45 and 46, respectively).  This includes spaces,
  44.  commas, linefeeds, carraige returns, tabs, quotes (single AND double), etc.
  45.  After the space character, simply specify another name=val sequence.  You
  46.  may assign as many constants in a row as you wish.
  47.  
  48.  
  49. OBJECT objname
  50.   member1:type
  51.   ...
  52. ENDOBJECT
  53.  
  54.  Creates an object of the given name with the listed members.  Very similar
  55.  to the E OBJECT format.  (The ... represents zero or more repetitions of
  56.  the previous line)  Members are separated by one or more 'space' characters
  57.  (see above).  The type may be CHAR, INT, LONG or a POSITIVE value which
  58.  represents the size of a substructure.  The value may be of the same format
  59.  as used for constants (as defined above), provided it is greater than or
  60.  equal to zero (0).
  61.  
  62.  
  63. LIBRARY 'libname.library', libbase
  64.   FuncName(registers)
  65.   ...
  66. ENDLIBRARY
  67.  
  68.  Creates a library and base variable of the given name with the functions
  69.  listed.  The function's name should start with a capital and then lowercase
  70.  letters, and the name should be followed IMMEDIATELY by an open parenthesis
  71.  "(" or you WILL get an error.  The registers should have NO spaces in them,
  72.  and should be either A0 to A7 or D0 to D7, separated by commas.  Functions
  73.  are separated by one or more space characters, and you may have as many as
  74.  you wish.
  75.  
  76.  NOTE:  A LIBRARY should be alone in a module, and belongs in the EMODULES:
  77.         directory, and not a subdirectory.  Also of note is that anything
  78.         after the ENDLIBRARY will be ignored by both the EM compiler and the
  79.         Amiga E Compiler.
  80.  
  81.  
  82. COMMENTS:
  83.  
  84.  Comments begin with the "/*" sequence and end with the "*/" sequence.
  85.  Everything inside will be ignored.  However, nested comments won't work
  86.  because I didn't put in comment counting.  I didn't feel it was necissary.
  87.  If, however, someone really wants me to, I will.
  88.  
  89.  
  90. USAGE:
  91.  
  92.  em source
  93.  
  94.  Generates a module named source.m from the file source.
  95.  
  96.  
  97. MISC STUFF:
  98.  
  99.  If you use ShowModule (which comes with Amiga E) and redirect the module's
  100.  output to a file, you can edit the file and recompile the module.  First,
  101.  you have to:  ShowModule >output_file EMODULES:module.m
  102.  where output_file is the name of the new file to send the module source to.
  103.  module.m is the path and filename of the original module file.
  104.  
  105.  Next, you need to edit the output_file and delete the first three (3)
  106.  lines.  Then, if there are any OBJECT definitions in the file, delete the
  107.  first 5 characters of each line (the '(---)') in the object.  Then save the
  108.  file and type:  em output_file
  109.  This will generate a file that should be exactly the same as the original
  110.  '.m' file you got it from.  The new file will have the same name as the
  111.  source output_file, with a '.m' extension.
  112.  
  113.  You can use this procedure to modify existing modules, following the
  114.  formatting guidelines given above.  Although, why you'd want to modify
  115.  perfectly fine existing modules is beyond me.  Chances are you'll want to
  116.  use the EM program to add modules for your own libraries.  (:  But this is
  117.  a good test to make sure it works.  (:
  118.  
  119.  
  120. DISCLAIMERS:
  121.  
  122.  I hate this stuff.
  123.  No warrenty is either stated or implied that this program will operate as
  124.  indicated, or is appropriate for any specific given purpose.  The creater
  125.  of this code is not held responsible for any damages this code incures.
  126.  
  127.  This code is Copyrighted (C) 1995 by Jesse McClusky.
  128.  It may be distributed freely and without charge, and may NOT be modified in
  129.  any way without the direct written permission of its author.
  130.  
  131.  
  132. FINALLY:
  133.  
  134.  Many thanks to the creator of the Amiga E Compiler, Wouter van Oortmerseen.
  135.  
  136.  If you need to contact me, I can be reached at:
  137.  
  138.  INTERNET:  thought@eskimo.com
  139.  Snail Mail:
  140.    Jesse McClusky
  141.    13035 110th Ave N.E.
  142.    Kirkland, WA   98034
  143.    USA
  144.  
  145.