TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

C Compiler Assembler and Runtime for C64

138 点作者 dannyow超过 1 年前

8 条评论

chillingeffect超过 1 年前
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 未加载
glonq超过 1 年前
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 未加载
guenthert超过 1 年前
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?
zellyn超过 1 年前
&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 未加载
Decabytes超过 1 年前
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 未加载
OnlyMortal超过 1 年前
I wonder if some of the boost header-only libraries might work.<p>In particular the shared pointers.
评论 #38911150 未加载
sirwhinesalot超过 1 年前
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 未加载
CatchSwitch超过 1 年前
Would this work on the Apple ][? How does it compare&#x2F;differ from the LLVM 6502-MOS project?
评论 #38912203 未加载
评论 #38912366 未加载