Skip to content

cc64 v0.10

Pre-release
Pre-release
Compare
Choose a tag to compare
@pzembrod pzembrod released this 23 Dec 22:53
· 56 commits to master since this release

The three main changes that v0.10 brings are ANSI syntax for function definitions, a basic libc, and proper support for _fastcall functions, with a related breaking change in runtime module .h file format.

ANSI style function definitions (char f(int a) {...}) are implemented as a syntactic alternative to K&R style function definitions (char f(a) int a; {...}) with exactly the same semantics, i.e. there is no matching or checking of declared parameter types and actual parameter types in function calls.

The new basic libc is based on PDCLib. Only a limited range of standard libc functions make sense on an int/char only compiler on the C64, C16 or X16. 18 string.h functions and 2 stdlib.h functions were ported from PDCLib, and 2 functions from stdlib.h, 8 functions from ctype.h and 12 functions from stdio.h were reimplemented in 6502 assembly. The cc64 libc is available in precompiled runtime modules libc-*.[hio], to be used instead of rt-*.[hio].

cc64 always could call a type of assembly-implemented single-param functions which need no own stack frame and get the param passed in
a/x. v0.10 introduces the keywork _fastcall to declare or define such functions, as well as _fastcall function pointers, which weren't possible before.
The related breaking change concerns the the format of how symbols are defined in the rt-*.h and libc-*.h files.

There are now more parser unit tests, some compiler bugs discovered while implementing the libc were fixed, and binary sizes are now tracked in bin-size-register.

For more details see Versions.