X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=doc%2Fld65.sgml;h=457893ffc33a467ff9e8828827f118b0f76777b0;hb=0f1cd5088361bc7c8b92bfed54ec0d70e9752e62;hp=4afaef5c70605b2adea50041316debdc13a4d310;hpb=ce778c4bb8315f03f4aa25c6823b1db90f1e67b0;p=cc65 diff --git a/doc/ld65.sgml b/doc/ld65.sgml index 4afaef5c7..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 @@ -399,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). @@ -598,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)

@@ -646,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 @@ -717,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

@@ -819,8 +845,9 @@ The necessary o65 attributes are defined in a special section labeled The , +has several attributes that may be defined here. FORMATS { @@ -928,12 +955,41 @@ mean, that the The SYMBOLS section

The configuration file may also be used to define symbols used in the link -stage. The mandatory attribute for a symbol is its value. A second, boolean -attribute named + + addrsize + + The + + +Without this attribute, the default address size is type + + This attribute is mandatory. Its value is one of value + + This must only be given for symbols of type The following example defines the stack size for an application, but allows the programmer to override the value by specifying SYMBOLS { # Define the stack size for the application - __STACKSIZE__: value = $800, weak = yes; + __STACKSIZE__: type = weak, value = $800; }