NAME zlink - linkage editor SYNOPSIS zlink comfile,mapfile=relfile,relfile... DESCRIPTION ZLINK is a linkage editor for programs assembled by ZMAC. "comfile" is the executable output file, with default extension "COM". "mapfile" is a listing of global symbols and their values, with default extension "MAP". The "relfiles" are the input files, with default extension "OBJ". The command line may be up to 128 bytes long. If a longer list of input files is needed, a "&" may be appended to the last name and ZLINK will prompt for more input with "&LINK>". The output files are both optional, so that zlink sam=sam reads SAM.OBJ and creates SAM.COM, while zlink ,sam=sam creates only SAM.MAP, and zlink sam,sam=sam creates both. The map file is very convenient for reference while using a debugger. The destinations "CON:" and "LST:" are also legal for the map file. The way to find out what symbols are imported and exported by an object file is to execute the linker and request only the map file: zlink ,con:=bilbo One of the last symbols shown will be "_END". Subtract 100H from its value to get the length of the executable code. If ZLINK is called with no arguments, it will obey multiple commands of the above format, prompting for each with "LINK>". An empty command line terminates the input. ZLINK defines the symbol _END to point to the first byte after the program (including all code and data). Data areas with contents otherwise unspecified are initialized to zero. EXAMPLE ZLINK links itself as follows: C>zlink zl,zl=zlink,linkp1,linkp2,linkproc,& SSD LINKAGE EDITOR VERSION 1.4 &LINK>mfsp,fsparse,gfspecs,linksadd,linkio,& &LINK>outmap,wrtrel,link01,link02,linkram 0 UNDEFINED SYMBOL(S). C> BUGS If one input file comes from an assembly language file with an AORG directive, then the next input file doesn't correctly import global symbols. For details, see BUG.DOC . Undefined symbols aren't listed unless a MAP file was requested. POTENTIAL IMPROVEMENTS Handle multiple program counters, such as one each for "code", "initialized data", and "uninitialized data". Eliminate the temporary file LINK.$$$ by reading the input files again (permitting use on smaller disk systems). Optionally include local symbols in the MAP file. AUTHOR Bruce Mallett