drac030 Publishes ELSA, a Native 65C816 Assembler for Accelerated Ataris
On 16 March 2020, drac030 released ELSA ("Everyone Likes Some Assembling"). It is the private assembler he had used for most of his Atari software, including the Rapidus OS and BIOS, the Let's Emu! ZX Spectrum emulator, MultiBASIC, U-BASIC, CP/Emu and the IDE Plus BIOS. He began writing it around 2006. IDE Plus BIOS was the last project to switch over, after it grew so large that his previous tool, the MAE assembler, ran out of memory assembling it.
A 65C816-native tool
ELSA is written in native 65C816 code, so it runs only on Ataris with a 65C816 CPU, such as those fitted with the Rapidus or Antonia boards. It should also work on a 65C802. If no High RAM (memory above the first 64 KB) is available, it falls back to the base 64 KB and leaves roughly 16–20 KB for the symbol table, enough for about a thousand short labels. It can produce code for the 6502, 65C02, W65SC02, 65C802 and 65C816, selected with the -M switch or in the source.
People who know MAE will find the syntax familiar. The first version was bootstrapped with MAE, and .el and *** are still accepted as .else and .endif for compatibility. Like other modern Atari assemblers, ELSA adds many pseudo-instructions:
- Repeat, skip and exit variants of every branch:
RNE/RCC… repeat the previous instruction,SNE/SCS… skip the next one, andENE/EEQ… return from a subroutine if the condition holds. - 16-bit helpers such as
INW,DEW,ADDandSUB, plusPHR/PLRto push and pull all registers. - Nestable
.ifblocks,.reptloops,.ifdef, and logical&&,||and!in expressions.
Command-line switches control listings, case sensitivity, warnings about cross-page branches, and reports of unused labels and unreferenced addresses.
How it developed
Drac030 kept releasing updates after the launch. Versions 0.9a–0.9c in spring 2020 sped up symbol lookup and fixed bugs. Version 0.91 in October 2020 collected months of smaller improvements. Version 0.94 (13 July 2021) added output of SpartaDOS X relocatable binaries. He said this support was more flexible than in MADS or Fast Assembler: every 65C816 instruction and addressing mode generates fixups where needed, and external symbols can be used inside arithmetic expressions. Version 1.0 arrived on 12 June 2024. By 2026 there were two builds, one for DOS XL/SpartaDOS and an "X" version for SpartaDOS X 4.51 and later.
The AtariAge thread also became a short course on how the 65C816 accelerators work. The CPU runs from its own fast RAM at many times the stock clock speed. It drops to the normal bus speed (about 1.77 MHz on PAL machines) only when it accesses the motherboard's RAM, ROM or hardware registers. On a Rapidus, the original 6502 can even keep running in parallel.
Where to get it
ELSA is free from drac030's site (drac030.krap.pl, ELSA section). Each version comes with its own English manual in PDF, and the archive also includes a text version for reading on the Atari.
Credits
- Picture: ELSA 0.9, the first public release, listing its command-line switches. — Screenshot from drac030's ELSA page
- AtariAge — ELSA (the assembler) — AtariAge forum members
- drac030 — ELSA information — Screenshot from drac030's ELSA page
- drac030 — ELSA change log — drac030.krap.pl
- drac030 — ELSA downloads — drac030.krap.pl
