A09
A09 6800/6801/6809/6309/68HC11 Assembler
Install / Use
/learn @Arakula/A09README
A09 - 6800/6801/6809/6301/6309/68HC11 Assembler
Copyright (c) 1993,1994 L.C. Benschop
Parts Copyright (c) 2001-2022 Hermann Seib
Based on Lennart Benschop's C core that can be found somewhere on the 'net (last address known to me was http://koti.mbnet.fi/~atjs/mc6809/Assembler/A09.c), I built a complete Macro Assembler that is functionally better than the TSC Flex9 Assembler (no wonder, I got multimegabytes to play with, whereas this excellent piece of software works within 50K or so!). It can deliver binary, Intel Hex, Motorola S1, and Flex9 binary output files, plus Flex9 RELASMB-compatible relocatable object modules.
I taylored the original to my taste by working through the source code; since A09 has reached a level of complexity that doesn't really lend itself to following the "Use the Source, Luke!" principle if you just want to hack a little 6809 assembly program, I've added this documentation. Have fun!
Hermann Seib, 2022
Syntax
<pre>a09 [-{b|r|s|x|f}[filename]]|[-c] [-l[filename]] [-ooption]* [-dsym=value]* sourcefile*</pre>Command Line Parameters
<dl> <dt><b>-c</b></dt> <dd>suppresses code output (corresponds to ASMB's <b>B</b> command line option)</dd> <dt><b>-u</b></dt> <dd>shorthand notation for the <b>UEX</b> option (see below)</b></dd> <dt><b>-b<i>filename</i></b> (default output mode)</dt> <dd>create a binary output file<br> if no file name is given, the extension <b>.bin</b> is used (<b>.b</b> on Unix)</dd> <dt><b>-r<i>filename</i></b></dt> <dd>create a Flex9 RELASMB-compatible output file name<br> if no file name is given, the extension <b>.rel</b> is used</dd> <dd><b>Attention:</b> this file format is undocumented; my solution has been derived from some bits of information gathered on the Flex User Group mailing list and a bit of playing with the original. In my tests, the output was identical to RELASMB's; nevertheless, A09 <i>might</i> create modules that are incompatible with the original under circumstances that I don't know or haven't tested.</dd> <dt><b>-s<i>filename</i></b></dt> <dd>create a Motorola S-record output file name<br> if no file name is given, the extension <b>.s09</b> is used</dd> <dt><b>-x<i>filename</i></b></dt> <dd>create an Intel hex output file name<br> if no file name is given, the extension <b>.hex</b> is used</dd> <dt><b>-f<i>filename</i></b></dt> <dd>create Flex9 ASMB-compatible output file<br> if no file name is given, the extension <b>.bin</b> is used</dd> <dt><b>-l<i>filename</i></b></dt> <dd>create a list file (default no listing)<br> if no file name is given, the extension <b>.lst</b> is used</dd> <dt><b>-d<i>sym</i>[=<i>value</i>]</b></dt> <dd>define a symbol (see <b>TEXT</b> directive below) <br> (roughly corresponds to ASMB's command line parameters 1-3)</dd> <dt><b>-o<i>opt</i></b></dt> <dd>defines an option (see below)</dd> <dt><b>sourcefile</b></dt> <dd>the assembler source file(s) to be processed.<br> At least one source file must be given; the first one also defines the default output and listing file names.</dd> </dl>Options
Over the years, A09 has learned quite a lot, and it can handle source files / list files in various formats. To allow their selection, I have expanded the scope of the <b>OPT</b> directive (see the FLEX9 Assembler Manual that can be found in the Documentation section on www.flexusergroup.com for details). Here's the list of additional options available in A09 (* denotes the default value for a mutually exclusive set):
<table border="0" cellspacing="1" width="100%" id="AutoNumber1"> <tbody><tr> <td valign="top" width="10%"><b>SYM *</b></td> <td>print a symbol table</td> </tr> <tr> <td valign="top"><b>NOS</b></td> <td>suppress symbol table printing (corresponds to ASMB's <b>S</b> command line option)</td> </tr> <tr> <td colspan="2" height="8" valign="top"></td> </tr> <tr bgcolor="#f0f0f0"> <td valign="top"><b>MUL *</b></td> <td>print multiple object code lines</td> </tr> <tr bgcolor="#f0f0f0"> <td valign="top"><b>NMU</b></td> <td>suppress printing of multiple object code lines (corresponds to ASMB's <b>G</b> command line option)</td> </tr> <tr> <td height="8" colspan="2" valign="top"></td> </tr> <tr> <td valign="top"><b>LP1</b></td> <td>print a Pass 1 listing</td> </tr> <tr> <td valign="top"><b>NO1 *</b></td> <td>print Pass 2 listing only</td> </tr> <tr> <td colspan="2" height="8" valign="top"></td> </tr> <tr bgcolor="#f0f0f0"> <td valign="top"><b>DAT</b> *</td> <td>print current date on formatted pages</td> </tr> <tr bgcolor="#f0f0f0"> <td valign="top"><b>NOD</b></td> <td>do not print the current date (corresponds to ASMB's <b>D</b> command line option)</td> </tr> <tr> <td colspan="2" height="8" valign="top"></td> </tr> <tr> <td valign="top"><b>NUM</b></td> <td>print line numbers (corresponds to ASMB's <b>N</b> command line option)</td> </tr> <tr> <td valign="top"><b>NON *</b></td> <td>do not print line numbers</td> </tr> <tr> <td colspan="2" height="8" valign="top"></td> </tr> <tr bgcolor="#f0f0f0"> <td valign="top"><b>INV</b></td> <td>print invisible lines</td> </tr> <tr bgcolor="#f0f0f0"> <td valign="top"><b>NOI *</b></td> <td>do not print invisible lines</td> </tr> <tr> <td colspan="2" height="8" valign="top"></td> </tr> <tr> <td valign="top"><b>TSC</b></td> <td>strict TSC Assembler compatibility</td> </tr> <tr> <td valign="top"><b>NOT *</b></td> <td>accept source code in a much more relaxed format</td> </tr> <tr> <td colspan="2" height="8" valign="top"></td> </tr> <tr bgcolor="#f0f0f0"> <td valign="top"><b>WAR *</b></td> <td>print warnings</td> </tr> <tr bgcolor="#f0f0f0"> <td valign="top"><b>NOW</b></td> <td>only print errors, suppress warnings (corresponds to ASMB's <b>W</b> command line option)</td> </tr> <tr> <td colspan="2" height="8" valign="top"></td> </tr> <tr> <td valign="top"><b>CLL *</b></td> <td>check line length (see the <b>SETLI</b> directive on that)</td> </tr> <tr> <td valign="top"><b>NCL</b></td> <td>do not check line length</td> </tr> <tr> <td colspan="2" height="8" valign="top"></td> </tr> <tr bgcolor="#f0f0f0"> <td valign="top"><b>LFN</b></td> <td>print long file names; on Win32 systems, this causes the file names displayed in warning and error messages to contain the full path name of the corresponding source file.</td> </tr> <tr bgcolor="#f0f0f0"> <td valign="top"><b>NLF *</b></td> <td>do not print long file names</td> </tr> <tr> <td colspan="2" height="8" valign="top"></td> </tr> <tr> <td valign="top"><b>LLL *</b></td> <td>list library file lines</td> </tr> <tr> <td valign="top"><b>NLL</b></td> <td>suppress listing of library file lines</td> </tr> <tr> <td colspan="2" height="8" valign="top"></td> </tr> <tr bgcolor="#f0f0f0"> <td valign="top"><b>GAS</b></td> <td>accept Gnu AS-compatible source codeThis isn't fully implemented yet. At the moment, the only significant difference is that A09 accepts constants in the form <b>0xXXXX</b> (hex), <b> 0bXXXX</b> (binary), <b>0NNN</b> (octal) in addition to the "standard" <b>$</b>,<b>%</b>, or <b>@</b> notation.</td>
</tr> <tr bgcolor="#f0f0f0"> <td valign="top"><b>NOG *</b></td> <td>don't accept Gnu AS-compatible source code</td> </tr> <tr> <td colspan="2" height="8" valign="top"></td> </tr> <tr> <td valign="top"><b>REL *</b></td> <td>print the relocation table if in Relocating Assembler mode</td> </tr> <tr> <td valign="top"><b>NOR</b></td> <td>suppress printing of the relocation table</td> </tr> <tr> <td colspan="2" height="8" valign="top"></td> </tr> <tr bgcolor="#f0f0f0"> <td valign="top"><b>M68|M09 *</b></td> <td>both forms accept Motorola 6809 mnemonics</td> </tr> <tr bgcolor="#f0f0f0"> <td valign="top"><b>H63|H09</b></td> <td>accept Hitachi 6309 mnemonics (still slightly experimental)</td> </tr> <tr bgcolor="#f0f0f0"> <td valign="top"><b>M00|M02|M08</b></td> <td>accept Motorola 6800 mnemonics</td> </tr> <tr bgcolor="#f0f0f0"> <td valign="top"><b>M01|M03</b></td> <td>accept Motorola 6801 mnemonics</td> </tr> <tr bgcolor="#f0f0f0"> <td valign="top"><b>H01|H03</b></td> <td>accept Hitachi 6301 mnemonics (slightly experimental)</td> </tr> <tr bgcolor="#f0f0f0"> <td valign="top"><b>H11</b></td> <td>accept Motorola 68HC11 mnemonics (very experimental)</td> </tr> <tr> <td colspan="2" height="8" valign="top"></td> </tr> <tr> <td valign="top"><b>TXT</b></td> <td>print the text table if text symbols are defined (see <b>TEXT</b> directive)</td> </tr> <tr> <td valign="top"><b>NTX *</b></td> <td>do not print the text table</td> </tr> <tr> <td colspan="2" height="8" valign="top"></td> </tr> <tr bgcolor="#f0f0f0"> <td valign="top"><b>LPA</b></td> <td>print listing in f9dasm patch formatThis option makes it easier to create complex patches to be embedded in images processed by f9dasm</td>
</tr> <tr bgcolor="#f0f0f0"> <td valign="top"><b>NLP *</b></td> <td>don't print listing in f9dasm patch format</td> </tr> <tr> <td colspan="2" height="8" valign="top"></td> </tr> <tr> <td valign="top"><b>DLM</b></td> <td>define label on macro expansion; see <a href="https://github.com/Arakula/A09/issues/1">Issue #1</a> for details. </td> </tr> <tr> <td valign="top"><b>NDL *</b></td> <td>do not define labels on macro expansion</td> </tr>