Saturday, November 18, 2023

xa (xa65) 2.4.0 - finally

xa (xa65) 2.4.0 is the newest release of André Fachat's fast and portable two-pass 6502/65816 crossassembler; yours truly is the current maintainer and I just punched "live" on it tonight. It runs on Un*xy things and Windows (with Cygwin or msys2 or similar), and probably other operating systems as well. xa 2.3 has had a good run, but it's served 17 years as the minor release (no joke: 2.3.0 came out in 2006) and time marches on. There are new features to add and old cruft to sweep away. But it's still compatible with all the systems 2.3 was compatible with and adds several new features, including:

  • Listing mode, allowing side-by-side byte output with the lines in your source. You can even emit it in HTML.
  • A ca65 compatibility mode that allows many of the same pseudo-ops and "cheap local labels" support. Although this obviously doesn't accept every feature in ca65, it can ease translating your assembly source considerably — because once you switch to xa, you won't want to go back. :) This feature is also used for other compatibility options such as MASM and allowing some C-like expressions.
  • Assertions at the preprocessor level (#error) and assembly level (.assert), allowing controlled errors when static assertions are violated.
  • Linker enhancements for .o65, including deferred linking of undefined symbols.
  • You can now get the assembler major and minor version in the preprocessor with XA_MAJOR and XA_MINOR. Other predefined macros may appear in future versions.

Because this is a new minor release, there are incompatibilities. The escape character in quoted strings is now the standard backslash (\) instead of the carat (^), and recursive multi-line /* */ comments are no longer allowed, unless you ask for them with -XXA23. Obviously these features are deprecated, and they will be removed in a future version. Our expanded testsuite is designed to look for regressions and we are very conservative about that, but it's possible we've introduced other changes that may interfere with edge cases or undefined behaviour in your source, and such changes are unlikely to be reversed.

This release also deprecates printcbm(1), since it's not been touched in a long time, was never really a core part of an assembler suite, and VICE petcat does everything it did and more (even I don't use it; I have my own Perl detokenizer). It will be removed in a future version also. Of things that were already deprecated in 2.3.x, the old 16-bit argument syntax for 65816 mvn/mvp is now not accepted and the old -S and -x options are finally removed. If you need those, you must use 2.3.14.

Between 2.4.x and the next version (2.5 or 3.0, depending on my mood and the scope), we will be slowly embarking on cleaning up the source code's readability which has been an admitted issue for years. One big reason for not doing this earlier was because of regression risk and as André and I are xa's most important users, we definitely didn't want cleanup to impair our ability to build our own projects. Now that we have an extensive and growing regression testsuite, this can be done slowly in stages so that we have something more maintainable without introducing new bugs in the process or incompatibilities with the C compilers we already test against (our oldest in the test rotation is egcs-1.1.2 and it probably works on even earlier ones). As these changes are expressly intended not to change code functionality, they will incrementally roll out with future 2.4.x releases.

You can download it and read documentation in man(1) format (converted to HTML) from the main xa65 home page.

No comments:

Post a Comment

Comments are subject to moderation. Be nice.


See more of my general vintage computing projects,
mostly microcomputers, 6502, PalmOS, 68K/Power Mac
and Unix workstations, but that's not all. Be kind, REWIND and PLAY.

Buy Me a Coffee at ko-fi.com

Old VCR is advertisement- and donation-funded, and what I get
goes to maintaining the hardware here at Floodgap.
I don't drink coffee, but the Mr Pibb doesn't buy itself. :-)
Thanks for reading. -- Cameron Kaiser