Add missing prototypes for alloc() and fixstring()
[a56.git] / README-1.2
1
2   a56 - a DSP56001 assembler - version 1.2
3
4 /*
5  * Copyright (C) 1990-1994 Quinn C. Jensen
6  *
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.
14  *
15  */
16
17 V1.2 CHANGES
18
19 Contributors to V1.2 -
20
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
27         this is now fixed.
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.
35
36     Tim Channon <tchannon@black.demon.co.uk> and Peter Breuer
37       <ptb@comlab.ox.ac.uk>
38       - Missing ";" in grammar!
39
40     Rober Ganter <ganter@ifi.unibas.ch>
41       - Fixed bad comment on line 10 of a56.y
42
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)
53
54 Known bugs/deficiencies:
55
56         - MOVE to a control reg generates bogus code (always use MOVEC,
57           MOVEM, and MOVEP)
58
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.
67
68
69 ---------------------------------------------------------------------------
70
71 OVERVIEW
72
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.)
76
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.
81
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.:
85
86         #define JCHEQ(c,label)  move #c,x0 @cmp x0,a @jeq label
87
88         #define JCHNE(c,label)  move #c,x0 @cmp x0,a @jne label
89
90
91 SUPPORTED PSEUDO-OPS
92
93 The following is a list of the pseudo-ops that are recognized:
94
95         <symbol> = <expression>                         ;assign a symbol
96         <label> EQU <expression>                        ;ditto
97
98         ALIGN <number>                                  ;set location pointer
99                                                         ;to next integral
100                                                         ;multiple of <number>
101
102         ORG <space:> <expression>                       ;new location pointer
103         ORG <space:> <expression>, <space:> <expression>
104
105         DC <dc_list>                                    ;declare constants
106
107         DS <number>                                     ;reserve <number>
108                                                         ;words of space
109
110         <label> DSM <number>                            ;reserve space for
111                                                         ;properly aligned
112                                                         ;modulo-addressed
113                                                         ;buffer of size
114                                                         ;<number>, assigning
115                                                         ;the aligned starting
116                                                         ;address to <label>
117
118         PAGE <number>, <number>, <number>, <number>     ;ignored
119
120         INCLUDE <file>                                  ;file inclusion
121
122         END                                             ;end
123
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.
128
129         PSECT <name> <space:><begin_addr>:<end_addr>    ;define
130
131         PSECT <name>                                    ;switch to psect <name>
132
133
134 FUTURE DIRECTION
135
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 
138 enhancements.
139
140 TO MAKE AND USE
141
142 Type "make".
143
144 The resulting program, a56, is used as follows:
145
146         a56 [-b] [-l] [-o output-file] file [...]
147
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.
152
153 A separate program, toomf, converts a56.out into "OMF" format suitable for 
154 downloading to the 56001 via the sloader.a56 program.
155
156         toomf < a56.out > file.omf
157
158 AUTHOR
159
160 11/28/91
161 v1.1 8/6/92
162 v1.2 5/2/94
163
164 Quinn C. Jensen
165 1374 N 40 E
166 Orem, UT  84057
167
168 home: jensenq@zdomain.com (preferred address for a56 correspondence)
169 work: jensenq@novell.com