From: cuz Date: Mon, 30 Oct 2000 21:54:28 +0000 (+0000) Subject: Describe .initializer X-Git-Tag: V2.12.0~3111 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=0e1c29d299aa148f5559be90a3e5622f8898b403;p=cc65 Describe .initializer git-svn-id: svn://svn.cc65.org/cc65/trunk@415 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/doc/ca65.sgml b/doc/ca65.sgml index eb545ba7b..ccbef2007 100644 --- a/doc/ca65.sgml +++ b/doc/ca65.sgml @@ -1323,6 +1323,31 @@ Here's a list of all control commands and a description, what they do: +.INITIALIZER + + Export a symbol and mark it as an initializer. This may be used together + with the linker to build a table of initializer subroutines that are called + by the startup code. + + Note: The linker has a feature to build a table of initializer routines, but + it is your code that must call these routines, so just declaring a symbol + as initializer does nothing by itself. + + An initializer is always exported as an absolute (16 bit) symbol. It may + have an optional initializer priority that is separated by a comma. If no + priority is given, the default priority of 24 is used. Priority values 1-15 + are reserved for the runtime and C libraries of the cc65 C compiler. + + Example: + + + .initializer ModuleInit + .initializer ModInit, 16 + + + See the C runtime libraries for more examples how to use initializers. + + .LEFT Builtin function. Extracts the left part of a given token list.