Yeah, it would be smart to look there. When I start something, I tend to dive in
and ignore other projects until I'm either stuck or done.
Sort of like how Woz and that other guy built their floppy disk. Re-solving the
tough problems for me is the fun part :D
It'll definitely be worth it, but someone else who is helping can teach me
or implement the virtues of another system.
> On Jul 3, 2014, at 11:06 PM, Paul Gardner-Stephen <paul at
servalproject.org> wrote:
>
> Regarding strategies for the back end, it might be worth taking a look at
the following existing C compilers for the 6502 and related bits:
>
> http://www.cc65.org/ (recent activity moved to to
http://cc65.github.io/cc65/)
>
https://groups.yahoo.com/neo/groups/staticrecompilers/conversations/topics/315
>
> The topic of targeting the 4502 / 65C02 is an interesting one because it
contains features that seem to have been specifically included to support
compilation and execution of compiled software:
>
> 1. The are instructions that dereference pointers on the stack: LDA
(SP+#$nn),y / STA (SP+#$nn),y (but usually misleadingly written as ($nn,SP),y)
> 2. The stack can be switched to 16 bit mode with CLE (although it still
silently over/under flows).
> 3. Zero-page can be moved anywhere you like with TBA.
> 4. There is a third index, Z, that provides slight register pressure
relief.
> 5. X, Y and Z can be pushed and pulled from the stack directly (PHX etc)
>
> Ophis is an assembler with full support for the 4502.
>
> I don't have the time to actively work on an llvm backend for 6502 or
4502, but I would certainly welcome one and am happy to contribute my knowledge
of those CPUs and to run code on them etc. For the C65GS it would be nice to be
able to create a new optional operating system written in C, rather than
assembler.
>
> Paul.
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20140704/ddb33cb4/attachment.html>