Retro Coding
Published on


Atari macro assembler

Back in 2021 I started investigating modern tools to write code for the Atari XL/XE machines. I wanted to try out the code I found in this tutorial. It mentioned ATasm, and so the journey with this assembler started.

First uses

The assembler worked well. Having been around for a very long time you kind of expected that. Version 1 was released back in 2002. Ever the curious person that I am I scanned over the source code and then looked at some of the reported issues with the code. Feeling that I could give back to the community I fixed some of the reported bugs and made the code available on GitHub:

Mark Schmelzenbach, the original author of the assembler was kind enough to give me write access to the documentation repo so I could keep the documentation up to date.

Second life

I quickly grew tired of using Visual Studio code to edit my assembler files and then use a script to call the assembler and run the resultant output in Altirra. That gave birth to Atasm Altirra Bridge. In short an easy way to write your 6502 assembler code, kick off Atasm to make the binary and then run that on the Altirra emulator. Quick, easy and having breakpoints in your code makes debugging so much better.

Now that the tutorials have been coded and run I wanted a target project. Retro Dschump was created to relearn 6502 and Atari 8-bit programming.

In the process of coding the game, Atasm moved from version 1.09 to 1.23. The community asked for some features and others just came as requirements that would make my the Atasm-Altirra-Bridge easier to use.

Some of the significant changes to Atasm include:

  • Assembler list generation now works correctly
  • C header generation for easy #include into CC65
  • Detailed information about symbols is exported. This helped in the VSCode plugin.
  • Added << and >> shift operators. Thank you to Mark for finding the source to your expression parser.
  • You can now name memory regions. Again makes the VSCode plugin more powerful.
  • Added/extended .IF .ELSEIF .ELSE .ENDIF functionality.
  • Added long jump commands: JEQ, JNE, JPL, JMI, JCC, JCS, JVC, JVS

The Future

This assembler has grown up nicely and I regularly get request for new features. Glad that it continues to be used and I'm sure I'll continue improving it. - Latest version of the tool can be found here.