TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

C Compiler Assembler and Runtime for C64

138 pointsby dannyowover 1 year ago

8 comments

chillingeffectover 1 year ago
Wow this is actually more than just a C compiler... it supports numerous 6502 systems like NES, has a number of useful libraries and examples like disk i/o and many ample programs including sprite multiplexing. There are also extensive pragmas to help optimize.
评论 #38912735 未加载
glonqover 1 year ago
Neat. When I owned 8-bit machines back in the 1980's, I never bothered to learn assembly; just BASIC. I'd love to tinker with retro computers again including things like the Commander X16, but to be honest I'm too old and impatient to code in assembly even though I'm comfy with it now. If I could use a C compiler that inflicted a non-heinous size/performance penalty, I'd be happy. Especially if I could link in asm libs for performance-critical or low-level functions.
评论 #38916488 未加载
评论 #38916248 未加载
guenthertover 1 year ago
That&#x27;s awesome. 40 years ago people would have killed for such (I myself included, if it were for Z80 instead of 6502).<p>But why? I know better then to ask for such projects, but here I do, because the project&#x27;s readme provides a &#x27;history &amp; motivation&#x27; section, albeit which doesn&#x27;t really tells much of the latter.<p>&quot;The original idea for the oscar64 compiler was to translate the C source to an intermediate 16 bit byte code&quot;. That&#x27;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&#x27;s no hardware stack). Is there some overlap?
zellynover 1 year ago
&gt; After extensive optimizations it turns out, that the interpreted code is not significantly smaller than the native code in most scenarios (although there are cases where the difference is significant).<p>Does that mean that the whole thing was ultimately a failed experiment, or that the native code optimizations have become so good that the interpreted mode is made obsolete in most situations?
评论 #38913187 未加载
Decabytesover 1 year ago
So I recently took at broad look at some of the old C compilers and wrote an article about it. One interesting thing of note is a lot of compilers in the mid 70s compilers like the Small-C compiler actually only compiled a subset of the C programming language. This was because the 8-bit systems were much more resource constrained the then PDP-11s that C was developed on, and C was difficult to compile. It&#x27;s hard to believe computers once struggled to run C code, and that definitely contributes to why you see more Pascal, Assembly, and Basic during that time period
评论 #38919097 未加载
评论 #38925362 未加载
评论 #38915197 未加载
评论 #38915788 未加载
OnlyMortalover 1 year ago
I wonder if some of the boost header-only libraries might work.<p>In particular the shared pointers.
评论 #38911150 未加载
sirwhinesalotover 1 year ago
Cool stuff, seems to be competing with cc65 (not very performant, includes a stdlib), sdcc (very new port), vbcc (not open-source, best performance), and kickc (not standard c)
评论 #38915365 未加载
评论 #38915408 未加载
CatchSwitchover 1 year ago
Would this work on the Apple ][? How does it compare&#x2F;differ from the LLVM 6502-MOS project?
评论 #38912203 未加载
评论 #38912366 未加载