1 a56 - a DSP5600X assembler
2 ---------------------------------------------------------------------
4 This program was written as a vehicle to learn the intricacies
5 of the DSP56001 instruction set, and to provide a tool for Unix-based
6 DSP code development (for those of us without a NeXT machine.)
8 The intent was to provide compatibility with Motorola assembler's
9 syntax. But since the author did not have Motorola's assembler or its
10 documentation, it is no doubt far from compatible. Only a few
11 pseudo-ops are implemented-- probably only partially.
13 Macros are not supported, except through the use of an external macro
14 preprocessor, such as /lib/cpp. To facilitate cpp macro expansion,
15 multiple assembler statements on a single input line are delimited
18 #define JCHEQ(c,label) move #c,x0 @cmp x0,a @jeq label
20 #define JCHNE(c,label) move #c,x0 @cmp x0,a @jne label
23 The following is a list of the pseudo-ops that are recognized:
25 <symbol> = <expression> ;assign a symbol
26 <label> EQU <expression> ;ditto
28 ALIGN <number> ;set location pointer
32 ORG <space:> <expression> ;new location pointer
33 ORG <space:> <expression>, <space:> <expression>
35 DC <dc_list> ;declare constants
37 DS <number> ;reserve <number>
40 <label> DSM <number> ;reserve space for
48 PAGE <number>, <number>, <number>, <number>
51 INCLUDE <file> ;file inclusion
55 In addition, a "PSECT" pseudo-op was implemented. It allows program
56 sections to be defined and bopped in and out of, each with its own
57 location counter and space. The Motorola assembler probably does not
58 have this pseudo-op, but no doubt supports the concept in some way.
60 PSECT <name> <space:><begin_addr>:<end_addr>
63 PSECT <name> ;switch to psect <name>
66 The assembler probably generates bogus code here and there, and no doubt
67 does not handle all of the syntax. I welcome all comments, fixes and
74 The resulting program, a56, is used as follows:
76 a56 [-b] [-l] [-o output-file] file [...]
78 An assembler listing is sent to the standard-output and an
79 ascii-formatted object file (a56.out) is produced. The "-b" option
80 adds binary to the listing. "-l" causes included files to be listed.
81 "-o" directs the output to the specified file rather than the
84 A separate program, toomf, converts a56.out into "OMF" format
85 suitable for downloading to the 56001 via the sloader.a56 program.
87 toomf < a56.out > file.omf
89 Known bugs/deficiencies:
90 - MOVE to a control reg generates bogus code (always use MOVEC,
94 - Add support for new instructions and modes
101 http://www.zdomain.com/~jensenq/
103 home: jensenq@zdomain.com (preferred address for a56 correspondence)
104 work: jensenq@novell.com
106 Copyright (C) 1990-1998 Quinn C. Jensen
108 Permission to use, copy, modify, distribute, and sell this software
109 and its documentation for any purpose is hereby granted without fee,
110 provided that the above copyright notice appear in all copies and
111 that both that copyright notice and this permission notice appear in
112 supporting documentation. The author makes no representations about
113 the suitability of this software for any purpose. It is provided "as
114 is" without express or implied warranty.