]> git.sur5r.net Git - cc65/blob - doc/cc65.sgml
f2461389c0d7e6b968ecd7235dbe2786197b1faa
[cc65] / doc / cc65.sgml
1 <!doctype linuxdoc system>
2
3 <article>
4 <title>cc65 Users Guide
5 <author>Ullrich von Bassewitz, <htmlurl url="mailto:uz@cc65.org" name="uz@cc65.org">
6 <date>03.09.2000
7
8 <abstract>
9 cc65 is a C compiler for 6502 targets. It supports several 6502 based home
10 computers like the Commodore and Atari machines, but it is easily retargetable.
11 </abstract>
12
13 <!-- Table of contents -->
14 <toc>
15
16 <!-- Begin the document -->
17
18
19 <sect>Overview<p>
20
21 cc65 was originally a C compiler for the Atari 8-bit machines written by
22 John R. Dunning. In prior releases I've described the compiler by listing
23 up the changes made by me. I have made many more changes in the meantime
24 (and rewritten major parts of the compiler), so I will no longer do that,
25 since the list would be too large and of no use to anyone. Instead I will
26 describe the compiler in respect to the ANSI/ISO C standard. In fact, I'm
27 planning a complete rewrite (that is, a complete new compiler) for the
28 next release, since there are too many limitations in the current code,
29 and removing these limitations would mean a rewrite of many more parts of
30 the compiler.
31
32 There is a separate document named "library.txt" that covers the library
33 available for the compiler. If you know C and are interested in doing
34 actual programming, the library documentation is probably of much more use
35 than this document.
36
37 If you need some hints for getting the best code out of the compiler, you
38 may have a look at "coding.txt" which covers some code generation issues.
39
40
41
42 <sect>Usage<p>
43
44 The compiler translates C files into files containing assembler code that
45 may be translated by the ca65 macroassembler (for more information about
46 the assembler, have a look at ca65.txt).
47
48
49 <sect1>Command line option overview<p>
50
51 The compiler may be called as follows:
52
53 <tscreen><verb>
54 ---------------------------------------------------------------------------
55 Usage: cc65 [options] file
56 Short options:
57   -d                    Debug mode
58   -g                    Add debug info to object file
59   -h                    Help (this text)
60   -j                    Default characters are signed
61   -o name               Name the output file
62   -t sys                Set the target system
63   -v                    Increase verbosity
64   -A                    Strict ANSI mode
65   -Cl                   Make local variables static
66   -Dsym[=defn]          Define a symbol
67   -I dir                Set an include directory search path
68   -O                    Optimize code
69   -Oi                   Optimize code, inline more code
70   -Or                   Enable register variables
71   -Os                   Inline some known functions
72   -T                    Include source as comment
73   -V                    Print the compiler version number
74   -W                    Suppress warnings
75
76 Long options:
77   --ansi                Strict ANSI mode
78   --bss-name seg        Set the name of the BSS segment
79   --check-stack         Generate stack overflow checks
80   --code-name seg       Set the name of the CODE segment
81   --codesize x          Accept larger code by factor x
82   --cpu type            Set cpu type
83   --data-name seg       Set the name of the DATA segment
84   --debug               Debug mode
85   --debug-info          Add debug info to object file
86   --help                Help (this text)
87   --include-dir dir     Set an include directory search path
88   --rodata-name seg     Set the name of the RODATA segment
89   --signed-chars        Default characters are signed
90   --static-locals       Make local variables static
91   --target sys          Set the target system
92   --verbose             Increase verbosity
93   --version             Print the compiler version number
94 ---------------------------------------------------------------------------
95 </verb></tscreen>
96
97
98 <sect1>Command line options in detail<p>
99
100 Here is a description of all the command line options:
101
102 <descrip>
103
104   <label id="option-A">
105   <tag><tt>-A, --ansi</tt></tag>
106
107   This option disables any compiler exensions. Have a look at section 5
108   for a discussion of compiler extensions. In addition, the macro
109   <tt/__STRICT_ANSI__/ is defined, when using one of these options.
110
111
112   <tag><tt>--bss-name seg</tt></tag>
113
114   Set the name of the bss segment.
115
116
117   <tag><tt>--check-stack</tt></tag>
118
119   Tells the compiler to generate code that checks for stack overflows. See
120   <tt><ref id="pragma-checkstack" name="#pragma checkstack"></tt> for an
121   explanation of this feature.
122
123
124   <tag><tt>--code-name seg</tt></tag>
125
126   Set the name of the code segment.
127
128
129   <tag><tt>--codesize x</tt></tag>
130
131   This options allows finer control about speed vs. size decisions in the
132   code generation phase. It gives the allowed size increase factor (in
133   percent). The default is 100 when not using <tt/-Oi/ and 200 when using
134   <tt/-Oi/ (<tt/-Oi/ is the same as <tt/--codesize 200/).
135
136
137   <tag><tt>--cpu CPU</tt></tag>
138
139   A new, still experimental option. You may specify "6502" or "65C02" as
140   the CPU. 6502 is the default, so this will not change anything.
141   Specifying 65C02 will use a few 65C02 instructions when generating code.
142   Don't expect too much from this option: It is still new (and may have
143   bugs), and the additional instructions for the 65C02 are not that
144   overwhelming.
145
146
147   <tag><tt>-d, --debug</tt></tag>
148
149   Enables debug mode, something that should not be needed for mere
150   mortals:-)
151
152
153   <tag><tt>-D sym[=definition]</tt></tag>
154
155   Define a macro on the command line. If no definition is given, the macro
156   is defined to the value "1".
157
158
159   <tag><tt>-g, --debug-info</tt></tag>
160
161   This will cause the compiler to insert a <tt/.DEBUGINFO/ command into the
162   generated assembler code. This will cause the assembler to include all
163   symbols in a special section in the object file.
164
165
166   <tag><tt>-h, --help</tt></tag>
167
168   Print the short option summary shown above.
169
170
171   <tag><tt>--rodata-name seg</tt></tag>
172
173   Set the name of the rodata segment (the segment used for readonly data).
174
175
176   <tag><tt>-j, --signed-chars</tt></tag>
177
178   Using this option, you can make the default characters signed. Since the
179   6502 has no provisions for sign extending characters (which is needed on
180   almost any load operation), this will make the code larger and slower. A
181   better way is to declare characters explicitly as "signed" if needed. You
182   can also use <tt><ref id="pragma-signedchars" name="#pragma
183   signedchars"></tt> for better control of this option.
184
185
186   <tag><tt>-t target, --target target</tt></tag>
187
188   This option is used to set the target system. The target system
189   determines things like the character set that is used for strings and
190   character constants. The following target systems are supported:
191
192   <itemize>
193   <item>none
194   <item>atari
195   <item>c64
196   <item>c128
197   <item>plus4
198   <item>cbm610 (all CBM series-II computers with 80 column video)
199   <item>pet (all CBM PET systems except the 2001)
200   <item>apple2
201   <item>geos
202   </itemize>
203
204   <tag><tt>-v, --verbose</tt></tag>
205
206   Using this option, the compiler will be somewhat more verbose if errors
207   or warnings are encountered.
208
209
210   <tag><tt>-Cl, --static-locals</tt></tag>
211
212   Use static storage for local variables instead of storage on the stack.
213   Since the stack is emulated in software, this gives shorter and usually
214   faster code, but the code is no longer reentrant. The difference between
215   <tt/-Cl/ and declaring local variables as static yourself is, that
216   initializer code is executed each time, the function is entered. So when
217   using
218
219   <tscreen><verb>
220         void f (void)
221         {
222             unsigned a = 1;
223             ...
224         }
225   </verb></tscreen>
226
227   the variable a will always have the value 1 when entering the function
228   and using <tt/-Cl/, while in
229
230   <tscreen><verb>
231         void f (void)
232         {
233             static unsigned a = 1;
234             ....
235         }
236   </verb></tscreen>
237
238   the variable a will have the value 1 only the first time, the function
239   is entered, and will keep the old value from one call of the function to
240   the next.
241
242   You may also use <tt><ref id="pragma-staticlocals" name="#pragma
243   staticlocals"></tt> to change this setting in your sources.
244
245
246   <tag><tt>-I dir, --include-dir dir</tt></tag>
247
248   Set a directory where the compiler searches for include files. You may
249   use this option multiple times to add more than one directory to the
250   search list.
251
252
253   <tag><tt>-o name</tt></tag>
254
255   Specify the name of the output file. If you don't specify a name, the
256   name of the C input file is used, with the extension replaced by ".s".
257
258
259   <tag><tt>-O, -Oi, -Or, -Os</tt></tag>
260
261   Enable an optimizer run over the produced code.
262
263   Using <tt/-Oi/, the code generator will inline some code where otherwise a
264   runtime functions would have been called, even if the generated code is
265   larger. This will not only remove the overhead for a function call, but will
266   make the code visible for the optimizer. <tt/-Oi/ is an alias for
267   <tt/--codesize 200/.
268
269   <tt/-Or/ will make the compiler honor the <tt/register/ keyword. Local
270   variables may be placed in registers (which are actually zero page
271   locations). There is some overhead involved with register variables, since
272   the old contents of the registers must be saved and restored. In addition,
273   the current implementation does not make good use of register variables, so
274   using <tt/-Or/ may make your program even slower and larger. Use with care!
275
276   Using <tt/-Os/ will force the compiler to inline some known functions from
277   the C library like strlen. Note: This has two consequences:
278   <p>
279   <itemize>
280   <item>You may not use names of standard C functions in your own code. If you
281         do that, your program is not standard compliant anyway, but using
282         <tt/-Os/ will actually break things.
283         <p>
284   <item>The inlined string and memory functions will not handle strings or
285         memory areas larger than 255 bytes. Similar, the inlined <tt/is..()/
286         functions will not work with values outside char range.
287         <p>
288   </itemize>
289   <p>
290   It is possible to concatenate the modifiers for <tt/-O/. For example, to
291   enable register variables and inlining of known functions, you may use
292   <tt/-Ors/.
293
294
295   <tag><tt>-T</tt></tag>
296
297   This include the source code as comments in the generated code. This is
298   normally not needed.
299
300
301   <tag><tt>-V, --version</tt></tag>
302
303   Print the version number of the compiler. When submitting a bug report,
304   please include the operating system you're using, and the compiler
305   version.
306
307
308   <tag><tt>-W</tt></tag>
309
310   This option will suppress any warnings generated by the compiler. Since
311   any source file may be written in a manner that it will not produce
312   compiler warnings, using this option is usually not a good idea.
313
314 </descrip><p>
315
316
317 <sect>Input and output<p>
318
319 The compiler will accept one C file per invocation and create a file with
320 the same base name, but with the extension replaced by ".s". The output
321 file contains assembler code suitable for the use with the ca65 macro
322 assembler.
323
324 In addition to the paths named in the <tt/-I/ option on the command line, the
325 directory named in the environment variable <tt/CC65_INC/ is added to the
326 search path for include files on startup.
327
328
329
330 <sect>Differences to the ISO standard<p>
331
332 Here is a list of differences between the language, the compiler accepts,
333 and the one defined by the ISO standard:
334
335 <itemize>
336
337 <item>  The compiler allows single line comments that start with //. This
338         feature is disabled in strict ANSI mode.
339         <p>
340 <item>  The compiler allows unnamed parameters in parameter lists. The
341         compiler will not issue warnings about unused parameters that don't
342         have a name. This feature is disabled in strict ANSI mode.
343         <p>
344 <item>  The compiler has some additional keywords:
345         <p>
346         <itemize>
347         <item><tt/asm/
348         <item><tt/__asm__/
349         <item><tt/fastcall/
350         <item><tt/__fastcall__/
351         <item><tt/__AX__/
352         <item><tt/__EAX__/
353         <item><tt/__func__/
354         <item><tt/__attribute__/
355         </itemize>
356         <p>
357         The keywords without the underlines are disabled in strict ANSI mode.
358         <p>
359 <item>  The datatypes "float" and "double" are not available.
360         <p>
361 <item>  The compiler does not support bit fields.
362         <p>
363 <item>  Initialization of local variables is only possible for scalar data
364         types (that is, not for arrays and structs).
365         <p>
366 <item>  Because of the "wrong" order of the parameters on the stack, there is
367         an additional macro needed to access parameters in a variable
368         parameter list in a C function.
369         <p>
370 <item>  Functions may not return structs (or unions), and structs may not be
371         passed as parameters by value. However, struct assignment *is* 
372         possible.
373         <p>
374 <item>  Part of the C library is available only with fastcall calling
375         conventions (see below). This means, that you may not mix pointers to
376         those functions with pointers to user written functions.
377         <p>
378 </itemize>
379
380 There may be some more minor differences, I'm currently not aware off. The
381 biggest problem is the missing float data type. With this limitation in
382 mind, you should be able to write fairly portable code.
383
384
385
386 <sect>Extensions<p>
387
388 This cc65 version has some extensions to the ISO C standard.
389
390 <itemize>
391
392 <item>  The compiler allows // comments (like in C++ and in the proposed C9x
393         standard). This feature is disabled by <tt><ref id="option-A"
394         name="-A"></tt>.
395         <p>
396
397 <item>  The compiler allows to insert assembler statements into the output
398         file. The syntax is
399
400         <tscreen><verb>
401         asm (&lt;string literal&gt;) ;
402         </verb></tscreen>
403         or
404         <tscreen><verb>
405         __asm__ (&lt;string literal&gt;) ;
406         </verb></tscreen>
407
408         The first form is in the user namespace and is disabled if the <tt/-A/
409         switch is given.
410
411         The given string is inserted literally into the output file, and a
412         newline is appended. The statements in this string are not checked by
413         the compiler, so be careful!
414
415         The asm statement may be used inside a function and on global file
416         level.
417         <p>
418
419 <item>  There is a special calling convention named "fastcall". This calling
420         convention is currently only usable for functions written in
421         assembler. The syntax for a function declaration using fastcall is
422
423         <tscreen><verb>
424         <tt/&lt;return type&gt; fastcall &lt;function name&gt; (&lt;parameter list&gt;)/
425         </verb></tscreen>
426         or
427         <tscreen><verb>
428         <tt/&lt;return type&gt; __fastcall__ &lt;function name&gt; (&lt;parameter list&gt;)/
429         </verb></tscreen>
430         An example would be
431         <tscreen><verb>
432         <tt/void __fastcall__ f (unsigned char c)/
433         </verb></tscreen>
434         The first form of the fastcall keyword is in the user namespace and is
435         therefore disabled in strict ANSI mode.
436
437         For functions declared as <tt/fastcall/, the rightmost parameter is not
438         pushed on the stack but left in the primary register when the function
439         is called. This will reduce the cost when calling assembler functions
440         significantly, especially when the function itself is rather small.
441         <p>
442
443 <item>  There are two pseudo variables named <tt/__AX__/ and <tt/__EAX__/.
444         Both refer to the primary register that is used by the compiler to
445         evaluate expressions or return function results. <tt/__AX__/ is of
446         type <tt/unsigned int/ and <tt/__EAX__/ of type <tt/long unsigned int/
447         respectively. The pseudo variables may be used as lvalue and rvalue as
448         every other variable. They are most useful together with short
449         sequences of assembler code. For example, the macro
450
451         <tscreen><verb>
452         #define hi(x) (__AX__=(x),asm("\ttxa\n\tldx\t#$00",__AX__)
453         </verb></tscreen>
454
455         will give the high byte of any unsigned value.
456         <p>
457
458 <item>  Inside a function, the identifier <tt/__func__/ gives the name of the
459         current function as a string. Outside of functions, <tt/__func__/ is
460         undefined.
461         Example:
462
463         <tscreen><verb>
464         #define PRINT_DEBUG(s)  printf ("%s: %s\n", __func__, s);
465         </verb></tscreen>
466
467         The macro will print the name of the current function plus a given
468         string.
469         <p>
470
471 <item>  cc65 allows the initialization of <tt/void/ variables. This may be
472         used to create variable structures that are more compatible with
473         interfaces written for assembler languages. Here is an example:
474
475         <tscreen><verb>
476         void GCmd = {   (char)3, (unsigned)0x2000, (unsigned)0x3000 };
477         </verb></tscreen>
478
479         This will be translated as follows:
480
481         <tscreen><verb>
482         _GCmd:
483                 .byte   3
484                 .word   $2000
485                 .word   $3000
486         </verb></tscreen>
487
488         Since the variable is of type <tt/void/ you may not use it as is.
489         However, taking the address of the variable results in a <tt/void*/
490         which may be passed to any function expecting a pointer.
491
492         See the <htmlurl url="geos.html" name="GEOS library"> for examples on
493         how to use this feature.
494         <p>
495
496 </itemize>
497 <p>
498
499
500 <sect>Predefined macros<p>
501
502 The compiler defines several macros at startup:
503
504 <descrip>
505
506   <tag><tt>__CC65__</tt></tag>
507
508   This macro is always defined. Its value is the version number of the
509   compiler in hex. Version 2.0.1 of the compiler will have this macro defined
510   as 0x0201.
511
512   <tag><tt>__CBM__</tt></tag>
513
514   This macro is defined if the target system is one of the CBM targets.
515
516   <tag><tt>__C64__</tt></tag>
517
518   This macro is defined if the target is the c64 (-t c64).
519
520   <tag><tt>__C128__</tt></tag>
521
522   This macro is defined if the target is the c128 (-t c128).
523
524   <tag><tt>__PLUS4__</tt></tag>
525
526   This macro is defined if the target is the plus/4 (-t plus4).
527
528   <tag><tt>__CBM610__</tt></tag>
529
530   This macro is defined if the target is one of the CBM 600/700 family of
531   computers (called B series in the US).
532
533   <tag><tt>__PET__</tt></tag>
534
535   This macro is defined if the target is the PET family of computers (-t pet).
536
537   <tag><tt>__ATARI__</tt></tag>
538
539   This macro is defined if the target is one of the Atari computers
540   (400/800/130XL/800XL).
541
542   <tag><tt>__APPLE2__</tt></tag>
543
544   This macro is defined if the target is the Apple ][ (-t apple2).
545
546   <tag><tt>__GEOS__</tt></tag>
547
548   This macro is defined if you are compiling for the GEOS system (-t geos).
549
550   <tag><tt>__FILE__</tt></tag>
551
552   This macro expands to a string containing the name of the C source file.
553
554   <tag><tt>__LINE__</tt></tag>
555
556   This macro expands to the current line number.
557
558   <tag><tt>__STRICT_ANSI__</tt></tag>
559
560   This macro is defined to 1 if the <tt/-A/ compiler option was given, and
561   undefined otherwise.
562
563   <tag><tt>__OPT__</tt></tag>
564
565   Is defined if the compiler was called with the <tt/-O/ command line option.
566
567   <tag><tt>__OPT_i__</tt></tag>
568
569   Is defined if the compiler was called with the <tt/-Oi/ command line option.
570
571   <tag><tt>__OPT_r__</tt></tag>
572
573   Is defined if the compiler was called with the <tt/-Or/ command line option.
574
575   <tag><tt>__OPT_s__</tt></tag>
576
577   Is defined if the compiler was called with the <tt/-Os/ command line option.
578
579 </descrip>
580
581
582 <sect>#pragmas<label id="pragmas"><p>
583
584 The compiler understands some pragmas that may be used to change code
585 generation and other stuff.
586
587
588 <sect1><tt>#pragma bssseg (&lt;name&gt;)</tt><p>
589
590   This pragma changes the name used for the BSS segment (the BSS segment
591   is used to store uninitialized data). The argument is a string enclosed
592   in double quotes.
593
594   Note: The default linker configuration file does only map the standard
595   segments. If you use other segments, you have to create a new linker
596   configuration file.
597
598   Beware: The startup code will zero only the default BSS segment. If you
599   use another BSS segment, you have to do that yourself, otherwise
600   uninitialized variables do not have the value zero.
601
602   Example:
603   <tscreen><verb>
604         #pragma bssseg ("MyBSS")
605   </verb></tscreen>
606
607
608 <sect1><tt>#pragma checkstack (&lt;const int&gt;)</tt><label
609 id="pragma-checkstack"><p>
610
611   Tells the compiler to insert calls to a stack checking subroutine to detect
612   stack overflows. The stack checking code will lead to somewhat larger and
613   slower programs, so you may want to use this pragma when debugging your
614   program and switch it off for the release version. If a stack overflow is
615   detected, the program is aborted.
616
617   If the argument is zero, stack checks are disabled (the default), otherwise
618   they're enabled.
619
620
621 <sect1><tt>#pragma codeseg (&lt;name&gt;)</tt><p>
622
623   This pragma changes the name used for the CODE segment (the CODE segment
624   is used to store executable code). The argument is a string enclosed in
625   double quotes.
626
627   Note: The default linker configuration file does only map the standard
628   segments. If you use other segments, you have to create a new linker
629   configuration file.
630
631   Example:
632   <tscreen><verb>
633         #pragma codeseg ("MyCODE")
634   </verb></tscreen>
635
636
637 <sect1><tt>#pragma dataseg (&lt;name&gt;)</tt><p>
638
639   This pragma changes the name used for the DATA segment (the DATA segment
640   is used to store initialized data). The argument is a string enclosed in
641   double quotes.
642
643   Note: The default linker configuration file does only map the standard
644   segments. If you use other segments, you have to create a new linker
645   configuration file.
646
647   Example:
648   <tscreen><verb>
649         #pragma dataseg ("MyDATA")
650   </verb></tscreen>
651
652
653 <sect1><tt>#pragma rodataseg (&lt;name&gt;)</tt><p>
654
655   This pragma changes the name used for the RODATA segment (the RODATA
656   segment is used to store readonly data). The argument is a string
657   enclosed in double quotes.
658
659   Note: The default linker configuration file does only map the standard
660   segments. If you use other segments, you have to create a new linker
661   configuration file.
662
663   Example:
664   <tscreen><verb>
665         #pragma rodataseg ("MyRODATA")
666   </verb></tscreen>
667
668
669 <sect1><tt>#pragma regvaraddr (&lt;const int&gt;)</tt><p>
670
671   The compiler does not allow to take the address of register variables.
672   The regvaraddr pragma changes this. Taking the address of a register
673   variable is allowed after using this pragma, if the argument is not
674   zero. Using an argument of zero changes back to the default behaviour.
675
676   Beware: The C standard does not allow taking the address of a variable
677   declared as register. So your programs become non-portable if you use
678   this pragma. In addition, your program may not work. This is usually the
679   case if a subroutine is called with the address of a register variable,
680   and this subroutine (or a subroutine called from there) uses itself
681   register variables. So be careful with this #pragma.
682
683   Example:
684   <tscreen><verb>
685         #pragma regvaraddr(1)   /* Allow taking the address
686                                  * of register variables
687                                  */
688   </verb></tscreen>
689
690
691 <sect1><tt>#pragma signedchars (&lt;const int&gt;)</tt><label
692 id="pragma-signedchars"><p>
693
694   Changes the signedness of the default character type. If the argument
695   is not zero, default characters are signed, otherwise characters are
696   unsigned. The compiler default is to make characters unsigned since this
697   creates a lot better code. This default may be overridden by the
698   <tt/--signed-chars/ command line option.
699
700
701 <sect1><tt>#pragma staticlocals (&lt;const int&gt;)</tt><label
702 id="pragma-staticlocals"<p>
703
704   Use variables in the bss segment instead of variables on the stack. This
705   pragma changes the default set by the compiler option <tt/-Cl/. If the
706   argument is not zero, local variables are allocated in the BSS segment,
707   leading to shorter and in most cases faster, but non-reentrant code.
708
709
710 <sect1><tt>#pragma zpsym (&lt;name&gt;)</tt><p>
711
712   Tell the compiler that the - previously as external declared - symbol with
713   the given name is a zero page symbol (usually from an assembler file).
714   The compiler will create a matching import declaration for the assembler.
715
716   Example:
717   <tscreen><verb>
718         extern int foo;
719         #pragma zpsym ("foo");  /* foo is in the zeropage */
720   </verb></tscreen>
721
722
723
724
725 <sect>Bugs/Feedback<p>
726
727 If you have problems using the compiler, if you find any bugs, or if you're
728 doing something interesting with it, I would be glad to hear from you. Feel
729 free to contact me by email (<htmlurl url="mailto:uz@cc65.org" name="uz@cc65.org">).
730
731
732
733 <sect>Copyright<p>
734
735 This is the original compiler copyright:
736
737 <tscreen><verb>
738 --------------------------------------------------------------------------
739   -*- Mode: Text -*-
740
741      This is the copyright notice for RA65, LINK65, LIBR65, and other
742   Atari 8-bit programs.  Said programs are Copyright 1989, by John R.
743   Dunning.  All rights reserved, with the following exceptions:
744
745       Anyone may copy or redistribute these programs, provided that:
746
747   1:  You don't charge anything for the copy.  It is permissable to
748       charge a nominal fee for media, etc.
749
750   2:  All source code and documentation for the programs is made
751       available as part of the distribution.
752
753   3:  This copyright notice is preserved verbatim, and included in
754       the distribution.
755
756       You are allowed to modify these programs, and redistribute the
757   modified versions, provided that the modifications are clearly noted.
758
759       There is NO WARRANTY with this software, it comes as is, and is
760   distributed in the hope that it may be useful.
761
762       This copyright notice applies to any program which contains
763   this text, or the refers to this file.
764
765       This copyright notice is based on the one published by the Free
766   Software Foundation, sometimes known as the GNU project.  The idea
767   is the same as theirs, ie the software is free, and is intended to
768   stay that way.  Everybody has the right to copy, modify, and re-
769   distribute this software.  Nobody has the right to prevent anyone
770   else from copying, modifying or redistributing it.
771
772 --------------------------------------------------------------------------
773 </verb></tscreen>
774
775 In acknowledgment of this copyright, I will place my own changes to the
776 compiler under the same copyright. Please note however, that the library
777 and all binutils are covered by another copyright, and that I'm planning
778 to do a complete rewrite of the compiler, after which the compiler
779 copyright will also change.
780
781 For the list of changes requested by this copyright see newvers.txt.
782
783
784 </article>
785