2 a56 - a DSP56001 assembler - version 1.2
5 * Copyright (C) 1990-1994 Quinn C. Jensen
7 * Permission to use, copy, modify, distribute, and sell this software
8 * and its documentation for any purpose is hereby granted without fee,
9 * provided that the above copyright notice appear in all copies and
10 * that both that copyright notice and this permission notice appear
11 * in supporting documentation. The author makes no representations
12 * about the suitability of this software for any purpose. It is
13 * provided "as is" without express or implied warranty.
19 Contributors to V1.2 -
21 Andreas Gustafsson <gson@joker.cs.hut.fi>
22 - Added DS and DSM directives
23 - Generalization of the use of "*" allowing current program counter
24 to be used in any expression (including "org l:*" which is useful
25 for changing spaces without changing the PC)
26 - Noted a bug with MOVEP to a non-symbolic I/O address. I believe
28 - Noted that mispelled argumentless operators will be treated as
29 labels. For example, N0P (N-zero-P) will be treated as a label.
30 Unfortunately, my own use of a56 (i.e. using cpp as the macro
31 pre-processor) complicates this. However, the grammar might
32 have been simpler if the lexical analyzer was able to distinguish
33 between label declarations and references instead of leaving that
34 up to the YACC parser.
36 Tim Channon <tchannon@black.demon.co.uk> and Peter Breuer
38 - Missing ";" in grammar!
40 Rober Ganter <ganter@ifi.unibas.ch>
41 - Fixed bad comment on line 10 of a56.y
43 Me <jensenq@zdomain.com>
44 - Listing now includes psect usage summary
45 - Better checking of movec arguments
46 - Added int(value) function to convert floating point constant expression
47 to integer (by truncation)
48 - Correctly convert a floating -1.0 to 0x800000
49 - Wrote a new lexical analyzer and lexical parser generator
50 - Many other minor enhancements and fixes.
51 - Ported to DOS using DJ Delories' GCC port. (Tools available at
52 ftp://omnigate.clarkson.edu/pub/msdos/djgpp)
54 Known bugs/deficiencies:
56 - MOVE to a control reg generates bogus code (always use MOVEC,
59 The example code this time around includes a full six-comb stereo reverb
60 (based on Moorer). This one sounds a lot better than the four-comb algorithm.
61 Each comb uses a one-pole low-pass filter in the loop. It lacks the
62 early-reflection FIR (although Motorola's rvb2.asm has it) but has
63 true stereo decorrelation by using a twin allpass stage. My old reverb
64 just used inversion to simulate stereo (the whole reverb effect would
65 disappear if you mixed the outputs). I've included only actual reverb
66 code itself. It lacks the hardware-implementation-specific shell.
69 ---------------------------------------------------------------------------
73 This program was written as a vehicle to learn the intricacies
74 of the DSP56001 instruction set, and to provide a tool for Unix-based
75 DSP code development (for those of us without a NeXT machine.)
77 The intent was to provide compatibility with Motorola assembler's syntax.
78 But since the author did not have Motorola's assembler or its documentation,
79 it is no doubt far from compatible. Only a few pseudo-ops are implemented--
80 probably only partially.
82 Macros are not supported, except through the use of an external macro
83 preprocessor, such as /lib/cpp. To facilitate cpp macro expansion, multiple
84 assembler statements on a single input line are delimited with an '@', e.g.:
86 #define JCHEQ(c,label) move #c,x0 @cmp x0,a @jeq label
88 #define JCHNE(c,label) move #c,x0 @cmp x0,a @jne label
93 The following is a list of the pseudo-ops that are recognized:
95 <symbol> = <expression> ;assign a symbol
96 <label> EQU <expression> ;ditto
98 ALIGN <number> ;set location pointer
100 ;multiple of <number>
102 ORG <space:> <expression> ;new location pointer
103 ORG <space:> <expression>, <space:> <expression>
105 DC <dc_list> ;declare constants
107 DS <number> ;reserve <number>
110 <label> DSM <number> ;reserve space for
115 ;the aligned starting
118 PAGE <number>, <number>, <number>, <number> ;ignored
120 INCLUDE <file> ;file inclusion
124 In addition, a "PSECT" pseudo-op was implemented. It allows program sections
125 to be defined and bopped in and out of, each with its own location counter and
126 space. The Motorola assembler probably does not have this pseudo-op, but no
127 doubt supports the concept in some way.
129 PSECT <name> <space:><begin_addr>:<end_addr> ;define
131 PSECT <name> ;switch to psect <name>
136 The assembler probably generates bogus code here and there, and no doubt
137 does not handle all of the syntax. I welcome all comments, fixes and
144 The resulting program, a56, is used as follows:
146 a56 [-b] [-l] [-o output-file] file [...]
148 An assembler listing is sent to the standard-output and an ascii-formatted
149 object file (a56.out) is produced. The "-b" option adds binary to the listing.
150 "-l" causes included files to be listed. "-o" directs the output to the
151 specified file rather than the default, a56.out.
153 A separate program, toomf, converts a56.out into "OMF" format suitable for
154 downloading to the 56001 via the sloader.a56 program.
156 toomf < a56.out > file.omf
168 home: jensenq@zdomain.com (preferred address for a56 correspondence)
169 work: jensenq@novell.com