home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / mbug / mbug039.arc / ZLINK.DOC < prev    next >
Text File  |  1979-12-31  |  3KB  |  88 lines

  1. NAME
  2.     zlink - linkage editor
  3.  
  4. SYNOPSIS
  5.     zlink  comfile,mapfile=relfile,relfile...
  6.  
  7. DESCRIPTION 
  8.     ZLINK is a linkage editor for programs assembled by
  9. ZMAC. "comfile" is the executable output file, with default
  10. extension "COM". "mapfile" is a listing of global symbols and
  11. their values, with default extension "MAP". The "relfiles" are
  12. the input files, with default extension "OBJ". The command line
  13. may be up to 128 bytes long. If a longer list of input files is
  14. needed, a "&" may be appended to the last name and ZLINK will
  15. prompt for more input with "&LINK>".
  16.  
  17. The output files are both optional, so that
  18.  
  19.     zlink sam=sam
  20.  
  21. reads SAM.OBJ and creates SAM.COM, while
  22.  
  23.     zlink ,sam=sam
  24.  
  25. creates only SAM.MAP, and
  26.  
  27.     zlink sam,sam=sam
  28.  
  29. creates both. The map file is very convenient for reference
  30. while using a debugger. The destinations "CON:" and "LST:"
  31. are also legal for the map file. The way to find out what
  32. symbols are imported and exported by an object file is to
  33. execute the linker and request only the map file:
  34.  
  35.     zlink ,con:=bilbo
  36.  
  37. One of the last symbols shown will be "_END". Subtract 100H
  38. from its value to get the length of the executable code.
  39.  
  40. If ZLINK is called with no arguments, it will obey multiple
  41. commands of the above format, prompting for each with "LINK>".
  42. An empty command line terminates the input.
  43.  
  44. ZLINK defines the symbol _END to point to the first byte after
  45. the program (including all code and data). 
  46.  
  47. Data areas with contents otherwise unspecified are initialized
  48. to zero.
  49.  
  50.  
  51. EXAMPLE
  52.  
  53. ZLINK links itself as follows:
  54.  
  55.     C>zlink zl,zl=zlink,linkp1,linkp2,linkproc,&
  56.     SSD LINKAGE EDITOR VERSION 1.4
  57.     &LINK>mfsp,fsparse,gfspecs,linksadd,linkio,&
  58.     
  59.     &LINK>outmap,wrtrel,link01,link02,linkram
  60.     
  61.           0 UNDEFINED SYMBOL(S).
  62.     C>
  63.  
  64.  
  65. BUGS
  66.  
  67. If one input file comes from an assembly language file with an
  68. AORG directive, then the next input file doesn't correctly
  69. import global symbols. For details, see BUG.DOC .
  70.  
  71. Undefined symbols aren't listed unless a MAP file was
  72. requested.
  73.  
  74.  
  75. POTENTIAL IMPROVEMENTS
  76.  
  77. Handle multiple program counters, such as one each for "code",
  78. "initialized data", and "uninitialized data".
  79.  
  80. Eliminate the temporary file LINK.$$$ by reading the input
  81. files again (permitting use on smaller disk systems).
  82.  
  83. Optionally include local symbols in the MAP file.
  84.  
  85.  
  86. AUTHOR
  87.     Bruce Mallett
  88.