Programming

--- This page is still being written ---

Cross-Development

There are several 6502 cross-assemblers available. I personally use MAS65 by Douglas Beattie. It doesn't have as many features as some others, but it works well and produces Intel Hex files suitable for my EEPROM programmer. I have written a pre-processor for it - MAS65PP - which adds a #include directive, so you can split your project into multiple source files.

For development in C, the best cross-compiler appears to be cc65. I recommend that you ensure you have the latest version (currently 2.4.0) because several important bugs have been fixed. It comes with support for several 6502-based machines, mostly Commodores, but you need to write a small run-time library for other systems. As an example you can download my library (with source code) in cc65-lib.zip, but remember that it depends on certain zero-page and ROM addresses which are defined in my BIOS. Here's some instructions for compiling programs using this custom library (assuming you've already set-up cc65 according to its instructions):

The BIOS

Click here to download the source code for the computer's BIOS. To build the BIOS you need to process BIOSMAIN.ASM with MAS65PP and assemble the output with MAS65.

Some notes about using the BIOS:

Some technical notes about the BIOS: