NutStudio C compiler available for early users

All aspects of programming on the Commander X16.
Post Reply
hth313
Posts: 25
Joined: Sun Nov 22, 2020 10:19 pm

NutStudio C compiler available for early users

Post by hth313 »


My 6502 C compiler tool chain as an early release. Send a private request to me for details on how to download it if you are interested. 

Documentation is available here: https://drive.google.com/file/d/1Eai87NQhPZ_XoTtgwmo-g_Upk0xDAyx0/view?usp=sharing

I have installers for macOS, Arch and Debian Linux (x86_64).

Highlights:


  • ISO C 99 compiler for 6502/65C02. This is a freestanding implementation with many features you will typically find in a hosted compiler.


  • Fully reentrant code model.


  • Support for all integer types up to 64 bits 'long long'.


  • Floating point supported (32 bits IEEE-754).


  • Full support for struct, union, typedef and what you expect to find in C.


  • The C stack is located outside the zero page, which means it can be as large as available memory (in the full 64K address range).


  • Support for (stack allocated) variable sized arrays.


  • Run-time model based on using pseudo registers in the zero page.


  • Parameter passing uses A and pseudo zero page registers (up to 8  bytes). Any remaining arguments are passed on the stack.


  • The compiler utilizes zero page as much as possible for local and  temporary variables.


  • Optimizing compiler that can output source level debugging information.


  • Source code debugger included.


  • Support for ELF/DWARF, hex output as well as RAW and PRG (Commodore) style program files.


DigitalMonk
Posts: 27
Joined: Tue Apr 27, 2021 2:44 pm

NutStudio C compiler available for early users

Post by DigitalMonk »


WOOT!

I am so incredibly glad to see progress on the C front for 6502 after so (SO) many years of people (who don't understand zero page speed) saying "the 6502 just isn't suited for C".

I mean, I appreciate all of the work that went into cc65, but even its developers say that its stack handling is inefficient.

Not to take anything at all away from your project, but I also just recently found out about KickC, which outputs commented assembler for KickAssembler, which is a fairly reasonable way to start at high level code and then be able to dig down into assembly for critical path stuff without getting lost.

My ultimate hope is that everybody can look at what the other projects are doing, and that the entire ecosystem will be better for it.  I don't want one compiler to "win" or for all compilers to end up being exactly the same, I just know that different perspectives always provide more paths around obstacles, and going from one (mostly stalled) C compiler to three compilers, two of which are actively evolving, makes me very happy!

(I was so desperate at one point that I even considered using the period C compilers running on the machine, but that is incredibly painful)

Mobsie
Posts: 1
Joined: Fri Dec 09, 2022 10:31 pm

NutStudio C compiler available for early users

Post by Mobsie »


Hi,

i am new here and don’t find how to send pm. I am very interested in your c compiler.

Regards 

Mike

Post Reply