+<sect1><tt>.HIBYTE</tt><label id=".HIBYTE"><p>
+
+ The function returns the high byte (that is, bits 8-15) of its argument.
+ It works identical to the '>' operator.
+
+ See: <tt><ref id=".LOBYTE" name=".LOBYTE"></tt>,
+ <tt><ref id=".BANKBYTE" name=".BANKBYTE"></tt>
+
+
+<sect1><tt>.HIWORD</tt><label id=".HIWORD"><p>
+
+ The function returns the high word (that is, bits 16-31) of its argument.
+
+ See: <tt><ref id=".LOWORD" name=".LOWORD"></tt>
+
+
+<sect1><tt>.IDENT</tt><label id=".IDENT"><p>
+
+ The function expects a string as its argument, and converts this argument
+ into an identifier. If the string starts with the current <tt/<ref
+ id=".LOCALCHAR" name=".LOCALCHAR">/, it will be converted into a cheap local
+ identifier, otherwise it will be converted into a normal identifier.
+
+ Example:
+
+ <tscreen><verb>
+ .macro makelabel arg1, arg2
+ .ident (.concat (arg1, arg2)):
+ .endmacro
+
+ makelabel "foo", "bar"
+
+ .word foobar ; Valid label
+ </verb></tscreen>
+
+
+<sect1><tt>.LEFT</tt><label id=".LEFT"><p>
+
+ Builtin function. Extracts the left part of a given token list.
+
+ Syntax:
+
+ <tscreen><verb>
+ .LEFT (<int expr>, <token list>)
+ </verb></tscreen>
+
+ The first integer expression gives the number of tokens to extract from
+ the token list. The second argument is the token list itself. The token
+ list may optionally be enclosed into curly braces. This allows the
+ inclusion of tokens that would otherwise terminate the list (the closing
+ right paren in the given case).
+
+ Example:
+
+ To check in a macro if the given argument has a '#' as first token
+ (immediate addressing mode), use something like this:
+
+ <tscreen><verb>
+ .macro ldax arg
+ ...
+ .if (.match (.left (1, {arg}), #))
+
+ ; ldax called with immediate operand
+ ...
+
+ .endif
+ ...
+ .endmacro
+ </verb></tscreen>
+
+ See also the <tt><ref id=".MID" name=".MID"></tt> and <tt><ref id=".RIGHT"
+ name=".RIGHT"></tt> builtin functions.
+
+
+<sect1><tt>.LOBYTE</tt><label id=".LOBYTE"><p>
+
+ The function returns the low byte (that is, bits 0-7) of its argument.
+ It works identical to the '<' operator.
+
+ See: <tt><ref id=".HIBYTE" name=".HIBYTE"></tt>,
+ <tt><ref id=".BANKBYTE" name=".BANKBYTE"></tt>
+
+
+<sect1><tt>.LOWORD</tt><label id=".LOWORD"><p>
+
+ The function returns the low word (that is, bits 0-15) of its argument.
+
+ See: <tt><ref id=".HIWORD" name=".HIWORD"></tt>
+
+
+<sect1><tt>.MATCH</tt><label id=".MATCH"><p>
+
+ Builtin function. Matches two token lists against each other. This is
+ most useful within macros, since macros are not stored as strings, but
+ as lists of tokens.
+
+ The syntax is
+
+ <tscreen><verb>
+ .MATCH(<token list #1>, <token list #2>)
+ </verb></tscreen>
+
+ Both token list may contain arbitrary tokens with the exception of the
+ terminator token (comma resp. right parenthesis) and
+
+ <itemize>
+ <item>end-of-line
+ <item>end-of-file
+ </itemize>
+
+ The token lists may optionally be enclosed into curly braces. This allows
+ the inclusion of tokens that would otherwise terminate the list (the closing
+ right paren in the given case). Often a macro parameter is used for any of
+ the token lists.
+
+ Please note that the function does only compare tokens, not token
+ attributes. So any number is equal to any other number, regardless of the
+ actual value. The same is true for strings. If you need to compare tokens
+ <em/and/ token attributes, use the <tt><ref id=".XMATCH"
+ name=".XMATCH"></tt> function.
+
+ Example:
+
+ Assume the macro <tt/ASR/, that will shift right the accumulator by one,
+ while honoring the sign bit. The builtin processor instructions will allow
+ an optional "A" for accu addressing for instructions like <tt/ROL/ and
+ <tt/ROR/. We will use the <tt><ref id=".MATCH" name=".MATCH"></tt> function
+ to check for this and print and error for invalid calls.
+
+ <tscreen><verb>
+ .macro asr arg
+
+ .if (.not .blank(arg)) .and (.not .match ({arg}, a))
+ .error "Syntax error"
+ .endif
+
+ cmp #$80 ; Bit 7 into carry
+ lsr a ; Shift carry into bit 7
+
+ .endmacro
+ </verb></tscreen>
+
+ The macro will only accept no arguments, or one argument that must be the
+ reserved keyword "A".
+
+ See: <tt><ref id=".XMATCH" name=".XMATCH"></tt>
+
+
+<sect1><tt>.MAX</tt><label id=".MAX"><p>
+
+ Builtin function. The result is the larger of two values.
+
+ The syntax is
+
+ <tscreen><verb>
+ .MAX (<value #1>, <value #2>)
+ </verb></tscreen>
+
+ Example:
+
+ <tscreen><verb>
+ ; Reserve space for the larger of two data blocks
+ savearea: .max (.sizeof (foo), .sizeof (bar))
+ </verb></tscreen>
+
+ See: <tt><ref id=".MIN" name=".MIN"></tt>
+
+
+<sect1><tt>.MID</tt><label id=".MID"><p>
+
+ Builtin function. Takes a starting index, a count and a token list as
+ arguments. Will return part of the token list.
+
+ Syntax:
+
+ <tscreen><verb>
+ .MID (<int expr>, <int expr>, <token list>)
+ </verb></tscreen>
+
+ The first integer expression gives the starting token in the list (the first
+ token has index 0). The second integer expression gives the number of tokens
+ to extract from the token list. The third argument is the token list itself.
+ The token list may optionally be enclosed into curly braces. This allows the
+ inclusion of tokens that would otherwise terminate the list (the closing
+ right paren in the given case).
+
+ Example:
+
+ To check in a macro if the given argument has a '<tt/#/' as first token
+ (immediate addressing mode), use something like this:
+
+ <tscreen><verb>
+ .macro ldax arg
+ ...
+ .if (.match (.mid (0, 1, {arg}), #))
+
+ ; ldax called with immediate operand
+ ...
+
+ .endif
+ ...
+ .endmacro
+ </verb></tscreen>
+
+ See also the <tt><ref id=".LEFT" name=".LEFT"></tt> and <tt><ref id=".RIGHT"
+ name=".RIGHT"></tt> builtin functions.
+
+
+<sect1><tt>.MIN</tt><label id=".MIN"><p>
+
+ Builtin function. The result is the smaller of two values.
+
+ The syntax is
+
+ <tscreen><verb>
+ .MIN (<value #1>, <value #2>)
+ </verb></tscreen>
+
+ Example:
+
+ <tscreen><verb>
+ ; Reserve space for some data, but 256 bytes minimum
+ savearea: .min (.sizeof (foo), 256)
+ </verb></tscreen>
+
+ See: <tt><ref id=".MAX" name=".MAX"></tt>
+
+
+<sect1><tt>.REF, .REFERENCED</tt><label id=".REFERENCED"><p>
+
+ Builtin function. The function expects an identifier as argument in braces.
+ The argument is evaluated, and the function yields "true" if the identifier
+ is a symbol that has already been referenced somewhere in the source file up
+ to the current position. Otherwise the function yields false. As an example,
+ the <tt><ref id=".IFREF" name=".IFREF"></tt> statement may be replaced by
+
+ <tscreen><verb>
+ .if .referenced(a)
+ </verb></tscreen>
+
+ See: <tt><ref id=".DEFINED" name=".DEFINED"></tt>
+
+
+<sect1><tt>.RIGHT</tt><label id=".RIGHT"><p>
+
+ Builtin function. Extracts the right part of a given token list.
+
+ Syntax:
+
+ <tscreen><verb>
+ .RIGHT (<int expr>, <token list>)
+ </verb></tscreen>
+
+ The first integer expression gives the number of tokens to extract from the
+ token list. The second argument is the token list itself. The token list
+ may optionally be enclosed into curly braces. This allows the inclusion of
+ tokens that would otherwise terminate the list (the closing right paren in
+ the given case).
+
+ See also the <tt><ref id=".LEFT" name=".LEFT"></tt> and <tt><ref id=".MID"
+ name=".MID"></tt> builtin functions.
+
+
+<sect1><tt>.SIZEOF</tt><label id=".SIZEOF"><p>
+
+ <tt/.SIZEOF/ is a pseudo function that returns the size of its argument. The
+ argument can be a struct/union, a struct member, a procedure, or a label. In
+ case of a procedure or label, its size is defined by the amount of data
+ placed in the segment where the label is relative to. If a line of code
+ switches segments (for example in a macro) data placed in other segments
+ does not count for the size.
+
+ Please note that a symbol or scope must exist, before it is used together with
+ <tt/.SIZEOF/ (this may get relaxed later, but will always be true for scopes).
+ A scope has preference over a symbol with the same name, so if the last part
+ of a name represents both, a scope and a symbol, the scope is chosen over the
+ symbol.
+
+ After the following code:
+
+ <tscreen><verb>
+ .struct Point ; Struct size = 4
+ xcoord .word
+ ycoord .word
+ .endstruct
+
+ P: .tag Point ; Declare a point
+ @P: .tag Point ; Declare another point
+
+ .code
+ .proc Code
+ nop
+ .proc Inner
+ nop
+ .endproc
+ nop
+ .endproc
+
+ .proc Data
+ .data ; Segment switch!!!
+ .res 4
+ .endproc
+ </verb></tscreen>
+
+ <descrip>
+ <tag><tt/.sizeof(Point)/</tag>
+ will have the value 4, because this is the size of struct <tt/Point/.
+
+ <tag><tt/.sizeof(Point::xcoord)/</tag>
+ will have the value 2, because this is the size of the member <tt/xcoord/
+ in struct <tt/Point/.
+
+ <tag><tt/.sizeof(P)/</tag>
+ will have the value 4, this is the size of the data declared on the same
+ source line as the label <tt/P/, which is in the same segment that <tt/P/
+ is relative to.
+
+ <tag><tt/.sizeof(@P)/</tag>
+ will have the value 4, see above. The example demonstrates that <tt/.SIZEOF/
+ does also work for cheap local symbols.
+
+ <tag><tt/.sizeof(Code)/</tag>
+ will have the value 3, since this is amount of data emitted into the code
+ segment, the segment that was active when <tt/Code/ was entered. Note that
+ this value includes the amount of data emitted in child scopes (in this
+ case <tt/Code::Inner/).
+
+ <tag><tt/.sizeof(Code::Inner)/</tag>
+ will have the value 1 as expected.
+
+ <tag><tt/.sizeof(Data)/</tag>
+ will have the value 0. Data is emitted within the scope <tt/Data/, but since
+ the segment is switched after entry, this data is emitted into another
+ segment.
+ </descrip>
+
+
+<sect1><tt>.STRAT</tt><label id=".STRAT"><p>
+
+ Builtin function. The function accepts a string and an index as
+ arguments and returns the value of the character at the given position
+ as an integer value. The index is zero based.
+
+ Example:
+
+ <tscreen><verb>
+ .macro M Arg
+ ; Check if the argument string starts with '#'
+ .if (.strat (Arg, 0) = '#')
+ ...
+ .endif
+ .endmacro
+ </verb></tscreen>
+
+
+<sect1><tt>.SPRINTF</tt><label id=".SPRINTF"><p>
+
+ Builtin function. It expects a format string as first argument. The number
+ and type of the following arguments depend on the format string. The format
+ string is similar to the one of the C <tt/printf/ function. Missing things
+ are: Length modifiers, variable width.
+
+ The result of the function is a string.
+
+ Example:
+
+ <tscreen><verb>
+ num = 3
+
+ ; Generate an identifier:
+ .ident (.sprintf ("%s%03d", "label", num)):
+ </verb></tscreen>
+
+
+<sect1><tt>.STRING</tt><label id=".STRING"><p>
+
+ Builtin function. The function accepts an argument in braces and converts
+ this argument into a string constant. The argument may be an identifier, or
+ a constant numeric value.
+
+ Since you can use a string in the first place, the use of the function may
+ not be obvious. However, it is useful in macros, or more complex setups.
+
+ Example:
+
+ <tscreen><verb>
+ ; Emulate other assemblers:
+ .macro section name
+ .segment .string(name)
+ .endmacro
+ </verb></tscreen>
+
+
+<sect1><tt>.STRLEN</tt><label id=".STRLEN"><p>
+
+ Builtin function. The function accepts a string argument in braces and
+ evaluates to the length of the string.
+
+ Example:
+
+ The following macro encodes a string as a pascal style string with
+ a leading length byte.
+
+ <tscreen><verb>
+ .macro PString Arg
+ .byte .strlen(Arg), Arg
+ .endmacro
+ </verb></tscreen>
+
+
+<sect1><tt>.TCOUNT</tt><label id=".TCOUNT"><p>
+
+ Builtin function. The function accepts a token list in braces. The function
+ result is the number of tokens given as argument. The token list may
+ optionally be enclosed into curly braces which are not considered part of
+ the list and not counted. Enclosement in curly braces allows the inclusion
+ of tokens that would otherwise terminate the list (the closing right paren
+ in the given case).
+
+ Example:
+
+ The <tt/ldax/ macro accepts the '#' token to denote immediate addressing (as
+ with the normal 6502 instructions). To translate it into two separate 8 bit
+ load instructions, the '#' token has to get stripped from the argument:
+
+ <tscreen><verb>
+ .macro ldax arg
+ .if (.match (.mid (0, 1, {arg}), #))
+ ; ldax called with immediate operand
+ lda #<(.right (.tcount ({arg})-1, {arg}))
+ ldx #>(.right (.tcount ({arg})-1, {arg}))
+ .else
+ ...
+ .endif
+ .endmacro
+ </verb></tscreen>
+
+
+<sect1><tt>.XMATCH</tt><label id=".XMATCH"><p>
+
+ Builtin function. Matches two token lists against each other. This is
+ most useful within macros, since macros are not stored as strings, but
+ as lists of tokens.
+
+ The syntax is
+
+ <tscreen><verb>
+ .XMATCH(<token list #1>, <token list #2>)
+ </verb></tscreen>
+
+ Both token list may contain arbitrary tokens with the exception of the
+ terminator token (comma resp. right parenthesis) and
+
+ <itemize>
+ <item>end-of-line
+ <item>end-of-file
+ </itemize>
+
+ The token lists may optionally be enclosed into curly braces. This allows
+ the inclusion of tokens that would otherwise terminate the list (the closing
+ right paren in the given case). Often a macro parameter is used for any of
+ the token lists.
+
+ The function compares tokens <em/and/ token values. If you need a function
+ that just compares the type of tokens, have a look at the <tt><ref
+ id=".MATCH" name=".MATCH"></tt> function.
+
+ See: <tt><ref id=".MATCH" name=".MATCH"></tt>
+
+
+
+<sect>Control commands<label id="control-commands"><p>
+
+Here's a list of all control commands and a description, what they do:
+
+
+<sect1><tt>.A16</tt><label id=".A16"><p>
+
+ Valid only in 65816 mode. Switch the accumulator to 16 bit.
+
+ Note: This command will not emit any code, it will tell the assembler to
+ create 16 bit operands for immediate accumulator addressing mode.
+
+ See also: <tt><ref id=".SMART" name=".SMART"></tt>
+
+
+<sect1><tt>.A8</tt><label id=".A8"><p>
+
+ Valid only in 65816 mode. Switch the accumulator to 8 bit.
+
+ Note: This command will not emit any code, it will tell the assembler to
+ create 8 bit operands for immediate accu addressing mode.
+
+ See also: <tt><ref id=".SMART" name=".SMART"></tt>
+
+
+<sect1><tt>.ADDR</tt><label id=".ADDR"><p>
+
+ Define word sized data. In 6502 mode, this is an alias for <tt/.WORD/ and
+ may be used for better readability if the data words are address values. In
+ 65816 mode, the address is forced to be 16 bit wide to fit into the current
+ segment. See also <tt><ref id=".FARADDR" name=".FARADDR"></tt>. The command
+ must be followed by a sequence of (not necessarily constant) expressions.
+
+ Example:
+
+ <tscreen><verb>
+ .addr $0D00, $AF13, _Clear
+ </verb></tscreen>
+
+ See: <tt><ref id=".FARADDR" name=".FARADDR"></tt>, <tt><ref id=".WORD"
+ name=".WORD"></tt>
+
+
+<sect1><tt>.ALIGN</tt><label id=".ALIGN"><p>
+
+ Align data to a given boundary. The command expects a constant integer
+ argument in the range 1 ... 65536, plus an optional second argument
+ in byte range. If there is a second argument, it is used as fill value,
+ otherwise the value defined in the linker configuration file is used
+ (the default for this value is zero).
+
+ <tt/.ALIGN/ will insert fill bytes, and the number of fill bytes depend of
+ the final address of the segment. <tt/.ALIGN/ cannot insert a variable
+ number of bytes, since that would break address calculations within the
+ module. So each <tt/.ALIGN/ expects the segment to be aligned to a multiple
+ of the alignment, because that allows the number of fill bytes to be
+ calculated in advance by the assembler. You are therefore required to
+ specify a matching alignment for the segment in the linker config. The
+ linker will output a warning if the alignment of the segment is less than
+ what is necessary to have a correct alignment in the object file.
+
+ Example:
+
+ <tscreen><verb>
+ .align 256
+ </verb></tscreen>
+
+ Some unexpected behaviour might occur if there are multiple <tt/.ALIGN/
+ commands with different arguments. To allow the assembler to calculate the
+ number of fill bytes in advance, the alignment of the segment must be a
+ multiple of each of the alignment factors. This may result in unexpectedly
+ large alignments for the segment within the module.
+
+ Example:
+
+ <tscreen><verb>
+ .align 15
+ .byte 15
+ .align 18
+ .byte 18
+ </verb></tscreen>
+
+ For the assembler to be able to align correctly, the segment must be aligned
+ to the least common multiple of 15 and 18 which is 90. The assembler will
+ calculate this automatically and will mark the segment with this value.
+
+ Unfortunately, the combined alignment may get rather large without the user
+ knowing about it, wasting space in the final executable. If we add another
+ alignment to the example above
+
+ <tscreen><verb>
+ .align 15
+ .byte 15
+ .align 18
+ .byte 18
+ .align 251
+ .byte 0
+ </verb></tscreen>
+
+ the assembler will force a segment alignment to the least common multiple of
+ 15, 18 and 251 - which is 22590. To protect the user against errors, the
+ assembler will issue a warning when the combined alignment exceeds 256. The
+ command line option <tt><ref id="option--large-alignment"
+ name="--large-alignment"></tt> will disable this warning.
+
+ Please note that with alignments that are a power of two (which were the
+ only alignments possible in older versions of the assembler), the problem is
+ less severe, because the least common multiple of powers to the same base is
+ always the larger one.
+
+
+
+<sect1><tt>.ASCIIZ</tt><label id=".ASCIIZ"><p>
+
+ Define a string with a trailing zero.
+
+ Example:
+
+ <tscreen><verb>
+ Msg: .asciiz "Hello world"
+ </verb></tscreen>
+
+ This will put the string "Hello world" followed by a binary zero into
+ the current segment. There may be more strings separated by commas, but
+ the binary zero is only appended once (after the last one).
+
+
+<sect1><tt>.ASSERT</tt><label id=".ASSERT"><p>
+
+ Add an assertion. The command is followed by an expression, an action
+ specifier, and an optional message that is output in case the assertion
+ fails. If no message was given, the string "Assertion failed" is used. The
+ action specifier may be one of <tt/warning/, <tt/error/, <tt/ldwarning/ or
+ <tt/lderror/. In the former two cases, the assertion is evaluated by the
+ assembler if possible, and in any case, it's also passed to the linker in
+ the object file (if one is generated). The linker will then evaluate the
+ expression when segment placement has been done.
+
+ Example:
+
+ <tscreen><verb>
+ .assert * = $8000, error, "Code not at $8000"
+ </verb></tscreen>
+
+ The example assertion will check that the current location is at $8000,
+ when the output file is written, and abort with an error if this is not
+ the case. More complex expressions are possible. The action specifier
+ <tt/warning/ outputs a warning, while the <tt/error/ specifier outputs
+ an error message. In the latter case, generation of the output file is
+ suppressed in both the assembler and linker.
+
+
+<sect1><tt>.AUTOIMPORT</tt><label id=".AUTOIMPORT"><p>
+
+ Is followed by a plus or a minus character. When switched on (using a
+ +), undefined symbols are automatically marked as import instead of
+ giving errors. When switched off (which is the default so this does not
+ make much sense), this does not happen and an error message is
+ displayed. The state of the autoimport flag is evaluated when the
+ complete source was translated, before outputting actual code, so it is
+ <em/not/ possible to switch this feature on or off for separate sections
+ of code. The last setting is used for all symbols.
+
+ You should probably not use this switch because it delays error
+ messages about undefined symbols until the link stage. The cc65
+ compiler (which is supposed to produce correct assembler code in all
+ circumstances, something which is not true for most assembler
+ programmers) will insert this command to avoid importing each and every
+ routine from the runtime library.
+
+ Example:
+
+ <tscreen><verb>
+ .autoimport + ; Switch on auto import
+ </verb></tscreen>
+
+<sect1><tt>.BANKBYTES</tt><label id=".BANKBYTES"><p>
+
+ Define byte sized data by extracting only the bank byte (that is, bits 16-23) from
+ each expression. This is equivalent to <tt><ref id=".BYTE" name=".BYTE"></tt> with
+ the operator '^' prepended to each expression in its list.
+
+ Example:
+
+ <tscreen><verb>
+ .define MyTable TableItem0, TableItem1, TableItem2, TableItem3
+
+ TableLookupLo: .lobytes MyTable
+ TableLookupHi: .hibytes MyTable
+ TableLookupBank: .bankbytes MyTable
+ </verb></tscreen>
+
+ which is equivalent to
+
+ <tscreen><verb>
+ TableLookupLo: .byte <TableItem0, <TableItem1, <TableItem2, <TableItem3
+ TableLookupHi: .byte >TableItem0, >TableItem1, >TableItem2, >TableItem3
+ TableLookupBank: .byte ^TableItem0, ^TableItem1, ^TableItem2, ^TableItem3
+ </verb></tscreen>
+
+ See also: <tt><ref id=".BYTE" name=".BYTE"></tt>,
+ <tt><ref id=".HIBYTES" name=".HIBYTES"></tt>,
+ <tt><ref id=".LOBYTES" name=".LOBYTES"></tt>
+
+
+<sect1><tt>.BSS</tt><label id=".BSS"><p>
+
+ Switch to the BSS segment. The name of the BSS segment is always "BSS",
+ so this is a shortcut for
+
+ <tscreen><verb>
+ .segment "BSS"
+ </verb></tscreen>
+
+ See also the <tt><ref id=".SEGMENT" name=".SEGMENT"></tt> command.
+
+
+<sect1><tt>.BYT, .BYTE</tt><label id=".BYTE"><p>
+
+ Define byte sized data. Must be followed by a sequence of (byte ranged)
+ expressions or strings.
+
+ Example:
+
+ <tscreen><verb>
+ .byte "Hello "
+ .byt "world", $0D, $00
+ </verb></tscreen>
+
+
+<sect1><tt>.CASE</tt><label id=".CASE"><p>
+
+ Switch on or off case sensitivity on identifiers. The default is off
+ (that is, identifiers are case sensitive), but may be changed by the
+ -i switch on the command line.
+ The command must be followed by a '+' or '-' character to switch the
+ option on or off respectively.
+
+ Example:
+
+ <tscreen><verb>
+ .case - ; Identifiers are not case sensitive
+ </verb></tscreen>
+
+
+<sect1><tt>.CHARMAP</tt><label id=".CHARMAP"><p>
+
+ Apply a custom mapping for characters. The command is followed by two
+ numbers. The first one is the index of the source character (range 1..255),
+ the second one is the mapping (range 0..255). The mapping applies to all
+ character and string constants when they generate output, and overrides a
+ mapping table specified with the <tt><ref id="option-t" name="-t"></tt>
+ command line switch.
+
+ Example:
+
+ <tscreen><verb>
+ .charmap $41, $61 ; Map 'A' to 'a'
+ </verb></tscreen>
+
+
+<sect1><tt>.CODE</tt><label id=".CODE"><p>
+
+ Switch to the CODE segment. The name of the CODE segment is always
+ "CODE", so this is a shortcut for
+
+ <tscreen><verb>
+ .segment "CODE"
+ </verb></tscreen>
+
+ See also the <tt><ref id=".SEGMENT" name=".SEGMENT"></tt> command.
+
+
+<sect1><tt>.CONDES</tt><label id=".CONDES"><p>
+
+ Export a symbol and mark it in a special way. The linker is able to build
+ tables of all such symbols. This may be used to automatically create a list
+ of functions needed to initialize linked library modules.
+
+ Note: The linker has a feature to build a table of marked routines, but it
+ is your code that must call these routines, so just declaring a symbol with
+ <tt/.CONDES/ does nothing by itself.
+
+ All symbols are exported as an absolute (16 bit) symbol. You don't need to
+ use an additional <tt><ref id=".EXPORT" name=".EXPORT"></tt> statement, this
+ is implied by <tt/.CONDES/.
+
+ <tt/.CONDES/ is followed by the type, which may be <tt/constructor/,
+ <tt/destructor/ or a numeric value between 0 and 6 (where 0 is the same as
+ specifying <tt/constructor/ and 1 is equal to specifying <tt/destructor/).
+ The <tt><ref id=".CONSTRUCTOR" name=".CONSTRUCTOR"></tt>, <tt><ref
+ id=".DESTRUCTOR" name=".DESTRUCTOR"></tt> and <tt><ref id=".INTERRUPTOR"
+ name=".INTERRUPTOR"></tt> commands are actually shortcuts for <tt/.CONDES/
+ with a type of <tt/constructor/ resp. <tt/destructor/ or <tt/interruptor/.
+
+ After the type, an optional priority may be specified. Higher numeric values
+ mean higher priority. If no priority is given, the default priority of 7 is
+ used. Be careful when assigning priorities to your own module constructors
+ so they won't interfere with the ones in the cc65 library.
+
+ Example:
+
+ <tscreen><verb>
+ .condes ModuleInit, constructor
+ .condes ModInit, 0, 16
+ </verb></tscreen>
+
+ See the <tt><ref id=".CONSTRUCTOR" name=".CONSTRUCTOR"></tt>, <tt><ref
+ id=".DESTRUCTOR" name=".DESTRUCTOR"></tt> and <tt><ref id=".INTERRUPTOR"
+ name=".INTERRUPTOR"></tt> commands and the separate section <ref id="condes"
+ name="Module constructors/destructors"> explaining the feature in more
+ detail.
+
+