New community dev tool uploaded: cc64 X16

All aspects of programming on the Commander X16.
Post Reply
pzembrod
Posts: 94
Joined: Sat Aug 29, 2020 9:21 pm

New community dev tool uploaded: cc64 X16

Post by pzembrod »




cc64 X16




View File






cc64 is a small-C compiler, written in Forth, targeting the 6502 CPU.

It's hosted on the C64, on the C16 with 64k RAM, and now on the X16.

Runtime targets are available for all 3 platforms, on each host, allowing cross-compilation.

The code lives at https://github.com/pzembrod/cc64.

It's licensed under the 2-clause BSD license: https://github.com/pzembrod/cc64/blob/master/COPYING

See https://github.com/pzembrod/cc64/blob/master/Usage.md for usage.

See https://github.com/pzembrod/cc64/blob/master/C-lang-subset.md for details about the supported subset of C.

See https://github.com/pzembrod/cc64/blob/master/Lib-reference.md for the the LibC subset that comes with cc64, plus the lib's deviations from the standard.






 
User avatar
desertfish
Posts: 1123
Joined: Tue Aug 25, 2020 8:27 pm
Location: Netherlands

New community dev tool uploaded: cc64 X16

Post by desertfish »


This is wizardry.

Stefan
Posts: 465
Joined: Thu Aug 20, 2020 8:59 am

New community dev tool uploaded: cc64 X16

Post by Stefan »


I'm really looking forward to try this out! Very nice achievement.

kktos
Posts: 50
Joined: Wed Dec 09, 2020 4:32 pm

New community dev tool uploaded: cc64 X16

Post by kktos »


I thought about asking why in forth.... then I saw your explanations ?

For fun.

That, I can understand :):)

Viel Spass.

 

Stefan
Posts: 465
Joined: Thu Aug 20, 2020 8:59 am

New community dev tool uploaded: cc64 X16

Post by Stefan »


Downloaded it now, and tried it out for the first time.

It's working! A real accomplishment.

I have skimmed the instructions you published. Do I understand correctly that there are no standard libraries? We may need to develop such libraries, for instance to call Kernal routines.

pzembrod
Posts: 94
Joined: Sat Aug 29, 2020 9:21 pm

New community dev tool uploaded: cc64 X16

Post by pzembrod »



13 hours ago, kktos said:




I thought about asking why in forth.... then I saw your explanations ?

For fun.



Well, fun was and is the reason for doing cc64 in the first place. And Forth is and continues to be fun.

But the original reason for using Forth was that it was the best high level language I could find on the C64 back then - powerful, practical, and producing very compact code.


13 hours ago, kktos said:




That, I can understand :):)



?


13 hours ago, kktos said:




Viel Spass.



Danke, gleichfalls!

pzembrod
Posts: 94
Joined: Sat Aug 29, 2020 9:21 pm

New community dev tool uploaded: cc64 X16

Post by pzembrod »



5 hours ago, Stefan said:




Downloaded it now, and tried it out for the first time.



It's working!



Glad to hear!


5 hours ago, Stefan said:




A real accomplishment.



Thank you!


5 hours ago, Stefan said:




I have skimmed the instructions you published. Do I understand correctly that there are no standard libraries?



Yes, that is correct ... yet.


5 hours ago, Stefan said:




We may need to develop such libraries, for instance to call Kernal routines.



Absolutely! The kernal-io-c64.c and kernal-io-c16.c files might serve as an example or a starting point. But going forward there should be at least a basic subset of the C standard library.

pzembrod
Posts: 94
Joined: Sat Aug 29, 2020 9:21 pm

New community dev tool uploaded: cc64 X16

Post by pzembrod »


Update: I haven't created a new release yet, but I would encourage folks to give the current v0.9-dev version a try, as it features a significant compile speed increase:

https://github.com/pzembrod/cc64/blob/v0.9-dev/cc64-x16files.zip

https://github.com/pzembrod/cc64/blob/v0.9-dev/cc64-x16files-sdcard.zip

 

pzembrod
Posts: 94
Joined: Sat Aug 29, 2020 9:21 pm

New community dev tool uploaded: cc64 X16

Post by pzembrod »


Update: v0.9 is out, as you may have noticed, and I have started work on a standard library, based on http://pdclib.rootdirectory.de/, in the v0.10-dev branch.

Post Reply