Email or username:

Password:

Forgot your password?
Roger Bidon

Hey I heard you'd love a decent C compiler for the 6502 but feared compiling GCC ...

Problem resolved, here's a binary release of gcc-6502: github.com/sgadrat/gcc-6502-bi

(If someone feels brave, a Windows build would make for an awesome PR ☺️ )

github.com/sgadrat/gcc-6502-bi

#nesdev #c64

5 comments
Felix Palmen 📯

@RogerBidon serious question, assuming you have to write mostly "targeted" code anyways (because a #mos6502 just won't reasonably run 98% of today's existing C code), what's the edge of a #GCC targeting this platform over e.g. #cc65?

If there's a real advantage, I might be tempted to bring this to #FreeBSD...

root42

@zirias @RogerBidon I think the reason might be that gcc has great tools and probably a very good backend. In the end it’s probably also a matte of taste. More compilers is always good.

Roger Bidon

@root42 @zirias
Things I love with gcc over dedicated 6502 compilers: high level optimisations, top error reporting, full compliance with the standard. Bad points: more complexe toolchain, poor low-level code.

Where I use it, main loop and critical paths are in assembly C is used for menus. When I code these menus, I rely a lot on inlining. I too often see cc65 code being inlined by hand or using specific syntax cause it produce better assembly, losing most benefits of a high level language.

F4GRX Sébastien

@RogerBidon there's also a sdcc for 6502. It might be less complex than gcc.

Roger Bidon

@f4grx cc65 and vbcc are also good choices 👍

Go Up