Allow optional assignments in .export and .exportzp statements.

git-svn-id: svn://svn.cc65.org/cc65/trunk@3809 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz
2008-02-19 21:01:07 +00:00
parent b582ad7ed1
commit 94f3a578a5
2 changed files with 46 additions and 10 deletions

View File

@@ -2158,19 +2158,25 @@ Here's a list of all control commands and a description, what they do:
<sect1><tt>.EXPORT</tt><label id=".EXPORT"><p>
Make symbols accessible from other modules. Must be followed by a comma
separated list of symbols to export, with each one optionally followed by
an address specification. The default is to export the symbol with the
address size it actually has. The assembler will issue a warning, if the
symbol is exported with an address size smaller than the actual address
size.
separated list of symbols to export, with each one optionally followed by an
address specification and (also optional) an assignment. Using an additional
assignment in the export statement allows to define and export a symbol in
one statement. The default is to export the symbol with the address size it
actually has. The assembler will issue a warning, if the symbol is exported
with an address size smaller than the actual address size.
Example:
Examples:
<tscreen><verb>
.export foo
.export bar: far
.export foobar: far = foo * bar
.export baz := foobar, zap: far = baz - bar
</verb></tscreen>
As with constant definitions, using <tt/:=/ instead of <tt/=/ marks the
symbols as a label.
See: <tt><ref id=".EXPORTZP" name=".EXPORTZP"></tt>
@@ -2178,12 +2184,15 @@ Here's a list of all control commands and a description, what they do:
Make symbols accessible from other modules. Must be followed by a comma
separated list of symbols to export. The exported symbols are explicitly
marked as zero page symbols.
marked as zero page symbols. An assignment may be included in the
<tt/.EXPORTZP/ statement. This allows to define and export a symbol in one
statement.
Example:
Examples:
<tscreen><verb>
.exportzp foo, bar
.exportzp baz := &dollar;02
</verb></tscreen>
See: <tt><ref id=".EXPORT" name=".EXPORT"></tt>