1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-21 20:29:24 +00:00
cc65 - a freeware C compiler for 6502 based systems
Go to file
Sidney Cadot ceac9f87ba Temporary fix for fgets() not using target-specific newline.
This patch provides a temporary fix for the issue where the fgets()
function did not use the target-specific newline character to
decide if it has reached the end of the line. It defaulted to the
value $0a, which is the newline character on only some targets.
The Atari, for example, has newline character $9b instead.

This patch is ugly, because the ca65 assembler that is used for
fgets doesn't currently accept C-type character escape sequences
as values. Ideally we'd be able to write:

		cmp #'\n'

And this would end up being translated to a compare-immediate
to the target-specific newline character.

Since that is impossible, this patch substitutes the equivalent,
but ugly, code:

		.byte $c9, "\n"

This works because $c9 is the opcode for cmp #imm, and the "\n"
string /is/ translated to the platform-specific newline character,
at least when the 'string_escapes' feature is enabled.
2024-12-18 07:44:52 +01:00
.github
asminc Changed 0x hex values to % binary values 2024-11-09 11:45:41 +01:00
cfg
doc Merge pull request #2558 from polluks/cpp 2024-12-15 23:02:35 +01:00
include Rename dir_file_count to dir_entry_count 2024-11-15 19:25:40 +01:00
libsrc Temporary fix for fgets() not using target-specific newline. 2024-12-18 07:44:52 +01:00
samples Update sieve.c 2024-12-09 18:26:00 +01:00
src Merge pull request #2557 from sidneycadot/fix-sim65-rol-ror-ops 2024-12-15 22:59:39 +01:00
targettest
test
util
.editorconfig
.gitattributes
.gitignore
.travis.yml
Contributing.md
LICENSE
Makefile
Makefile.travis
README.md

The cc65 cross-compiler suite

cc65 is a complete cross-development package for 65(C)02 systems, including a powerful macro assembler, a C compiler, linker, archiver, simulator and several other tools. cc65 has C and runtime library support for many of the old 6502 machines. For details look at the cc65 web site:

Company / People Machine / Environment
Apple Apple II
Apple IIe enhanced
Atari Atari 400/800
Atari 2600
Atari 5200
Atari 7800
Atari XL
Lynx
Tangerine Oric Atmos
Eureka Oric Telestrat
Acorn BBC series
Commodore C128
C16
C64
CBM 510/610
PET
Plus/4
VIC-20
VTech CreatiVision
Commander X16 Community Commander X16
Bit Corporation Gamate
Berkeley Softworks GEOS (Apple/CBM)
LUnix Team LUnix (C64)
Nintendo Nintendo Entertainment System (NES)
Ohio Scientific OSI C1P
MOS Technology, Inc. KIM-1
NEC PC Engine (PCE)
Dr. Jozo Dujmović Picocomputer (RP6502)
Watara Watura/QuickShot Supervision
Synertek SYM-1

A generic configuration to adapt cc65 to new targets is also around.

People

cc65 is originally based on the "Small C" compiler by Ron Cain and enhanced by James E. Hendrix.

Project founders

  • John R. Dunning: original implementation of the C compiler and runtime library, Atari hosted.
  • Ullrich von Bassewitz:
    • moved Dunning's code to modern systems,
    • rewrote most parts of the compiler,
    • rewrote all of the runtime library.

Core team members

External contributors

(The above list is incomplete, if you feel left out - please speak up or add yourself in a PR)

For a complete list look at the full team list or the list of all contributors.

Contact

For general discussion, questions, etc subscribe to the mailing list or use the github discussions.

Some of us may also be around on IRC #cc65 on libera.chat.

Documentation

  • The main Documentation for users and developers.
  • Info on Contributing to the CC65 project. Please read this before working on something you want to contribute, and before reporting bugs.
  • The Wiki contains some extra info that does not fit into the regular documentation.

Downloads

Snapshot Build