cc65 is a no-cost C compiler that supports 6502-based systems.
The original copyright permits free distribution, even if it does not qualify as Open Source Software as per the Open Source Definition. The complete package includes the compiler, assembler, librarian, linker, and a C library for the Atari. Some net packages claim to be adapted as a crosscompiler for DOS or Unix, but they could not be run correctly. Therefore, the creator of cc65 took the Atari compiler and started a rewrite.
Today, cc65 features a rewritten compiler with large parts of the library, a new assembler, linker, and librarian, and an added frontend for ease of use. All changes have been done with portability in mind, which means that porting to new 6502 architectures should be straightforward. The compiler is almost ISO C compatible, so you should be able to translate many sources from other systems. However, target system dependent limitations may exist, such as file I/O not being implemented on all platforms.
The assembler suite is a complete development environment that can be used to write programs for any 6502 machine. Both C code and assembler code can be used together and can call each other. The assembler is a one pass macroassembler that outputs code for the 6502, 65SC02 and 65SC816. It includes a plethora of features such as include files, conditional assembly, macros, nested lexical levels, among others. The assembler creates object files containing relocatable code which should pass through a linker to create the final program.
The linker features a flexible output format and can support various configurations such as ROMable code (different load and run addresses for data), banked systems, multiple ROMs, unlimited segments, among others. The archiver is used to create libraries containing objects files, which simplifies code management. The linker only extracts the modules needed from a library.
Finally, for simplified use, the package features the cl65 frontend utility that knows how to build binaries from a list of C files, assembler files, object files, and libraries. For smaller projects, just one invocation of the cl65 utility is required to build a binary from several source files and libraries. Overall, cc65 is an excellent package for developers seeking to create programs for 6502 systems.
Version 2.13.0: N/A