⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 newvers.txt

📁 cc65 的编译器文档
💻 TXT
📖 第 1 页 / 共 2 页
字号:
This document is slightly outdated! See cc65.txt and library.txt for a moreup-to-date discussion.Discussion of some of the features/non features of the current cc65 version---------------------------------------------------------------------------  1. Copyright  2. Differences to the original version  3. Known bugs and limitations  4. Library  5. Bugs1. Copyright-----------This is the original compiler copyright:--------------------------------------------------------------------------  -*- Mode: Text -*-     This is the copyright notice for RA65, LINK65, LIBR65, and other  Atari 8-bit programs.  Said programs are Copyright 1989, by John R.  Dunning.  All rights reserved, with the following exceptions:      Anyone may copy or redistribute these programs, provided that:  1:  You don't charge anything for the copy.  It is permissable to      charge a nominal fee for media, etc.  2:  All source code and documentation for the programs is made      available as part of the distribution.  3:  This copyright notice is preserved verbatim, and included in      the distribution.      You are allowed to modify these programs, and redistribute the  modified versions, provided that the modifications are clearly noted.      There is NO WARRANTY with this software, it comes as is, and is  distributed in the hope that it may be useful.      This copyright notice applies to any program which contains  this text, or the refers to this file.      This copyright notice is based on the one published by the Free  Software Foundation, sometimes known as the GNU project.  The idea  is the same as theirs, ie the software is free, and is intended to  stay that way.  Everybody has the right to copy, modify, and re-  distribute this software.  Nobody has the right to prevent anyone  else from copying, modifying or redistributing it.--------------------------------------------------------------------------In acknowledgment of this copyright, I will place my own changes to thecompiler under the same copyright.However, since the library and all binutils (assembler, archiver, linker)are a complete rewrite, they are covered by another copyright:--------------------------------------------------------------------------		       CC65 C Library and Binutils       	        (C) Copyright 1998 Ullrich von Bassewitz                           COPYING CONDITIONS  This software is provided 'as-is', without any expressed or implied  warranty.  In no event will the authors be held liable for any damages  arising from the use of this software.  Permission is granted to anyone to use this software for any purpose,  including commercial applications, and to alter it and redistribute it  freely, subject to the following restrictions:  1. The origin of this software must not be misrepresented; you must not     claim that you wrote the original software. If you use this software     in a product, an acknowledgment in the product documentation would be     appreciated but is not required.  2. Altered source versions must be plainly marked as such, and must not     be misrepresented as being the original software.  3. This notice may not be removed or altered from any source     distribution--------------------------------------------------------------------------I will try to contact John, maybe he is also willing to place his sourcesunder a less restrictive copyright, after all these years:-)2. Differences to the original version--------------------------------------This is a list of changes against the cc65 archives. I got the originalsfrom:  http://www.umich.edu/~archive/atari/8bit/Languages/Cc65/  * Removed all assembler code from the compiler. It was unportable because    it made assumptions about the character set (ATASCII) and made the    sources hard to read and to debug.  * All programs do return an error code, so they may be used by make. All    programs try to remove the target file, if there were errors.  * The assembler now checks several error conditions (others still go    undetected - see "known bugs").  * Removed many bugs from the compiler. One error was invalid code    produced by the compiler that went through the assembler since the    assembler did not check for ranges itself.  * Removed many non-portable constructs from the compiler. Code cleanups,    rewrite of the function headers and more.  * New style function prototypes supported instead of the old K&R syntax.    The new syntax is a must, that is, the old style syntax is no longer    understood. As an extension, unnamed parameters may be used to avoid    warnings about unused parameters.  * New void type. May also be used as a function return type.  * Changed the memory management in the compiler. Use malloc/free instead    of the old homebrew (and unportable) stuff.  * Default character type is unsigned. This is much more what you want in    small systems environments, since a char is often used to represent a    small numerical value, and the integer promotion does the wrong thing    in those cases. Look at the follwing piece of code:       char c = read_char ();       switch (c) {           case 0x80: printf ("c is 0x80\n"); break;           default:   printf ("c is something else\n"); break;       }    With signed chars, the code above, will *always* run into the default    selector. c is promoted to int, and since it is signed, 0x80 will get    promoted to 0xFF80 - which will select the default label. With unsigned    chars, the code works as intended (but note: the code works for cc65    but it is non portable anyway, since many other compilers have signed    chars by default, so be careful! Having unsigned chars is just a    convenience thing).  * Shorter code when using the builtin operators and the lhs of an expr    is a constant (e.g. expressions like "c == 0x80" are encoded two    bytes shorter).  * Some optimizations when pushing constants.  * Character set translation by the compiler. A new -t option was added    to set the target system type. Use	-t0     For no spefic target system (default)        -t1     For the atari (does not work completely, since I did not                have an ATASCII translation table).        -t2     Target system is C64.        -t3     Target system is C128.        -t4     Target system is ACE.	-t5	Target system is Plus/5.  * Dito for the linker: Allow an option to set the target system and add    code to the linker to produce different headers and set the correct    start address.  * Complete rewrite of the C library. See extra chapter.  * Many changes in the runtime library. Splitted it into more than one    file to allow for smaller executables if not all of the code is needed.  * Allow longer names. Now the first 12 characters are sigificant at the    expense of some more memory used at runtime.  * String constants are now concatenated in all places. This allows    things like:    	fputs ("Options:\n"    	       "    -b  bomb computer\n"               "    -f  format hard disk\n"    	       "    -k  kill init\n",               stderr);    saving code for more than one call to the function.  * Several new macros are defined:      M6502       This one is old - don't use!      __CC65__    Use this instead. Defined when compiling with cc65.      __ATARI__   Defined when the target system is atari.      __CBM__     Defined when compiling for a CBM system as target.      __C64__     Defined when the C64 is the target system.      __C128__    Defined when compiling for the 128.      __ACE__     Defined when compiling for ACE.      __PLUS4__	  Defined when compiling for the Plus/4.    The __CC65__ macro has the compiler version as its value, version    1.0 of the compiler will define this macro as 0x100.  * The -a option is gone.  * The compiler will generate external references (via .globl) only if a    function is defined as extern in a module, or not defined but called    from a module. The old behaviour was to generate a reference for every    function prototype ever seen, which meant that using a header file like    stdio.h got most of the C library linked in, even if it was never used.  * Many new warnings added (about unused parameters, unused variables,    compares of unsigneds against zero, function call without prototype    and much more).  * Added a new compiler option (-W) to suppress all warnings.  * New internal variable __fixargs__ that gives the size of fixed    arguments, a function takes. This allows to work (somehow) around the    problem, that cc65 has the "wrong" (that is, pascal) calling order. See    below ("Known problems") for a discussion.  * The "empty" preprocessor directive ("#" on a line) is now ignored.  * Added a "#error" directive to force user errors.  * Optimization of the code generation. Constant parts of expressions are    now detected in many places where the old compiler evaluated the    constants at runtime.  * Allow local static variables (there was code in the original compiler for    that, but it did not work). Allow also initialization in this case (no    code for that in the original). Local static variables in the top level    function block have no penalty, for static variables in nested blocks, the    compiler generates a jump around the variable space. To eliminate this,    an assembler/linker with support for segments is needed.  * You cannot return a value from a void function, and must return a value    in a non-void function. Violations are flagged as an error.  * Typedefs added.  * The nonstandard evaluation of the NOARGC and FIXARGC macros has been    replaced by a smart algorithm that does the same thing automagically

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -