Live data from Hacker News

C Compiler Assembler and Runtime for C64

github.com

1–10 of 34 posts

Re: C Compiler Assembler and Runtime for C64

#5

I wonder if some of the boost header-only libraries might work. In particular the shared pointers.

~~This is a C compiler, not C++, so Boost will not work with it.~~ EDIT: - I stand corrected, the compiler can be switched in C++ mode.

To quote the article:

“C++ support level

The compiler will most likely not support a current C++ standard in the near future, but several C++ features are already implemented. The compiler can be switched into C++ mode with the command line option -pp or by providing a source file with a .cpp extension.”

Re: C Compiler Assembler and Runtime for C64

#6

Earlier quoted context omitted.

~~This is a C compiler, not C++, so Boost will not work with it.~~ EDIT: - I stand corrected, the compiler can be switched in C++ mode.

To quote the article: “C++ support level The compiler will most likely not support a current C++ standard in the near future, but several C++ features are already implemented. The compiler can be switched into C++ mode with the command line option -pp or by providing a source file with a .cpp extension.”

Thanks, you are right, the compiler has some C++ support also.

Re: C Compiler Assembler and Runtime for C64

#9
That's awesome. 40 years ago people would have killed for such (I myself included, if it were for Z80 instead of 6502).

But why? I know better then to ask for such projects, but here I do, because the project's readme provides a 'history & motivation' section, albeit which doesn't really tells much of the latter.

"The original idea for the oscar64 compiler was to translate the C source to an intermediate 16 bit byte code". That's (afair) the approach taken by the (out-of-tree) GCC port to the Parallax P8X32A (itself not an easy target for C: registers, if one wants to call the local memory location used as such that are wide, but the architecture is memory starved and there's no hardware stack). Is there some overlap?

Re: C Compiler Assembler and Runtime for C64

#10

Would this work on the Apple ][? How does it compare/differ from the LLVM 6502-MOS project?

Not much of a point since Apple ][ has the SWEET16 interpreter already as part of its BASIC ROM. But yes, it would be nice if the LLVM-MOS6502 folks put some effort towards feature parity with this toolchain. LLVM almost certainly has better auto-optimization than a new bespoke compiler.
Post reply on HN