2 a56 - a DSP56001 assembler - version 1.1
5 * Copyright (C) 1990-1992 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 Many thanks to Tom Cunningham at Motorola who noted several bugs, fixing
20 most of them. Thanks also to Stephen Edwards at CalTech for his fixes as well.
21 Both he and Tom fixed up the XY parallel move code; I believe all the
24 Summary of changes since v1.0:
26 - Jcc, JScc, Tcc recognizes "CC" synonym for "HS" (Tom)
27 - LUA syntax fixed (Tom, Stephen)
28 - DIV syntax fixed (Tom)
29 - XY move fixed (Tom, Stephen)
30 - a56 now detects phase errors (changes in symbol values
32 - several causes of phase errors fixed
33 - immediate value handling improved for both integer and
35 - symbols have type (INT or FLOAT)
36 - cpp droppings are properly handled
37 - ALIGN pseudo-op added
39 Known bugs/deficiencies:
41 - MOVE to a control reg generates bogus code (always use MOVEC,
44 The example code has been cleaned up a bit and I've included my
45 56K board's envelope code - tdsg.basic.a56. This code is specific to
48 A note on the reverb code - I have since found since posting version 1.0
49 that the reverb code has a great-big almost-DC bumb in its impulse
50 response. I found this after doing some simulations. I suspected something
51 was wrong because I had to scale the output of the comb filters by .046
52 or something before going into the two all-pass stages. Overall I think it
53 works better without the 1.7 ms all-pass. There's another reverb example
54 on Dr. Bubb that fits Moorer's 1979 model better. I've included this in
55 the examples but I have not yet assembled or tried it.
59 This program was written as a vehicle to learn the intricacies
60 of the DSP56001 instruction set, and to provide a tool for Unix-based
61 DSP code development (for those of us without a NeXT machine.)
63 The intent was to provide compatibility with Motorola assembler's syntax.
64 But since the author did not have Motorola's assembler or its documentation,
65 it is no doubt far from compatible. Only a few pseudo-ops are implemented--
66 probably only partially.
68 Macros are not supported, except through the use of an external macro
69 preprocessor, such as /lib/cpp. To facilitate cpp macro expansion, multiple
70 assembler statements on a single input line are delimited with an '@', e.g.:
72 #define JCHEQ(c,label) move #c,x0 @cmp x0,a @jeq label
74 #define JCHNE(c,label) move #c,x0 @cmp x0,a @jne label
79 The following is a list of the pseudo-ops that are recognized:
81 <symbol> = <expression> ;assign a symbol
83 ALIGN <number> ;set location pointer
87 ORG <space:> <expression> ;new location pointer
88 ORG <space:> <expression>, <space:> <expression>
90 DC <dc_list> ;declare constants
92 PAGE <number>, <number>, <number>, <number> ;ignored
94 INCLUDE <file> ;file inclusion
98 In addition, a "PSECT" pseudo-op was implemented. It allows program sections
99 to be defined and bopped in and out of, each with its own location counter and
100 space. The Motorola assembler probably does not have this pseudo-op, but no
101 doubt supports the concept in some way.
103 PSECT <name> <space:><begin_addr>:<end_addr> ;define
105 PSECT <name> ;switch to psect <name>
110 The assembler probably generates bogus code here and there, and no doubt
111 does not handle all of the syntax. I welcome all comments, fixes and
116 Type "make". gram.c and lex.yy.c are provided for those without yacc
117 (or bison) and/or lex.
119 The resulting program, a56, is used as follows:
121 a56 [-b] [-l] [-o output-file] file [...]
123 An assembler listing is sent to the standard-output and an ascii-formatted
124 object file (a56.out) is produced. The "-b" option adds binary to the listing.
125 "-l" causes included files to be listed. "-o" directs the output to the
126 specified file rather than the default, a56.out.
128 A separate program, toomf, converts a56.out into "OMF" format suitable for
129 downloading to the 56001 via the sloader.a56 program.
131 toomf < a56.out > file.omf
142 home: jensenq@zdomain.com (preferred address for a56 correspondence)
143 work: jensenq@novell.com