Jump to content
JesperGravgaard

KickC Optimizing C-Compiler now supports Atari 8bit XL/XE

Recommended Posts

Quick question, I decided to give KickC a try, I appreciate it's still being developed, I copied a program I had written for cc65,

nothing too fancy in it, but it uses file handling and fails to  find <fcnlt.h> I've got the latest release from GitHub but it doesn't seem to

be in the include directory, does KickC not support file handling yet ?

Share this post


Link to post
Share on other sites
36 minutes ago, ilmenit said:

Looking at the github, KickC does not have fcntl.h (nor other filesystem operations) implemented yet

Thought as much, did a 'grep' for fopen of all the header files in case it was there somewhere, but nothing.

Share this post


Link to post
Share on other sites
1 hour ago, ilmenit said:

it's a great opportunity to become a contributor to the project! ;-)

Not promising anything, but looks like something I just might do !!!

Share this post


Link to post
Share on other sites

I working in a port of B2FJ (https://mzattera.github.io/b2fJ/) to Atari 800 XL.

 

I'm currently using CC65, but the generated binaries seems to be sub-optimal, as there are many JSR calls for stack handling in the generated 6502 code. Also, seems that the default CC65 binaries images don't use all available RAM on Atari.

 

Will be great if kickc point their efforts to be a drop-in replace for CC65, supporting the same extensions, command-line and arguments than CC65 but with better code generation, then we can port old projects to this new compiler easily.

 

 

 

  • Like 1

Share this post


Link to post
Share on other sites

I see your program display 64K RAM system. Theoretically that's correct, but normally only 48kB is available, because 16kB is overlayed with ROM and hardware registers. If ROM is disabled, you get 14kB of RAM extra, but with a 2kB gap of hardware registers.

 

Share this post


Link to post
Share on other sites
14 hours ago, Elkino said:

Will be great if kickc point their efforts to be a drop-in replace for CC65, supporting the same extensions, command-line and arguments than CC65 but with better code generation, then we can port old projects to this new compiler easily.

KickC is not aiming to be "CC65 with better code generation", therefore I doubt this will be ever done.

  • Like 2

Share this post


Link to post
Share on other sites

It would be possible to create an independent front-end.

 

However, the value of such software would be questionable. Depends on how much cc65 options are mappable to KickC. It would always be imperfect.

 

Better to update your build files for KickC.

 

Share this post


Link to post
Share on other sites

IMHO it's a good to choice to not make KickC ABI compatible with CC65, because that would mean you are still stuck to the software stack and the same calling conventions.

 

That does not mean you cannot port or reimplement CC65 libraries for KickC ofcourse :)

Edited by ivop
  • Like 1

Share this post


Link to post
Share on other sites

Hi,

The author of KickC here.

@ivop and @ilmenit are correct that the goal is not to be a drop-in replacement for cc65. 

What I really want to create is a compiler that allows a programmer who knows C an easy way to get started on any 6502-platform, to be able to create C-programs that runs as fast or faster than naively coded ASM, and finally to be able to seamlessly switch to optimized ASM for any performance-critical parts. 

The semi-prioritized goals of KickC could be stated as: 
1) Generate optimized and readable 6502-family ASM.
2) Support different existing 6502-based hardware platforms.

3) Allow the programmer to utilize the strength of KickAsm.

4) Be standard C compatible.

However, it would be great if porting CC65 programs to KickC was pretty easy to do. For instance CC65 and KickC can and should have a bunch of libraries that are compatible. An existing example of this is the <conio.h> library.

If anyone wants to contribute an implementation of <fcnlt.h> or any other standard C / cc65 library for Atari 8bit I will gladly merge it into the KickC master and include it in future releases.

Feel free to reach out to me with any questions.

/Jesper

  • Like 1
  • Thanks 2

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...