3 ms·
cc65 (http://cc65.github.io/cc65/ http://cc65.github.io/cc65/) is probably the most popular C compiler for the 6502, and its has support for many of the old hom
by white-flame 10y ago
cc65 (http://cc65.github.io/cc65/ http://cc65.github.io/cc65/) is probably the most popular C compiler for the 6502, and its has support for many of the old home computers. I only use its assembler, since it's one of the most powerful, but I'm somewhat familiar with its C side of things.
I believe it uses a manual 16-bit stack pointer for frames, and zeropage for globals and statics. Pointers have to be copied into zeropage to be dereferenced, and I think it might have a numeric stack somewhere for intermediate results when evaluating numeric expressions. It's not super fast by any measure (simply due to impedance mismatch between C and 6502), but it does work and is quite mature.
As a side note, most 6502 Forths do use zeropage for the operand stack, with heavy use of zp,X addressing in their operators.