home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / vol_100 / 108_01 / ccrl.doc < prev    next >
Text File  |  1985-11-14  |  3KB  |  74 lines

  1.  
  2. CCRL.DOC
  3. ========
  4.  
  5. **********************************************************
  6. * This file contains information on how to use the "CCRL"*
  7. * program to convert COM files (generated by ASM or MAC) *
  8. * into CRL format for use with the BDS C package.     *
  9. * The original program was called "CRLADD", and it was   *
  10. * written by:    Earl T. Cohen                 *
  11. *        Cyclotomics, Inc.             *
  12. *        2140 Shattuck Ave.             *
  13. *        Berkeley, Ca. 94704             *
  14. * Modifications and this documentation are the works of: *
  15. *        Jack M. Wierda                  *
  16. *        33 W. Naperville Rd. apt 9         *
  17. *        Westmont, Illinois 60559         *
  18. * Questions concerning the CCRL program should be aimed  *
  19. * at one of the above persons, since I (Leor) do not     *
  20. * know how the thing works.                 *
  21. **********************************************************
  22.  
  23. This program is a simplified version of the CRLADD program written by
  24. Earl T. Cohen. 
  25.  
  26. The purpose of the program is to create a filename.CRL file from existing
  27. filename.COM and filename.EXT files. The filename.CRL file can then be
  28. manipulated using CLIB, putting it into the desired library. 
  29.  
  30. The command line is as follows,
  31.   CCRL filename
  32.  
  33. Where filename is the name of .COM file (that was created using ASM or
  34. MAC and LOAD) and .EXT file (created with an editor in the format outlined
  35. below).
  36.  
  37. The format for a .EXT file is as follows:
  38.  
  39. line 1:  name of function
  40.  
  41. line 2:  size of bare function (from ASM or LOAD)
  42.  
  43. line  3:  total  size of .CRL entry after jump table  and  all 
  44. other  stuff has been added to the function.   This is  needed 
  45. since  it  is written onto the output file before  it  can  be 
  46. computed.
  47.  
  48. If no other functions are listed at line 4, then
  49.   Total size = [5 + bare function size from line 2 + (# of relocations
  50.                 from line y) * 2]
  51.  
  52. If other functions are listed at line 4, then
  53.   Total size = [10 + bare function size from line 2 + (# of relocations
  54.                 from line x + # of relocations from line y) * 2
  55.                 + (# of functions at line 4) * 3 + # of characters
  56.                 in the functions at line 4]
  57.  
  58. line  4:  list of needed functions starts here -- one  function 
  59. name per line, a blank line terminates the list.
  60.  
  61. line x:  after the above,  if there were any needed functions, 
  62. the relocation paramaters for their calls in the assembly code 
  63. come here.  They are in hex (and can be from 1 - 4 hex  chars) 
  64. and  are separated by blanks,  tabs or newlines.   The list is 
  65. terminated by any non-blank, non-hex char; i use a '.'
  66.  
  67. line y:  a list as above for the other relocation paramters.
  68.  
  69. The  relocation paramters are not hard to compute  since  they 
  70. are 0-based and can be read right from the .prn listing of asm 
  71. just  by  adding  1  to the location of a jump  or  call  (and 
  72. throwing away 0x100 (the origin)) for example.
  73.  
  74.