home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 23 / IOPROG_23.ISO / SOFT / ASM / ALAB13B1.ZIP / DOC / CONFIG.DOC < prev    next >
Encoding:
Text File  |  1998-08-23  |  10.0 KB  |  241 lines

  1.  Alab Assembler,Compiler and Linker Configuration Files Documentation.
  2.  =====================================================================
  3.  
  4. Alab has been rewritten to allow users to have full control of the
  5. assembler and linker setup. That is, the user can edit these
  6. configuration files to their most suitable. Each .CFG-file in the "ASM\"
  7. directory contains information about one assembler, and each .CFG-file
  8. in the "LINK\" directory holds one linker setup. In addition, because of
  9. this general setup, Alab can now also support different compilers. I
  10. have therefore included C language syntax highlighting, made the
  11. different tools compatible with C source code, and included Watcom C/C++
  12. compiler support. Each .CFG-file in the "COMPILER\" directory holds
  13. information about one compiler.
  14.  
  15. In this documentation file I explain how the configuration files is
  16. built up. When I write "program", I mean "assembler/linker or compiler",
  17. since the configuration files has excactly the same syntax.
  18. Each CFG-file contains information about the program, such as the calling
  19. syntax, various switches to it, and error presentation (how the program
  20. shows the errors).
  21.  
  22. The configuration files is built up by directives, and data which goes
  23. to this directive. All directives are optional, and they can come in any
  24. order.
  25.  
  26. When you shall create a new CFG-file, I suggest that you copy one of the
  27. old ones to the new one, and then make the desired changes to the new
  28. one.
  29.  
  30. Here follows a description of the various directives in a .CFG-file:
  31.  
  32. *"Name= ..."
  33.    The name typed here is the name shown in the program setup dialog
  34.    used for selecting between different assemblers/linkers/compilers.
  35.  
  36. *"Parameters= ..."
  37.    Here you specify how the command line is built up. The program is
  38.    called with this parameter line. There are some macros which Alab
  39.    recognizes, and exchanges with other information.
  40.  
  41.    The macros for the assembler/compiler configuration files is:
  42.  
  43.      $OPTIONS_   = All options set in the assembler setup.
  44.      $SOURCE_    = The filename of the file in the current edit window.
  45.      $OBJECT_    = The name of the object file. ($SOURCE_ without ext.)
  46.      $EDNAME_    = Name of file in current edit window (without ext.).
  47.      $EDNAMEEXT_ = Name+Extension of file in current edit window.
  48.      $OBJEDNAME_ = Name of file in current edit window (without ext.),
  49.                    with directory replaced by Options|Dirs.../Object dir.
  50.      $EXEEDNAME_ = Name of file in current edit window (without ext.),
  51.                    with directory replaced by Options|Dirs.../Exe dir.
  52.  
  53.    The macros for the linker configuration files is:
  54.  
  55.      $OPTIONS_   = All options set in the linker setup.
  56.      $OBJFILES_  = Object files to be linked. This includes the external
  57.                    object files defined in the linker setup.
  58.                    "objfile objfile objfile ..."
  59.      $OBJFILES1_ = "objfile objfile objfile ..." (same as $OBJFILES_)
  60.      $OBJFILES2_ = "objfile+objfile+objfile ..."
  61.      $OBJFILES3_ = "objfile,objfile,objfile ..."
  62.      $EXEFILE_   = The name of the exefile to be generated.
  63.      $LIBFILES_  = Library files to be linked (defined in linker setup).
  64.  
  65. *"Calltype="
  66.    Alab currenctly supports 3 different methods of calling the
  67.    programs. 1 is to pass the whole command line as normal, 2 is to
  68.    write the parameters into an environment variable, and then call the
  69.    programs with the environment variable as a parameter (with an '@'
  70.    in front). The 3 is to write the parameters into a file, and call the
  71.    programs with the file as a parameter (with an '@' in front).
  72.    0=Parameters,1=Environment variable,2=File
  73.  
  74.  
  75. *"Options="
  76.  
  77. Here you specify which switches is to be represented in the program
  78. setup for the programs. The radio buttons comes later (where you have
  79. multiple choices and can choose only one of them).
  80. The syntax for the switches is as follows:
  81. SWITCH WHATITDOES (they must be separated by 1 or more spaces)
  82. example:
  83. /a Alphabetic segment ordering
  84. /s Source-code segment ordering
  85.  
  86. NB! You can have a maximum of 16 different options.
  87.  
  88. *"Radio buttons="
  89.  
  90. Here you specify which radio buttons is to be represented in the
  91. program setup for the programs. You use radio buttons when you have
  92. multiple choices, but can choose only one of them. For example, you can
  93. specify case sensitivity as EITHER "None", "Globals" or "All" with Turbo
  94. Assembler. You have the switch "/mu" for None, "/mx" for Globals, and
  95. "/ml" for All, but can use only one of them. Ofcourse you can put these
  96. 3 in the option list, and then check one of them in the Miscellaneous
  97. box, but it's more convenient to specify it as a Radio Button. The
  98. syntax for a Radio Button is as follows:
  99.  
  100. Header
  101.  switch Option 1
  102.  switch Option 2
  103.  ...
  104.  switch Option n
  105.  
  106. You can specify a maximum of 6 radio buttons.
  107.  
  108.  
  109. Error configuration
  110. ===================
  111.  
  112. Now we have come to the error configuration. This is where you specify
  113. how the errors in the asm/c/??? source file is presented by the
  114. program. Currently Alab supports 3 different error presentations:
  115.  - The errors is output directly to the screen by the program.
  116.    In this case Alab reads a redirected file to get the errors.
  117.    This is the most usual method used, and almost all programs
  118.    supports this method. It is recommended that you use this method
  119.    if the program supports it.
  120.    E.g. : Turbo Assembler, Microsoft Assembler, Watcom assembler.
  121.  
  122.  - The program creates a special error file where all the errors
  123.    are listed. This file is typically called sourcefilename.ERR. In this
  124.    case Alab ofcourse reads this file.
  125.    E.g. : Watcom assembler.
  126.  
  127.  - The program writes the errors directly into the sourcefile.
  128.    The sourcefile is either saved with an other extension, or the
  129.    source file with the errors is saved with an other extension.
  130.    E.g. : A86
  131.  
  132. You must first specify which of these methods is used by this program.
  133. You do this by assigning a number to the ErrorType directive.
  134.  
  135. *"ErrorType="
  136.    Here you specify which one of the methods listed above the program
  137.    uses. 0=to screen,1=to errorfile,2=into source.
  138.    If the program is a linker, ErrorType must be 0 or 1 (btw; I don't
  139.    know about any linkers which supports 1).
  140.  
  141. *"ErrorFileExtension="
  142.    Here you can specify the extention of the error file created. The
  143.    default is ".ERR".
  144.  
  145. *"IntoSourceExtension="
  146.    When the program writes the errors directly into the source, the
  147.    program can sometimes save the source with the errors as something
  148.    else, so the source is never overwritten. Then you must specify an
  149.    extension for it, and you do that here. For example: If you use A86
  150.    with the "+E" switch, A86 saves the source with the errors as
  151.    sourcefilename.ERR. You then must specify ".ERR" as the extension
  152.    here. The default is ".ASM" (errors written directly into source).
  153.    Not needed in linker config.
  154.  
  155. *"IntoSourceNumbHeaderLines="
  156.    When the program writes the errors directly into the source, the
  157.    program sometimes creates a header before the source starts. Alab
  158.    needs to know how many lines this is in order to get the correct
  159.    error linenumbers.
  160.    Not needed in linker config.
  161.  
  162. *"IntoSourceEachErrNumbLines="
  163.    Alab currently only supports 1 error presentation syntax (that means
  164.    that each error is presented on 1 line). But some programs uses
  165.    several lines for each error message. In this case you must specify
  166.    how many lines the program uses for each error.
  167.    Not needed in linker config.
  168.    For example: A86 uses 2 lines:
  169.  
  170.    int 10h
  171.    thisgeneratatesanerror
  172. 1  ~^
  173. 2  #ERROR 01: Unknown Mnemonic                          @@@@#
  174.    mov ax, 4c00h
  175.    int 21h
  176.  
  177. *"ErrorfileOutput="
  178.    Then, there are 3 different possibilities to where the program
  179.    writes the error file (if it generates an error file). To the
  180.    program directory, to the current directory or to the directory
  181.    where the file is.
  182.    0=to program directory,1=to current dir,2=to file dir
  183.  
  184.  
  185. Error message syntax
  186. ====================
  187.  
  188. Then you must specify how each error is presented.
  189. You do this by just writing the error on the line following the
  190. ErrorSyntax directive.
  191. Everything which is changeable in the error presentation (such as the
  192. filename, the errorline number and the error message) you exchange with
  193. a macro defined below:
  194.  
  195. $FILENAME_            This means the name of the file just assembled
  196. $ERRORNUMBER_         The number of the error
  197. $ERRORLINE_           This is the line in which the error is
  198. $ERRORMESSAGE_        Here comes the error message
  199.  
  200. If there are multiple spaces between 2 words, you can cut it down to
  201. just 1.
  202. For example... I assemble the file GSNAKE.ASM, and the output by the
  203. assembler is as follows:
  204.  
  205. ;
  206. ; Turbo Assembler  Version 3.2  Copyright (c) 1988, 1992 Borland International
  207. ;
  208. ; Assembling file:   GSNAKE.ASM
  209. ; *Warning* GSNAKE.ASM(32) Argument needs type override
  210. ; **Error** GSNAKE.ASM(33) Undefined symbol: PUSH
  211. ; **Error** GSNAKE.ASM(58) Constant too large
  212. ; Error messages:     2
  213. ; Warning messages:   1
  214. ; Passes:             1
  215. ; Remaining memory:   490k
  216. ;
  217.  
  218. We here see clearly how the error/warning messages is built up. Let's
  219. take the error messages first. First there always comes the word
  220. "**Error**", followed by the filename just assembled. Then there comes
  221. a "(", the line number in which the error is, and a ")". And then the
  222. error message follows. We then get:
  223.  
  224. **Error** $FILENAME_($ERRORLINE_) $ERRORMESSAGE_
  225.  
  226. We do the same with the warning messages, and perhaps other error
  227. messages.
  228.  
  229. NB! When the errors is written directly into the source, Alab always
  230. assumes that the error is on the line *above* the error message.
  231.  
  232. Error message syntax macros (these macros you use in both the
  233. assembler/linker and compiler setup):
  234.  
  235. $FILENAME_            This means the name of the file just assembled
  236. $ERRORNUMBER_         The number of the error
  237. $ERRORLINE_           This is the line in which the error is
  238. $ERRORMESSAGE_        Here comes the error message
  239.  
  240. 
  241.