[Hosted by Floodgap Systems]

xa (xa65)

xa is Andre Fachat's open-source 6502 cross assembler. I, Cameron Kaiser (ckaiser@floodgap.com), am the current maintainer, and bug reports and questions should now go to me.

xa is Copyright © 1989-2008, André Fachat, Jolse Maginnis, David Weinehall and Cameron Kaiser. All rights reserved. Additional contributors: Fabien Nuñez, Mikkel Holm Olsen. xa is distributed under the GNU Public License v2. The current maintainer is Cameron Kaiser.


For a complete list of available files and distributions, check the dists/ directory.

For other Floodgap-maintained packages, see the Floodgap Software listing.


What is xa?

xa is a high-speed, two-pass portable cross-assembler. It understands mnemonics and generates code for NMOS 6502s (such as 6502A, 6504, 6507, 6510, 7501, 8500, 8501, 8502 ...), CMOS 6502s (65C02 and Rockwell R65C02) and the 65816.

Key amongst its features:

xa's eventual companion disassembler is dxa, a moderately hacked-up version of Marko Mäkelä's d65 disassembler. This is still alpha and is available as a separate distribution until it is stabilized enough to be part of the xa suite.

Version 2.3.5 (7 February 2009)

xa 2.3.5 is released. This is a feature and bugfix release of the long-lived 2.3.0 series branch.

For Amiga users, I still offer xa-2.1.4f-amiga.lha with the 2.1.4f Amiga binaries, as well as the "smakefiles" and "SCOPTIONS" files to compile under SAS/C. This was provided by Pasi Ojala. Please note that this version is not supported. If you want to browse other prior versions, look in dists/unsupported/. Please do not send bug reports in about these versions.

xa should compile out of the box on just about any Unix or Unixy thing, and will probably compile on other systems that support ANSI C as well. Please see the README.1st file for more detailed instructions.

Compile fix for POSIX 2008 systems: If the compiler complains about getline in xa.c, just change the three references to its getline() function to xgetline() (or just apply Joel Heikkila's patch) in that file to avoid conflict with the new library function. This fix will be in 2.3.6. Thanks to Joel and others who have reported this.

What's new in 2.3.5

Documentation

Documentation is now in man format since 2.3.0. You can read them here, converted with man2html:

For those using older distributions, refer to the previous xa HTML documentation.

History

I'll just let Andre tell it:
"I developed the first version of xa in 1990 on my old Atari ST to build programms for my selfbuilt computer CS/A65. After my Atari broke I ported it to Linux (ported? It compiled right out of the box!) and when I had to develop a programm for a friend of mine, I compiled it on an Amiga without errors. Until the beginning of 1992 I made more improvements, until it came to version 2.0.7. Since then I only very occasionally worked on it, up to version 2.0.7d. When I decided to push my selfbuilt OS to a new level in 1996, I needed more important improvements, like o65 object format and a linker and all that."


dxa

Starting with 2.3.0, xa is now officially accompanied by dxa, its companion disassembler. dxa is a rudely hacked version of Marko Mäkelä's d65 package, with some extra features and altered output to allow "perfect" disassembly (which is to say, you can take an arbitrary object, run it through dxa, take what it spits out, run it back through xa, and get the binary you started with). It also has features for intelligently labeling code and data sections and multiple output formats, and can understand undocumented and CMOS opcodes (65816 not yet).

Because dxa is new and not well tested, I have not included it as part of the standard xa distribution and it is offered here separately. Please consider it to be alpha software only and expect bugs. Refer to the readme for instructions on installation. dxa, like d65, is distributed under GPL v2.

Patch for scan.c under dxa 0.1.3 (7 August 2013)

Yes, I'm behind, but here is a patch for a use-after-free error in scan.c, found and patched by Vladimir Rytikov. Thanks, Vladimir! It is a single line change.

Patch for label.c/malloc() under dxa 0.1.3 (31 August 2010)

While I slowly work on 0.1.4, Hannu Nuotio submitted this patch for a malloc() glitch in the label manager. Great find, Hannu! Steven Flintham found one other place that is affected with optimization. It is a two-line change, so I have posted it here.

Version 0.1.3 (2 June 2007)

This version repairs issues with dumping values referencing zero page that should be rendered in absolute addressing mode, and issues with relative addressing, both incorporating fixes submitted by Mikkel Holm Olsen. dxa is based on d65 0.2.1.

Documentation is offered in man format; here is the man2html version.


[Top of page]Send all bugs in xa or dxa to ckaiser@floodgap.com.
Cameron Kaiser