.he
.bp odd
.cs 5
.mt 5
.mb 6
.pl 66
.ll 65
.po 10
.hm 2
.fm 2
.ft All Information Presented Here is Proprietary to Digital Research
.he
.tc 6.0  L068 Linker
.ce 2
=================== REPLACE/RE-WRITE ENTIRE SECTION ================
=================== DOCUMENT ON LD8K ATTACHED       ================
.sh
Section 6
.qs
.sp
.sh
L068 Linker
.qs
.he CP/M-8000 Programmer's Guide                      6.0  L068 Linker
.sp 3
.tc    6.1  Linker Operation
.sh
6.1  Linker Operation
.qs
.he CP/M-8000 Programmer's Guide                 6.1  Linker Operation
.ix linker (L068) operation
.pp 5
L068 is the CP/M-8000 Linker that combines several AS68 assembled
(object) programs into one executable command file.  All external
references are resolved.  The linker must be used to create
executable programs, even when a single object program contains
no unresolved references.  The argument routines are concatenated
in the order specified.  The entry point of the output is the
first instruction of the first routine. 
.sp 2
.tc    6.2  Invoking the Linker (L068)
.sh
6.2  Invoking the Linker (L068)
.qs
.he CP/M-8000 Programmer's Guide              6.2  Invoking the Linker
.ix Linker, invoking
.pp
Invoke L068 by entering a command of the following form:
.sp 2
.nf
     L068 [-F d:] [-R] [-S] [-I] [-Umodname]
          [-O filename] [-X] [-Zaddress] 
          [-Daddress] [-Baddress] object filename [object filename]
          [>message filename]
.fi
.sp 2
.ce 
.sh
Table 6-1.  Linker Command Options
.qs
.sp
.in 5
.ll 60
.nf
Option    Meaning
.fi
.in 15
.ti -10
.sp
-F d:    
.sp
The -F option specifies the drive on which temporary files 
are created.  The variable d: is the drive designation.
.ix -F option (L068)
.sp 2
.ti -10
-R
.sp
.ix -R option (L068)
The -R option preserves the relocation bits so the resulting 
executable program is relocatable.
.sp 2
.ti -10
-S
.ix -S option (L068)
.sp
If specified, the output is stripped; the symbol table and relocation 
bits are removed to save memory space.
.bp
.in 0
.ll 65
.ce 
.sh
Table 6-1.  (continued)
.qs
.sp
.in 5
.ll 60
.nf
Option    Meaning
.fi
.sp
.in 15
.ti -10
-I        
.sp
.ix -I option (L068)
If -I is specified, no 16-bit address overflow messages 
are generated.  When you assemble a program without the AS68 -L option, the 
linker may generate address overflow messages if the program contains 
addresses longer than 16 bits.
.sp 2
.ti -10
-Umodname 
.sp
.ix -Umodname option (L068)
Links a module within the library with other modules in the command line.
The module name, specified by the modname parameter, cannot exceed eight
characters.  You can use this option to create a program from modules
within a library, if the module following the U option calls other modules
in the library. 
.sp 2
.ti -10
-O filename
.sp
.ix -O option (L068)
If specified, the object file produced by L068 has the filename that you
specify following the -O option.  The -O option and filename are separated 
by one or more spaces.  If you do not specify a filename, the object 
file has the name C.OUT.
.sp 2
.ti -10
-X        
.sp
.ix -X option (L068)
If specified, the symbol table includes all local
symbols except those that begin with the letter L.  If not specified, L068
puts only global symbols in the symbol table.  This option is
provided so that you can discard compiler internally-generated labels
that begin with the letter L while retaining symbols local to routines. 
.bp
.in 0
.ll 65
.ce 
.sh
Table 6-1.  (continued)
.qs
.sp
.in 5
.ll 60
.nf
Option    Meaning
.fi
.sp
.in 15
.ti -10
-Taddress
.sp 0
.ti -10
-Zaddress
.sp
.ix -Taddress (L068)
.ix -Zaddress (L068)
.ix -Daddress (L068)
.ix -Baddress (L068)
The -T and -Z options are equivalent.  If specified, the hexadecimal
address given is defined by L068 as the beginning address for the text
segment.  This address defaults to zero, or it can be specified as any
hexadecimal number between 0 and FFFFFFFFH.  This option is especially
useful for stand-alone programs, or for putting programs in R0M.
Hexadecimal characters can be in upper-case or lower-case. 
.sp 2
.ti -10
-Daddress
.sp
If specified, the hexadecimal address given is defined by L068 as the 
beginning address for the data segment.  This address defaults to the next 
byte after the end of the text segment, or it can be specified as any 
hexadecimal number between 0 and FFFFFFFF.  This option is especially 
useful for stand-alone programs or for putting programs in ROM.  Hexadecimal
address characters can be in upper-case or lower-case.
.sp 2
.ti -10
-Baddress
.sp
If specified, the hexadecimal address given is defined by L068 as the 
beginning address for the bss.  This address defaults to the next 
byte after the end of the data segment, or it can be specified as
any hexadecimal number between 0 and FFFFFFFF.
.sp 2
.ti -10
object filename [object filename]
.sp
.ix object filename option (L068)
The name of one or more object files produced by the assembler AS68.
These are the object files that L068 links. 
.bp
.in 0
.ll 65
.ce 
.sh
Table 6-1.  (continued)
.qs
.sp
.in 5
.ll 60
.nf
Option    Meaning
.fi
.sp
.in 15
.ti -10
>message filename
.sp
.ix >message filename (L068)
If specified, error messages produced by L068 are redirected to the file 
that you specify immediately after the greater than (>) sign.  If 
you do not specify a filename, error messages are written to the 
standard default output device, which typically is your console terminal.
.in 0
.ll 65
.sp 2
.tc    6.3  Sample Commands Invoking L068
.ne 10
.sh
6.3  Sample Commands Invoking L068
.qs
.he CP/M-8000 Programmer's Guide           6.3  Commands Invoking L068
.sp 2
.ti 8
A>\c
.sh
L068 -S -0 TEST.8000 TEST.O
.qs
.sp 
.in 0
.pp
This command links assembled file TEST.O into file TEST.8000 and strips out 
the symbol table and relocation bits.
.sp 2
.ti 8
A>\c
.sh
L068 -T4000 -D8000 -BC000 A.O B.O C.O
.qs
.sp
.pp
This command links assembled files A.O, B.O, and C.O to the default output
file C.OUT.  The text segment starts at location 4000H; the 
data segment starts at location 8000H; and the bss starts at 
location C000H. 
.sp 2
.ti 8
A>\c
.sh
L068 -I -O TEST.8000 TEST.O TEST1.0 >ERROR
.qs
.sp
.pp
This command links assembled files TEST.O and TEST1.O to file TEST.8000.  
Any 16-bit address overflow errors are ignored; error messages are 
directed to the file ERROR. 
.sp 2
.tc    6.4  L068 Error Messages
.sh
6.4  L068 Error Messages
.qs
.he CP/M-8000 Programmer's Guide              6.4  L068 Error Messages
.pp
Appendix E lists the error messages that L068 displays. 
.sp 2
.ce
End of Section 6
.nx seven


