Welcome

Welcome to the llvm-mos project!
The llvm-mos project is an experiment to create a first-class backend in LLVM for the MOS Technology 65xx series of microprocessors and their clones.

There have been many failed attempts to create a 6502 backend for LLVM. Ours is the first to successfully compile working programs. The llvm-mos project is not only able to compile short C and LLVM-IR programs to 6502 assembly; it also has feature-complete assembler and ELF linker support for generic 6502 targets.

This project will permit modern C programs, written in a modern style, to target common microcomputers of the 1980s, including but not limited to the Commodore 64, the Apple IIe, and the Atari 8-bit family.

Our work is based on LLVM's novel GlobalISel architecture, and as such, our compiler is aggressive about pursuing optimization opportunities for the 65xx series.

The development team has established a project on Github. Acceptance tests and packaging occur via Github actions as well. We provide builds of the llvm-mos tool chain for Windows, MacOS, and Ubuntu Linux.

Ongoing development discussions occur on Slack, in the llvm-mos workspace. If you're an experienced programmer, with a detailed understanding of the LLVM architecture, then please join our Slack group and help out!

Key topics

 * Assembly
 * Assembler
 * Modifiers
 * C
 * C compiler
 * C calling convention
 * Debugging code generation
 * clang command line reference
 * Emulator
 * Linking
 * ELF overview
 * ELF specification
 * Zero page
 * Zero page