X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;ds=inline;f=doc%2Fld65.sgml;h=457893ffc33a467ff9e8828827f118b0f76777b0;hb=7ab3ede933ca2307b948cd6a218d1f49a4a8aa72;hp=3fbc7c2c2044f4b78ef6059794ee6f2382c51d74;hpb=b1f4526e52be306f229a16a057184b345e0d9398;p=cc65
diff --git a/doc/ld65.sgml b/doc/ld65.sgml
index 3fbc7c2c2..457893ffc 100644
--- a/doc/ld65.sgml
+++ b/doc/ld65.sgml
@@ -154,6 +154,7 @@ Here is a description of all the command line options:
none
+ module
apple2
apple2enh
atari
@@ -161,15 +162,17 @@ Here is a description of all the command line options:
c16 (works also for the c116 with memory up to 32K)
c64
c128
- plus4
cbm510 (CBM-II series with 40 column video)
cbm610 (all CBM series-II computers with 80 column video)
- pet (all CBM PET systems except the 2001)
- geos
+ geos-apple
+ geos-cbm
lunix
- atmos
+ lynx
nes
+ pet (all CBM PET systems except the 2001)
+ plus4
supervision
+ vic20
There are a few more targets defined but neither of them is actually
@@ -278,7 +281,7 @@ Here is a description of all the command line options:
written to this file. Using the --lib file
@@ -324,9 +327,8 @@ The library search path contains in this order:
A compiled in library path which is often /usr/lib/cc65/lib on
Linux systems.
The value of the environment variable The value of the environment variable A subdirectory named Any directory added with the option on the command line.
@@ -338,12 +340,11 @@ The object file search path contains in this order:
The current directory.
-A compiled in directory which is often /usr/lib/cc65/lib on
+A compiled in directory which is often /usr/lib/cc65/obj on
Linux systems.
The value of the environment variable The value of the environment variable A subdirectory named Any directory added with the option on the command line.
@@ -358,9 +359,8 @@ The config file search path contains in this order:
A compiled in directory which is often /usr/lib/cc65/cfg on
Linux systems.
The value of the environment variable The value of the environment variable A subdirectory named Any directory added with the option on the command line.
@@ -402,7 +402,7 @@ for the segments and define any linker symbols (see ).
After that, the linker is ready to produce an output file. Before doing that,
-it checks it's data for consistency. That is, it checks for unresolved
+it checks its data for consistency. That is, it checks for unresolved
externals (if the output format is not relocatable) and for symbol type
mismatches (for example a zero page symbol is imported by a module as absolute
symbol).
@@ -601,6 +601,19 @@ empty (for example because they are of type bss). In that case, the linker
will create an empty output file. This may be suppressed by assigning an empty
file name to that memory area.
+The
+ MEMORY {
+ ROM1: start = $A000, size = $2000, file = "%O-1.bin";
+ ROM2: start = $E000, size = $2000, file = "%O-2.bin";
+ }
+
+
+would write two files that start with the name of the output file specified on
+the command line, with "-1.bin" and "-2.bin" appended respectively. Because
+'%' is used as an escape char, the sequence "%%" has to be used if a single
+percent sign is required.
LOAD and RUN addresses (ROMable code)
@@ -649,7 +662,7 @@ Let's have a closer look at this
-This will define three external symbols that may be used in your code:
+This will define some external symbols that may be used in your code:
__STACK_START__ This is set to the start of the memory
- area, $C000 in this example.
+ area, $C000 in this example.
__STACK_SIZE__ The size of the area, here $1000.
__STACK_LAST__ This is NOT the same as START+SIZE.
- Instead, it it defined as the first
- address that is not used by data. If we
- don't define any segments for this area,
- the value will be the same as START.
+ Instead, it it defined as the first
+ address that is not used by data. If we
+ don't define any segments for this area,
+ the value will be the same as START.
+ __STACK_FILEOFFS__ The binary offset in the output file. This
+ is not defined for relocatable output file
+ formats (o65).
A memory section may also have a type. Valid types are
@@ -720,6 +736,13 @@ the one defined in the section, or the
value given on the command line with the
option).
+To support systems with banked memory, a special attribute named Other SEGMENT attributes
@@ -822,8 +845,9 @@ The necessary o65 attributes are defined in a special section labeled
The ,
+has several attributes that may be defined here.
FORMATS {
@@ -931,12 +955,41 @@ mean, that the The SYMBOLS section
@@ -953,15 +1006,22 @@ __STACKSIZE__=xxx/ on the command line.
Builtin configurations
-The builtin configurations are part of the linker source. They are also
-distributed together with the machine specific binary packages (usually in the
-doc directory) and don't have a special format. So if you need a special
-configuration, it's a good idea to start with the builtin configuration for
-your system. In a first step, just replace Secondary configurations
+
+Several machine specific binary packages are distributed together with secondary
+configurations (in the cfg directory). These configurations can be used with
+Special segments
The builtin config files do contain segments that have a special meaning for
@@ -986,10 +1046,11 @@ This segment contains the startup code which initializes the C software stack
and the libraries. It is placed in its own segment because it needs to be
loaded at the lowest possible program address on several platforms.
-HEAP
+ZPSAVE
-This segment defines the location of the memory heap used by the malloc
-routine.
+The ZPSAVE segment contains the original values of the zeropage locations used
+by the ZEROPAGE segment. It is placed in its own segment because it must not be
+initialized.