Describe new --check-stack option and related #pragma. Added missing

descriptions for the options to set the segment names from the command
line.


git-svn-id: svn://svn.cc65.org/cc65/trunk@636 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz
2001-03-20 10:24:54 +00:00
parent 9bf849151d
commit 83f8ce6f39

View File

@@ -74,17 +74,22 @@ Short options:
-W Suppress warnings -W Suppress warnings
Long options: Long options:
--ansi Strict ANSI mode --ansi Strict ANSI mode
--cpu type Set cpu type --bss-name seg Set the name of the BSS segment
--debug Debug mode --check-stack Generate stack overflow checks
--debug-info Add debug info to object file --code-name seg Set the name of the CODE segment
--help Help (this text) --cpu type Set cpu type
--include-dir dir Set an include directory search path --data-name seg Set the name of the DATA segment
--signed-chars Default characters are signed --debug Debug mode
--static-locals Make local variables static --debug-info Add debug info to object file
--target sys Set the target system --help Help (this text)
--verbose Increase verbosity --include-dir dir Set an include directory search path
--version Print the compiler version number --rodata-name seg Set the name of the RODATA segment
--signed-chars Default characters are signed
--static-locals Make local variables static
--target sys Set the target system
--verbose Increase verbosity
--version Print the compiler version number
--------------------------------------------------------------------------- ---------------------------------------------------------------------------
</verb></tscreen> </verb></tscreen>
@@ -103,6 +108,23 @@ Here is a description of all the command line options:
<tt/__STRICT_ANSI__/ is defined, when using one of these options. <tt/__STRICT_ANSI__/ is defined, when using one of these options.
<tag><tt>--bss-name seg</tt></tag>
Set the name of the bss segment.
<tag><tt>--check-stack</tt></tag>
Tells the compiler to generate code that checks for stack overflows. See
<tt><ref id="pragma-checkstack" name="#pragma checkstack"></tt> for an
explanation of this feature.
<tag><tt>--code-name seg</tt></tag>
Set the name of the code segment.
<tag><tt>--cpu CPU</tt></tag> <tag><tt>--cpu CPU</tt></tag>
A new, still experimental option. You may specify "6502" or "65C02" as A new, still experimental option. You may specify "6502" or "65C02" as
@@ -137,6 +159,11 @@ Here is a description of all the command line options:
Print the short option summary shown above. Print the short option summary shown above.
<tag><tt>--rodata-name seg</tt></tag>
Set the name of the rodata segment (the segment used for readonly data).
<tag><tt>-j, --signed-chars</tt></tag> <tag><tt>-j, --signed-chars</tt></tag>
Using this option, you can make the default characters signed. Since the Using this option, you can make the default characters signed. Since the
@@ -430,8 +457,8 @@ This cc65 version has some extensions to the ISO C standard.
string. string.
<p> <p>
<item> cc65 allows the initialization of <tt/void/ variables. This may be <item> cc65 allows the initialization of <tt/void/ variables. This may be
used to create variable structures that are more compatible with used to create variable structures that are more compatible with
interfaces written for assembler languages. Here is an example: interfaces written for assembler languages. Here is an example:
<tscreen><verb> <tscreen><verb>
@@ -447,7 +474,7 @@ This cc65 version has some extensions to the ISO C standard.
.word $3000 .word $3000
</verb></tscreen> </verb></tscreen>
Since the variable is of type <tt/void/ you may not use it as is. Since the variable is of type <tt/void/ you may not use it as is.
However, taking the address of the variable results in a <tt/void*/ However, taking the address of the variable results in a <tt/void*/
which may be passed to any function expecting a pointer. which may be passed to any function expecting a pointer.
@@ -567,6 +594,19 @@ generation and other stuff.
</verb></tscreen> </verb></tscreen>
<sect1><tt>#pragma checkstack (&lt;const int&gt;)</tt><label
id="pragma-checkstack"><p>
Tells the compiler to insert calls to a stack checking subroutine to detect
stack overflows. The stack checking code will lead to somewhat larger and
slower programs, so you may want to use this pragma when debugging your
program and switch it off for the release version. If a stack overflow is
detected, the program is aborted.
If the argument is zero, stack checks are disabled (the default), otherwise
they're enabled.
<sect1><tt>#pragma codeseg (&lt;name&gt;)</tt><p> <sect1><tt>#pragma codeseg (&lt;name&gt;)</tt><p>
This pragma changes the name used for the CODE segment (the CODE segment This pragma changes the name used for the CODE segment (the CODE segment
@@ -579,7 +619,7 @@ generation and other stuff.
Example: Example:
<tscreen><verb> <tscreen><verb>
#pragma bssseg ("MyCODE") #pragma bssseg ("MyCODE")
</verb></tscreen> </verb></tscreen>
@@ -595,7 +635,7 @@ generation and other stuff.
Example: Example:
<tscreen><verb> <tscreen><verb>
#pragma bssseg ("MyDATA") #pragma bssseg ("MyDATA")
</verb></tscreen> </verb></tscreen>
@@ -611,7 +651,7 @@ generation and other stuff.
Example: Example:
<tscreen><verb> <tscreen><verb>
#pragma bssseg ("MyRODATA") #pragma bssseg ("MyRODATA")
</verb></tscreen> </verb></tscreen>
@@ -640,7 +680,7 @@ generation and other stuff.
<sect1><tt>#pragma signedchars (&lt;const int&gt;)</tt><label <sect1><tt>#pragma signedchars (&lt;const int&gt;)</tt><label
id="pragma-signedchars"><p> id="pragma-signedchars"><p>
Changed the signedness of the default character type. If the argument Changes the signedness of the default character type. If the argument
is not zero, default characters are signed, otherwise characters are is not zero, default characters are signed, otherwise characters are
unsigned. The compiler default is to make characters unsigned since this unsigned. The compiler default is to make characters unsigned since this
creates a lot better code. This default may be overridden by the creates a lot better code. This default may be overridden by the