You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
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 2stdlib.h
functions were ported from PDCLib, and 2 functions fromstdlib.h
, 8 functions fromctype.h
and 12 functions fromstdio.h
were reimplemented in 6502 assembly. The cc64 libc is available in precompiled runtime moduleslibc-*.[hio]
, to be used instead ofrt-*.[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
andlibc-*.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.
This discussion was created from the release cc64 v0.10.
Beta Was this translation helpful? Give feedback.
All reactions